Displaying 4 results from an estimated 4 matches for "func_on".
Did you mean:
funcion
2002 Dec 06
3
[LLVMdev] Tarjan+function_ptrs == trouble ? (fwd)
...help. I assume this has to do
> with data structure analysis? Can you provide a testcase?
>
> -Chris
>
>
-------------- next part --------------
#include <stdlib.h>
#include <stdio.h>
//#define WORKS
int * a_global;
int a_predicate = 1;
int another_pred =0;
int func_one()
{
return 1;
}
int func_two()
{
return 2;
}
int func_three()
{
return 3;
}
int main()
{
int (*func_ptr)();
if(a_predicate)
func_ptr = func_one;
else if(another_pred)
func_ptr = func_two;
else
func_ptr = func_three;
#ifdef WORKS...
2002 Dec 06
1
[LLVMdev] Tarjan+function_ptrs == trouble ?
...t the SCC iterator seems to not be doing the
> right thing. On the testcase (below), and with the pass below, I get the
> following:
>
> $ opt -load /localhome/lattner/llvm/lib/Debug/libtest.so -test < test.o > /dev/null
> New SCC
> Node: __main
> New SCC
> Node: func_one
> New SCC
> Node: func_two
> New SCC
> Node: func_three
>
> Which doesn't visit main. Vikram, could you look into this if you get a
> chance?
>
> -Chris
>
> ------------------- Pass code ----------------------------
>
> #include "llvm/Analys...
2002 Dec 06
0
[LLVMdev] Tarjan+function_ptrs == trouble ?
...oing on.
Despite that, I can verify that the SCC iterator seems to not be doing the
right thing. On the testcase (below), and with the pass below, I get the
following:
$ opt -load /localhome/lattner/llvm/lib/Debug/libtest.so -test < test.o > /dev/null
New SCC
Node: __main
New SCC
Node: func_one
New SCC
Node: func_two
New SCC
Node: func_three
Which doesn't visit main. Vikram, could you look into this if you get a
chance?
-Chris
------------------- Pass code ----------------------------
#include "llvm/Analysis/CallGraph.h"
#include "llvm/Function.h"
#includ...
2002 Dec 06
2
[LLVMdev] Tarjan+function_ptrs == trouble ? (fwd)
Dear LLVM,
Recently I incorporated code into my project such that function pointers
were supported, however it seems that the TarjanSCC_iterator no longer
works on the call graph... main() is no longer reached while the function
pointers are... I can provide code, but I have a feeling there is a
simple fix... Has anyone gone through this?
Thanks,
Dave