Skip to content

Revert "[AMDGPU][MIR] Serialize NumPhysicalVGPRSpillLanes" #115353

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

dyung
Copy link
Collaborator

@dyung dyung commented Nov 7, 2024

Reverts #115291

Reverting due to test failures on many bots including https://lab.llvm.org/buildbot/#/builders/174/builds/8049

@dyung dyung merged commit bc7e099 into main Nov 7, 2024
6 of 8 checks passed
@dyung dyung deleted the revert-115291-users/Akshat-Oke/11-07-_amdgpu_mir_serialize_numphysicalvgprspilllanes branch November 7, 2024 18:02
@llvmbot
Copy link
Member

llvmbot commented Nov 7, 2024

@llvm/pr-subscribers-backend-amdgpu

Author: None (dyung)

Changes

Reverts llvm/llvm-project#115291

Reverting due to test failures on many bots including https://lab.llvm.org/buildbot/#/builders/174/builds/8049


Full diff: https://github.com/llvm/llvm-project/pull/115353.diff

3 Files Affected:

  • (modified) llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp (+4-5)
  • (modified) llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h (-7)
  • (removed) llvm/test/CodeGen/MIR/AMDGPU/num-phys-vgpr-spill-lanes.ll (-15)
diff --git a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
index 2ddcd5a799cb10..1e43d2727a00da 100644
--- a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
@@ -694,22 +694,22 @@ yaml::SIMachineFunctionInfo::SIMachineFunctionInfo(
     const llvm::MachineFunction &MF)
     : ExplicitKernArgSize(MFI.getExplicitKernArgSize()),
       MaxKernArgAlign(MFI.getMaxKernArgAlign()), LDSSize(MFI.getLDSSize()),
-      GDSSize(MFI.getGDSSize()), DynLDSAlign(MFI.getDynLDSAlign()),
-      IsEntryFunction(MFI.isEntryFunction()),
+      GDSSize(MFI.getGDSSize()),
+      DynLDSAlign(MFI.getDynLDSAlign()), IsEntryFunction(MFI.isEntryFunction()),
       NoSignedZerosFPMath(MFI.hasNoSignedZerosFPMath()),
       MemoryBound(MFI.isMemoryBound()), WaveLimiter(MFI.needsWaveLimiter()),
       HasSpilledSGPRs(MFI.hasSpilledSGPRs()),
       HasSpilledVGPRs(MFI.hasSpilledVGPRs()),
       HighBitsOf32BitAddress(MFI.get32BitAddressHighBits()),
       Occupancy(MFI.getOccupancy()),
-      NumPhysicalVGPRSpillLanes(MFI.getNumPhysicalVGPRSpillLanes()),
       ScratchRSrcReg(regToString(MFI.getScratchRSrcReg(), TRI)),
       FrameOffsetReg(regToString(MFI.getFrameOffsetReg(), TRI)),
       StackPtrOffsetReg(regToString(MFI.getStackPtrOffsetReg(), TRI)),
       BytesInStackArgArea(MFI.getBytesInStackArgArea()),
       ReturnsVoid(MFI.returnsVoid()),
       ArgInfo(convertArgumentInfo(MFI.getArgInfo(), TRI)),
-      PSInputAddr(MFI.getPSInputAddr()), PSInputEnable(MFI.getPSInputEnable()),
+      PSInputAddr(MFI.getPSInputAddr()),
+      PSInputEnable(MFI.getPSInputEnable()),
       Mode(MFI.getMode()) {
   for (Register Reg : MFI.getSGPRSpillPhysVGPRs())
     SpillPhysVGPRS.push_back(regToString(Reg, TRI));
@@ -754,7 +754,6 @@ bool SIMachineFunctionInfo::initializeBaseYamlFields(
   HasSpilledVGPRs = YamlMFI.HasSpilledVGPRs;
   BytesInStackArgArea = YamlMFI.BytesInStackArgArea;
   ReturnsVoid = YamlMFI.ReturnsVoid;
-  NumPhysicalVGPRSpillLanes = YamlMFI.NumPhysicalVGPRSpillLanes;
 
   if (YamlMFI.ScavengeFI) {
     auto FIOrErr = YamlMFI.ScavengeFI->getFI(MF.getFrameInfo());
diff --git a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
index db4aefadaee3e5..018322eaa18665 100644
--- a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
+++ b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
@@ -275,7 +275,6 @@ struct SIMachineFunctionInfo final : public yaml::MachineFunctionInfo {
   // TODO: 10 may be a better default since it's the maximum.
   unsigned Occupancy = 0;
 
-  unsigned NumPhysicalVGPRSpillLanes = 0;
   SmallVector<StringValue, 2> SpillPhysVGPRS;
   SmallVector<StringValue> WWMReservedRegs;
 
@@ -338,8 +337,6 @@ template <> struct MappingTraits<SIMachineFunctionInfo> {
     YamlIO.mapOptional("highBitsOf32BitAddress",
                        MFI.HighBitsOf32BitAddress, 0u);
     YamlIO.mapOptional("occupancy", MFI.Occupancy, 0);
-    YamlIO.mapOptional("numPhysicalVGPRSpillLanes",
-                       MFI.NumPhysicalVGPRSpillLanes);
     YamlIO.mapOptional("spillPhysVGPRs", MFI.SpillPhysVGPRS);
     YamlIO.mapOptional("wwmReservedRegs", MFI.WWMReservedRegs);
     YamlIO.mapOptional("scavengeFI", MFI.ScavengeFI);
@@ -617,10 +614,6 @@ class SIMachineFunctionInfo final : public AMDGPUMachineFunction,
   ArrayRef<Register> getSGPRSpillVGPRs() const { return SpillVGPRs; }
   ArrayRef<Register> getSGPRSpillPhysVGPRs() const { return SpillPhysVGPRs; }
 
-  unsigned getNumPhysicalVGPRSpillLanes() const {
-    return NumPhysicalVGPRSpillLanes;
-  }
-
   const WWMSpillsMap &getWWMSpills() const { return WWMSpills; }
   const ReservedRegSet &getWWMReservedRegs() const { return WWMReservedRegs; }
 
diff --git a/llvm/test/CodeGen/MIR/AMDGPU/num-phys-vgpr-spill-lanes.ll b/llvm/test/CodeGen/MIR/AMDGPU/num-phys-vgpr-spill-lanes.ll
deleted file mode 100644
index a211427c5e0c17..00000000000000
--- a/llvm/test/CodeGen/MIR/AMDGPU/num-phys-vgpr-spill-lanes.ll
+++ /dev/null
@@ -1,15 +0,0 @@
-; RUN: llc -O0 -mtriple=amdgcn-amd-amdhsa --stop-after=prologepilog -o - %s | FileCheck %s
-
-; Spill the PC SGPR30_31 and FP to physical VGPR
-
-define void @test() #0 {
-; CHECK: machineFunctionInfo
-; CHECK: numPhysicalVGPRSpillLanes: 3
-entry:
-  %call = call i32 @ext_func()
-  ret void
-}
-
-declare i32 @ext_func();
-
-attributes #0 = { nounwind "amdgpu-num-vgpr"="41" "amdgpu-num-sgpr"="34" }

Groverkss pushed a commit to iree-org/llvm-project that referenced this pull request Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants