Hi, I was wondering how exactly LLVM handles the ConstantExpr, specifically GEP ConstantExpr, in code generation. From what I'm reading, translating these Constant Expressions into Instructions can slow the code, so I'd like to be able to handle ConstantExpr in the same way that LLVM code generation does. Thanks, Brandon ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
Hi Brandon,> I was wondering how exactly LLVM handles the ConstantExpr, > specifically GEP ConstantExpr, in code generation. From what I'm > reading, translating these Constant Expressions into Instructions can > slow the code, so I'd like to be able to handle ConstantExpr in the > same way that LLVM code generation does.I think this is handled in lib/CodeGen/AsmPrinter/AsmPrinter.cpp in the LowerConstant method. It looks like it only handles the case where the GEP indices are explicit integers (ConstantInt). Ciao, Duncan.