[ValueTracking] Teach GetUnderlyingObject to stop when it reachs an alloca instruction.
authorCraig Topper <craig.topper@gmail.com>
Wed, 12 Apr 2017 22:29:23 +0000 (22:29 +0000)
committerCraig Topper <craig.topper@gmail.com>
Wed, 12 Apr 2017 22:29:23 +0000 (22:29 +0000)
commit854824139e4f7db8513dea19933d1cf5b5c97796
treee612ffe14b49c96f1b474ded4ac0316b01bf320c
parentec0fc037af27a882aec393e024b7a1f49339c3e8
[ValueTracking] Teach GetUnderlyingObject to stop when it reachs an alloca instruction.

Previously it tried to call SimplifyInstruction which doesn't know anything about alloca so defers to constant folding which also doesn't do anything with alloca. This results in wasted cycles making calls that won't do anything. Given the frequency with which this function is called this time adds up.

llvm-svn: 300118
llvm/lib/Analysis/ValueTracking.cpp