diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2007-08-30 05:50:32 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2007-08-30 05:50:32 +0000 |
| commit | ecf5342104719a64f4e4aa508047beeb65bbac12 (patch) | |
| tree | b81589f14e78b128471e42a5c6ca0c0973baccd4 | |
| parent | c2081fe573c73ec582e4fe6fa9de62799b321dd1 (diff) | |
| download | bcm5719-llvm-ecf5342104719a64f4e4aa508047beeb65bbac12.tar.gz bcm5719-llvm-ecf5342104719a64f4e4aa508047beeb65bbac12.zip | |
Added CreateFrameIndex to create a FrameIndex MachineOperand without a MachineInstr.
llvm-svn: 41596
| -rw-r--r-- | llvm/include/llvm/CodeGen/MachineInstr.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/include/llvm/CodeGen/MachineInstr.h b/llvm/include/llvm/CodeGen/MachineInstr.h index 48cf62cfa77..8fe446f0e8b 100644 --- a/llvm/include/llvm/CodeGen/MachineInstr.h +++ b/llvm/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; |

