This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Use DFS to avoid second loop over function
ClosedPublic

Authored by arsenm on Aug 14 2015, 5:17 PM.

Details

Reviewers
tstellarAMD

Diff Detail

Event Timeline

arsenm updated this revision to Diff 32206.Aug 14 2015, 5:17 PM
arsenm retitled this revision from to AMDGPU: Use DFS to avoid second loop over function.
arsenm updated this object.
arsenm added a reviewer: tstellarAMD.
arsenm added a subscriber: llvm-commits.

Do you actually use Visited outside of the iterator (It's not visible
in this patch if you do)?
If not, you should just use depth_first, not depth_first_ext.

Do you actually use Visited outside of the iterator (It's not visible
in this patch if you do)?
If not, you should just use depth_first, not depth_first_ext.

No. I thought might have a use for it, but this doesn't use it yet. The comment on it also says "This iterator stores the 'visited' set in an external set, which allows it to be more efficient, and allows external clients to use the set for other purposes." so I figured if it's faster to just leave it

tstellarAMD accepted this revision.Aug 21 2015, 1:49 PM
tstellarAMD edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Aug 21 2015, 1:49 PM

The comment means space efficient, in terms of set reuse of existing sets.
Leaving it is likely to just confuse future readers
:)

arsenm closed this revision.Aug 21 2015, 5:44 PM

r245772 without the Visited