shding at mtu.edu
2005-Jul-11 15:16 UTC
[LLVMdev] how to pass message from LLVM IR to bachend code
Hi: I have extended the IR for adding flag. But I just want this flag to pass through the backend machine code. I know there're several passes like register relocation, schedualing, etc. But I think I just miss the part which is used to "parser" the LLVM IR to machine code instructions. Would you give me some help? Thank you !> 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/ > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev >-- Shuhan
Chris Lattner
2005-Jul-12 06:17 UTC
[LLVMdev] how to pass message from LLVM IR to bachend code
On Mon, 11 Jul 2005 shding at mtu.edu wrote:> I have extended the IR for adding flag. But I just want this flag to > pass through the backend machine code. I know there're several passes > like register relocation, schedualing, etc. But I think I just miss the > part which is used to "parser" the LLVM IR to machine code > instructions.The part of the code generator that converts LLVM IR to machine code IR is called the 'instruction selection' phase. You can find some documentation for it here: http://llvm.cs.uiuc.edu/docs/CodeGenerator.html#instselect Unfortunately the code generator is not as well documented as it should be (though this is slowly improving). The best way to see how this process works is to look at example instructions. Most of the code for lowering standard instructions is held in lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp -Chris>> 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/ >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev >> > > >-Chris -- http://nondot.org/sabre/ http://llvm.org/
shding at mtu.edu
2005-Jul-13 19:34 UTC
[LLVMdev] how to pass message from LLVM IR to bachend code
Hi, In the directory of lib/CodeGen/SelectionDAG, I cann't find SelectionDAGISel.cpp. I only have DAGBuilder.cpp and SelectionDAG.cpp. I don't know why. My edtion is 1.4. Is it because of the edtion difference? Thanks!> On Mon, 11 Jul 2005 shding at mtu.edu wrote: >> I have extended the IR for adding flag. But I just want this flag to >> pass through the backend machine code. I know there're several passes >> like register relocation, schedualing, etc. But I think I just miss the >> part which is used to "parser" the LLVM IR to machine code >> instructions. > > The part of the code generator that converts LLVM IR to machine code IR is > called the 'instruction selection' phase. You can find some documentation > for it here: > http://llvm.cs.uiuc.edu/docs/CodeGenerator.html#instselect > > Unfortunately the code generator is not as well documented as it should be > (though this is slowly improving). The best way to see how this process > works is to look at example instructions. Most of the code for lowering > standard instructions is held in > lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp > > -Chris > >>> 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/ >>> >>> _______________________________________________ >>> LLVM Developers mailing list >>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >>> http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev >>> >> >> >> > > -Chris > > -- > http://nondot.org/sabre/ > http://llvm.org/ > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev >-- Shuhan
Maybe Matching Threads
- [LLVMdev] how to pass message from LLVM IR to bachend code
- [LLVMdev] how to pass message from LLVM IR to bachend code
- [LLVMdev] how to pass message from LLVM IR to bachend code
- [LLVMdev] how to pass message from LLVM IR to bachend code
- Windows 2003 domU can not use 7G RAM ?