This is an archive of the discontinued LLVM Phabricator instance.

[PM] Port BoundsChecking to the new PM.
ClosedPublic

Authored by chandlerc on Oct 19 2017, 2:16 AM.

Details

Summary

Registers it and everything, updates all the references, etc.

Next patch will add support to Clang's -fexperimental-new-pass-manager
path to actually enable BoundsChecking correctly.

Diff Detail

Repository
rL LLVM

Event Timeline

chandlerc created this revision.Oct 19 2017, 2:16 AM
echristo accepted this revision.Nov 13 2017, 3:40 PM
echristo added a subscriber: echristo.

LGTM.

This revision is now accepted and ready to land.Nov 13 2017, 3:40 PM
davide accepted this revision.Nov 13 2017, 3:54 PM
davide added a subscriber: davide.

LGTM modulo comments. I thought we were done with this monkey work.

llvm/include/llvm/Transforms/Instrumentation/BoundsChecking.h
17 ↗(On Diff #119557)

Do you need Function to be declared here otherwise you get an error?

19 ↗(On Diff #119557)

This comment seems repeated twice, I think one of the two instances can be removed (this very one seems also not clang-formatte'd)

27 ↗(On Diff #119557)

We generally don't put the old create* API in the header, is there a particular reason why this is here?

chandlerc marked 2 inline comments as done.Nov 13 2017, 5:28 PM

Thanks, landing with comments addressed.

llvm/include/llvm/Transforms/Instrumentation/BoundsChecking.h
27 ↗(On Diff #119557)

I've been moving the create methods to the same header as the class. Otherwise, we end up in the awkward place where the .cpp file defines interfaces declared in two unrelated headers (MyPass.h and Scalar.h or whichever umbrella header had the createFoo.* thing originally).

We didn't do this very carefully though and so probably need to go and move a bunch more of these declarations to better header files.

(I chatted with Davide on IRC and this plan made sense to him...)

davide added inline comments.Nov 13 2017, 5:31 PM
llvm/include/llvm/Transforms/Instrumentation/BoundsChecking.h
27 ↗(On Diff #119557)

Yes, thanks!

This revision was automatically updated to reflect the committed changes.