Page MenuHomePhabricator

[MachineOutliner] NFC - Move intermediate data structures to MachineOutliner.h

Authored by paquette on Jun 1 2018, 2:23 PM.



This is setting up to fix bug 37573 cleanly. Although this is NFC, it involves introducing a header file for some outliner data structures. If possible, I'd like a bit of input on how I've set up the header file etc. Other than that, the changes are

  • Renaming things to fit the new header file
  • Removing the vector of std::pairs that was used to communicate candidate information between the target and the outliner.

This moves data structures that are technically both used in some way by the target and the general-purpose outlining algorithm into MachineOutliner.h. In particular, the Candidate class is of importance.

Before, the outliner passed the locations of Candidates to the target, which would then make some decisions about the prospective outlined function. This change allows us to just pass Candidates along to the target. This will allow the target to discard Candidates that would be considered unsafe before cost calculation. Thus, we will be able to remove the unsafe candidates described in the bug without resorting to torching the entire prospective function.

Also, as a side-effect, it makes the outliner a bit cleaner.

Diff Detail

Event Timeline

paquette created this revision.Jun 1 2018, 2:23 PM

Please post diffs to Phabricator with full context.

Please commit the whitespace-only changes separately.




Is this change related somehow? It's not obvious.

paquette updated this revision to Diff 149581.Jun 1 2018, 4:20 PM

Got rid of the whitespace changes and remembered to pass -U999999 this time.

(Could probably also move renaming MInfo to TCI to a separate patch if that'd be less annoying. :))

paquette marked 2 inline comments as done.Jun 1 2018, 4:28 PM
paquette added inline comments.

That was from some early experimentation with the patch and accidentally made it in... Removed it.

This revision is now accepted and ready to land.Jun 4 2018, 11:12 AM
paquette closed this revision.Jun 4 2018, 2:19 PM
paquette marked an inline comment as done.