search for: test_label

Displaying 7 results from an estimated 7 matches for "test_label".

Did you mean: set_label
2010 Mar 15
3
[LLVMdev] LLVM tries to remove labels used in blockaddress()
I see. But the block does not necessarily contain dead code. My original problem is more like this: define i32 @main() { entry: %target = bitcast i8* blockaddress(@test_fun, %test_label) to i8* call i32 @test_fun(i8* %target) ret i32 0 } define i32 @test_fun(i8* %target) { entry: indirectbr i8* %target, [label %test_label] test_label: ; assume some code here... br label %ret ret: ret i32 -1 } The code after test_label can be reached, but this example produces also an er...
2010 Mar 15
0
[LLVMdev] LLVM tries to remove labels used in blockaddress()
...ee. But the block does not necessarily contain dead code. This case is now fixed in r98566, I will fix the 'dead block' case in a bit. -Chris > > My original problem is more like this: > > define i32 @main() { > entry: > %target = bitcast i8* blockaddress(@test_fun, %test_label) to i8* > > call i32 @test_fun(i8* %target) > > ret i32 0 > } > > define i32 @test_fun(i8* %target) { > entry: > indirectbr i8* %target, [label %test_label] > > test_label: > ; assume some code here... > br label %ret > > ret: > ret i32 -1 &...
2010 Mar 15
1
[LLVMdev] LLVM tries to remove labels used in blockaddress()
...e. > > This case is now fixed in r98566, I will fix the 'dead block' case in a bit. > > -Chris > > > > > My original problem is more like this: > > > > define i32 @main() { > > entry: > > %target = bitcast i8* blockaddress(@test_fun, %test_label) to i8* > > > > call i32 @test_fun(i8* %target) > > > > ret i32 0 > > } > > > > define i32 @test_fun(i8* %target) { > > entry: > > indirectbr i8* %target, [label %test_label] > > > > test_label: > > ; assume some code he...
2010 Mar 15
0
[LLVMdev] LLVM tries to remove labels used in blockaddress()
...ecifically to catch bugs like: > An earlier revision simply generated asm-code, where the appropriate label was missing, thus causing gcc to fail when i wanted to compile the asm-file. Here is a slightly reduced testcase: define i8* @test1() nounwind { entry: ret i8* blockaddress(@test_fun, %test_label) } define i32 @test_fun() nounwind { entry: ret i32 -1 test_label: br label %ret ret: ret i32 -1 } The basic problem is that we codegen test1, which generates a reference to test_label, then we codegen test_func. The optimization passes that run before the code generator (UnreachableBlockElim...
2010 Mar 15
3
[LLVMdev] LLVM tries to remove labels used in blockaddress()
...-case that produces this error. (The original problem is much more complicated, so i hope the reduced example, which has no indirectbr but produces an error nevertheless, will suffice.) I compile the code with: # llvm-as -o main.bc main.ll # llc -o main.s main.bc and get: # While deleting: label %test_label # An asserting value handle still pointed to this value! # UNREACHABLE executed at Value.cpp:522! # 0 llc 0x0000000000c67cdf # 1 llc 0x0000000000c684fd # 2 libpthread.so.0 0x00002b24f70db0f0 # 3 libc.so.6 0x00002b24f7ed2435 gsignal + 53 # 4 libc.so.6 0x00002...
2010 Mar 15
2
[LLVMdev] LLVM tries to remove labels used in blockaddress()
...t;> An earlier revision simply generated asm-code, where the appropriate label was missing, thus causing gcc to fail when i wanted to compile the asm-file. > > Here is a slightly reduced testcase: > > define i8* @test1() nounwind { > entry: > ret i8* blockaddress(@test_fun, %test_label) > } > > define i32 @test_fun() nounwind { > entry: > ret i32 -1 > test_label: > br label %ret > ret: > ret i32 -1 > } > > The basic problem is that we codegen test1, which generates a reference to test_label, then we codegen test_func. The optimization pas...
2010 Mar 15
0
[LLVMdev] LLVM tries to remove labels used in blockaddress()
...on simply generated asm-code, where the appropriate label was missing, thus causing gcc to fail when i wanted to compile the asm-file. >> >> Here is a slightly reduced testcase: >> >> define i8* @test1() nounwind { >> entry: >> ret i8* blockaddress(@test_fun, %test_label) >> } >> >> define i32 @test_fun() nounwind { >> entry: >> ret i32 -1 >> test_label: >> br label %ret >> ret: >> ret i32 -1 >> } >> >> The basic problem is that we codegen test1, which generates a reference to test_label,...