[llvm-dev] question about operandcycles in class InstrItinData

林政宗 via llvm-dev llvm-dev at lists.llvm.org
Thu Jun 17 19:00:59 PDT 2021


I am not sure about the usage of InstrItinData in td file.


109class InstrItinData<InstrItinClass Class, list<InstrStage> stages,

110                    list<int> operandcycles = [],

111                    list<Bypass> bypasses = [], int uops = 1> {

112  InstrItinClass TheClass = Class;

113  int NumMicroOps = uops;

114  list<InstrStage> Stages = stages;

115  list<int> OperandCycles = operandcycles;

116  list<Bypass> Bypasses = bypasses;



I wonder how the operandcycles correspond to the operands of the instruction.

Each instruction definition has outs and ins. 

Is it that we first write the cycles for outs one by one, and then write the cycles for ins one by one.  And that's the final value for operandcycles.

How should we handle it when we run into the case that the instruction has constraints that an operand in ins is tied to an operand in outs?

Should we just ignore the constrants and stick to the one by one policy(outs first, ins second)? 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210618/95a8a8bf/attachment.html>

More information about the llvm-dev mailing list