[llvm-dev] failing to optimize boolean ops on cmps
Daniel Berlin via llvm-dev
llvm-dev at lists.llvm.org
Fri Jul 14 09:54:25 PDT 2017
> I think you're done when you get everything that you have that fits into a
> model of local transformations and that should be run to a fixed point.
Sure, but to point out what you certainly already know, that's almost every
optimization you can think of in a compiler.
For example, I can do PRE this way with no issue (IE generate optimal
Same with reassociation, most CSE, etc.
A very large set of global stuff can be done by "local transform repeated
until fixpoint is reached". It's just not optimal time-wise.
Certainly an interesting question, but I suspect that the practical answer
> is "what's in InstCombine."
At least to me, that's clearly the wrong answer, because instcombine
already does a lot of non-local stuff that could be done better elsewhere.
> To do more in this sense probably requires some more-general scheme (e.g.
> equality saturation).
> Hal Finkel
> Lead, Compiler Technology and Programming Languages
> Leadership Computing Facility
> Argonne National Laboratory
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev