[LLVMdev] Does LLVM optimize variable to constant value in the compiling time?

Robert Sandra robert.sandra0712 at gmail.com
Fri Feb 22 13:16:10 PST 2013


Considering the following codes:

int x = 21;

if(x > 20) {

    p = &C;

} else {

    p = &E;

}


I looked into the bitcode that LLVM generates, it still considers the
'else' branch, which will be never reached during the runtime.


Thanks,

Robert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130222/47e98f03/attachment.html>


More information about the llvm-dev mailing list