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

Valery Pykhtin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 22 10:00:01 PDT 2017


vpykhtin added inline comments.


================
Comment at: lib/Target/AMDGPU/SIMachineScheduler.cpp:1372
+      SIScheduleBlock *Block = Blocks[ID];
+      const std::set<unsigned> OutRegs = Block->getOutRegs();
+
----------------
constructing std::set every time you need to find one register in it is an obvious overkill. In this case its better to swap these two loops, construct the OutRegs set once for a block and then search all out regs there.


https://reviews.llvm.org/D30145





More information about the llvm-commits mailing list