This is an archive of the discontinued LLVM Phabricator instance.

[StructurizeCFG] Refactor OrderNodes.
ClosedPublic

Authored by jlebar on Nov 22 2016, 1:46 PM.

Details

Summary

No need to copy the RPOT vector before using it. Switch from std::map
to SmallDenseMap. Get rid of an unused variable (TempVisited). Get rid
of a typedef, RNVector, which is now used only once.

Event Timeline

jlebar updated this revision to Diff 78941.Nov 22 2016, 1:46 PM
jlebar retitled this revision from to [StructurizeCFG] Refactor OrderNodes..
jlebar updated this object.
jlebar added a subscriber: llvm-commits.

Unlike D26998, there should be no performance question here, because ReversePostOrderTraversal itself builds a vector -- previously we were just copying that vector before iterating over it.

arsenm accepted this revision.Nov 22 2016, 2:08 PM
arsenm edited edge metadata.

LGTM

This revision is now accepted and ready to land.Nov 22 2016, 2:08 PM
This revision was automatically updated to reflect the committed changes.