Assume intrinsic handling in global opt
authorPiotr Padlewski <prazek@google.com>
Tue, 25 Aug 2015 01:34:15 +0000 (01:34 +0000)
committerPiotr Padlewski <prazek@google.com>
Tue, 25 Aug 2015 01:34:15 +0000 (01:34 +0000)
commit8e6aecec255db5858a7abcc22a2d287a368883fa
treea67d559f773cd75aa25c75c8a21253bc8b81e2dc
parent4bc8e7e0c1ff0b4db669c04b3e7568ff31e30fdb
Assume intrinsic handling in global opt

It doesn't solve the problem, when for example we load something, and
then assume that it is the same as some constant value, because
globalopt will fail on unknown load instruction. The proposed solution
would be to skip some instructions that we can't evaluate and they are
safe to skip (f.e. load, assume and many others) and see if they are
required to perform optimization (f.e. we don't care about ephemeral
instructions that may appear using @llvm.assume())

http://reviews.llvm.org/D12266

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245919 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/GlobalOpt.cpp
test/Transforms/GlobalOpt/assume.ll [new file with mode: 0644]