diff --git a/llvm/tools/llvm-mca/include/Instruction.h b/llvm/tools/llvm-mca/include/Instruction.h index cd9a0d69c02c..af471a4efc24 100644 --- a/llvm/tools/llvm-mca/include/Instruction.h +++ b/llvm/tools/llvm-mca/include/Instruction.h @@ -246,7 +246,7 @@ public: bool isValid() const { return Begin <= End; } unsigned size() const { return End - Begin; }; - void Subtract(unsigned Cycles) { + void subtract(unsigned Cycles) { assert(End >= Cycles); End -= Cycles; } diff --git a/llvm/tools/llvm-mca/lib/InstrBuilder.cpp b/llvm/tools/llvm-mca/lib/InstrBuilder.cpp index 5195ef2fe958..6f776f396688 100644 --- a/llvm/tools/llvm-mca/lib/InstrBuilder.cpp +++ b/llvm/tools/llvm-mca/lib/InstrBuilder.cpp @@ -98,7 +98,7 @@ static void initializeUsedResources(InstrDesc &ID, for (unsigned J = I + 1; J < E; ++J) { ResourcePlusCycles &B = Worklist[J]; if ((NormalizedMask & B.first) == NormalizedMask) { - B.second.CS.Subtract(A.second.size() - SuperResources[A.first]); + B.second.CS.subtract(A.second.size() - SuperResources[A.first]); if (countPopulation(B.first) > 1) B.second.NumUnits++; }