Commit Graph

189 Commits

Author SHA1 Message Date
florian
6cac8cc77b * fix Peephole Optimization: Cmpcc2Testcc - condition AE/NB/NC/NO --> Always optimization
git-svn-id: trunk@44271 -
2020-03-06 16:16:38 +00:00
florian
8f0376c888 + JccAdd2SetccAdd optimization
* take care of C_C/C_NC in JccAdd/Inc/Dec2(Cmc)Adc/Sbb

git-svn-id: trunk@44268 -
2020-03-06 15:47:18 +00:00
florian
cea7723080 * more use of RemoveCurrentP(p)
git-svn-id: trunk@44264 -
2020-03-05 21:49:36 +00:00
florian
f42b0bf6f5 * fixed JccAdd/Inc/Dec2*Adc/Sbb optimizations
git-svn-id: trunk@44254 -
2020-03-01 21:21:18 +00:00
florian
34be9e4643 * CallRet2* optimization may not misalign the stack, reported by C Western on fpc-devel
git-svn-id: trunk@44253 -
2020-03-01 09:37:09 +00:00
florian
9bdfbc2473 + GetNextInstructionUsingRegTrackingUse
* better MovAnd2Mov optimization
  + TOptsToCheck to track expensive optimizations, needs more work

git-svn-id: trunk@44241 -
2020-02-23 21:47:47 +00:00
florian
a357359971 * LeaCallLeaRet2Jmp is done in TX86AsmOptimizer.PostPeepholeOptLea
git-svn-id: trunk@44240 -
2020-02-23 21:21:40 +00:00
florian
2acc6337d8 * debug statement removed
git-svn-id: trunk@44234 -
2020-02-22 22:38:36 +00:00
florian
4dff373fef * (modified) patch by J. Gareth Moreton: processor-aware MOVZX optimisation cleanup, resolves #36687
git-svn-id: trunk@44233 -
2020-02-22 18:37:38 +00:00
florian
49f789b92a * reverted accidently committed changes again
git-svn-id: trunk@44218 -
2020-02-19 21:12:23 +00:00
florian
95e8992e2f + AArch64: profiler support for aarch64-linux
git-svn-id: trunk@44216 -
2020-02-19 21:10:19 +00:00
florian
3099e10f41 * revert accidently committed code
git-svn-id: trunk@44205 -
2020-02-17 20:12:53 +00:00
florian
e50c4f6373 + AAarch64: optimize divisions by constant
git-svn-id: trunk@44204 -
2020-02-17 20:11:32 +00:00
florian
88836b467e * (V)MOVA*(V)MOVS*2(V)MOVS* 1 optimization
git-svn-id: trunk@44194 -
2020-02-16 16:43:26 +00:00
florian
42324235bd + CallRet2Call optimization
git-svn-id: trunk@44192 -
2020-02-16 13:15:12 +00:00
florian
3279e63351 * patch by J. Gareth Moreton: cleanup TX86AsmOptimizer.OptPass2MOV after DeepMov changes, second part of #36670
git-svn-id: trunk@44166 -
2020-02-13 20:53:39 +00:00
florian
3a5eb0ec59 * patch by J. Gareth Moreton: cleanup TX86AsmOptimizer.OptPass1MOV after DeepMov changes, first part of #36670
git-svn-id: trunk@44164 -
2020-02-13 20:20:10 +00:00
florian
f632e2e7be * simplified TX86AsmOptimizer.OptPass1Movx
git-svn-id: trunk@44162 -
2020-02-12 20:23:06 +00:00
florian
21565c2284 * fixed Mov2Movz optimization
git-svn-id: trunk@44161 -
2020-02-12 19:26:52 +00:00
florian
c6350e2903 * patch by J. Gareth Moreton: processor-aware MOVZX optimisation cleanup, part one of #36687
git-svn-id: trunk@44153 -
2020-02-11 20:56:20 +00:00
florian
e7d2c93ca7 * patch by J. Gareth Moreton: deadstore removal improvement, resolves #36669
git-svn-id: trunk@44147 -
2020-02-10 20:48:45 +00:00
florian
12d015a935 * patch by J. Gareth Moreton: CMOV extensions: frame/stack pointer relative references are always valid, resolves #36675
git-svn-id: trunk@44141 -
2020-02-09 17:39:50 +00:00
florian
bbcbd4eae1 * patch by J. Gareth Moreton, avoid illegal MovAdd2Lea and MovSub2Lea optimziations, resolves #36630
git-svn-id: trunk@44101 -
2020-02-02 19:49:47 +00:00
florian
2ea35e55b1 * patch by J. Gareth Moreton: x86 "OptPass1MOV" improvements - Part 2, resolves #36608
git-svn-id: trunk@44086 -
2020-02-01 21:31:56 +00:00
florian
43c83b3ae6 * improve LeaLea2Lea optimization
git-svn-id: trunk@44058 -
2020-01-29 21:35:26 +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
a807e18591 * patch by J. Gareth Moreton: x86 CMP/TEST/Jcc optimisations, resolves #36624
git-svn-id: trunk@44029 -
2020-01-24 20:41:11 +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
5a1e6c2e91 * compilation on i386 fixed
git-svn-id: trunk@43920 -
2020-01-12 12:00:44 +00:00
florian
2b70c64d09 * patch by J. Gareth Moreton: Some cleaning up of OptPass2JMP and OptPass2MOV, resolves #36553
git-svn-id: trunk@43919 -
2020-01-12 10:33:21 +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
236c11ef71 * patch by J. Gareth Moreton: EAX -> EDX:EAX sign extension shortcuts, and MOVSX shortcuts for AX register, part 1 of #36551
git-svn-id: trunk@43917 -
2020-01-12 09:20:00 +00:00
florian
3dd6a8e24e * add forgotten exits, fixes r43874
git-svn-id: trunk@43877 -
2020-01-06 19:53:43 +00:00
florian
92671c9b85 o patch by J. Gareth Moreton:
* applies some optimisations to OptPass1MOV. Repeated checks to the "GetNextInstruction_p Boolean"
      variable are factored out, since all of the optimisations bar the first one require a
      succeeding instruction.

