Skip to content

Commit 7170a81

Browse files
authored
[AArch64][SME] Rename EdgeBundles to Bundles (NFC) (#154295)
It seems some buildbots do not like the shadowing. See: https://lab.llvm.org/buildbot/#/builders/137/builds/23838
1 parent 615f839 commit 7170a81

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

llvm/lib/Target/AArch64/MachineSMEABIPass.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ struct MachineSMEABI : public MachineFunctionPass {
252252
} State;
253253

254254
MachineFunction *MF = nullptr;
255-
EdgeBundles *EdgeBundles = nullptr;
255+
EdgeBundles *Bundles = nullptr;
256256
const AArch64Subtarget *Subtarget = nullptr;
257257
const AArch64RegisterInfo *TRI = nullptr;
258258
const TargetInstrInfo *TII = nullptr;
@@ -316,8 +316,8 @@ void MachineSMEABI::collectNeededZAStates(SMEAttrs SMEFnAttrs) {
316316
}
317317

318318
void MachineSMEABI::assignBundleZAStates() {
319-
State.BundleStates.resize(EdgeBundles->getNumBundles());
320-
for (unsigned I = 0, E = EdgeBundles->getNumBundles(); I != E; ++I) {
319+
State.BundleStates.resize(Bundles->getNumBundles());
320+
for (unsigned I = 0, E = Bundles->getNumBundles(); I != E; ++I) {
321321
LLVM_DEBUG(dbgs() << "Assigning ZA state for edge bundle: " << I << '\n');
322322

323323
// Attempt to assign a ZA state for this bundle that minimizes state
@@ -326,16 +326,16 @@ void MachineSMEABI::assignBundleZAStates() {
326326
// TODO: We should propagate desired incoming/outgoing states through blocks
327327
// that have the "ANY" state first to make better global decisions.
328328
int EdgeStateCounts[ZAState::NUM_ZA_STATE] = {0};
329-
for (unsigned BlockID : EdgeBundles->getBlocks(I)) {
329+
for (unsigned BlockID : Bundles->getBlocks(I)) {
330330
LLVM_DEBUG(dbgs() << "- bb." << BlockID);
331331

332332
const BlockInfo &Block = State.Blocks[BlockID];
333333
if (Block.Insts.empty()) {
334334
LLVM_DEBUG(dbgs() << " (no state preference)\n");
335335
continue;
336336
}
337-
bool InEdge = EdgeBundles->getBundle(BlockID, /*Out=*/false) == I;
338-
bool OutEdge = EdgeBundles->getBundle(BlockID, /*Out=*/true) == I;
337+
bool InEdge = Bundles->getBundle(BlockID, /*Out=*/false) == I;
338+
bool OutEdge = Bundles->getBundle(BlockID, /*Out=*/true) == I;
339339

340340
ZAState DesiredIncomingState = Block.Insts.front().NeededState;
341341
if (InEdge && isLegalEdgeBundleZAState(DesiredIncomingState)) {
@@ -375,8 +375,8 @@ void MachineSMEABI::assignBundleZAStates() {
375375
void MachineSMEABI::insertStateChanges() {
376376
for (MachineBasicBlock &MBB : *MF) {
377377
const BlockInfo &Block = State.Blocks[MBB.getNumber()];
378-
ZAState InState = State.BundleStates[EdgeBundles->getBundle(MBB.getNumber(),
379-
/*Out=*/false)];
378+
ZAState InState = State.BundleStates[Bundles->getBundle(MBB.getNumber(),
379+
/*Out=*/false)];
380380

381381
ZAState CurrentState = Block.FixedEntryState;
382382
if (CurrentState == ZAState::ANY)
@@ -392,8 +392,8 @@ void MachineSMEABI::insertStateChanges() {
392392
if (MBB.succ_empty())
393393
continue;
394394

395-
ZAState OutState = State.BundleStates[EdgeBundles->getBundle(
396-
MBB.getNumber(), /*Out=*/true)];
395+
ZAState OutState =
396+
State.BundleStates[Bundles->getBundle(MBB.getNumber(), /*Out=*/true)];
397397
if (CurrentState != OutState)
398398
emitStateChange(MBB, MBB.getFirstTerminator(), CurrentState, OutState,
399399
Block.PhysLiveRegsAtExit);
@@ -674,7 +674,7 @@ bool MachineSMEABI::runOnMachineFunction(MachineFunction &MF) {
674674
// Reset pass state.
675675
State = PassState{};
676676
this->MF = &MF;
677-
EdgeBundles = &getAnalysis<EdgeBundlesWrapperLegacy>().getEdgeBundles();
677+
Bundles = &getAnalysis<EdgeBundlesWrapperLegacy>().getEdgeBundles();
678678
Subtarget = &MF.getSubtarget<AArch64Subtarget>();
679679
TII = Subtarget->getInstrInfo();
680680
TRI = Subtarget->getRegisterInfo();

0 commit comments

Comments
 (0)