[LLVMdev] Given alias knowledge, how to optimize?
Duncan Sands
baldrick at free.fr
Wed Aug 29 08:40:28 PDT 2012
Hi Jun,
> i have following 3 simple lines of LLVM code:
>
>
> store i32 100, i32* @XXX ; (1)
> %2 = load i32* %1 ; (2)
> store i32 %2, i32* @XXX ; (3)
>
>
> my question: is there any trick to optimize away line (1), given that
> i know (for sure) that @XXX does not alias to %1?
how do you know this?
> if this is possible, how can i tell the optimizer that @XXX does not
> alias to %1?
The answer to this depends on the reason why %1 can't alias @XXX.
Ciao, Duncan.
More information about the llvm-dev
mailing list