[PATCH] D38313: [InstCombine] Introducing Aggressive Instruction Combine pass

Michael Zolotukhin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 15 10:47:46 PST 2018


mzolotukhin added a comment.

> As you said, the pass spend very little time, cannot we decide on moving it to -O3 in the future when/if other heavy optimizations is added to this pass?
>  And even then, we can decide to run part of them on -O2 and the rest on -O3.

My main concern with that is that it's actually really hard to demote something to lower optlevels retroactively.

For instance, right now it would make sense to move some parts of existing InstCombine out of O0. In practice it's a very time consuming task to do so (to find the right pieces, to do all the measurements, to agree in the community on the acceptable regressions etc.). And there is usually no single big heavy part that we can just move out and solve all the compile time issues - we have many small pieces that just sum up to something big.

I expect that to be the case with this pass as well - people will add more stuff, but each individual piece would contribute only a little, so it'll be hard to say "yep, this one goes to -O3, others can stay at O0/https://reviews.llvm.org/owners/package/2/". So I think it's worth moving the whole pass to -O3 now rather than in the future (and how bad is it for other optlevels not to have it? is it really critical?).

Michael


https://reviews.llvm.org/D38313





More information about the llvm-commits mailing list