AMDGPU: Remove unused tracking of flat instructions
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 11 Aug 2016 17:15:28 +0000 (17:15 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 11 Aug 2016 17:15:28 +0000 (17:15 +0000)
llvm-svn: 278361

llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp
llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h

index 23043ea..4fad185 100644 (file)
@@ -419,10 +419,7 @@ bool SILowerControlFlow::runOnMachineFunction(MachineFunction &MF) {
   TRI = &TII->getRegisterInfo();
   SkipThreshold = SkipThresholdFlag;
 
-  SIMachineFunctionInfo *MFI = MF.getInfo<SIMachineFunctionInfo>();
-
   bool HaveKill = false;
-  bool NeedFlat = false;
   unsigned Depth = 0;
 
   MachineFunction::iterator NextBB;
@@ -440,10 +437,6 @@ bool SILowerControlFlow::runOnMachineFunction(MachineFunction &MF) {
 
       MachineInstr &MI = *I;
 
-      // Flat uses m0 in case it needs to access LDS.
-      if (TII->isFLAT(MI))
-        NeedFlat = true;
-
       switch (MI.getOpcode()) {
         default: break;
         case AMDGPU::SI_IF:
@@ -519,13 +512,5 @@ bool SILowerControlFlow::runOnMachineFunction(MachineFunction &MF) {
       }
     }
   }
-
-  if (NeedFlat && MFI->isKernel()) {
-    // TODO: What to use with function calls?
-    // We will need to Initialize the flat scratch register pair.
-    if (NeedFlat)
-      MFI->setHasFlatInstructions(true);
-  }
-
   return true;
 }
index 6a598a4..60c3535 100644 (file)
@@ -59,7 +59,6 @@ SIMachineFunctionInfo::SIMachineFunctionInfo(const MachineFunction &MF)
     HasSpilledSGPRs(false),
     HasSpilledVGPRs(false),
     HasNonSpillStackObjects(false),
-    HasFlatInstructions(false),
     NumSpilledSGPRs(0),
     NumSpilledVGPRs(0),
     PrivateSegmentBuffer(false),
index 7d0eb59..61b38c8 100644 (file)
@@ -82,7 +82,6 @@ private:
   bool HasSpilledSGPRs;
   bool HasSpilledVGPRs;
   bool HasNonSpillStackObjects;
-  bool HasFlatInstructions;
 
   unsigned NumSpilledSGPRs;
   unsigned NumSpilledVGPRs;
@@ -308,14 +307,6 @@ public:
     HasNonSpillStackObjects = StackObject;
   }
 
-  bool hasFlatInstructions() const {
-    return HasFlatInstructions;
-  }
-
-  void setHasFlatInstructions(bool UseFlat = true) {
-    HasFlatInstructions = UseFlat;
-  }
-
   unsigned getNumSpilledSGPRs() const {
     return NumSpilledSGPRs;
   }