Villmow, Micah
2008-Sep-24 19:15 UTC
[LLVMdev] Determining the register type of a MachineOperand
This only has the register class information, not the register type information. My register class has multiple register types and I need to know how to differentiate which register type of my register class of the current register. The information in the MVT data type is what I need, i.e. the position in the GPRVT array of each register. Something equivalent to MVT getValueType() but for registers. Thanks, ________________________________ From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Evan Cheng Sent: Wednesday, September 24, 2008 10:22 AM To: LLVM Developers Mailing List Subject: Re: [LLVMdev] Determining the register type of a MachineOperand You can get to the MachineInstr from a MachineOperand. Then get to its TargetInstrDesc and TargetOperandInfo which has register class information. Evan On Sep 23, 2008, at 12:44 PM, Villmow, Micah wrote: How do I determine what type of register(i.e. i32, f32, etc..) I am accessing from a MachineOperand? I.e. how do I get to the MVT struct, or equivalent information, from a MachineOperand object? Micah Villmow Systems Engineer Advanced Technology & Performance Advanced Micro Devices Inc. 4555 Great America Pkwy, Santa Clara, CA. 95054 P: 408-572-6219 F: 408-572-6596 _______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080924/a0483607/attachment.html>
Mon Ping Wang
2008-Sep-24 20:23 UTC
[LLVMdev] Determining the register type of a MachineOperand
To my knowledge, I don't think there is an easy way to get the MVT information from a MachineOperand. Why do you need it for? In my mind, the MachineInstr and its associated operands represent a physical machine instruction and I typically want to think of those as machine opcodes and machine register files. I am typically interested in the mapping of MVTs to register classes when I'm generating machine instructions. Note that a register class may map to multiple MVTs depending on your description. -- Mon Ping On Sep 24, 2008, at 12:15 PM, Villmow, Micah wrote:> This only has the register class information, not the register type > information. > > My register class has multiple register types and I need to know how > to differentiate which register type of my register class of the > current register. > The information in the MVT data type is what I need, i.e. the > position in the GPRVT array of each register. > > Something equivalent to MVT getValueType() but for registers. > > Thanks, > > From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev- > bounces at cs.uiuc.edu] On Behalf Of Evan Cheng > Sent: Wednesday, September 24, 2008 10:22 AM > To: LLVM Developers Mailing List > Subject: Re: [LLVMdev] Determining the register type of a > MachineOperand > > You can get to the MachineInstr from a MachineOperand. Then get to > its TargetInstrDesc and TargetOperandInfo which has register class > information. > > Evan > > On Sep 23, 2008, at 12:44 PM, Villmow, Micah wrote: > > > How do I determine what type of register(i.e. i32, f32, etc..) I am > accessing from a MachineOperand? I.e. how do I get to the MVT > struct, or equivalent information, from a MachineOperand object? > > Micah Villmow > Systems Engineer > Advanced Technology & Performance > Advanced Micro Devices Inc. > 4555 Great America Pkwy, > Santa Clara, CA. 95054 > P: 408-572-6219 > F: 408-572-6596 > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080924/d76a01d8/attachment.html>
David Greene
2008-Sep-26 15:38 UTC
[LLVMdev] Determining the register type of a MachineOperand
On Wednesday 24 September 2008 15:23, Mon Ping Wang wrote:> To my knowledge, I don't think there is an easy way to get the MVT > information from a MachineOperand. Why do you need it for? In mySee the thread I started on this very topic. Spilling is one place you'd like to have this information.> mind, the MachineInstr and its associated operands represent a > physical machine instruction and I typically want to think of those as > machine opcodes and machine register files. I am typically interested > in the mapping of MVTs to register classes when I'm generating machine > instructions. Note that a register class may map to multiple MVTs > depending on your description.Right, but the instruction opcode should give a clue about what the bits represent. That mapping is what's currently missing. -Dave
Reasonably Related Threads
- [LLVMdev] Determining the register type of a MachineOperand
- [LLVMdev] Modeling GPU vector registers, again (with my implementation)
- [LLVMdev] Determining the register type of a MachineOperand
- [LLVMdev] Determining the register type of a MachineOperand
- [PATCH 1/2] allow path to envyas binary to be specified