This is an archive of the discontinued LLVM Phabricator instance.

LPM: Print after/before all passes during -print-{after,before}-all even if not registered.
Needs ReviewPublic

Authored by pcc on May 4 2015, 11:50 AM.

Details

Reviewers
chandlerc
Summary

Some MachineFunction passes are not properly registered using INITIALIZE_PASS,
but this doesn't normally seem to matter. One way in which it does matter is
that the -print-{after,before}-all flags have no effect when running those
passes. This change modifies the code that implements these flags so that
they print even if the pass is not registered (i.e. the PassInfo is null).

It doesn't seem worth going through the existing MachineFunction passes to add
registration, as the new pass manager seems to not require registration for
most passes, and in any case one would expect the -print-{after,before}-all
flags to do what they say, and not silently skip certain passes.

Diff Detail

Event Timeline

pcc updated this revision to Diff 24901.May 4 2015, 11:50 AM
pcc retitled this revision from to LPM: Print after/before all passes during -print-{after,before}-all even if not registered..
pcc updated this object.
pcc edited the test plan for this revision. (Show Details)
pcc added a reviewer: chandlerc.
pcc added a subscriber: Unknown Object (MLST).
chandlerc edited edge metadata.May 21 2015, 12:04 AM

Is this still relevant? If so, I'll put it in my queue.

pcc added a comment.May 21 2015, 10:54 AM

Yes, it is.