[LLVMdev] Distinguish variadic register defines/uses in MCInstrDesc?

Jakob Stoklund Olesen stoklund at 2pi.dk
Wed Sep 26 11:18:20 PDT 2012


On Sep 24, 2012, at 6:39 PM, Christoph Grenz <christophg+llvm at grenz-bonn.de> wrote:

> Is it possible to extend LLVM to check if 'variable_ops' is in 'ins' and/or 
> 'outs' in tablegen, so that MCInstrDesc could provide something like 
> hasVariadicDefs() and hasVariadicUses()?
> 
> That way handling variadic instructions when disassembling would be much 
> easier and only instructions with variadic uses and defines would need 
> explicit special casing - if they even exist.

Hi Christoph,

As you noticed, MCInstrDesc doesn't distinguish between variadic uses and defs. Since variadic instructions will always require some kind of special handling, it doesn't seem worthwhile to make the model more detailed.

I think your current workaround sounds fine.

/jakob



More information about the llvm-dev mailing list