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

Repository
rL LLVM

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 ↗(On Diff #62566)

hmm, is this clang-formatt'ed?

196 ↗(On Diff #62566)

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

290 ↗(On Diff #62566)

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

500 ↗(On Diff #62566)

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 ↗(On Diff #62566)

else after return

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

Thanks, Sean and Davide!

lib/Transforms/Scalar/ConstantHoisting.cpp
180 ↗(On Diff #62566)

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

290 ↗(On Diff #62566)

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 ↗(On Diff #62566)

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 ↗(On Diff #62566)

Right, thanks!

This revision was automatically updated to reflect the committed changes.