I'm attempting to modify a parser generator to emit LLVM code instead of C.
So far the experience has been trivial, but I am now running into an error
regarding labels that I can't seem to solve.
Situation 1: A label is used immediately after a void function call (l6 in
this case):
<snip>
%tmp26 = load i32* @yybegin, align 4
%tmp27 = load i32* @yyend, align 4
call void @yyDo(void (i8*, i32)* @yy_7_body, i32 %tmp26, i32 %tmp27)
l6:
br label %l2
<snip>
I get the following error:
llvm-as: test.ll:578,0: test.ll:578: error: syntax error, unexpected LABELSTR,
expecting LOAD or STORE while reading token: 'l6:'
Why is this label unexpected?
Situation 2: More than 1 label is used to refer to the same location (l11 in
this case):
<snip>
PredicateEqualZero3:
br label %l1
PredicateNotEqualZero3:
l11:
l2:
ret i32 1
<snip>
I get the same error:
llvm-as: test.ll:706,0: test.ll:706: error: syntax error, unexpected LABELSTR,
expecting LOAD or STORE while reading token: 'l11:'
If this code were hand written I'd just use one label here, but the parser
generator automatically creates several labels. When these overlap there are
sometimes multiple labels for the same location in the code. Why is this an
error and is there any way to allow it?
Also, is there a NO-OP instruction in LLVM?
I've attached the complete LLVM code as well.
Thanks,
Mike
-------------- next part --------------
;A recursive-descent parser generated by llvm-peg 0.1.2
target datalayout =
"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-s0:0:64-f80:32:32"
target triple = "i686-pc-linux-gnu"
@YYRULECOUNT = global i32 2
%struct._IO_FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*,
i8*, i8*, %struct._IO_marker*, %struct._IO_FILE*, i32, i32, i32, i16, i8, [1 x
i8], i8*, i64, i8*, i8*, i8*, i8*, i32, i32, [40 x i8] }
%struct._IO_marker = type { %struct._IO_marker*, %struct._IO_FILE*, i32 }
%struct.yythunk = type { i32, i32, void (i8*, i32)*, %struct.yythunk* }
@yybuf = global i8* null
@yyvalslen = global i32 0
@yyvals = global i32* null
@yyval = global i32* null
@yythunkpos = global i32 0
@yythunkslen = global i32 0
@yythunks = global %struct.yythunk* null
@yytextmax = global i32 0
@yyend = global i32 0
@yybegin = global i32 0
@yytextlen = global i32 0
@yytext = global i8* null
@yylimit = global i32 0
@yypos = global i32 0
@yybuflen = global i32 0
@stdin = external global %struct._IO_FILE*
@yy = weak global i32 0
define i32 @yyrefill()
{
entry:
%tmp842 = load i32* @yybuflen, align 4
%tmp943 = load i32* @yypos, align 4
%tmp1044 = sub i32 %tmp842, %tmp943
%tmp1145 = icmp slt i32 %tmp1044, 512
br i1 %tmp1145, label %bb, label %bb13
bb:
%tmp2.rle = phi i32 [ %tmp842, %entry ], [ %tmp8, %bb ]
%tmp3 = shl i32 %tmp2.rle, 1
store i32 %tmp3, i32* @yybuflen, align 4
%tmp5 = load i8** @yybuf, align 4
%tmp6 = tail call i8* @realloc( i8* %tmp5, i32 %tmp3 )
store i8* %tmp6, i8** @yybuf, align 4
%tmp8 = load i32* @yybuflen, align 4
%tmp9 = load i32* @yypos, align 4
%tmp10 = sub i32 %tmp8, %tmp9
%tmp11 = icmp slt i32 %tmp10, 512
br i1 %tmp11, label %bb, label %bb13
bb13:
%tmp15 = load %struct._IO_FILE** @stdin, align 4
%tmp16 = tail call i32 @_IO_getc( %struct._IO_FILE* %tmp15 )
%tmp21 = icmp eq i32 %tmp16, -1
br i1 %tmp21, label %cond_next, label %cond_true
cond_true:
%tmp24 = load i8** @yybuf, align 4
%tmp25 = load i32* @yypos, align 4
%tmp2627 = trunc i32 %tmp16 to i8
%tmp28 = getelementptr i8* %tmp24, i32 %tmp25
store i8 %tmp2627, i8* %tmp28, align 1
br label %cond_next
cond_next:
%iftmp.29.0 = phi i32 [ 1, %cond_true ], [ 0, %bb13 ]
%tmp31 = icmp eq i32 %iftmp.29.0, 0
br i1 %tmp31, label %UnifiedReturnBlock, label %cond_next36
cond_next36:
%tmp37 = load i32* @yylimit, align 4
%tmp39 = add i32 %tmp37, %iftmp.29.0
store i32 %tmp39, i32* @yylimit, align 4
ret i32 1
UnifiedReturnBlock:
ret i32 0
}
declare i8* @realloc(i8*, i32)
declare i32 @_IO_getc(%struct._IO_FILE*)
define i32 @yymatchDot()
{
entry:
%tmp1 = load i32* @yypos, align 4
%tmp2 = load i32* @yylimit, align 4
%tmp3 = icmp slt i32 %tmp1, %tmp2
br i1 %tmp3, label %cond_next11, label %cond_true
cond_true:
%tmp5 = tail call i32 @yyrefill( )
%tmp6 = icmp eq i32 %tmp5, 0
br i1 %tmp6, label %UnifiedReturnBlock, label %cond_next11
cond_next11:
%tmp12 = load i32* @yypos, align 4
%tmp13 = add i32 %tmp12, 1
store i32 %tmp13, i32* @yypos, align 4
ret i32 1
UnifiedReturnBlock:
ret i32 0
}
define i32 @yymatchChar(i32 %c)
{
entry:
%tmp1 = load i32* @yypos, align 4
%tmp2 = load i32* @yylimit, align 4
%tmp3 = icmp slt i32 %tmp1, %tmp2
br i1 %tmp3, label %cond_next11, label %cond_true
cond_true:
%tmp5 = tail call i32 @yyrefill( )
%tmp6 = icmp eq i32 %tmp5, 0
br i1 %tmp6, label %UnifiedReturnBlock, label %cond_next11
cond_next11:
%tmp12 = load i8** @yybuf, align 4
%tmp13 = load i32* @yypos, align 4
%tmp14 = getelementptr i8* %tmp12, i32 %tmp13
%tmp15 = load i8* %tmp14, align 1
%tmp1516 = sext i8 %tmp15 to i32
%tmp18 = icmp eq i32 %tmp1516, %c
br i1 %tmp18, label %cond_true21, label %UnifiedReturnBlock
cond_true21:
%tmp23 = add i32 %tmp13, 1
store i32 %tmp23, i32* @yypos, align 4
ret i32 1
UnifiedReturnBlock:
ret i32 0
}
define i32 @yymatchString(i8* %s)
{
entry:
%tmp1 = load i32* @yypos, align 4
%tmp3243 = load i8* %s, align 1
%tmp3344 = icmp eq i8 %tmp3243, 0
br i1 %tmp3344, label %UnifiedReturnBlock, label %bb
bb:
%tmp2.rle = phi i32 [ %tmp1, %entry ], [ %tmp29, %cond_next25 ]
%s_addr.039.0.rec = phi i32 [ 0, %entry ], [ %tmp27.rec, %cond_next25 ]
%s_addr.039.0 = getelementptr i8* %s, i32 %s_addr.039.0.rec
%tmp3 = load i32* @yylimit, align 4
%tmp4 = icmp slt i32 %tmp2.rle, %tmp3
br i1 %tmp4, label %cond_next12, label %cond_true
cond_true:
%tmp6 = tail call i32 @yyrefill( )
%tmp7 = icmp eq i32 %tmp6, 0
br i1 %tmp7, label %UnifiedReturnBlock, label %cond_next12
cond_next12:
%tmp13 = load i8** @yybuf, align 4
%tmp14 = load i32* @yypos, align 4
%tmp15 = getelementptr i8* %tmp13, i32 %tmp14
%tmp16 = load i8* %tmp15, align 1
%tmp18 = load i8* %s_addr.039.0, align 1
%tmp19 = icmp eq i8 %tmp16, %tmp18
br i1 %tmp19, label %cond_next25, label %cond_true22
cond_true22:
store i32 %tmp1, i32* @yypos, align 4
ret i32 0
cond_next25:
%tmp27.rec = add i32 %s_addr.039.0.rec, 1
%tmp27 = getelementptr i8* %s, i32 %tmp27.rec
%tmp29 = add i32 %tmp14, 1
store i32 %tmp29, i32* @yypos, align 4
%tmp32 = load i8* %tmp27, align 1
%tmp33 = icmp eq i8 %tmp32, 0
br i1 %tmp33, label %UnifiedReturnBlock, label %bb
UnifiedReturnBlock:
%UnifiedRetVal = phi i32 [ 1, %entry ], [ 0, %cond_true ], [ 1, %cond_next25 ]
ret i32 %UnifiedRetVal
}
define i32 @yymatchClass(i8* %bits)
{
entry:
%tmp1 = load i32* @yypos, align 4
%tmp2 = load i32* @yylimit, align 4
%tmp3 = icmp slt i32 %tmp1, %tmp2
br i1 %tmp3, label %cond_next11, label %cond_true
cond_true:
%tmp5 = tail call i32 @yyrefill( )
%tmp6 = icmp eq i32 %tmp5, 0
br i1 %tmp6, label %UnifiedReturnBlock, label %cond_next11
cond_next11:
%tmp12 = load i8** @yybuf, align 4
%tmp13 = load i32* @yypos, align 4
%tmp14 = getelementptr i8* %tmp12, i32 %tmp13
%tmp15 = load i8* %tmp14, align 1
%tmp1516 = sext i8 %tmp15 to i32
%tmp18 = ashr i32 %tmp1516, 3
%tmp20 = getelementptr i8* %bits, i32 %tmp18
%tmp21 = load i8* %tmp20, align 1
%tmp2122 = zext i8 %tmp21 to i32
%tmp24 = and i32 %tmp1516, 7
%tmp = shl i32 1, %tmp24
%tmp26273940 = and i32 %tmp, %tmp2122
%toBool28 = icmp eq i32 %tmp26273940, 0
br i1 %toBool28, label %UnifiedReturnBlock, label %cond_true29
cond_true29:
%tmp31 = add i32 %tmp13, 1
store i32 %tmp31, i32* @yypos, align 4
ret i32 1
UnifiedReturnBlock:
ret i32 0
}
define void @yyDo(void (i8*, i32)* %action, i32 %begin, i32 %end)
{
entry:
%tmp931 = load i32* @yythunkpos, align 4
%tmp1032 = load i32* @yythunkslen, align 4
%tmp1133 = icmp slt i32 %tmp931, %tmp1032
br i1 %tmp1133, label %bb13, label %bb
bb:
%tmp.rle = phi i32 [ %tmp1032, %entry ], [ %tmp10, %bb ]
%tmp1 = shl i32 %tmp.rle, 1
store i32 %tmp1, i32* @yythunkslen, align 4
%tmp3 = shl i32 %tmp.rle, 5
%tmp4 = load %struct.yythunk** @yythunks, align 4
%tmp45 = bitcast %struct.yythunk* %tmp4 to i8*
%tmp6 = tail call i8* @realloc( i8* %tmp45, i32 %tmp3 )
%tmp67 = bitcast i8* %tmp6 to %struct.yythunk*
store %struct.yythunk* %tmp67, %struct.yythunk** @yythunks, align 4
%tmp9 = load i32* @yythunkpos, align 4
%tmp10 = load i32* @yythunkslen, align 4
%tmp11 = icmp slt i32 %tmp9, %tmp10
br i1 %tmp11, label %bb13, label %bb
bb13:
%tmp15.rle = phi i32 [ %tmp931, %entry ], [ %tmp9, %bb ]
%tmp14 = load %struct.yythunk** @yythunks, align 4
%tmp17 = getelementptr %struct.yythunk* %tmp14, i32 %tmp15.rle, i32 0
store i32 %begin, i32* %tmp17, align 4
%tmp19 = load %struct.yythunk** @yythunks, align 4
%tmp20 = load i32* @yythunkpos, align 4
%tmp22 = getelementptr %struct.yythunk* %tmp19, i32 %tmp20, i32 1
store i32 %end, i32* %tmp22, align 4
%tmp24 = load %struct.yythunk** @yythunks, align 4
%tmp25 = load i32* @yythunkpos, align 4
%tmp27 = getelementptr %struct.yythunk* %tmp24, i32 %tmp25, i32 2
store void (i8*, i32)* %action, void (i8*, i32)** %tmp27, align 4
%tmp29 = load i32* @yythunkpos, align 4
%tmp30 = add i32 %tmp29, 1
store i32 %tmp30, i32* @yythunkpos, align 4
ret void
}
define i32 @yyText(i32 %begin, i32 %end)
{
entry:
%tmp3 = sub i32 %end, %begin
%tmp5 = icmp slt i32 %tmp3, 1
br i1 %tmp5, label %cond_next, label %bb12.preheader
bb12.preheader:
%tmp1433 = add i32 %tmp3, -1
%tmp1534 = load i32* @yytextlen, align 4
%tmp1635 = icmp sgt i32 %tmp1433, %tmp1534
br i1 %tmp1635, label %bb, label %bb19
bb:
%tmp7.rle = phi i32 [ %tmp1534, %bb12.preheader ], [ %tmp15, %bb ]
%tmp8 = shl i32 %tmp7.rle, 1
store i32 %tmp8, i32* @yytextlen, align 4
%tmp10 = load i8** @yytext, align 4
%tmp11 = tail call i8* @realloc( i8* %tmp10, i32 %tmp8 )
store i8* %tmp11, i8** @yytext, align 4
%tmp15 = load i32* @yytextlen, align 4
%tmp16 = icmp sgt i32 %tmp1433, %tmp15
br i1 %tmp16, label %bb, label %bb19
bb19:
%tmp21 = load i8** @yybuf, align 4
%tmp23 = getelementptr i8* %tmp21, i32 %begin
%tmp24 = load i8** @yytext, align 4
tail call void @llvm.memcpy.i32( i8* %tmp24, i8* %tmp23, i32 %tmp3, i32 1 )
%tmp2531 = load i8** @yytext, align 4
%tmp2732 = getelementptr i8* %tmp2531, i32 %tmp3
store i8 0, i8* %tmp2732, align 1
ret i32 %tmp3
cond_next:
%tmp25 = load i8** @yytext, align 4
store i8 0, i8* %tmp25, align 1
ret i32 0
}
declare void @llvm.memcpy.i32(i8*, i8*, i32, i32)
define void @yyDone()
{
entry:
%tmp2740 = load i32* @yythunkpos, align 4
%tmp2942 = icmp sgt i32 %tmp2740, 0
br i1 %tmp2942, label %bb, label %bb32
bb:
%pos.033.0 = phi i32 [ 0, %entry ], [ %tmp25, %cond_next ]
%tmp = load %struct.yythunk** @yythunks, align 4
%tmp4 = getelementptr %struct.yythunk* %tmp, i32 %pos.033.0, i32 1
%tmp5 = load i32* %tmp4, align 4
%tmp6 = icmp eq i32 %tmp5, 0
%tmp16 = getelementptr %struct.yythunk* %tmp, i32 %pos.033.0, i32 0
%tmp17 = load i32* %tmp16, align 4
br i1 %tmp6, label %cond_next, label %cond_true
cond_true:
%tmp14 = tail call i32 @yyText( i32 %tmp17, i32 %tmp5 )
br label %cond_next
cond_next:
%iftmp.74.0 = phi i32 [ %tmp14, %cond_true ], [ %tmp17, %bb ]
%tmp20 = getelementptr %struct.yythunk* %tmp, i32 %pos.033.0, i32 2
%tmp21 = load void (i8*, i32)** %tmp20, align 4
%tmp22 = load i8** @yytext, align 4
tail call void %tmp21( i8* %tmp22, i32 %iftmp.74.0 )
%tmp25 = add i32 %pos.033.0, 1
%tmp27 = load i32* @yythunkpos, align 4
%tmp29 = icmp slt i32 %tmp25, %tmp27
br i1 %tmp29, label %bb, label %bb32
bb32:
store i32 0, i32* @yythunkpos, align 4
ret void
}
define void @yyCommit()
{
entry:
%tmp = load i32* @yylimit, align 4
%tmp1 = load i32* @yypos, align 4
%tmp2 = sub i32 %tmp, %tmp1
store i32 %tmp2, i32* @yylimit, align 4
%tmp4 = icmp eq i32 %tmp, %tmp1
br i1 %tmp4, label %cond_next, label %cond_true
cond_true:
%tmp7 = load i8** @yybuf, align 4
%tmp9 = getelementptr i8* %tmp7, i32 %tmp1
tail call void @llvm.memmove.i32( i8* %tmp7, i8* %tmp9, i32 %tmp2, i32 1 )
br label %cond_next
cond_next:
%tmp11 = load i32* @yybegin, align 4
%tmp12 = load i32* @yypos, align 4
%tmp13 = sub i32 %tmp11, %tmp12
store i32 %tmp13, i32* @yybegin, align 4
%tmp14 = load i32* @yyend, align 4
%tmp16 = sub i32 %tmp14, %tmp12
store i32 %tmp16, i32* @yyend, align 4
store i32 0, i32* @yythunkpos, align 4
store i32 0, i32* @yypos, align 4
ret void
}
declare void @llvm.memmove.i32(i8*, i8*, i32, i32)
define i32 @yyAccept(i32 %tp0)
{
entry:
%tmp2 = icmp eq i32 %tp0, 0
br i1 %tmp2, label %cond_false, label %UnifiedReturnBlock
cond_false:
tail call void @yyDone( )
tail call void @yyCommit( )
ret i32 1
UnifiedReturnBlock:
ret i32 0
}
define void @yyPush(i8* %text, i32 %count)
{
entry:
%tmp = load i32** @yyval, align 4
%tmp2 = getelementptr i32* %tmp, i32 %count
store i32* %tmp2, i32** @yyval, align 4
ret void
}
define void @yyPop(i8* %text, i32 %count)
{
entry:
%tmp = load i32** @yyval, align 4
%tmp2 = sub i32 0, %count
%tmp3 = getelementptr i32* %tmp, i32 %tmp2
store i32* %tmp3, i32** @yyval, align 4
ret void
}
define void @yySet(i8* %text, i32 %count)
{
entry:
%tmp = load i32** @yyval, align 4
%tmp1 = load i32* @yy, align 4
%tmp3 = getelementptr i32* %tmp, i32 %count
store i32 %tmp1, i32* %tmp3, align 4
ret void
}
define void @yy_13_body(i8* %yytext, i32 %yyleng)
{
ret void
}
define void @yy_12_body(i8* %yytext, i32 %yyleng)
{
ret void
}
define void @yy_11_body(i8* %yytext, i32 %yyleng)
{
ret void
}
define void @yy_10_body(i8* %yytext, i32 %yyleng)
{
ret void
}
define void @yy_9_body(i8* %yytext, i32 %yyleng)
{
ret void
}
define void @yy_8_body(i8* %yytext, i32 %yyleng)
{
ret void
}
define void @yy_7_body(i8* %yytext, i32 %yyleng)
{
ret void
}
define void @yy_6_body(i8* %yytext, i32 %yyleng)
{
ret void
}
define void @yy_5_body(i8* %yytext, i32 %yyleng)
{
ret void
}
define void @yy_4_body(i8* %yytext, i32 %yyleng)
{
ret void
}
define void @yy_3_body(i8* %yytext, i32 %yyleng)
{
ret void
}
define void @yy_2_body(i8* %yytext, i32 %yyleng)
{
ret void
}
define void @yy_1_body(i8* %yytext, i32 %yyleng)
{
ret void
}
define void @yy_1_start(i8* %yytext, i32 %yyleng)
{
ret void
}
define internal i32 @yy_body()
{
%yypos0 = load i32* @yypos
%yythunkpos0 = load i32* @yythunkpos
%yypos2 = load i32* @yypos
%yythunkpos2 = load i32* @yythunkpos
%tmp0 = call i32 @yymatchChar(i8 97)
%tmp1 = icmp ne i32 %tmp97, 0
br i1 %tmp1, label %StringNotEqualZero0, label %StringEqualZero0
StringNotEqualZero0:
br label %l3
StringEqualZero0:
%tmp2 = load i32* @yybegin, align 4
%tmp3 = load i32* @yyend, align 4
call void @yyDo(void (i8*, i32)* @yy_1_body, i32 %tmp2, i32 %tmp3)
%tmp4 = call i32 @yymatchChar(i8 98)
%tmp5 = icmp ne i32 %tmp98, 0
br i1 %tmp5, label %StringNotEqualZero1, label %StringEqualZero1
StringNotEqualZero1:
br label %l3
StringEqualZero1:
%tmp6 = load i32* @yybegin, align 4
%tmp7 = load i32* @yyend, align 4
call void @yyDo(void (i8*, i32)* @yy_2_body, i32 %tmp6, i32 %tmp7)
br label %l2
l3:
store i32 %yypos2, i32* @yypos
store i32 %yythunkpos2, i32 * @yythunkpos
%tmp8 = call i32 @yymatchChar(i8 97)
%tmp9 = icmp ne i32 %tmp97, 0
br i1 %tmp9, label %StringNotEqualZero2, label %StringEqualZero2
StringNotEqualZero2:
br label %l4
StringEqualZero2:
%tmp10 = load i32* @yybegin, align 4
%tmp11 = load i32* @yyend, align 4
call void @yyDo(void (i8*, i32)* @yy_3_body, i32 %tmp10, i32 %tmp11)
%tmp12 = call i32 @yymatchChar(i8 99)
%tmp13 = icmp ne i32 %tmp99, 0
br i1 %tmp13, label %StringNotEqualZero3, label %StringEqualZero3
StringNotEqualZero3:
br label %l4
StringEqualZero3:
%tmp14 = load i32* @yybegin, align 4
%tmp15 = load i32* @yyend, align 4
call void @yyDo(void (i8*, i32)* @yy_4_body, i32 %tmp14, i32 %tmp15)
br label %l2
l4:
store i32 %yypos2, i32* @yypos
store i32 %yythunkpos2, i32 * @yythunkpos
%tmp16 = call i32 @yymatchChar(i8 97)
%tmp17 = icmp ne i32 %tmp97, 0
br i1 %tmp17, label %StringNotEqualZero4, label %StringEqualZero4
StringNotEqualZero4:
br label %l5
StringEqualZero4:
%tmp18 = load i32* @yybegin, align 4
%tmp19 = load i32* @yyend, align 4
call void @yyDo(void (i8*, i32)* @yy_5_body, i32 %tmp18, i32 %tmp19)
%yypos6 = load i32* @yypos
%yythunkpos6 = load i32* @yythunkpos
%tmp20 = call i32 @yymatchChar(i8 100)
%tmp21 = icmp ne i32 %tmp100, 0
br i1 %tmp21, label %StringNotEqualZero5, label %StringEqualZero5
StringNotEqualZero5:
br label %l7
StringEqualZero5:
%tmp22 = load i32* @yybegin, align 4
%tmp23 = load i32* @yyend, align 4
call void @yyDo(void (i8*, i32)* @yy_6_body, i32 %tmp22, i32 %tmp23)
br label %l6
l7:
store i32 %yypos6, i32* @yypos
store i32 %yythunkpos6, i32 * @yythunkpos
%tmp24 = call i32 @yymatchChar(i8 101)
%tmp25 = icmp ne i32 %tmp101, 0
br i1 %tmp25, label %StringNotEqualZero6, label %StringEqualZero6
StringNotEqualZero6:
br label %l5
StringEqualZero6:
%tmp26 = load i32* @yybegin, align 4
%tmp27 = load i32* @yyend, align 4
call void @yyDo(void (i8*, i32)* @yy_7_body, i32 %tmp26, i32 %tmp27)
l6:
br label %l2
l5:
store i32 %yypos2, i32* @yypos
store i32 %yythunkpos2, i32 * @yythunkpos
%tmp28 = call i32 @yymatchChar(i8 97)
%tmp29 = icmp ne i32 %tmp97, 0
br i1 %tmp29, label %StringNotEqualZero7, label %StringEqualZero7
StringNotEqualZero7:
br label %l8
StringEqualZero7:
%tmp30 = load i32* @yybegin, align 4
%tmp31 = load i32* @yyend, align 4
call void @yyDo(void (i8*, i32)* @yy_8_body, i32 %tmp30, i32 %tmp31)
%yypos9 = load i32* @yypos
%yythunkpos9 = load i32* @yythunkpos
%tmp32 = call i32 @yymatchChar(i8 102)
%tmp33 = icmp ne i32 %tmp102, 0
br i1 %tmp33, label %StringNotEqualZero8, label %StringEqualZero8
StringNotEqualZero8:
br label %l10
StringEqualZero8:
%tmp34 = load i32* @yybegin, align 4
%tmp35 = load i32* @yyend, align 4
call void @yyDo(void (i8*, i32)* @yy_9_body, i32 %tmp34, i32 %tmp35)
%tmp36 = call i32 @yymatchChar(i8 103)
%tmp37 = icmp ne i32 %tmp103, 0
br i1 %tmp37, label %StringNotEqualZero9, label %StringEqualZero9
StringNotEqualZero9:
br label %l10
StringEqualZero9:
%tmp38 = load i32* @yybegin, align 4
%tmp39 = load i32* @yyend, align 4
call void @yyDo(void (i8*, i32)* @yy_10_body, i32 %tmp38, i32 %tmp39)
br label %l9
l10:
store i32 %yypos9, i32* @yypos
store i32 %yythunkpos9, i32 * @yythunkpos
%tmp40 = call i32 @yymatchChar(i8 102)
%tmp41 = icmp ne i32 %tmp102, 0
br i1 %tmp41, label %StringNotEqualZero10, label %StringEqualZero10
StringNotEqualZero10:
br label %l8
StringEqualZero10:
%tmp42 = load i32* @yybegin, align 4
%tmp43 = load i32* @yyend, align 4
call void @yyDo(void (i8*, i32)* @yy_11_body, i32 %tmp42, i32 %tmp43)
%tmp44 = call i32 @yymatchChar(i8 104)
%tmp45 = icmp ne i32 %tmp104, 0
br i1 %tmp45, label %StringNotEqualZero11, label %StringEqualZero11
StringNotEqualZero11:
br label %l8
StringEqualZero11:
%tmp46 = load i32* @yybegin, align 4
%tmp47 = load i32* @yyend, align 4
call void @yyDo(void (i8*, i32)* @yy_12_body, i32 %tmp46, i32 %tmp47)
l9:
br label %l2
l8:
store i32 %yypos2, i32* @yypos
store i32 %yythunkpos2, i32 * @yythunkpos
%tmp48 = call i32 @yymatchChar(i8 97)
%tmp49 = icmp ne i32 %tmp97, 0
br i1 %tmp49, label %StringNotEqualZero12, label %StringEqualZero12
StringNotEqualZero12:
br label %l1
StringEqualZero12:
%tmp50 = load i32* @yybegin, align 4
%tmp51 = load i32* @yyend, align 4
call void @yyDo(void (i8*, i32)* @yy_13_body, i32 %tmp50, i32 %tmp51)
%yypos11 = load i32* @yypos
%yythunkpos11 = load i32* @yythunkpos
%tmp52 = call i32 @yymatchChar(i8 102)
%tmp53 = icmp ne i32 %tmp102, 0
br i1 %tmp53, label %StringNotEqualZero13, label %StringEqualZero13
StringNotEqualZero13:
br label %l12
StringEqualZero13:
call i32 @yyText(i32 %yybegin, i32 %yyend)
%tmp54 = ptrtoint i8* @str0 to i32
%tmp55 = icmp eq i32 %tmp0, 0
br i1 %tmp55, label %PredicateEqualZero0, label %PredicateNotEqualZero0
PredicateEqualZero0:
br label %l12
PredicateNotEqualZero0:
%tmp56 = call i32 @yymatchChar(i8 105)
%tmp57 = icmp ne i32 %tmp105, 0
br i1 %tmp57, label %StringNotEqualZero14, label %StringEqualZero14
StringNotEqualZero14:
br label %l12
StringEqualZero14:
call i32 @yyText(i32 %yybegin, i32 %yyend)
%tmp58 = ptrtoint i8* @str1 to i32
%tmp59 = icmp eq i32 %tmp1, 0
br i1 %tmp59, label %PredicateEqualZero1, label %PredicateNotEqualZero1
PredicateEqualZero1:
br label %l12
PredicateNotEqualZero1:
br label %l11
l12:
store i32 %yypos11, i32* @yypos
store i32 %yythunkpos11, i32 * @yythunkpos
%tmp60 = call i32 @yymatchChar(i8 102)
%tmp61 = icmp ne i32 %tmp102, 0
br i1 %tmp61, label %StringNotEqualZero15, label %StringEqualZero15
StringNotEqualZero15:
br label %l1
StringEqualZero15:
call i32 @yyText(i32 %yybegin, i32 %yyend)
%tmp62 = ptrtoint i8* @str2 to i32
%tmp63 = icmp eq i32 %tmp2, 0
br i1 %tmp63, label %PredicateEqualZero2, label %PredicateNotEqualZero2
PredicateEqualZero2:
br label %l1
PredicateNotEqualZero2:
%tmp64 = call i32 @yymatchChar(i8 106)
%tmp65 = icmp ne i32 %tmp106, 0
br i1 %tmp65, label %StringNotEqualZero16, label %StringEqualZero16
StringNotEqualZero16:
br label %l1
StringEqualZero16:
call i32 @yyText(i32 %yybegin, i32 %yyend)
%tmp66 = ptrtoint i8* @str3 to i32
%tmp67 = icmp eq i32 %tmp3, 0
br i1 %tmp67, label %PredicateEqualZero3, label %PredicateNotEqualZero3
PredicateEqualZero3:
br label %l1
PredicateNotEqualZero3:
l11:
l2:
ret i32 1
l1:
store i32 %yypos0, i32* @yypos
store i32 %yythunkpos0, i32 * @yythunkpos
ret i32 0
}define internal i32 @yy_start()
{
%yypos0 = load i32* @yypos
%yythunkpos0 = load i32* @yythunkpos
%tmp68 = call i32 %yy_body()
%tmp69 = icmp ne i32 %tmp143080904, 0
br i1 %tmp69, label %NameNotEqualZero0, label %NameEqualZero0
NameNotEqualZero0:
br label %l13
NameEqualZero0:
%tmp70 = call i32 @yymatchChar(i8 46)
%tmp71 = icmp ne i32 %tmp46, 0
br i1 %tmp71, label %StringNotEqualZero17, label %StringEqualZero17
StringNotEqualZero17:
br label %l13
StringEqualZero17:
%tmp72 = load i32* @yybegin, align 4
%tmp73 = load i32* @yyend, align 4
call void @yyDo(void (i8*, i32)* @yy_1_start, i32 %tmp72, i32 %tmp73)
ret i32 1
l13:
store i32 %yypos0, i32* @yypos
store i32 %yythunkpos0, i32 * @yythunkpos
ret i32 0
}
define i32 @yyparsefrom(i32 (...)* %yystart)
{
entry:
Successp1.b = load i1* @yybuflen.b, align 1
br i1 Successp1.b, label ond_next, label ond_true
cond_true:
store i1 true, i1* @yybuflen.b, align 1
%tmp5135 = malloc [1024 x i8]
%tmp5135.sub = getelementptr [1024 x i8]* %tmp5135, i32 0, i32 0
store i8* %tmp5135.sub, i8** @yybuf, align 4
store i32 1024, i32* @yytextlen, align 4
%tmp7134 = malloc [1024 x i8]
%tmp7134.sub = getelementptr [1024 x i8]* %tmp7134, i32 0, i32 0
store i8* %tmp7134.sub, i8** @yytext, align 4
%tmp10132133 = malloc [32 x %struct.yythunk]
%tmp10132133.sub = getelementptr [32 x %struct.yythunk]* %tmp10132133, i32 0,
i32 0
store %struct.yythunk* %tmp10132133.sub, %struct.yythunk** @yythunks, align 4
%tmp14130131 = malloc [32 x i32]
%tmp14130131.sub = getelementptr [32 x i32]* %tmp14130131, i32 0, i32 0
store i32* %tmp14130131.sub, i32** @yyvals, align 4
store i32 0, i32* @yylimit, align 4
store i32 0, i32* @yyend, align 4
store i32 0, i32* @yybegin, align 4
%tmp25140 = tail call i32 (...)* %yystart( )
%tmp27142 = icmp eq i32 %tmp25140, 0
br i1 %tmp27142, label %cond_next105, label %bb98
cond_next:
store i32 0, i32* @yyend, align 4
store i32 0, i32* @yybegin, align 4
%tmp25 = tail call i32 (...)* %yystart( )
%tmp27 = icmp eq i32 %tmp25, 0
br i1 %tmp27, label %cond_next105, label %bb98
bb98:
%tmp25137.0.ph = phi i32 [ %tmp25140, %cond_true ], [ %tmp25, %cond_next ]
br label %cond_next105
cond_next105:
%tmp25137.1 = phi i32 [ %tmp25137.0.ph, %bb98 ], [ %tmp25140, %cond_true ], [
%tmp25, %cond_next ]
%tmp106 = load i32* @yylimit, align 4
%tmp110 = icmp eq i32 %tmp106, 0
br i1 %tmp110, label %UnifiedReturnBlock, label %cond_true113
cond_true113:
%tmp115 = load i8** @yybuf, align 4
tail call void @llvm.memmove.i32( i8* %tmp115, i8* %tmp115, i32 %tmp106, i32 1
)
ret i32 %tmp25137.1
UnifiedReturnBlock:
ret i32 %tmp25137.1
}
define i32 @yyparse()
{
entry:
%tmp1 = tail call i32 @yyparsefrom( i32 (...)* %yy_start )
ret i32 %tmp1
}
declare void @llvm.memmove.i32(i8*, i8*, i32, i32)
@str0 = internal constant [2 x i8] c" \00"
@str1 = internal constant [2 x i8] c" \00"
@str2 = internal constant [2 x i8] c" \00"
@str3 = internal constant [2 x i8] c" \00"