[llvm] [NFC][TableGen] Code cleanup in CodeGenRegister (PR #137994)
Rahul Joshi via llvm-commits
llvm-commits at lists.llvm.org
Fri May 2 05:08:59 PDT 2025
================
@@ -1915,23 +1897,22 @@ static void computeUberWeights(std::vector<UberRegSet> &UberSets,
}
if (Weight > MaxWeight)
MaxWeight = Weight;
- if (I->Weight != MaxWeight) {
- LLVM_DEBUG(dbgs() << "UberSet " << I - UberSets.begin() << " Weight "
- << MaxWeight;
- for (auto &Unit
- : I->Regs) dbgs()
- << " " << Unit->getName();
- dbgs() << "\n");
+ if (S.Weight != MaxWeight) {
+ LLVM_DEBUG({
+ dbgs() << "UberSet " << &S - UberSets.begin() << " Weight "
+ << MaxWeight;
+ for (auto &Unit : S.Regs)
+ dbgs() << " " << Unit->getName();
----------------
jurahul wrote:
Kept the loop, but fixed auto and the var name as well (its a Register, not a unit).
https://github.com/llvm/llvm-project/pull/137994
More information about the llvm-commits
mailing list