[llvm-dev] path from a location to the program entry

Syed Rafiul Hussain via llvm-dev llvm-dev at lists.llvm.org
Mon Apr 25 18:12:36 PDT 2016


I want to find the path from a program location to main.entry.  Lets
consider the following program where I am interested to find the path
from p = &a to main.entry.

int *p;
int a, b;

void foo(){
     ...
     p = &a;  // <---  location
     ...
}

void bar(){
    ...
    p = &b;
    ...
}

void main(){

   foo();
   ...
}


Is there any transformation pass that inlines callees into callers or
vice versa and make a one-whole function so that I can backtrack from
fun_ptr = &foo to main.entry.

Thanks,
Syed

-- 
Rafi


More information about the llvm-dev mailing list