[PATCH] D44434: [AMDGPU] Waitcnt pass: propagate info in the case of a single basic block loop
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 13 09:40:03 PDT 2018
rampitec added inline comments.
================
Comment at: lib/Target/AMDGPU/SIInsertWaitcnts.cpp:1313
- // Clear the score bracket state.
- ScoreBrackets->clear();
+ for (MachineBasicBlock *Pred : Block.predecessors()) {
+ if (Pred == &Block) {
----------------
I think you can use std::find().
================
Comment at: lib/Target/AMDGPU/SIInsertWaitcnts.cpp:1328
+ if (IsSelfPred) {
+ ScoreBrackets = S.get();
+ }
----------------
Do you need to make a copy if block is not a self predecessor? You are not going to reuse it then as far as I understand.
https://reviews.llvm.org/D44434
More information about the llvm-commits
mailing list