]> granicus.if.org Git - llvm/commit
[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)
commit53726fa11ac970b3d285c108fc5e2aec7c59b42f
treebe2fa1fae2b8a54c0295971f1cf3024d3ce5051a
parent7c6ef2a2995024c97216fc4d110be4ff8c88df21
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300118 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ValueTracking.cpp