[llvm-commits] [parallel] CVS: llvm/lib/Bytecode/Reader/InstructionReader.cpp
Misha Brukman
brukman at cs.uiuc.edu
Thu Jan 29 19:28:02 PST 2004
Changes in directory llvm/lib/Bytecode/Reader:
InstructionReader.cpp updated: 1.66 -> 1.66.2.1
---
Log message:
Add ability to parse parallel branch instructions from bytecode.
---
Diffs of the changes: (+14 -2)
Index: llvm/lib/Bytecode/Reader/InstructionReader.cpp
diff -u llvm/lib/Bytecode/Reader/InstructionReader.cpp:1.66 llvm/lib/Bytecode/Reader/InstructionReader.cpp:1.66.2.1
--- llvm/lib/Bytecode/Reader/InstructionReader.cpp:1.66 Thu Jan 15 00:13:09 2004
+++ llvm/lib/Bytecode/Reader/InstructionReader.cpp Thu Jan 29 19:27:45 2004
@@ -174,7 +174,8 @@
getValue(RI.Type, Args[0]),
getValue(Type::UByteTyID, Args[1]));
break;
- case Instruction::Ret:
+
+ case Instruction::Ret: {
if (Args.size() == 0)
Result = new ReturnInst();
else if (Args.size() == 1)
@@ -182,8 +183,9 @@
else
throw std::string("Unrecognized instruction!");
break;
+ }
- case Instruction::Br:
+ case Instruction::Br: {
if (Args.size() == 1)
Result = new BranchInst(getBasicBlock(Args[0]));
else if (Args.size() == 3)
@@ -192,6 +194,16 @@
else
throw std::string("Invalid number of operands for a 'br' instruction!");
break;
+ }
+
+ case Instruction::ParaBr: {
+ if (Args.size() == 2)
+ Result = new ParaBrInst(getBasicBlock(Args[0]), getBasicBlock(Args[1]));
+ else
+ throw std::string("Invalid number of operands for a 'pbr' instruction!");
+ break;
+ }
+
case Instruction::Switch: {
if (Args.size() & 1)
throw std::string("Switch statement with odd number of arguments!");
More information about the llvm-commits
mailing list