[PATCH] D30150: AMDGPU/SI: Update colorEndsAccordingToDependencies

Axel Davy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 22 12:09:30 PDT 2017


axeldavy 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 ?


Repository:
  rL LLVM

https://reviews.llvm.org/D30150





More information about the llvm-commits mailing list