summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineInstr.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-07-03 00:04:37 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-07-03 00:04:37 +0000
commit273f7e42994a5bce0614d04d96dbfdf05fd652e5 (patch)
tree5963df402c4f6ba2641e0e869ddafa71fd5aa850 /include/llvm/CodeGen/MachineInstr.h
parent43b8fd728b889f15ea4c65ca957a7420ce2905cd (diff)
downloadllvm-273f7e42994a5bce0614d04d96dbfdf05fd652e5.tar.gz
llvm-273f7e42994a5bce0614d04d96dbfdf05fd652e5.tar.bz2
llvm-273f7e42994a5bce0614d04d96dbfdf05fd652e5.tar.xz
Detect and handle COPY in many places.
This code is transitional, it will soon be possible to eliminate isExtractSubreg, isInsertSubreg, and isMoveInstr in most places. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107547 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineInstr.h')
-rw-r--r--include/llvm/CodeGen/MachineInstr.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h
index 003ed15f05..08ada4cc91 100644
--- a/include/llvm/CodeGen/MachineInstr.h
+++ b/include/llvm/CodeGen/MachineInstr.h
@@ -231,6 +231,12 @@ public:
return getOpcode() == TargetOpcode::COPY;
}
+ /// isCopyLike - Return true if the instruction behaves like a copy.
+ /// This does not include native copy instructions.
+ bool isCopyLike() const {
+ return isCopy() || isSubregToReg() || isExtractSubreg() || isInsertSubreg();
+ }
+
/// readsRegister - Return true if the MachineInstr reads the specified
/// register. If TargetRegisterInfo is passed, then it also checks if there
/// is a read of a super-register.