[llvm-commits] [parallel] CVS: llvm/lib/VMCore/Instruction.cpp iBranch.cpp

Misha Brukman brukman at cs.uiuc.edu
Thu Jan 29 19:29:02 PST 2004


Changes in directory llvm/lib/VMCore:

Instruction.cpp updated: 1.33 -> 1.33.2.1
iBranch.cpp updated: 1.12 -> 1.12.4.1

---
Log message:

Add implementation of the parallel branch instruction and its textual display.


---
Diffs of the changes:  (+20 -0)

Index: llvm/lib/VMCore/Instruction.cpp
diff -u llvm/lib/VMCore/Instruction.cpp:1.33 llvm/lib/VMCore/Instruction.cpp:1.33.2.1
--- llvm/lib/VMCore/Instruction.cpp:1.33	Mon Jan 12 17:18:25 2004
+++ llvm/lib/VMCore/Instruction.cpp	Thu Jan 29 19:28:20 2004
@@ -62,6 +62,7 @@
   // Terminators
   case Ret:    return "ret";
   case Br:     return "br";
+  case ParaBr: return "pbr";
   case Switch: return "switch";
   case Invoke: return "invoke";
   case Unwind: return "unwind";


Index: llvm/lib/VMCore/iBranch.cpp
diff -u llvm/lib/VMCore/iBranch.cpp:1.12 llvm/lib/VMCore/iBranch.cpp:1.12.4.1
--- llvm/lib/VMCore/iBranch.cpp:1.12	Thu Nov 20 12:11:56 2003
+++ llvm/lib/VMCore/iBranch.cpp	Thu Jan 29 19:28:20 2004
@@ -85,3 +85,22 @@
     Operands.push_back(Use(BI.Operands[2], this));
   }
 }
+
+// Parallel Branch implementations
+ParaBrInst::ParaBrInst(const ParaBrInst &BI) :
+  TerminatorInst(Instruction::ParaBr) {
+  Operands.reserve(2);
+  assert(BI.Operands.size() == 2 && "PBR can have only 2 operands!");
+  Operands.push_back(Use(BI.Operands[0], this));
+  Operands.push_back(Use(BI.Operands[1], this));
+}
+
+ParaBrInst::ParaBrInst(BasicBlock *one, BasicBlock *two) : 
+  TerminatorInst(Instruction::ParaBr) {
+  Operands.reserve(2);
+  Operands.push_back(Use(one, this));
+  Operands.push_back(Use(two, this));
+}
+
+// FIXME: implement copy constructors...?
+





More information about the llvm-commits mailing list