[llvm-commits] [llvm] r94433 - in /llvm/trunk: include/llvm/Value.h lib/Transforms/Scalar/ScalarReplAggregates.cpp lib/VMCore/Value.cpp

Duncan Sands baldrick at free.fr
Mon Jan 25 10:33:03 PST 2010


Hi Bob,

> Change Value::getUnderlyingObject to have the MaxLookup value specified as a
> parameter with a default value, instead of just hardcoding it in the
> implementation.  The limit of MaxLookup = 6 was introduced in r69151 to fix
> a performance problem with O(n^2) behavior in instcombine, but the scalarrepl
> pass is relying on getUnderlyingObject to go all the way back to an AllocaInst.
> Making the limit part of the method signature makes it clear that by default
> the result is limited and should help avoid similar problems in the future.
> This fixes pr6126.

if sroa has to go back through a gazillion GEPS and bitcasts to get to the
alloca, maybe it should just give up instead?

Ciao,

Duncan.



More information about the llvm-commits mailing list