This is an archive of the discontinued LLVM Phabricator instance.

Reordering defs of a common user closer to the user in alphabetical order.
ClosedPublic

Authored by plotfi on Mar 28 2018, 5:51 PM.

Details

Reviewers
bogner
qcolombet

Diff Detail

Repository
rL LLVM

Event Timeline

plotfi created this revision.Mar 28 2018, 5:51 PM
bogner added inline comments.Apr 3 2018, 2:50 PM
lib/CodeGen/MIRCanonicalizerPass.cpp
301–306

Isn't this equivalent to MultiUsers[UseToBringDefCloserTo].push_back(Def), since you're default constructing the vector anyway?

312–313

Stylistically, both the comment and the variable should start with capital letters. I'd probably also use "const auto &" rather than just auto here.

321–322

What does it mean if we get here?

plotfi marked 2 inline comments as done.Apr 3 2018, 6:03 PM
plotfi added inline comments.
lib/CodeGen/MIRCanonicalizerPass.cpp
301–306

Oh, yeah. I think I could do it this way. Yes. I’ll try it.

321–322

It means what we have more than two defs to pull down, so worth doing it from a diffing standpoint.

plotfi updated this revision to Diff 140915.Apr 4 2018, 1:56 AM
plotfi marked an inline comment as done.
plotfi marked 3 inline comments as done.
nhaehnle removed a subscriber: nhaehnle.Apr 4 2018, 4:10 AM
bogner accepted this revision.Apr 4 2018, 1:29 PM

LGTM

This revision is now accepted and ready to land.Apr 4 2018, 1:29 PM
plotfi closed this revision.Apr 9 2018, 9:48 AM