aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineInstr.h
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-08-30 05:50:32 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-08-30 05:50:32 +0000
commit42a0f9a4fb74bf11fdc36a73772b7c9b744cc867 (patch)
tree12faf4fee4abcbc460e45798fda80b41c7f755a0 /include/llvm/CodeGen/MachineInstr.h
parent2f39426ec9a1e64ff8931a1ea91a52ba6109c7c3 (diff)
Added CreateFrameIndex to create a FrameIndex MachineOperand without a MachineInstr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41596 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineInstr.h')
-rw-r--r--include/llvm/CodeGen/MachineInstr.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h
index 48cf62cfa7..8fe446f0e8 100644
--- a/include/llvm/CodeGen/MachineInstr.h
+++ b/include/llvm/CodeGen/MachineInstr.h
@@ -102,6 +102,18 @@ public:
return Op;
}
+ static MachineOperand CreateFrameIndex(unsigned Idx) {
+ MachineOperand Op;
+ Op.opType = MachineOperand::MO_FrameIndex;
+ Op.contents.immedVal = Idx;
+ Op.IsDef = false;
+ Op.IsImp = false;
+ Op.IsKill = false;
+ Op.IsDead = false;
+ Op.auxInfo.offset = 0;
+ return Op;
+ }
+
const MachineOperand &operator=(const MachineOperand &MO) {
contents = MO.contents;
IsDef = MO.IsDef;