diff options
| author | Pete Cooper <peter_cooper@apple.com> | 2011-11-08 19:30:00 +0000 |
|---|---|---|
| committer | Pete Cooper <peter_cooper@apple.com> | 2011-11-08 19:30:00 +0000 |
| commit | 9ee220915b5f4be5213bd3ae39085753f80c26d4 (patch) | |
| tree | 8eaadc144dd65ba35a8bf65ab71bec0d4809d45a /llvm/lib/Transforms | |
| parent | 970771c0e87519456d9cce8be183b5fb3d859ba2 (diff) | |
| download | bcm5719-llvm-9ee220915b5f4be5213bd3ae39085753f80c26d4.tar.gz bcm5719-llvm-9ee220915b5f4be5213bd3ae39085753f80c26d4.zip | |
LICM pass now understands invariant load metadata. Nothing generates this yet so it will currently never get used in real tests
llvm-svn: 144107
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/LICM.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp index b79bb1300fe..8098b3608e9 100644 --- a/llvm/lib/Transforms/Scalar/LICM.cpp +++ b/llvm/lib/Transforms/Scalar/LICM.cpp @@ -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; |

