diff options
author | Jay Foad <jay.foad@amd.com> | 2024-02-13 16:47:45 +0000 |
---|---|---|
committer | Jay Foad <jay.foad@amd.com> | 2024-02-13 16:59:17 +0000 |
commit | e847abc5b47210de63455f67e58225121617873b (patch) | |
tree | fbd4ebe517bcb7613d185a38d9fad1afb2d08dac | |
parent | 1dacfd119071af50eaef21a97a46076ee6ff20fd (diff) | |
download | llvm-e847abc5b47210de63455f67e58225121617873b.zip llvm-e847abc5b47210de63455f67e58225121617873b.tar.gz llvm-e847abc5b47210de63455f67e58225121617873b.tar.bz2 |
[TableGen] Remove trivial helper function hasRegUnit. NFC.
-rw-r--r-- | llvm/utils/TableGen/CodeGenRegisters.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/llvm/utils/TableGen/CodeGenRegisters.cpp b/llvm/utils/TableGen/CodeGenRegisters.cpp index 0b67127..e29bc50 100644 --- a/llvm/utils/TableGen/CodeGenRegisters.cpp +++ b/llvm/utils/TableGen/CodeGenRegisters.cpp @@ -253,11 +253,6 @@ CodeGenRegister::RegUnitList RegUnitIterator::Sentinel; } // end anonymous namespace -// Return true of this unit appears in RegUnits. -static bool hasRegUnit(CodeGenRegister::RegUnitList &RegUnits, unsigned Unit) { - return RegUnits.test(Unit); -} - // Inherit register units from subregisters. // Return true if the RegUnits changed. bool CodeGenRegister::inheritRegUnits(CodeGenRegBank &RegBank) { @@ -1842,9 +1837,8 @@ static bool normalizeWeight(CodeGenRegister *Reg, // for this register, has not been used to normalize a subregister's set, // and has not already been used to singularly determine this UberRegSet. unsigned AdjustUnit = *Reg->getRegUnits().begin(); - if (Reg->getRegUnits().count() != 1 || - hasRegUnit(NormalUnits, AdjustUnit) || - hasRegUnit(UberSet->SingularDeterminants, AdjustUnit)) { + if (Reg->getRegUnits().count() != 1 || NormalUnits.test(AdjustUnit) || + UberSet->SingularDeterminants.test(AdjustUnit)) { // We don't have an adjustable unit, so adopt a new one. AdjustUnit = RegBank.newRegUnit(UberSet->Weight - RegWeight); Reg->adoptRegUnit(AdjustUnit); |