diff options
Diffstat (limited to 'llvm/utils/TableGen/CodeGenSchedule.h')
| -rw-r--r-- | llvm/utils/TableGen/CodeGenSchedule.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/llvm/utils/TableGen/CodeGenSchedule.h b/llvm/utils/TableGen/CodeGenSchedule.h index c2af28bbaa0..39443bb35e9 100644 --- a/llvm/utils/TableGen/CodeGenSchedule.h +++ b/llvm/utils/TableGen/CodeGenSchedule.h @@ -167,8 +167,9 @@ struct CodeGenSchedClass { struct CodeGenRegisterCost { Record *RCDef; unsigned Cost; - CodeGenRegisterCost(Record *RC, unsigned RegisterCost) - : RCDef(RC), Cost(RegisterCost) {} + bool AllowMoveElimination; + CodeGenRegisterCost(Record *RC, unsigned RegisterCost, bool AllowMoveElim = false) + : RCDef(RC), Cost(RegisterCost), AllowMoveElimination(AllowMoveElim) {} CodeGenRegisterCost(const CodeGenRegisterCost &) = default; CodeGenRegisterCost &operator=(const CodeGenRegisterCost &) = delete; }; @@ -181,12 +182,18 @@ struct CodeGenRegisterCost { struct CodeGenRegisterFile { std::string Name; Record *RegisterFileDef; + unsigned MaxMovesEliminatedPerCycle; + bool AllowZeroMoveEliminationOnly; unsigned NumPhysRegs; std::vector<CodeGenRegisterCost> Costs; - CodeGenRegisterFile(StringRef name, Record *def) - : Name(name), RegisterFileDef(def), NumPhysRegs(0) {} + CodeGenRegisterFile(StringRef name, Record *def, unsigned MaxMoveElimPerCy = 0, + bool AllowZeroMoveElimOnly = false) + : Name(name), RegisterFileDef(def), + MaxMovesEliminatedPerCycle(MaxMoveElimPerCy), + AllowZeroMoveEliminationOnly(AllowZeroMoveElimOnly), + NumPhysRegs(0) {} bool hasDefaultCosts() const { return Costs.empty(); } }; |

