Skip to content

tcg/optimize: rework copy propagation

Aurelien Jarno qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest10 patches 8 repliesIn review
  2. v19 patches 12 repliesSuperseded

Changes in v2 from the cover letter

- fixed conflict in patch 3 following movcond introduction
- movcond optimization added in patch 7
- added patch 10

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10tcg/optimize: remove TCG_TEMP_ANYtcg/optimize.c+5 -60 replies
2/10tcg/optimize: check types in copy propagationtcg/optimize.c+8 -100 replies
3/10tcg/optimize: rework copy progagationtcg/optimize.c+92 -750 replies
4/10tcg/optimize: do copy propagation for all operationstcg/optimize.c+9 -20 replies
5/10tcg/optimize: optimize "op r, a, a => mov r, a"tcg/optimize.c+1 -10 replies
6/10tcg/optimize: optimize "op r, a, a => movi r, 0"tcg/optimize.c+16 -00 replies
7/10tcg/optimize: further optimize brcond/movcond/setcondtcg/optimize.c+76 -513 replies
8/10tcg/optimize: prefer the "op a, a, b" form for commutative opstcg/optimize.c+4 -10 replies
9/10tcg: remove #ifdef #endif around TCGOpcode teststcg/tcg.c+1 -120 replies
10/10tcg/optimize: add constant folding for deposittcg/optimize.c+20 -04 replies

Reviews trailers per patch

6 of 10 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchRichard Henderson
SeriesR-b
1/10R-b
2/10
3/10R-b
4/10R-b
5/10R-b
6/10R-b
7/10
8/10
9/10R-b
10/10

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [Qemu-devel] [PATCH v2 00/10] tcg/optimize: rework copy propagation

This patch series rework the copy propagation in order to generate better code. The first two patches are cleanup and bug fixes, the third patch is the heart of the series, and the remaining ones are small optimizations using the new copy propagation.

I have measured a decrease of the generated code size of about 4%, with a gain in speed between 0 and 2% depending on the workload.

For better benefits in ARM emulation, it should be used with the setcond patches series I have sent a few days ago.

--
Changes v1 -> v2
- fixed conflict in patch 3 following movcond introduction
- movcond optimization added in patch 7
- added patch 10

Aurelien Jarno (10):
tcg/optimize: remove TCG_TEMP_ANY
tcg/optimize: check types in copy propagation tcg/optimize: rework copy progagation
tcg/optimize: do copy propagation for all operations tcg/optimize: optimize "op r, a, a => mov r, a" tcg/optimize: optimize "op r, a, a => movi r, 0" tcg/optimize: further optimize brcond/movcond/setcond tcg/optimize: prefer the "op a, a, b" form for commutative ops
tcg: remove #ifdef #endif around TCGOpcode tests tcg/optimize: add constant folding for deposit

 tcg/optimize.c |  361 ++++++++++++++++++++++++++++++++++----------------------
 tcg/tcg.c      |   13 +-
 2 files changed, 224 insertions(+), 150 deletions(-)
Signature · 1 line
1.7.10.4