[PATCH] D30150: AMDGPU/SI: Update colorEndsAccordingToDependencies
Valery Pykhtin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 23 07:43:34 PDT 2017
vpykhtin added inline comments.
Comment at: lib/Target/AMDGPU/SIMachineScheduler.cpp:840
+ // everything in one block.
+ if (*std::max_element(CurrentBottomUpReservedDependencyColoring.begin(),
+ CurrentBottomUpReservedDependencyColoring.end()) == 0 &&
> vpykhtin wrote:
> > max_element can return end iterator only if the range is empty, so could you place an assert for this before these comparisons?
> The two vectors are supposed to be the size of DAGSize.
> Should I assert their size, and that DAGSize is >= 1 ?
It would look a bit paranoid :-) but I think it would make more sence than just asserting its not empty.
More information about the llvm-commits