This is an archive of the discontinued LLVM Phabricator instance.

[Polly][NewPM] Update pass registration for the LLVM plugin interface
ClosedPublic

Authored by philip.pfaffe on Apr 10 2018, 5:50 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

philip.pfaffe created this revision.Apr 10 2018, 5:50 AM

Hi Philip,

I am not sure what this means. Is this something that can already be tested? Or is this tested by the change in test/lit.site.cfg.in?

Best,
Tobias

lksbhm added a subscriber: lksbhm.Apr 10 2018, 8:29 AM

The tests for this I added in a follow-up revision D45493, which, as you can see, is quite large. I wanted to keep the functional change here and the mechanical changes to the tests separate for better review.

So, this change here cannot be tested on its own.

grosser accepted this revision.Apr 10 2018, 8:54 AM

OK. Then this LGTM.

Personally, I would add a minimal test cases that shows this works. But this is probably subjective. Feel free to add one or not.

This revision is now accepted and ready to land.Apr 10 2018, 8:54 AM
Meinersbur added inline comments.Apr 10 2018, 9:51 AM
test/lit.site.cfg.in
47–50 ↗(On Diff #141830)

Don't -load and -load-pass-plugin conflict? If the so is loaded twice into the address space, shoudn't some global symbols or cl::opt initializer clash?

philip.pfaffe added inline comments.Apr 11 2018, 3:24 AM
test/lit.site.cfg.in
47–50 ↗(On Diff #141830)

They don't! That's the beauty of this.

Both mechanisms are built on top of DynamicLibrary, which guarantees that you can safely load the same shared library twice.

Meinersbur accepted this revision.Apr 12 2018, 3:40 PM
Meinersbur added inline comments.
test/lit.site.cfg.in
47–50 ↗(On Diff #141830)

Cool, I didn't know that.

Add a testcase.

This revision was automatically updated to reflect the committed changes.