[llvm-commits] [PATCH] More Spill Annotations

David Greene dag at cray.com
Tue Nov 24 06:29:15 PST 2009


On Monday 23 November 2009 21:04, Evan Cheng wrote:

> > To do isVectorInstr and isVectorOperandInstr will require some additional
> > flags in the .td files, I think.  Is that ok?  I don't want to to a whole
> > bunch of work to find out later that there's a better way.
>
> What kind of flags? These are fairly target specific information so I don't
> think we want to add anything target independent. Can you enhance asm
> printer so targets can inject target specific comments?

I was thinking of doing this by having TableGen infer isVector flags on
instructions and operands from the type.  If an operand has a vector type,
set the isVector flag on the operand.  If an instruction has any operands
with isVector set, set isVector on the instruction.  The user can then 
override these assumptions in the .td file by setting "let scalar=1" or
"let vector=1."

I'm not sure how target-specific comments would work.  Do you have an
example in mind?  I want to avoid having to mark every vector instruction as 
the information can be inferred for 90% of the cases.

                             -Dave



More information about the llvm-commits mailing list