[PATCH] D18155: Instcombine: try to avoid wasted work in ConstantFold

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 15 18:46:47 PDT 2016


reames added a comment.

You're correct, I got confused by the changes to the ConstantFolding interface.

What happens if you *only* reorder the two steps?  (i.e. do we see cases where we have non-foldable constant exprs?)  What performance impact do you see there?

What's really confusing me about this code is that my expectation would be that constant expressions were fully folded *at construction* and that there would be very few places (linking two modules?) which would introduce new foldable constructs in a previously fully folded constant expr.  If that's correct, why aren't we conicalizing in those presumable very rare places?  (i.e. why is this code in ConstantFoldingInstruction at *all*?)


Repository:
  rL LLVM

http://reviews.llvm.org/D18155





More information about the llvm-commits mailing list