[PATCH] D30145: AMDGPU/SI: Fix SI scheduler LiveOut Refcount issue

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 21 15:47:39 PST 2017


arsenm added inline comments.


================
Comment at: lib/Target/AMDGPU/SIMachineScheduler.cpp:1372
+      SIScheduleBlock *Block = Blocks[ID];
+      std::set<unsigned> OutRegs = Block->getOutRegs();
+
----------------
const reference


================
Comment at: lib/Target/AMDGPU/SIMachineScheduler.cpp:1374-1381
+      if (OutRegs.find(Reg) == OutRegs.end())
+        continue;
+
+      if (LiveOutRegsNumUsages[ID].find(Reg) ==
+            LiveOutRegsNumUsages[ID].end()) {
+        LiveOutRegsNumUsages[ID][Reg] = 1;
+      } else {
----------------
Double map lookup, use the iterator returned by find


Repository:
  rL LLVM

https://reviews.llvm.org/D30145





More information about the llvm-commits mailing list