J. Gareth "Curious Kit" Moreton
6757bf3832
* x86: New SHR-based optimisations
2022-09-16 16:57:55 +00:00
J. Gareth "Curious Kit" Moreton
de650dea55
* x86: Fixed minor logic bug in aoc_ForceNewIteration check where UpdateUsedRegs was called at the wrong time.
2022-07-27 16:26:07 +01:00
J. Gareth "Curious Kit" Moreton
9432a550e1
* x86: Bug fix where aoc_ForceNewIteration was
...
checked in the wrong pass.
2022-07-23 12:58:20 +00:00
J. Gareth "Curious Kit" Moreton
627fb9a25b
* x86: New jump/label tracking in CrossJump optimisations
2022-04-24 16:42:35 +00:00
florian
4808ed63e3
* use MOVDQA instead of MOVQ in spilling_create_store
...
* call OptPass1_V_MOVAP for MOVDQA
2022-04-19 22:35:02 +02:00
J. Gareth "Curious Kit" Moreton
72661fd5c1
Added missing MOVSXD check to PostPeepHoleOptsCpu
2021-12-09 02:15:55 +00:00
J. Gareth "Curious Kit" Moreton
b58fdc3e58
Improved ADD and SUB optimisations for LEA instructions
2021-10-31 15:44:00 +00:00
J. Gareth "Curious Kit" Moreton
fd28cc0db0
Better handling of zeroing upper parts of registers
...
Better handling of zeroing upper parts of registers
2021-10-16 14:42:19 +02:00
J. Gareth "Curious Kit" Moreton
674ed4069a
Expanded MM block move to include YMM registers under AVX
2021-10-16 14:17:41 +02:00
florian
ec40db3da7
+ (V)Cvtss2CvtSd(V)Cvtsd2ss2Nop optimization, resolves #39360
2021-10-06 21:57:24 +02:00
florian
c67d35b8cc
* patch by J. Gareth Moreton: x86: Minor bitwise optimisations, resolves #39299
...
git-svn-id: trunk@49614 -
2021-07-16 21:47:36 +00:00
florian
7d6b01bfc4
+ SHXXMov2SHXX optimization
...
git-svn-id: trunk@49579 -
2021-07-05 21:07:46 +00:00
florian
bae583118a
* patch by J. Gareth Moreton: x86 JccMovJmpMov2MovSetcc improvement, resolves #38761
...
git-svn-id: trunk@49402 -
2021-05-26 21:03:56 +00:00
florian
5726428dcc
* patch by J. Gareth Moreton: Additional SETcc optimisations, resolves #38767
...
git-svn-id: trunk@49386 -
2021-05-21 20:36:15 +00:00
florian
578424cf51
* patch by J. Gareth Moreton: TEST chain shortcutting, resolves #38908
...
git-svn-id: trunk@49385 -
2021-05-20 20:45:38 +00:00
florian
4e9b42344e
+ AddLea2Lea optimization
...
* improved LeaLea2Lea
git-svn-id: trunk@48116 -
2021-01-08 22:22:56 +00:00
florian
28efcfba65
+ patch by J. Gareth Moreton: Advanced MOVZX optimisations, resolves #38294
...
git-svn-id: trunk@48086 -
2021-01-05 15:15:41 +00:00
florian
2a990b8167
+ patch by J. Gareth Moreton: some new x86 assembler optimizations, resolves #38130
...
git-svn-id: trunk@47824 -
2020-12-20 18:05:43 +00:00
florian
b90ec52a0e
* x86: apply VOpVmov2VOp optimization to vmins*/vmaxs*
...
git-svn-id: trunk@47768 -
2020-12-13 09:52:45 +00:00
florian
78244d89dc
* use VPXORD in avx-512 mode as VPXOR does not work for the upper 16 registers
...
git-svn-id: trunk@47368 -
2020-11-09 21:21:36 +00:00
florian
8e62bf649e
* load 0.0 by (V)XORPS/D instead of (V)PXOR in mm registers
...
git-svn-id: trunk@47073 -
2020-10-10 13:23:35 +00:00
florian
1fb7603f61
* x86: ImulMov2Imul optimization
...
* x86: apply OptPass1VOP also to vsqrts*
git-svn-id: trunk@46955 -
2020-09-25 20:06:27 +00:00
florian
afb68dbcf3
* factored out OptPass1VPXor
...
git-svn-id: trunk@45487 -
2020-05-24 17:52:07 +00:00
florian
809fb83334
* adapt optimizer to handle push/pop for stack alignment
...
* adapt test
git-svn-id: trunk@45477 -
2020-05-23 17:50:14 +00:00
florian
9b54588d75
+ PXorPXor2PXor optimization
...
git-svn-id: trunk@45430 -
2020-05-18 21:28:45 +00:00
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