In SelectionDAG, what's the difference between getConstant and getTargetConstant? One creates a node with opcode Constant and the other with TargetConstant. What's the semantic difference? In X86ISelLowering I need to create a constant vector and put it in memory so I can reference it as an operand. I don't see any examples of doing this. Is it possible? If so, what's the magic? Thanks! -Dave
I added some comments here: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20100426/100541.html To put a constant in memory, you should use a constant pool entry, and the constant pool infrastructure. Dan On Apr 29, 2010, at 8:23 AM, David Greene wrote:> In SelectionDAG, what's the difference between getConstant and > getTargetConstant? One creates a node with opcode Constant and the > other with TargetConstant. What's the semantic difference? > > In X86ISelLowering I need to create a constant vector and put > it in memory so I can reference it as an operand. I don't see > any examples of doing this. Is it possible? If so, what's the > magic? > > Thanks! > > -Dave > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
On Thursday 29 April 2010 12:01:19 Dan Gohman wrote:> I added some comments here: > http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20100426/100541 >.html > > To put a constant in memory, you should use a constant pool entry, and the > constant pool infrastructure.Yeah, I figured that was the case. Oh, I just found an example in x86 lowering. Great! Thanks for the extra commentary on TargetConstant. -Dave
Seemingly Similar Threads
- [LLVMdev] Target Constants
- [LLVMdev] Inserting nodes into SelectionDAG (X86)
- [LLVMdev] Inserting nodes into SelectionDAG (X86)
- [LLVMdev] How to enable use of 64bit load/store for 32bit architecture
- [LLVMdev] How to enable use of 64bit load/store for 32bit architecture