[LLVMdev] ConstantExpr Evaluation

bdavis at cs.fsu.edu bdavis at cs.fsu.edu
Thu Oct 27 10:12:48 PDT 2011


Hi,

What I'm currently working on is a translation from LLVM IR to a  
register transfer list format used in VPO.

If my understanding of ConstantExpr is correct, that they can be  
evaluated at compile-time, how can I simply have them be evaluated but  
have the code still remain in IR format?

For example, in:

store i32 1, i32* getelementptr [6 x i32]* @arr, i32 0, i32 0

the getelementptr ConstantExpr can be evaluated at compile-time, so is  
there a way to run a pass and end up with something like:

store i32 1, i32* ???

where ??? is not another ConstantExpr, but rather a ConstantInt or similar.


Thanks,
Brandon

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.





More information about the llvm-dev mailing list