LSL-PyOptimizer/lslopt
Sei Lisa 5bfb218505 Perform redundant jump elimination in lastpass
This is a first try at redundant jump removal (jumps that target the very next instruction). It's too basic in several ways.

- The statement is replaced by a ';' instead of removed.
- If the jump was the only statement in an if, when the if becomes empty, it's not folded.
- Jumps that are last in the 'then' branch of if+else are not visible. This would need either to track multiple last statements, or to have some means to anticipate what the next statement is at every statement. A Control Flow Graph would help a lot.
- When a label is immediately followed by a jump, all jumps to that label should target the destination of that jump if it's in scope. Added to TODO.
- It misses some optimizations when not expanding WHILE and FOR into IF/JUMP.

Moving everything to an earlier stage would help with some of these, especially with ';' and 'if' folding. Unconditionally expanding WHILE and FOR would also help.
2019-01-06 22:32:19 +01:00
..
__init__.py Initial commit. Status so far: 2014-07-26 02:43:44 +02:00
lslbasefuncs.py New copyright year 2019-01-01 22:54:34 +01:00
lslcommon.py New copyright year 2019-01-01 22:54:34 +01:00
lsldeadcode.py Proper fix for unwanted substitutions in function calls 2019-01-03 02:33:23 +01:00
lslextrafuncs.py New copyright year 2019-01-01 22:54:34 +01:00
lslfoldconst.py Fix indentation typo (cosmetic) 2019-01-04 19:35:36 +01:00
lslfuncopt.py New copyright year 2019-01-01 22:54:34 +01:00
lslfuncs.py New copyright year 2019-01-01 22:54:34 +01:00
lslinliner.py Finish inlining for all loop conditions 2019-01-06 01:59:36 +01:00
lsljson.py New copyright year 2019-01-01 22:54:34 +01:00
lsllastpass.py Perform redundant jump elimination in lastpass 2019-01-06 22:32:19 +01:00
lslloadlib.py New copyright year 2019-01-01 22:54:34 +01:00
lsloptimizer.py New copyright year 2019-01-01 22:54:34 +01:00
lsloutput.py Add the capability to show scope info to the output module 2019-01-02 15:05:21 +01:00
lslparse.py Allow #pragma OPT inline 2019-01-06 02:20:34 +01:00
lslrenamer.py New copyright year 2019-01-01 22:54:34 +01:00