[llvm-commits] [llvm] r41596 - /llvm/trunk/include/llvm/CodeGen/MachineInstr.h

Evan Cheng evan.cheng at apple.com
Wed Aug 29 22:50:32 PDT 2007


Author: evancheng
Date: Thu Aug 30 00:50:32 2007
New Revision: 41596

URL: http://llvm.org/viewvc/llvm-project?rev=41596&view=rev
Log:
Added CreateFrameIndex to create a FrameIndex MachineOperand without a MachineInstr.

Modified:
    llvm/trunk/include/llvm/CodeGen/MachineInstr.h

Modified: llvm/trunk/include/llvm/CodeGen/MachineInstr.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineInstr.h?rev=41596&r1=41595&r2=41596&view=diff

==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineInstr.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineInstr.h Thu Aug 30 00:50:32 2007
@@ -102,6 +102,18 @@
     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;





More information about the llvm-commits mailing list