[llvm-commits] [parallel] CVS: llvm/lib/AsmParser/Lexer.l llvmAsmParser.y
Misha Brukman
brukman at cs.uiuc.edu
Thu Jan 29 19:27:02 PST 2004
Changes in directory llvm/lib/AsmParser:
Lexer.l updated: 1.44 -> 1.44.4.1
llvmAsmParser.y updated: 1.148 -> 1.148.2.1
---
Log message:
Add lexing and parsing ability for the parallel branch instruction.
---
Diffs of the changes: (+6 -1)
Index: llvm/lib/AsmParser/Lexer.l
diff -u llvm/lib/AsmParser/Lexer.l:1.44 llvm/lib/AsmParser/Lexer.l:1.44.4.1
--- llvm/lib/AsmParser/Lexer.l:1.44 Tue Nov 11 16:41:32 2003
+++ llvm/lib/AsmParser/Lexer.l Thu Jan 29 19:25:55 2004
@@ -242,6 +242,7 @@
ret { RET_TOK(TermOpVal, Ret, RET); }
br { RET_TOK(TermOpVal, Br, BR); }
+pbr { RET_TOK(TermOpVal, ParaBr, PBR); }
switch { RET_TOK(TermOpVal, Switch, SWITCH); }
invoke { RET_TOK(TermOpVal, Invoke, INVOKE); }
unwind { RET_TOK(TermOpVal, Unwind, UNWIND); }
Index: llvm/lib/AsmParser/llvmAsmParser.y
diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.148 llvm/lib/AsmParser/llvmAsmParser.y:1.148.2.1
--- llvm/lib/AsmParser/llvmAsmParser.y:1.148 Mon Jan 12 13:06:28 2004
+++ llvm/lib/AsmParser/llvmAsmParser.y Thu Jan 29 19:25:55 2004
@@ -820,7 +820,7 @@
%token OPAQUE NOT EXTERNAL TARGET ENDIAN POINTERSIZE LITTLE BIG
// Basic Block Terminating Operators
-%token <TermOpVal> RET BR SWITCH INVOKE UNWIND
+%token <TermOpVal> RET BR PBR SWITCH INVOKE UNWIND
// Binary Operators
%type <BinaryOpVal> BinaryOps // all the binary operators
@@ -1594,6 +1594,10 @@
$$ = new BranchInst(cast<BasicBlock>(getVal(Type::LabelTy, $6)),
cast<BasicBlock>(getVal(Type::LabelTy, $9)),
getVal(Type::BoolTy, $3));
+ }
+ | PBR LABEL ValueRef ',' LABEL ValueRef {
+ $$ = new ParaBrInst(cast<BasicBlock>(getVal(Type::LabelTy, $3)),
+ cast<BasicBlock>(getVal(Type::LabelTy, $6)));
}
| SWITCH IntType ValueRef ',' LABEL ValueRef '[' JumpTable ']' {
SwitchInst *S = new SwitchInst(getVal($2, $3),
More information about the llvm-commits
mailing list