This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/SI: Update colorEndsAccordingToDependencies
ClosedPublic

Authored by axeldavy on Feb 18 2017, 1:29 PM.

Details

Summary

This patch adds a comment to the
colorEndsAccordingToDependencies coloring pass of the SI scheduler
and disables it when there is no reserved block.

Diff Detail

Repository
rL LLVM

Event Timeline

axeldavy created this revision.Feb 18 2017, 1:29 PM
vpykhtin added inline comments.
lib/Target/AMDGPU/SIMachineScheduler.cpp
840

max_element can return end iterator only if the range is empty, so could you place an assert for this before these comparisons?

axeldavy added inline comments.Mar 22 2017, 12:09 PM
lib/Target/AMDGPU/SIMachineScheduler.cpp
840

The two vectors are supposed to be the size of DAGSize.
Should I assert their size, and that DAGSize is >= 1 ?

t-tye added a subscriber: t-tye.Mar 22 2017, 6:39 PM
tony-tye removed a subscriber: tony-tye.Mar 22 2017, 6:46 PM
vpykhtin added inline comments.Mar 23 2017, 7:43 AM
lib/Target/AMDGPU/SIMachineScheduler.cpp
840

It would look a bit paranoid :-) but I think it would make more sence than just asserting its not empty.

axeldavy updated this revision to Diff 92874.Mar 23 2017, 3:28 PM

Add assert over the initialization of Current*ReservedDependencyColoring and DAGSIZE

vpykhtin accepted this revision.Mar 24 2017, 8:39 AM

LGTM.

This revision is now accepted and ready to land.Mar 24 2017, 8:39 AM
This revision was automatically updated to reflect the committed changes.