Displaying 4 results from an estimated 4 matches for "fptreqtest".
2008 Nov 04
4
[LLVMdev] Debugging lli using bugpoint
...dio.h>
#include<stdlib.h>
void test();
void (*funcPtr)();
int main(int argc, char **argv) {
funcPtr = test;
test();
}
void test() {
if(funcPtr == test) {
printf("OK!\n");
} else {
fprintf(stderr, "Bad!\n");
exit(1);
}
}
$ llvm-gcc -emit-llvm -o FPtrEqTest.bc -c FPtrEqTest.c
$ llc -f FPtrEqTest.bc
$ gcc -o FPtrEqTest FPtrEqTest.s
$ ./FPtrEqTest
OK!
$ lli FPtrEqTest.bc
Bad!
The above test case is just a smaller version of the one in Python's
subtype_traverse which also tests a function pointer and calls itself. It
seems the problem arises due co...
2008 Nov 11
0
[LLVMdev] Debugging lli using bugpoint
...int main(int argc, char **argv) {
> funcPtr = test;
> test();
> }
>
> void test() {
> if(funcPtr == test) {
> printf("OK!\n");
> } else {
> fprintf(stderr, "Bad!\n");
> exit(1);
> }
> }
>
> $ llvm-gcc -emit-llvm -o FPtrEqTest.bc -c FPtrEqTest.c
> $ llc -f FPtrEqTest.bc
> $ gcc -o FPtrEqTest FPtrEqTest.s
> $ ./FPtrEqTest
> OK!
>
> $ lli FPtrEqTest.bc
> Bad!
>
> The above test case is just a smaller version of the one in Python's
> subtype_traverse which also tests a function pointer an...
2008 Nov 03
0
[LLVMdev] Debugging lli using bugpoint
Hi Prakash,
Unfortunately it looks like you need to do quite a bit of
investigation into this. However, I hope I can provide some useful tips.
1. In general, lli and llc generate exact the same code except lli
default to static codegen while llc defaults to dynamic-no-pic
codegen. So try passing -relocation-model=dynamic-no-pic to lli. If
this works, that means there are issues with
2008 Nov 02
2
[LLVMdev] Debugging lli using bugpoint
Hi Eli,
Thanks for the reply. I tried with -Xlinker="-ldl ". However it does not
seem to make a difference. It seems that when bugpoint is run with
--run-jit, the linker args are not passed to gcc (from
tools/bugpoint/ExecutionDriver.cpp) :
if (InterpreterSel == RunLLC || InterpreterSel == RunCBE ||
InterpreterSel == CBE_bug || InterpreterSel == LLC_Safe)
RetVal =