Skip to content

Commit 55bc04f

Browse files
authored
[X86] Replace hasVirtualTileReg with AMXProgModel (#95105)
Cleanup after AMXProgModel introduction. AMXProgModel is ManagedRA whenever virtual tile registers exist at some point.
1 parent 9a2c841 commit 55bc04f

File tree

4 files changed

+1
-12
lines changed

4 files changed

+1
-12
lines changed

llvm/lib/Target/X86/X86FastTileConfig.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,6 @@ bool X86FastTileConfig::configBasicBlock(MachineBasicBlock &MBB) {
161161
}
162162
}
163163

164-
if (Change)
165-
X86FI->setHasVirtualTileReg(true);
166-
167164
return Change;
168165
}
169166

llvm/lib/Target/X86/X86FrameLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2594,7 +2594,7 @@ void X86FrameLowering::emitEpilogue(MachineFunction &MF,
25942594
}
25952595

25962596
// Emit tilerelease for AMX kernel.
2597-
if (X86FI->hasVirtualTileReg())
2597+
if (X86FI->getAMXProgModel() == AMXProgModelEnum::ManagedRA)
25982598
BuildMI(MBB, Terminator, DL, TII.get(X86::TILERELEASE));
25992599
}
26002600

llvm/lib/Target/X86/X86MachineFunctionInfo.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,6 @@ class X86MachineFunctionInfo : public MachineFunctionInfo {
149149
/// other tools to detect the extended record.
150150
bool HasSwiftAsyncContext = false;
151151

152-
/// True if this function has tile virtual register. This is used to
153-
/// determine if we should insert tilerelease in frame lowering.
154-
bool HasVirtualTileReg = false;
155-
156152
/// Ajust stack for push2/pop2
157153
bool PadForPush2Pop2 = false;
158154

@@ -282,9 +278,6 @@ class X86MachineFunctionInfo : public MachineFunctionInfo {
282278
bool hasSwiftAsyncContext() const { return HasSwiftAsyncContext; }
283279
void setHasSwiftAsyncContext(bool v) { HasSwiftAsyncContext = v; }
284280

285-
bool hasVirtualTileReg() const { return HasVirtualTileReg; }
286-
void setHasVirtualTileReg(bool v) { HasVirtualTileReg = v; }
287-
288281
bool padForPush2Pop2() const { return PadForPush2Pop2; }
289282
void setPadForPush2Pop2(bool V) { PadForPush2Pop2 = V; }
290283

llvm/lib/Target/X86/X86PreTileConfig.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,6 @@ bool X86PreTileConfig::runOnMachineFunction(MachineFunction &MF) {
305305
// There's no AMX instruction if we didn't find a tile config live in point.
306306
if (CfgNeedInsert.empty())
307307
return false;
308-
X86FI->setHasVirtualTileReg(true);
309308

310309
// Avoid to insert ldtilecfg before any shape defs.
311310
SmallVector<MachineBasicBlock *, 8> WorkList;

0 commit comments

Comments
 (0)