[LLVMdev] How to determine Immediate Type in MachineOperand class?

Evan Cheng evan.cheng at apple.com
Fri Jan 23 14:01:10 PST 2009


On Jan 23, 2009, at 11:55 AM, Sanjay Soman wrote:

> Hi,
>    I would like to get the type of immediate value (integer) from  
> MachineOperand Class. Currently the immediate value is being  
> represented as int64_t.
> int64_t ImmVal; // For MO_Immediate.
>
> Is it possible to find out whether the immediate value is int8, 16,  
> 32 etc?
>
> Note: My target has a virtual Instruction set.
>
> Thanks in advance,
> -Sanjay
>

It's not possible. MachineOperand and TargetOperandInfo do not carry  
type information.

Evan

> _______________________________________________
> 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/20090123/7ff5104d/attachment.html>


More information about the llvm-dev mailing list