Add support for invariant.start inside the static constructor evaluator. This is
authorNick Lewycky <nicholas@mxc.ca>
Fri, 17 Feb 2012 06:59:21 +0000 (06:59 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Fri, 17 Feb 2012 06:59:21 +0000 (06:59 +0000)
commit81266c5c9358d71331886a98e750ac9409cc640c
tree70d61056257c6a311e8353773fef542a13adf21f
parent38bdc5762f58b64d652864d154bf1b4dffb5ed39
Add support for invariant.start inside the static constructor evaluator. This is
useful to represent a variable that is const in the source but can't be constant
in the IR because of a non-trivial constructor. If globalopt evaluates the
constructor, and there was an invariant.start with no matching invariant.end
possible, it will mark the global constant afterwards.

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