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 -
* updated TAOptObj.RegUsedAfterInstruction with the arm implementation and removed the arm specific implementation
* RegLoadedWithNewValue and InstructionLoadsFromReg are now a methods of TAoptBase
* moved RegEndOfLife to TAOptObj
* during this refactoring, fixed also TCpuAsmOptimizer.RegLoadedWithNewValue for arm regarding post/preindexed
memory references: those modify the register but do not load it with a new value in the sense of RegLoadedWithNewValue
git-svn-id: trunk@33000 -
The difference in branch instruction formats is isolated in function JumpTargetOp, it is a plain function rather than a virtual method, so it can be easily inlined and, after inlining, produces the same code for non-MIPS targets as it was before change.
git-svn-id: trunk@25033 -
RegInOp did not check for a register beeing part of a shifterop
(op.shifterop^.rs) which could result in trashed registers (But that did
not seem to happen yet anyway).
I've also implemented support for top_regset, but it is currently not
generated outside of proc_entry/proc_exit anyway.
git-svn-id: trunk@21808 -
* symtables based on TFPHashObjectList and TFPObjectList
* rename torddef.typ to torddef.ordtype
* rename tfloatdef.typ to tfloatdef.floattype
* rename tdef.deftype to tdef.typ
* remove obsolete browser code, browcol is kept so the ide
can still be compiled
git-svn-id: trunk@5192 -