search for: jumpmap

Displaying 3 results from an estimated 3 matches for "jumpmap".

Did you mean: jumpmaps
2017 Feb 13
5
(RFC) JumpMaps: switch statement optimization
...working for good few years now on an out-of-tree embedded back-end. Our primary goal is code size, secondary performance. We've recently implemented an optimization that we believe others could use. It's about time to contribute back. ------------------------------------------------------- JumpMaps: a generalization of JumpTables JumpTables produce fast and small code but have a limitation - they only work if case values are easy to compute from the variable being switch()ed. To overcome this limitation we introduce a {key,value} structure - a JumpMap. Simplifying somewhat, LLVM would curre...
2017 Feb 14
2
(RFC) JumpMaps: switch statement optimization
JumpMap lowering is nearly identical to that of JumpTables with the exception of lack of range-check basic-block. We introduce JumpMapInfo structure which follows the same flow as JumpTableInfo and is finally emitted by AsmPrinter. There are many ways a Target may want to encode jumpmaps (deltas, compress...
2017 Feb 14
3
(RFC) JumpMaps: switch statement optimization
I wonder if it would make sense to emit the jumpmap_find_ functions in IR rather than in compiler-rt. Many targets don't link against compiler-rt, e.g. x86 Linux typically uses libgcc. If they're emitted in IR, the functions could potentially be inlined. For example if the size of the switch is known to be small so no binary search is done...