This is an archive of the discontinued LLVM Phabricator instance.

[ArgPromote] Re-arrange the code in a more typical, logical way.
ClosedPublic

Authored by chandlerc on Jan 28 2017, 1:17 AM.

Details

Summary

This arranges the static helpers in an order where they are defined
prior to their use to avoid the need of forward declarations, and
collect the core pass components at the bottom below their helpers.

This also folds one trivial function into the pass itself. Factoring
this 'runImpl' was an attempt to help porting to the new pass manager,
however in my attempt to begin this port in earnest it turned out to not
be a substantial help. I think it will be easier to factor things
without it.

This is an NFC change and does a minimal amount of edits over all.
Subsequent NFC cleanups will normalize the formatting with clang-format
and improve the basic doxygen commenting.

Event Timeline

chandlerc created this revision.Jan 28 2017, 1:17 AM
davide accepted this revision.Jan 28 2017, 3:48 PM

This is a lot of churn, so I applied it locally and took a closer look. I think it looks better now, and if it helps the port to the new PM, even better.

This revision is now accepted and ready to land.Jan 28 2017, 3:48 PM
This revision was automatically updated to reflect the committed changes.