LICM pass now understands invariant load metadata. Nothing generates this yet so it will currently never get used in real tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144107 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Pete Cooper
2011-11-08 19:30:00 +00:00
parent 67a917d495
commit 2d76a78462
2 changed files with 41 additions and 0 deletions
+2
View File
@@ -369,6 +369,8 @@ bool LICM::canSinkOrHoistInst(Instruction &I) {
// in the same alias set as something that ends up being modified.
if (AA->pointsToConstantMemory(LI->getOperand(0)))
return true;
if (LI->getMetadata(LI->getContext().getMDKindID("invariant.load")))
return true;
// Don't hoist loads which have may-aliased stores in loop.
uint64_t Size = 0;