diff options
author | Chris Lattner <sabre@nondot.org> | 2008-01-06 23:38:27 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-01-06 23:38:27 +0000 |
commit | 1a1932c83d6b6fcbf089eee3f97b65a23de22a92 (patch) | |
tree | fa9d9d5b1ad73454fca5dd87fe5dd8b848b8bdc7 /include/llvm | |
parent | 099688622c0d888df945cf4b3bc4c52ef414ef3b (diff) | |
download | external_llvm-1a1932c83d6b6fcbf089eee3f97b65a23de22a92.zip external_llvm-1a1932c83d6b6fcbf089eee3f97b65a23de22a92.tar.gz external_llvm-1a1932c83d6b6fcbf089eee3f97b65a23de22a92.tar.bz2 |
rename isLoad -> isSimpleLoad due to evan's desire to have such a predicate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45667 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/Target/TargetInstrInfo.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/include/llvm/Target/TargetInstrInfo.h b/include/llvm/Target/TargetInstrInfo.h index 153c1a7..f2a091b 100644 --- a/include/llvm/Target/TargetInstrInfo.h +++ b/include/llvm/Target/TargetInstrInfo.h @@ -48,7 +48,11 @@ const unsigned M_CALL_FLAG = 1 << 1; const unsigned M_RET_FLAG = 1 << 2; const unsigned M_BARRIER_FLAG = 1 << 3; const unsigned M_DELAY_SLOT_FLAG = 1 << 4; -const unsigned M_LOAD_FLAG = 1 << 5; + +/// M_SIMPLE_LOAD_FLAG - This flag is set for instructions that are simple loads +/// from memory. This should only be set on instructions that load a value from +/// memory and return it in their only virtual register definition. +const unsigned M_SIMPLE_LOAD_FLAG = 1 << 5; /// M_MAY_STORE_FLAG - This flag is set to any instruction that could possibly /// modify memory. Instructions with this flag set are not necessarily simple @@ -184,6 +188,17 @@ public: /// findTiedToSrcOperand - Returns the operand that is tied to the specified /// dest operand. Returns -1 if there isn't one. int findTiedToSrcOperand(unsigned OpNum) const; + + + /// isSimpleLoad - Return true for instructions that are simple loads from + /// memory. This should only be set on instructions that load a value from + /// memory and return it in their only virtual register definition. + /// Instructions that return a value loaded from memory and then modified in + /// some way should not return true for this. + bool isSimpleLoad() const { + return Flags & M_SIMPLE_LOAD_FLAG; + } + }; @@ -279,9 +294,6 @@ public: bool isCall(MachineOpCode Opcode) const { return get(Opcode).Flags & M_CALL_FLAG; } - bool isLoad(MachineOpCode Opcode) const { - return get(Opcode).Flags & M_LOAD_FLAG; - } /// mayStore - Return true if this instruction could possibly modify memory. /// Instructions with this flag set are not necessarily simple store |