diff options
| author | Pete Cooper <peter_cooper@apple.com> | 2011-11-08 18:42:53 +0000 |
|---|---|---|
| committer | Stephen Hines <srhines@google.com> | 2011-11-14 09:12:00 -0800 |
| commit | 67f02679340e056f50120a84b128b3c6188d693d (patch) | |
| tree | f1afbeeae6c8cabf6b06d440d9e90937f2402d6d /include/llvm/CodeGen/MachineMemOperand.h | |
| parent | 68e7c6959f1a3d0542e752b34f1a7816ccdd75bf (diff) | |
| download | external_llvm-67f02679340e056f50120a84b128b3c6188d693d.zip external_llvm-67f02679340e056f50120a84b128b3c6188d693d.tar.gz external_llvm-67f02679340e056f50120a84b128b3c6188d693d.tar.bz2 | |
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144100 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineMemOperand.h')
| -rw-r--r-- | include/llvm/CodeGen/MachineMemOperand.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/MachineMemOperand.h b/include/llvm/CodeGen/MachineMemOperand.h index 768ce47..c01597e 100644 --- a/include/llvm/CodeGen/MachineMemOperand.h +++ b/include/llvm/CodeGen/MachineMemOperand.h @@ -95,8 +95,10 @@ public: MOVolatile = 4, /// The memory access is non-temporal. MONonTemporal = 8, + /// The memory access is invariant. + MOInvariant = 16, // This is the number of bits we need to represent flags. - MOMaxBits = 4 + MOMaxBits = 5 }; /// MachineMemOperand - Construct an MachineMemOperand object with the @@ -141,6 +143,7 @@ public: bool isStore() const { return Flags & MOStore; } bool isVolatile() const { return Flags & MOVolatile; } bool isNonTemporal() const { return Flags & MONonTemporal; } + bool isInvariant() const { return Flags & MOInvariant; } /// refineAlignment - Update this MachineMemOperand to reflect the alignment /// of MMO, if it has a greater alignment. This must only be used when the |
