[PATCH] D30145: AMDGPU/SI: Fix SI scheduler LiveOut Refcount issue
Axel Davy via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 22 11:59:10 PDT 2017
axeldavy added inline comments.
================
Comment at: lib/Target/AMDGPU/SIMachineScheduler.cpp:1372
+ SIScheduleBlock *Block = Blocks[ID];
+ const std::set<unsigned> OutRegs = Block->getOutRegs();
+
----------------
vpykhtin wrote:
> 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.
Sorry, I didn't know for (-U9999999) when I sent this patch, I'll update with it.
Probably the good way is const std::set<unsigned> &OutRegs = Block->getOutRegs();
For blocks, the result of getOutRegs is computed once.
This is different to DAG->getOutRegs, which is added in this patch.
https://reviews.llvm.org/D30145
More information about the llvm-commits
mailing list