[llvm-commits] [llvm] r89659 - in /llvm/trunk: lib/Analysis/ConstantFolding.cpp lib/Transforms/IPO/GlobalOpt.cpp test/Transforms/GlobalOpt/constantfold-initializers.ll test/Transforms/InstCombine/cast.ll test/Transforms/InstCombine/shufflevec-constant.ll

Chris Lattner clattner at apple.com
Mon Nov 30 17:45:20 PST 2009


On Nov 30, 2009, at 2:26 PM, Dan Gohman wrote:

>> My recollection is that instcombine uses this function, so making  
>> it more expensive is potentially bad.  Have you looked for any  
>> compile time impact of this?
>
> I don't expect to see a compile-time impact in normal cases, because
> the new code is only significant when it encounters elaborate nested
> unfoldable ConstantExprs, which don't happen very often, and because
> instcombine uses a SmallPtrSet to avoid calling  
> ConstantFoldConstantExpr
> multiple times on the same constant within a run. It's probably  
> possible
> to construct a testcase which would see a difference, but compile time
> still wouldn't be worse than proportional to the size of the program.

Aha, ok, I forgot that we had the smallptrset, thanks!

-Chris



More information about the llvm-commits mailing list