Add option to enable/disable LEA optimization pass. By default the pass is disabled.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Out of curiosity, are there actually plans to make this faster?
(Since it would be non-ideal to have this disabled by default but in-tree
forever)
I'm going to investigate the compile time issue and try to find ways to improve pass's speed.
In the worst case we can just skip LEA optimization for big basic blocks, that should keep compile time from blowing up.
I would try the two things i suggested in the bug. They solve the main algorithmic complexity problems with this pass. I hacked up a patch to do them, and it completely solved the compile time issue, and i didn't see any regressions.
IMHO, We generally should only be inserting big-hammer compile time controls and random "stop after 10" style things if we can't reasonably make the algorithmic complexity better.
(among other reasons, we end up with a compiler that has sudden changes in optimization behavior depending on if your block has 999 instructions or 1000 instructions)