R600 Patches: Private memory fixes

Vincent Lejeune vljn at ovi.com
Fri Jun 7 09:42:26 PDT 2013


First patch is reviewed-by: vljn at ovi.com

>-        if (RegisterAddressMap[Reg] == Address) {
>-          PhiRegisters.push_back(Reg);
>+      struct AddressInfo &Info = AddressInfoMap[Address];
>+      bool IsLive = true;
>+
>+      for (std::vector<unsigned>::iterator I = Info.Defs.begin(),
>+                                           E = Info.Defs.end();
>+                                           I != E; ++I) {
>+        MachineInstr *LiveDefInstr = MRI.getVRegDef(*I);
>+        if (DT->dominates(DefInstr->getParent(), LiveDefInstr->getParent())) {
>+          IsLive = false;
>+          break;
>         }
>       }
I think this loop can be predicated.

>+        bool FoundBB = false;
>+        for (MachineBasicBlock::const_pred_iterator PI = MBB.pred_begin(),
>+                                                    PE = MBB.pred_end();
>+                                                    PI != PE; ++PI) {
>+          if (DT->dominates(DefInstr->getParent(), *PI)) {
>+            FoundBB = true;
>+            PhiOperands[DefReg] = *PI;
>+            break;
>+          }
>+        }
This loop too could become a predicated function.



----- Mail original -----
> De : Tom Stellard <tom at stellard.net>
> À : llvm-commits at cs.uiuc.edu
> Cc : 
> Envoyé le : Mercredi 5 juin 2013 20h17
> Objet : R600 Patches: Private memory fixes
> 
> Hi,
> 
> The attached patches fix a few bugs with OpenCL private memory in the
> R600 backend.
> 
> -Tom
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 




More information about the llvm-commits mailing list