This is an archive of the discontinued LLVM Phabricator instance.

RegAllocGreedy: Properly initialize this pass, so that -run-pass will work
ClosedPublic

Authored by tstellarAMD on Nov 11 2016, 4:52 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

tstellarAMD retitled this revision from to RegAllocGreedy: Properly initialize this pass, so that -run-pass will work.
tstellarAMD updated this object.
tstellarAMD added reviewers: qcolombet, MatzeB.
tstellarAMD added a subscriber: llvm-commits.
davide added a subscriber: davide.Nov 11 2016, 4:55 PM

This seems reasonable. Are you aware of other passes that don't use INITIALIZE_PASS without a good reason?
@MatzeB pointed out earlier on IRC InstPrinter but that's not quite easy to fix.

MatzeB accepted this revision.Nov 11 2016, 5:02 PM
MatzeB edited edge metadata.

LGTM.

lib/CodeGen/RegAllocGreedy.cpp
433 ↗(On Diff #77702)

duplicate

434–442 ↗(On Diff #77702)

There are a number of passes in here that I would not expect (I would only expect the stuff from getAnalysisUsage() here). But I see this was just copied from the constructor, which was equally strange.

So I guess we can leave the cleanup of this list for another commit.

This revision is now accepted and ready to land.Nov 11 2016, 5:02 PM

This seems reasonable. Are you aware of other passes that don't use INITIALIZE_PASS without a good reason?

For example RABasic, I am sure you will find more. Patches highly welcome :)

qcolombet accepted this revision.Nov 14 2016, 1:13 PM
qcolombet edited edge metadata.

Yay!

It was on my todo list and did not have time to do it yet.

Thanks,
-Quentin

This revision was automatically updated to reflect the committed changes.