[LLVMdev] Determining the register type of a MachineOperand
Mon Ping Wang
wangmp at apple.com
Wed Sep 24 13:23:28 PDT 2008
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>
More information about the llvm-dev
mailing list