search for: test_fun

Displaying 8 results from an estimated 8 matches for "test_fun".

Did you mean: test_func
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 produc...
2010 Mar 15
0
[LLVMdev] LLVM tries to remove labels used in blockaddress()
...: > I see. 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: >...
2010 Mar 15
1
[LLVMdev] LLVM tries to remove labels used in blockaddress()
...in 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...
2010 Mar 15
0
[LLVMdev] LLVM tries to remove labels used in blockaddress()
...I added, specifically 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 (Unreach...
2010 Mar 15
3
[LLVMdev] LLVM tries to remove labels used in blockaddress()
...0x000000000052cf24 main + 3556 # 14 libc.so.6 0x00002b24f7ebda3d __libc_start_main + 253 # 15 llc 0x000000000052ac29 # Stack dump: # 0. Program arguments: llc -o main.s -f main.bc # 1. Running pass 'Remove unreachable blocks from the CFG' on function '@test_fun' I'm using the current svn version (revision 98542). 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. Regards, Sebastian -------------- next part -------------- A non-text attachment was...
2010 Mar 15
2
[LLVMdev] LLVM tries to remove labels used in blockaddress()
...e: > >> 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 opt...
2010 Mar 15
0
[LLVMdev] LLVM tries to remove labels used in blockaddress()
...lier 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...
2013 Mar 01
1
.Call interface: Use R SEXP as C mutable *char
Dear R Developers, DISCLAIMER: I am new to package development in R and new to this list. I am trying to do something along the lines of: SEXP test_fun (SEXP filename) { const char *inputfile = translateChar(STRING_ELT(filename, 0)); int abc = some_function(inputfile); ... } The code compiles fine, but I get a warning: "passing argument of 'some_function' discards qualifiers from pointer target type" I read up on my issue...