florian
892454ff17
* patch by J. Gareth Moreton: optimize MOVSXD as well, resolves #36700
...
git-svn-id: trunk@44185 -
2020-02-15 20:53:40 +00:00
florian
993144b91b
* patch by J. Gareth Moreton: x86 SUB and LEA optimisations, resolves #36622
...
git-svn-id: trunk@44030 -
2020-01-24 21:10:17 +00:00
florian
16152cf948
* patch by J. Gareth Moreton: get rid of another pass through the assembler list by integrating OptReferences
...
into the post optimizer pass
git-svn-id: trunk@44001 -
2020-01-19 20:11:05 +00:00
florian
124c64152d
* patch by J. Gareth Moreton: EAX -> EDX:EAX sign extension shortcuts, and MOVSX shortcuts for AX register, part 2 of #36551
...
git-svn-id: trunk@43918 -
2020-01-12 09:20:01 +00:00
florian
d444f750f9
* factored out TX86AsmOptimizer.OptPass1Cmp
...
* fixed it
* activated it for x86-64
git-svn-id: trunk@43574 -
2019-11-24 16:33:50 +00:00
florian
20a47afe13
* more aggressive LeaCallLeaRet2Jmp
...
git-svn-id: trunk@43373 -
2019-11-02 22:37:31 +00:00
florian
3487c34ed9
* unified TX86AsmOptimizer.OptPass1MOVAP and TX86AsmOptimizer.OptPass1VMOVAP
...
git-svn-id: trunk@43370 -
2019-11-02 18:48:23 +00:00
Jonas Maebe
281b3ad276
* fix case completeness and unreachable code warnings in compiler that would
...
be introduced by the next commit
git-svn-id: trunk@42046 -
2019-05-12 14:29:03 +00:00
florian
c7bb028d35
* factored out OptPass1FLD, used bx x86-64 now as well
...
- removed unused function
git-svn-id: trunk@41061 -
2019-01-24 20:10:29 +00:00
florian
24f6cc0da5
* factored out OptPass1FSTP, used by x86-64 now as well
...
git-svn-id: trunk@41059 -
2019-01-24 19:38:32 +00:00
florian
59d5d6ec95
+ factored out TX86AsmOptimizer.PrePeepholeOptIMUL, used now by x86-64 and i386
...
* generalized and simplified the code
git-svn-id: trunk@40162 -
2018-11-01 20:49:20 +00:00
florian
78943ea843
+ patch by J. Gareth Moreton: x86 optimisations for Jcc and SETcc, resolves #33899
...
* optimization also added for i386
git-svn-id: trunk@39307 -
2018-06-25 20:40:05 +00:00
florian
9b18e39c81
* enable Lea2AddBase and Lea2AddIndex in TX86AsmOptimizer.PostPeepholeOptLea as we have flag tracking now
...
* some flag allocations fixed
git-svn-id: trunk@38501 -
2018-03-11 20:30:09 +00:00
florian
5fbecc5501
+ use TX86AsmOptimizer.OptPass1SHLSAL on x86-64
...
git-svn-id: trunk@38499 -
2018-03-11 14:35:22 +00:00
florian
91514da267
* factored out TX86AsmOptimizer.PostPeepholeOptCall
...
+ use TX86AsmOptimizer.PostPeepholeOptCall on x86-64
git-svn-id: trunk@38278 -
2018-02-17 23:25:01 +00:00
florian
31f78ea2b6
+ implementation of the vectorcall calling convention by J. Gareth Moreton
...
+ tests
git-svn-id: trunk@38206 -
2018-02-11 17:50:37 +00:00
florian
810acd82b2
* patch by J. Gareth Moreton that makes some improvements to the Peephole Optimizer for x86 and x86-64 code, as well as some cleanup with formatting, code syntax consistency, and debug messages.
...
- xorq %reg,%reg (identical registers) is now changed to xorl %reg,%reg if doing so removes the REX prefix.
- movw %bx,%ax; andl $0xffff,%eax, for example, is now changed to movzwl %bx,%eax as long as a conditional operation doesn't follow 'and' (checks to see if the CPU flags are in use).
- movzbq and movzwq get optimised to movzbl and movzwl respectively if doing so removes the REX prefix.
- Removal of optimisation code that zero-extends from 32-bit to 64-bit, because there isn't actually a valid combination of opcodes for MOVZX that allows that (for registers,
just use MOV). This is not the case with MOVSX.
- movq is now optimised to movl even if the CPU flags are in use (this stops mov %reg,0 from being optimised to xor %reg,%reg if doing so breaks an algorithm that relies on them).
- Fixed typo in peephole message regarding movq to movl (it said movd instead).
- Made the peephole debug messages more consistent in formatting, some of which now have more detail.
* small fixes of the patch
git-svn-id: trunk@38070 -
2018-01-28 14:41:54 +00:00
florian
73fda1ccb6
* factored out OptPass1Sub
...
+ make use of OptPass1Sub on x86_64 and i8086 as well
git-svn-id: trunk@37572 -
2017-11-10 20:55:22 +00:00
florian
4da4b768ec
* factored out PostPeepholeOptTest
...
+ use PostPeepholeOptTest on x86-64
git-svn-id: trunk@37551 -
2017-11-04 19:10:14 +00:00
florian
3097eaf8ee
* made PostPeepholeOptMov a function
...
git-svn-id: trunk@37550 -
2017-11-04 19:10:12 +00:00
florian
a7ea7fb569
* factored out PostPeepholeOptCmp
...
+ use PostPeepholeOptCmp for x86_64
git-svn-id: trunk@37549 -
2017-11-04 19:10:09 +00:00
nickysn
80226e3af4
+ added an optimization pass, that optimizes x86 references
...
git-svn-id: trunk@37494 -
2017-10-20 15:55:55 +00:00
florian
15b617546e
+ call TX86AsmOptimizer.OptPass1VOP for logical operations as well
...
git-svn-id: trunk@37367 -
2017-10-01 14:40:21 +00:00
florian
05ecd784f2
* factored out OptPass1LEA and use it for x86-64 as well
...
+ LEAMov2LEA optimization
git-svn-id: trunk@37199 -
2017-09-13 20:40:32 +00:00
florian
22956c4393
+ TX86AsmOptimizer.OptPass1OP
...
git-svn-id: trunk@36365 -
2017-05-28 13:49:43 +00:00
florian
0f16f6d94d
+ OptPass1MOVXX
...
git-svn-id: trunk@36209 -
2017-05-14 20:59:10 +00:00
florian
535c990233
+ OptPass1MOVAP
...
git-svn-id: trunk@36203 -
2017-05-13 21:48:44 +00:00
florian
b1dff29cbf
* removed unused units
...
git-svn-id: trunk@36165 -
2017-05-09 19:53:14 +00:00
florian
52d3756c26
* factored out OptPass1Movx and merged i386 and x86-64 version
...
git-svn-id: trunk@36159 -
2017-05-08 20:44:27 +00:00
florian
06c4c651fd
* factored out PrePeepholeOptSxx
...
+ x86-64 uses PrePeepholeOptSxx now as well
git-svn-id: trunk@36158 -
2017-05-08 20:44:24 +00:00
florian
4a43d992f5
* unified usage of MatchOpType
...
* fixed generic MatchOpType
git-svn-id: trunk@36145 -
2017-05-07 16:18:33 +00:00
florian
7afe762d22
* factored out OptPass2Jcc assembler optimization
...
* OptPass2Jcc now used by x86-64 as well
* remove orphaned alignments if the label is not used anymore after cmov is used
git-svn-id: trunk@36143 -
2017-05-07 12:45:48 +00:00
florian
e3f0b338d4
* SkipLabels moved to aoptutils
...
* factored out OptPass2Jmp assembler optimization
* OptPass2Jmp now used by x86-64 as well
git-svn-id: trunk@36141 -
2017-05-06 21:07:02 +00:00
florian
f68558b88c
* factored out TX86AsmOptimizer.OptPass2Imul
...
git-svn-id: trunk@35252 -
2017-01-06 22:25:24 +00:00
yury
649823a246
* Removed unused vars.
...
git-svn-id: trunk@34405 -
2016-09-01 20:01:54 +00:00
florian
a5fc8b629a
* factored out OptPass1AND from x86-64 and moved it to aoptx86
...
git-svn-id: trunk@33934 -
2016-06-07 20:01:09 +00:00
florian
5e8e21c1be
* factored out OpPass2MOV code, x86-64 uses it as well now
...
git-svn-id: trunk@33932 -
2016-06-06 21:18:24 +00:00
florian
4758271c91
* x86-64 uses OptPass1MOV
...
git-svn-id: trunk@33931 -
2016-06-06 21:18:23 +00:00
florian
e56147ac6e
* integrated mov op mov -> op optimization in aoptx86
...
* isFoldableArithOp is in aoptx86 now
git-svn-id: trunk@33928 -
2016-06-06 21:18:18 +00:00
florian
20807f4148
* factored out V<Op> optimizations into OptPass1VOP
...
* call OptPass1VOP also for i386
git-svn-id: trunk@33878 -
2016-06-01 20:49:35 +00:00
florian
bd54a11f1c
+ TX86AsmOptimizer.OptPass1VMOVAP for i386 and x86-64
...
+ new unit aoptutils which helpers for the assembler optimizer
git-svn-id: trunk@33587 -
2016-05-01 09:37:21 +00:00
florian
ec92bc3390
* case of identifiers fixed
...
* x86-64 uses also the mov $0,... -> xor optimization
git-svn-id: trunk@33553 -
2016-04-24 20:01:43 +00:00
florian
3c2dab9878
* i386 peephole assembler uses largely the common peephole optimizer infrastructure, the resulting code is besides a few improvements the same
...
git-svn-id: trunk@33542 -
2016-04-21 20:14:01 +00:00
florian
f634387394
+ implement TCpuAsmOptimizer.RegLoadedWithNewValue for x86-64, resolves issue #29527
...
git-svn-id: trunk@33525 -
2016-04-15 21:27:06 +00:00
florian
53ea4fb7d4
* unify x86 peephole optimizer helpers
...
git-svn-id: trunk@31843 -
2015-09-27 09:36:39 +00:00
yury
47b316d0e2
* Removed unused vars for x86-64 compiler.
...
git-svn-id: trunk@31744 -
2015-09-17 15:26:31 +00:00
florian
2fa066b003
* optimize vmovaps/vmovapd after avx instructions
...
git-svn-id: trunk@27712 -
2014-05-01 19:20:35 +00:00
florian
0e5cf6529e
+ peephole optimizations AndMovzToAnd, MovMov2Mov1 and MovMov2MovMov1 for x86-64
...
git-svn-id: trunk@27181 -
2014-03-18 21:54:42 +00:00
florian
53c39d5420
* fixes peephole optimizer problems with -O3 on x86-64
...
git-svn-id: trunk@21288 -
2012-05-13 19:19:04 +00:00
pierre
bf1690458a
Partial fix for x86_64 peephole optimization
...
git-svn-id: trunk@21022 -
2012-04-24 15:38:07 +00:00