#390 peephole optimizer for stm8 - relative jumps

None
closed-fixed
nobody
None
5
2013-08-04
2013-05-27
No

The stm8 port currently lacks a peephole optimizer. This is a feature request to get the basic infrastructure for the peephole optimizer in place, as far as it is needed to optimize relative jumps.

For this, the function for instruction size needs to be implemented. See e.g. the z80 or mcs51 ports for an example.

Then a rule that converts jp into jr could be added to stm8/peeph.def (and once that is working, we can go for rules that invert jump conditions, etc).

Philipp

Discussion

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -2,6 +2,6 @@
    
     For this, the function for instruction size needs to be implemented. See e.g. the z80 or mcs51 ports for an example.
    
    -Then a rule that converts jp into jr could be added to stm8/peeph.def (and once that is working, we can go for rules that ivert jump conditions, etc).
    +Then a rule that converts jp into jr could be added to stm8/peeph.def (and once that is working, we can go for rules that invert jump conditions, etc).
    
     Philipp
    
    • Group: -->
     
    • status: open --> closed-fixed
     
  • Implemented some time ago by Valentin, then disabled due to bug #2182. Then reenabled with a workaround for the bug.
    Either way, any future discussion of shortcomings of the current implementation of this feature can take place in bug #2182.

    Philipp