[LLVMdev] MVT (machine value type) for MachineOperand

Matthias Braun mbraun at apple.com
Thu May 28 16:07:09 PDT 2015


For the registers on register operands you can query MachineRegisterInfor for their Class. The registerclass should have a list of possible types (usually with the same size in bits) assigned.

- Matthias

> On May 28, 2015, at 8:11 AM, Fabian Gruber <fabian.gruber at fadeopolis.com> wrote:
> 
> Hi,
> 
> I am writing a small tool to gather some static statistics on machine code using LLVMs MachineInstr, etc., infrastructure.
> My current goal is to count the number of bytes of integer and floating point data being processed per iteration of a loop.
> Now I've ran into the problem that I can't find any obvious way to get the actual type of a MachineOperand.
> 
> After some digging I noticed that the selection DAG has some type information and I had a look at the TableGen records that contain this type info. I started looking into how I could generate some descriptor tables with that information but TableGen is quite a handfull, and I'd like to avoid this if I can.
> 
> Did I overlook some easy way to get at type information at the MachineOperand level?
> 
> Thanks.
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev





More information about the llvm-dev mailing list