[PATCH] D17543: AMDGPU/SI: Handle wait states required for DPP instructions
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 23 18:53:04 PST 2016
arsenm added inline comments.
================
Comment at: lib/Target/AMDGPU/SIInsertWaits.cpp:507
@@ +506,3 @@
+
+ // If we have reached the strt of the block, we need to check predecessors.
+ if (SearchI == E) {
----------------
Typo strt
================
Comment at: lib/Target/AMDGPU/SIInsertWaits.cpp:509-510
@@ +508,4 @@
+ if (SearchI == E) {
+ for (MachineBasicBlock::pred_iterator PI = SearchMBB->pred_begin(),
+ PE = SearchMBB->pred_end(); PI != PE; ++PI) {
+ MachineBasicBlock *Pred = *PI;
----------------
You should be able to use range loop with predecessors()
================
Comment at: lib/Target/AMDGPU/SIInsertWaits.cpp:516
@@ +515,3 @@
+ continue;
+ insertDPPWaitStates(DPP, Pred->rbegin(), Pred, WaitStates);
+ }
----------------
There could be a break here since there will only ever be one fall through block, although it doesn't really matter because with structured control flow there is at most one predecessor
http://reviews.llvm.org/D17543
More information about the llvm-commits
mailing list