Commit Graph

101 Commits

Author SHA1 Message Date
J. Gareth "Curious Kit" Moreton
47825610b8 * Pass 2 can now be run multiple times when
under -O3 and above.
2023-11-05 10:03:52 +00:00
J. Gareth "Curious Kit" Moreton
b8933dd267 * x86: Some refactoring to use aoc_ForceNewIteration instead of manually advancing p 2023-03-04 18:40:27 +00:00
J. Gareth "Curious Kit" Moreton
3cf8ae8433 * x86: New XOR->BTC peephole optimisation 2022-11-15 21:10:47 +00:00
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
fab610a927 * call OptPass1_V_MOVAP for MOVDQA on i386 2022-04-19 22:35:02 +02: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
2c180cf101 * by default, DEBUG_AOPTCPU is only enabled if the compiler is compiled with -dEXTDEBUG 2021-10-10 15:35:38 +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
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
c2684c0dc3 * use V* instructions if possible
* fix i386 compilation

git-svn-id: trunk@47076 -
2020-10-10 13:50:35 +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
9b54588d75 + PXorPXor2PXor optimization
git-svn-id: trunk@45430 -
2020-05-18 21:28:45 +00:00
yury
1b3a3a7983 * Removed lot of unused local vars. It is useful to turn on the notes in options. :)
git-svn-id: trunk@44053 -
2020-01-28 18:45:33 +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
svenbarth
0149d26adb * in PeepHoleOptPass1Cpu when an instruction contains a segment, don't replace the current instruction with the next, cause then we get an infinite loop when compiling on Win32 with -dTEST_WIN32_SEH -O4
git-svn-id: trunk@43704 -
2019-12-20 16:44:54 +00:00
florian
9e307f5c3a - removed code not used for years
git-svn-id: trunk@43575 -
2019-11-24 19:50:27 +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
dea1855126 o patch by J. Gareth Moreton, resolves #36352:
* The supplied patch cleans up some vestigial code from the i386 peephole
      optimizer that has since been superseded by the jump optimisations over
      at #36271.
    * The PrePeepholeOptsCPU method has had a minor restructuring to better
      handle the rare case where InsContainsSegRef() returns True and
      p becomes something that is no longer an instruction (it ultimately
      removes a conditonal check and some overhead from repeated function calls).

git-svn-id: trunk@43573 -
2019-11-24 16:12:02 +00:00
pierre
c882828fd0 Minimalist change to avoid Invalid Typecast error on class when compiled with '-CriotR -O2' for i386-go32v2 target
git-svn-id: trunk@43565 -
2019-11-23 22:44:30 +00:00
florian
87b3b089d6 * i386: more clean up of TCPUAsmOPtimizer.PeepHoleOptPass1Cpu
git-svn-id: trunk@43465 -
2019-11-14 21:26:48 +00:00
florian
632f13c47a * i386 does not use anymore its own assembler optimizer loops
git-svn-id: trunk@43464 -
2019-11-14 21:14:01 +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
1b6425176b * synchronised with trunk till r42049
git-svn-id: branches/debug_eh@42050 -
2019-05-12 18:44:05 +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
Jonas Maebe
5d28e2156b + support for generating Dwarf CFI using .cfi_* directives
o adjust peephole optimisers so they don't remove cfi_endproc directives
     in case of tail call optimisation

git-svn-id: branches/debug_eh@41578 -
2019-03-03 17:15:03 +00:00
yury
a277a5f8db * Removed unused local vars.
git-svn-id: trunk@41457 -
2019-02-25 11:22:49 +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
e8ebc00b3b * redundant code removed, work is meanwhile done by aasmcpu.optimize_ref
git-svn-id: trunk@40282 -
2018-11-11 17:32:21 +00:00
florian
72416edcc4 + support for tlsm_general on i386-linux
git-svn-id: trunk@40281 -
2018-11-11 17:32:20 +00:00
yury
30d64cec68 * Removed unused local vars.
git-svn-id: trunk@40185 -
2018-11-02 18:51:19 +00:00
yury
4357caaad8 * Removed unused local vars.
git-svn-id: trunk@40183 -
2018-11-02 18:44:29 +00:00