git-svn-id: trunk@43875 -
2020-01-06 17:05:48 +00:00
florian
9b68c7a5f5 * fix X86AsmOptimizer.RegModifiedByInstruction for VMOVSS/VMOVSD/IMUL
git-svn-id: trunk@43874 -
2020-01-06 17:05:47 +00:00
florian
76e7833a20 * avoid invalid type cast
git-svn-id: trunk@43865 -
2020-01-05 15:43:04 +00:00
florian
d3f3f81e16 * fixes TX86AsmOptimizer.OptPass1_V_MOVAP after r43855
git-svn-id: trunk@43864 -
2020-01-05 15:43:03 +00:00
florian
22cb46fca9 * cleanup
git-svn-id: trunk@43863 -
2020-01-05 15:43:02 +00:00
florian
73c6cab096 + MovMovMov2XChg optimization by J. Gareth Moreton
git-svn-id: trunk@43858 -
2020-01-04 14:24:28 +00:00
florian
7da6bac960 * look further forward in TX86AsmOptimizer.OptPass1_V_MOVAP
git-svn-id: trunk@43855 -
2020-01-03 22:23:07 +00:00
florian
451afd6e45 * triggered by #36505, removed CmpJxxDecJmp2SubJcc optimization as it was wrong anyways
git-svn-id: trunk@43852 -
2020-01-03 19:15:12 +00:00
florian
b8b5d84108 * missing +')' added
git-svn-id: trunk@43707 -
2019-12-22 20:41:48 +00:00
florian
5f2410b871 * patch by J. Gareth Moreton to fix an ie 2018061400 on darwin
git-svn-id: trunk@43694 -
2019-12-16 21:15:57 +00:00
florian
ef7e4f6f62 * fix J. Gareth Moreton to resolve #36389
git-svn-id: trunk@43670 -
2019-12-09 22:00:45 +00:00
florian
b8a78b135c * simplified and improved TX86AsmOptimizer.RegModifiedByInstruction
git-svn-id: trunk@43623 -
2019-12-01 22:15:48 +00:00
florian
4525edd9f7 * patch by J. Gareth Moreton: x86 implementation of RegModifiedByInstruction, resolves #36376
git-svn-id: trunk@43611 -
2019-11-29 21:57:53 +00:00
florian
7000d82dcd * do not convert cmp 0,... into test ...,... before the post pass of the peephole optimizer
as this conversion might result in missing further optimizer opportunities

git-svn-id: trunk@43596 -
2019-11-26 22:09:34 +00:00
florian
7e6eeebdf0 o patch by J. Gareth Moreton, seeks to improve maintainability, safety and efficiency
in the peephole optimizer by slightly modifying some function headers based
    on their intended purpose, resolves #36353
    * Non-virtual methods and class methods that don't need to access any fields from
      the current object are now static methods, thus removing the hidden "Self"
      parameter and reducing overhead. This includes a large number of
      frequently-used functions such as SkipEntryExitMarker and SuperRegistersEqual.
    * GetNextInstruction, GetLastInstruction, SkipEntryExitMarker and
      SkipLabels have had their 'var' parameter changed to an 'out' parameter because
      they shouldn't depend on its input value. This will cause the compiler to throw warnings
      if you start using the value without initialising it first, and may open up optimisation
      opportunities in the future (e.g. storing written values in a temporary register
      and only writing it to the actual variable when the routine exits).

git-svn-id: trunk@43595 -
2019-11-26 22:09:33 +00:00
florian
cf0716123c * avoid overflow error
git-svn-id: trunk@43593 -
2019-11-26 19:39:04 +00:00