Hoist out some work done inside a loop doing a linear scan over all
authorNick Lewycky <nicholas@mxc.ca>
Fri, 26 Oct 2012 04:43:47 +0000 (04:43 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Fri, 26 Oct 2012 04:43:47 +0000 (04:43 +0000)
commitc86037ff01712bb07c5c957d8462c9ed2eed5357
tree5afb50c7c945e78a687039c422f5dd61de9351b1
parenta3843dd2a5b6e49d0c3a51b8a8aaf7425f48efcd
Hoist out some work done inside a loop doing a linear scan over all
instructions in a block. GetUnderlyingObject is more expensive than it looks as
it can, for instance, call SimplifyInstruction.

This might have some behavioural changes in odd corner cases, but only because
of some strange artefacts of the original implementation. If you were relying
on those, we can fix that by replacing this with a smarter algorithm. Change
passes the existing tests.

llvm-svn: 166754
llvm/lib/Analysis/LazyValueInfo.cpp