[LLVMdev] how to pass message from LLVM IR to bachend code

Chris Lattner sabre at nondot.org
Sun Jul 10 18:47:59 PDT 2005


On Sun, 10 Jul 2005 shding at mtu.edu wrote:
> Hi:
>   I want to pass some message of instructions from LLVM Internal
> representation to backend  code. For example, I make a flag for some
> certain operands of certain instructions. How can  it be passed to the
> backend instructions? Which programs I should look into? Would someone
> give me some idea? Thank you !

The easiest way to do this is to extend the LLVM IR itself.  As a simple 
example of this, you can take a look at how the PHINode class has an extra 
'reservedspace' member (ignore what it is used for though), or the 
load/store instructions track the 'isVolatile' flag.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.cs.uiuc.edu/




More information about the llvm-dev mailing list