AMDGPU/SI: Report SIFixSGPRLiveRanges changed function
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 26 Aug 2015 19:12:03 +0000 (19:12 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 26 Aug 2015 19:12:03 +0000 (19:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246056 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/AMDGPU/SIFixSGPRLiveRanges.cpp

index 5f25c69fde057baf84780965dd776ae7663e32a1..abe331477ad6474dbaa52ade225f0084997879a4 100644 (file)
@@ -114,6 +114,7 @@ bool SIFixSGPRLiveRanges::runOnMachineFunction(MachineFunction &MF) {
   const TargetInstrInfo *TII = MF.getSubtarget().getInstrInfo();
   const SIRegisterInfo *TRI = static_cast<const SIRegisterInfo *>(
       MF.getSubtarget().getRegisterInfo());
+  bool MadeChange = false;
 
   MachinePostDominatorTree *PDT = &getAnalysis<MachinePostDominatorTree>();
   std::vector<std::pair<unsigned, LiveRange *>> SGPRLiveRanges;
@@ -209,6 +210,8 @@ bool SIFixSGPRLiveRanges::runOnMachineFunction(MachineFunction &MF) {
                 TII->get(AMDGPU::SGPR_USE))
         .addReg(Reg, RegState::Implicit);
 
+      MadeChange = true;
+
       SlotIndex SI = LIS->InsertMachineInstrInMaps(NCDSGPRUse);
       LIS->extendToIndices(*LR, SI.getRegSlot());
 
@@ -221,5 +224,5 @@ bool SIFixSGPRLiveRanges::runOnMachineFunction(MachineFunction &MF) {
     }
   }
 
-  return false;
+  return MadeChange;
 }