This is an archive of the discontinued LLVM Phabricator instance.

[PM] Port ConstantHoisting to the new Pass Manager
ClosedPublic

Authored by mkuper on Jul 1 2016, 4:18 PM.

Diff Detail

Event Timeline

mkuper updated this revision to Diff 62566.Jul 1 2016, 4:18 PM
mkuper retitled this revision from to [PM] Port ConstantHoisting to the new Pass Manager.
mkuper updated this object.
mkuper added reviewers: davidxl, silvas, davide, ributzka.
mkuper added a subscriber: llvm-commits.
silvas accepted this revision.Jul 1 2016, 4:58 PM
silvas edited edge metadata.

Looks good. Thanks!

This revision is now accepted and ready to land.Jul 1 2016, 4:58 PM
davide edited edge metadata.Jul 1 2016, 5:01 PM

The structure of this patch looks sensible. Some comments.

lib/Transforms/Scalar/ConstantHoisting.cpp
180

hmm, is this clang-formatt'ed?

196

Nice that you got rid of this weird setup() function.

290

same (re clang-format), I could be wrong tho

500

I prefer the idiom
this->TTI = &TTI
so that you don't have two different names for the variables, but, up to you I guess.

534

else after return

mkuper added a comment.Jul 1 2016, 5:11 PM

Thanks, Sean and Davide!

lib/Transforms/Scalar/ConstantHoisting.cpp
180

Yes, it is. Looks like the usual format goes out of the 80-char bounds, and I guess this is the fallback.

290

This one is a bit weirder, since the usual formatting fits (exactly), but this is what clang-format outputs. Possibly a clang-format bug...

500

I don't really care either way, and we have both in the codebase. Since you felt strongly enough about it to comment, I don't mind changing. :-)

534

Right, thanks!

This revision was automatically updated to reflect the committed changes.