[LLVMdev] basicaa result

Haopeng Liu hyliuhp at gmail.com
Thu Feb 19 16:07:10 PST 2015


Hi,

I'm trying to explore basicaa alias analysis.

test.c:
int main() {
     int a;
     int *p, *q;
     p = &a;
     q = p;
     ...
}

Commands:
clang -emit-llvm -c -g -O0 test.c -o test.bc
opt -basicaa -print-must-aliases test.bc

However, the result shows that p and q are no alias.

Could anyone explain it? Your help is much appreciated!

-Haopeng



More information about the llvm-dev mailing list