diff options
| author | Pete Cooper <peter_cooper@apple.com> | 2011-11-08 18:42:53 +0000 |
|---|---|---|
| committer | Pete Cooper <peter_cooper@apple.com> | 2011-11-08 18:42:53 +0000 |
| commit | 82cd9e81fcc8ce8b051404ef0c9ea2abd8048fbb (patch) | |
| tree | 5b1fed3b2b67f465db5d7511c978afa0a4a571c3 /llvm/lib/CodeGen/MachineInstr.cpp | |
| parent | 54ce295d3753b03766e6a06bbe4511230b60629f (diff) | |
| download | bcm5719-llvm-82cd9e81fcc8ce8b051404ef0c9ea2abd8048fbb.tar.gz bcm5719-llvm-82cd9e81fcc8ce8b051404ef0c9ea2abd8048fbb.zip | |
Added invariant field to the DAG.getLoad method and changed all calls.
When this field is true it means that the load is from constant (runt-time or compile-time) and so can be hoisted from loops or moved around other memory accesses
llvm-svn: 144100
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/MachineInstr.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index a240667f7d6..b0ef9d401a2 100644 --- a/llvm/lib/CodeGen/MachineInstr.cpp +++ b/llvm/lib/CodeGen/MachineInstr.cpp @@ -1253,6 +1253,7 @@ bool MachineInstr::isInvariantLoad(AliasAnalysis *AA) const { E = memoperands_end(); I != E; ++I) { if ((*I)->isVolatile()) return false; if ((*I)->isStore()) return false; + if ((*I)->isInvariant()) return true; if (const Value *V = (*I)->getValue()) { // A load from a constant PseudoSourceValue is invariant. |

