[LLVMdev] OperandWithDefaultOps question

Tom Stellard tom at stellard.net
Fri Feb 1 17:20:26 PST 2013


On Fri, Feb 01, 2013 at 04:58:29PM -0800, Joe Matarazzo wrote:
> Is it possible to use this operand class in an instruction that has a
> pattern defined? If so, can you write it with anything besides a
> ComplexPattern in the instruction's pattern DAG, to set it to a value?
> Can you refer to it at all? Or would it be added to the MachineInstr
> with the default value such that you could modify it later in the
> backend?
>

You can use OperandWithDefaultOps in an instruction with a pattern.
Take a look at the R600 target it has a lot of instructions that use
this operand class.

It's been a while since I looked at this, but I don't think you can
reference a member of this operand class in the pattern, but you
should try it out to be sure.

-Tom


> If there is a non-ComplexPattern way to write this, can you provide an example?
> 
> Thanks,
> Joe
> _______________________________________________
> 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