[llvm] 55bc04f - [X86] Replace hasVirtualTileReg with AMXProgModel (#95105)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 11 23:14:50 PDT 2024
Author: aengelke
Date: 2024-06-12T08:14:47+02:00
New Revision: 55bc04f67be1c61573acd03c70f6eee2ec764dc0
URL: https://github.com/llvm/llvm-project/commit/55bc04f67be1c61573acd03c70f6eee2ec764dc0
DIFF: https://github.com/llvm/llvm-project/commit/55bc04f67be1c61573acd03c70f6eee2ec764dc0.diff
LOG: [X86] Replace hasVirtualTileReg with AMXProgModel (#95105)
Cleanup after AMXProgModel introduction. AMXProgModel is ManagedRA
whenever virtual tile registers exist at some point.
Added:
Modified:
llvm/lib/Target/X86/X86FastTileConfig.cpp
llvm/lib/Target/X86/X86FrameLowering.cpp
llvm/lib/Target/X86/X86MachineFunctionInfo.h
llvm/lib/Target/X86/X86PreTileConfig.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86FastTileConfig.cpp b/llvm/lib/Target/X86/X86FastTileConfig.cpp
index cc59b97f17ab2..70bc11228be6a 100644
--- a/llvm/lib/Target/X86/X86FastTileConfig.cpp
+++ b/llvm/lib/Target/X86/X86FastTileConfig.cpp
@@ -161,9 +161,6 @@ bool X86FastTileConfig::configBasicBlock(MachineBasicBlock &MBB) {
}
}
- if (Change)
- X86FI->setHasVirtualTileReg(true);
-
return Change;
}
diff --git a/llvm/lib/Target/X86/X86FrameLowering.cpp b/llvm/lib/Target/X86/X86FrameLowering.cpp
index 4521401d8741c..76bcf875f00e2 100644
--- a/llvm/lib/Target/X86/X86FrameLowering.cpp
+++ b/llvm/lib/Target/X86/X86FrameLowering.cpp
@@ -2594,7 +2594,7 @@ void X86FrameLowering::emitEpilogue(MachineFunction &MF,
}
// Emit tilerelease for AMX kernel.
- if (X86FI->hasVirtualTileReg())
+ if (X86FI->getAMXProgModel() == AMXProgModelEnum::ManagedRA)
BuildMI(MBB, Terminator, DL, TII.get(X86::TILERELEASE));
}
diff --git a/llvm/lib/Target/X86/X86MachineFunctionInfo.h b/llvm/lib/Target/X86/X86MachineFunctionInfo.h
index af2de2e73dc36..315aeef65d28c 100644
--- a/llvm/lib/Target/X86/X86MachineFunctionInfo.h
+++ b/llvm/lib/Target/X86/X86MachineFunctionInfo.h
@@ -149,10 +149,6 @@ class X86MachineFunctionInfo : public MachineFunctionInfo {
/// other tools to detect the extended record.
bool HasSwiftAsyncContext = false;
- /// True if this function has tile virtual register. This is used to
- /// determine if we should insert tilerelease in frame lowering.
- bool HasVirtualTileReg = false;
-
/// Ajust stack for push2/pop2
bool PadForPush2Pop2 = false;
@@ -282,9 +278,6 @@ class X86MachineFunctionInfo : public MachineFunctionInfo {
bool hasSwiftAsyncContext() const { return HasSwiftAsyncContext; }
void setHasSwiftAsyncContext(bool v) { HasSwiftAsyncContext = v; }
- bool hasVirtualTileReg() const { return HasVirtualTileReg; }
- void setHasVirtualTileReg(bool v) { HasVirtualTileReg = v; }
-
bool padForPush2Pop2() const { return PadForPush2Pop2; }
void setPadForPush2Pop2(bool V) { PadForPush2Pop2 = V; }
diff --git a/llvm/lib/Target/X86/X86PreTileConfig.cpp b/llvm/lib/Target/X86/X86PreTileConfig.cpp
index 1e3b72e7aed0d..ecf923c0e2a22 100644
--- a/llvm/lib/Target/X86/X86PreTileConfig.cpp
+++ b/llvm/lib/Target/X86/X86PreTileConfig.cpp
@@ -305,7 +305,6 @@ bool X86PreTileConfig::runOnMachineFunction(MachineFunction &MF) {
// There's no AMX instruction if we didn't find a tile config live in point.
if (CfgNeedInsert.empty())
return false;
- X86FI->setHasVirtualTileReg(true);
// Avoid to insert ldtilecfg before any shape defs.
SmallVector<MachineBasicBlock *, 8> WorkList;
More information about the llvm-commits
mailing list