[LLVMdev] Given alias knowledge, how to optimize?

Jun Koi junkoi2004 at gmail.com
Wed Aug 29 03:10:23 PDT 2012


hi,

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?

if this is possible, how can i tell the optimizer that @XXX does not
alias to %1?

thanks so much,
Jun



More information about the llvm-dev mailing list