[llvm] d9c0166 - [MachineScheduler] Rename Reg2SUnitsMap to RegUnit2SUnitsMap
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 8 09:47:11 PDT 2023
Author: Jay Foad
Date: 2023-08-08T17:47:04+01:00
New Revision: d9c0166f12f0231df0893a397326efb93935ed26
URL: https://github.com/llvm/llvm-project/commit/d9c0166f12f0231df0893a397326efb93935ed26
DIFF: https://github.com/llvm/llvm-project/commit/d9c0166f12f0231df0893a397326efb93935ed26.diff
LOG: [MachineScheduler] Rename Reg2SUnitsMap to RegUnit2SUnitsMap
This is a follow up to D156552.
Added:
Modified:
llvm/include/llvm/CodeGen/ScheduleDAGInstrs.h
llvm/lib/CodeGen/ScheduleDAGInstrs.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/CodeGen/ScheduleDAGInstrs.h b/llvm/include/llvm/CodeGen/ScheduleDAGInstrs.h
index abffcd5dca16fb..ef7662a8e7a26a 100644
--- a/llvm/include/llvm/CodeGen/ScheduleDAGInstrs.h
+++ b/llvm/include/llvm/CodeGen/ScheduleDAGInstrs.h
@@ -88,7 +88,7 @@ namespace llvm {
/// Use a SparseMultiSet to track physical registers. Storage is only
/// allocated once for the pass. It can be cleared in constant time and reused
/// without any frees.
- using Reg2SUnitsMap =
+ using RegUnit2SUnitsMap =
SparseMultiSet<PhysRegSUOper, identity<unsigned>, uint16_t>;
/// Use SparseSet as a SparseMap by relying on the fact that it never
@@ -166,8 +166,8 @@ namespace llvm {
/// iterate upward through the instructions. This is allocated here instead
/// of inside BuildSchedGraph to avoid the need for it to be initialized and
/// destructed for each block.
- Reg2SUnitsMap Defs;
- Reg2SUnitsMap Uses;
+ RegUnit2SUnitsMap Defs;
+ RegUnit2SUnitsMap Uses;
/// Tracks the last instruction(s) in this region defining each virtual
/// register. There may be multiple current definitions for a register with
diff --git a/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp b/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp
index a42f842b70df7d..d22de53d821fd2 100644
--- a/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp
+++ b/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp
@@ -249,7 +249,8 @@ void ScheduleDAGInstrs::addPhysRegDataDeps(SUnit *SU, unsigned OperIdx) {
bool ImplicitPseudoDef = (OperIdx >= DefMIDesc.getNumOperands() &&
!DefMIDesc.hasImplicitDefOfPhysReg(Reg));
for (MCRegUnit Unit : TRI->regunits(Reg)) {
- for (Reg2SUnitsMap::iterator I = Uses.find(Unit); I != Uses.end(); ++I) {
+ for (RegUnit2SUnitsMap::iterator I = Uses.find(Unit); I != Uses.end();
+ ++I) {
SUnit *UseSU = I->SU;
if (UseSU == SU)
continue;
@@ -308,7 +309,8 @@ void ScheduleDAGInstrs::addPhysRegDeps(SUnit *SU, unsigned OperIdx) {
// there's no cost for reusing registers.
SDep::Kind Kind = MO.isUse() ? SDep::Anti : SDep::Output;
for (MCRegUnit Unit : TRI->regunits(Reg)) {
- for (Reg2SUnitsMap::iterator I = Defs.find(Unit); I != Defs.end(); ++I) {
+ for (RegUnit2SUnitsMap::iterator I = Defs.find(Unit); I != Defs.end();
+ ++I) {
SUnit *DefSU = I->SU;
if (DefSU == &ExitSU)
continue;
@@ -353,9 +355,9 @@ void ScheduleDAGInstrs::addPhysRegDeps(SUnit *SU, unsigned OperIdx) {
// the block. Instead, we leave only one call at the back of the
// DefList.
for (MCRegUnit Unit : TRI->regunits(Reg)) {
- Reg2SUnitsMap::RangePair P = Defs.equal_range(Unit);
- Reg2SUnitsMap::iterator B = P.first;
- Reg2SUnitsMap::iterator I = P.second;
+ RegUnit2SUnitsMap::RangePair P = Defs.equal_range(Unit);
+ RegUnit2SUnitsMap::iterator B = P.first;
+ RegUnit2SUnitsMap::iterator I = P.second;
for (bool isBegin = I == B; !isBegin; /* empty */) {
isBegin = (--I) == B;
if (!I->SU->isCall)
More information about the llvm-commits
mailing list