diff options
| author | Sergei Barannikov <barannikov88@gmail.com> | 2025-11-23 03:22:48 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-23 00:22:48 +0000 |
| commit | 0619292195ecd47ac05b0c7759992b400abec52c (patch) | |
| tree | 8083c89d2efdc825200e5b934043b8768380f7ba /llvm/utils/TableGen/DAGISelMatcherGen.cpp | |
| parent | 2d051adc75b45ff7f213bb5d4ee208ac999fc125 (diff) | |
[TableGen] Constify CodeGenInstruction where possible (NFC) (#169193)
Diffstat (limited to 'llvm/utils/TableGen/DAGISelMatcherGen.cpp')
| -rw-r--r-- | llvm/utils/TableGen/DAGISelMatcherGen.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/utils/TableGen/DAGISelMatcherGen.cpp b/llvm/utils/TableGen/DAGISelMatcherGen.cpp index d84bfa8d0c92..afc75f1ecf4a 100644 --- a/llvm/utils/TableGen/DAGISelMatcherGen.cpp +++ b/llvm/utils/TableGen/DAGISelMatcherGen.cpp @@ -690,7 +690,7 @@ void MatcherGen::EmitResultLeafAsOperand(const TreePatternNode &N, MVT::SimpleValueType ResultVT = N.getSimpleType(0); auto IDOperandNo = NextRecordedOperandNo++; const Record *ImpDef = Def->getRecords().getDef("IMPLICIT_DEF"); - CodeGenInstruction &II = CGP.getTargetInfo().getInstruction(ImpDef); + const CodeGenInstruction &II = CGP.getTargetInfo().getInstruction(ImpDef); AddMatcher(new EmitNodeMatcher(II, ResultVT, {}, false, false, false, false, -1, IDOperandNo)); ResultOps.push_back(IDOperandNo); @@ -749,7 +749,7 @@ static bool mayInstNodeLoadOrStore(const TreePatternNode &N, const CodeGenDAGPatterns &CGP) { const Record *Op = N.getOperator(); const CodeGenTarget &CGT = CGP.getTargetInfo(); - CodeGenInstruction &II = CGT.getInstruction(Op); + const CodeGenInstruction &II = CGT.getInstruction(Op); return II.mayLoad || II.mayStore; } @@ -776,7 +776,7 @@ void MatcherGen::EmitResultInstructionAsOperand( const TreePatternNode &N, SmallVectorImpl<unsigned> &OutputOps) { const Record *Op = N.getOperator(); const CodeGenTarget &CGT = CGP.getTargetInfo(); - CodeGenInstruction &II = CGT.getInstruction(Op); + const CodeGenInstruction &II = CGT.getInstruction(Op); const DAGInstruction &Inst = CGP.getInstruction(Op); bool isRoot = &N == &Pattern.getDstPattern(); @@ -1046,7 +1046,7 @@ void MatcherGen::EmitResultCode() { const TreePatternNode &DstPat = Pattern.getDstPattern(); if (!DstPat.isLeaf() && DstPat.getOperator()->isSubClassOf("Instruction")) { const CodeGenTarget &CGT = CGP.getTargetInfo(); - CodeGenInstruction &II = CGT.getInstruction(DstPat.getOperator()); + const CodeGenInstruction &II = CGT.getInstruction(DstPat.getOperator()); if (II.HasOneImplicitDefWithKnownVT(CGT) != MVT::Other) HandledReg = II.ImplicitDefs[0]; |
