Skip to content

Commit 6a1fdf4

Browse files
committed
Fix nits
Change-Id: Ia4b386081d67ce44d411c2fa1a835b744b0610e1
1 parent 3c76ae2 commit 6a1fdf4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

llvm/lib/Target/AArch64/AArch64SMEInstrInfo.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def : Pat<(i64 (AArch64AllocateSMESaveBuffer GPR64:$size)),
9494
// New SME ABI lowering ISD nodes/pseudos (-aarch64-new-sme-abi)
9595
//===----------------------------------------------------------------------===//
9696

97-
let hasSideEffects = 1 in {
97+
let hasSideEffects = 1, isMeta = 1 in {
9898
def InOutZAUsePseudo : Pseudo<(outs), (ins), []>, Sched<[]>;
9999
def RequiresZASavePseudo : Pseudo<(outs), (ins), []>, Sched<[]>;
100100
}

llvm/lib/Target/AArch64/MachineSMEABIPass.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ static bool isZAorZT0RegOp(const TargetRegisterInfo &TRI,
111111
/// to where any code required to change the ZA state should be inserted.
112112
static std::pair<ZAState, MachineBasicBlock::iterator>
113113
getZAStateBeforeInst(const TargetRegisterInfo &TRI, MachineInstr &MI,
114-
bool ZALiveAtReturn) {
114+
bool ZAOffAtReturn) {
115115
MachineBasicBlock::iterator InsertPt(MI);
116116

117117
if (MI.getOpcode() == AArch64::InOutZAUsePseudo)
@@ -121,7 +121,7 @@ getZAStateBeforeInst(const TargetRegisterInfo &TRI, MachineInstr &MI,
121121
return {ZAState::LOCAL_SAVED, std::prev(InsertPt)};
122122

123123
if (MI.isReturn())
124-
return {ZALiveAtReturn ? ZAState::ACTIVE : ZAState::OFF, InsertPt};
124+
return {ZAOffAtReturn ? ZAState::OFF : ZAState::ACTIVE, InsertPt};
125125

126126
for (auto &MO : MI.operands()) {
127127
if (isZAorZT0RegOp(TRI, MO))
@@ -257,7 +257,7 @@ void MachineSMEABI::collectNeededZAStates(SMEAttrs SMEFnAttrs) {
257257
LiveUnits.stepBackward(MI);
258258
LiveRegs PhysLiveRegs = GetPhysLiveRegs();
259259
auto [NeededState, InsertPt] = getZAStateBeforeInst(
260-
*TRI, MI, /*ZALiveAtReturn=*/SMEFnAttrs.hasSharedZAInterface());
260+
*TRI, MI, /*ZAOffAtReturn=*/SMEFnAttrs.hasPrivateZAInterface());
261261
assert((InsertPt == MBBI ||
262262
InsertPt->getOpcode() == AArch64::ADJCALLSTACKDOWN) &&
263263
"Unexpected state change insertion point!");
@@ -287,7 +287,7 @@ void MachineSMEABI::assignBundleZAStates() {
287287
for (unsigned BlockID : Bundles->getBlocks(I)) {
288288
LLVM_DEBUG(dbgs() << "- bb." << BlockID);
289289

290-
BlockInfo &Block = State.Blocks[BlockID];
290+
const BlockInfo &Block = State.Blocks[BlockID];
291291
if (Block.Insts.empty()) {
292292
LLVM_DEBUG(dbgs() << " (no state preference)\n");
293293
continue;
@@ -332,7 +332,7 @@ void MachineSMEABI::assignBundleZAStates() {
332332

333333
void MachineSMEABI::insertStateChanges() {
334334
for (MachineBasicBlock &MBB : *MF) {
335-
BlockInfo &Block = State.Blocks[MBB.getNumber()];
335+
const BlockInfo &Block = State.Blocks[MBB.getNumber()];
336336
ZAState InState =
337337
State.BundleStates[Bundles->getBundle(MBB.getNumber(), /*Out=*/false)];
338338

0 commit comments

Comments
 (0)