This is an archive of the discontinued LLVM Phabricator instance.

Fix the bug that parseAAPipeline is not invoked in runNewPMPasses in release compiler.
ClosedPublic

Authored by danielcdh on Aug 1 2017, 3:15 PM.

Event Timeline

danielcdh created this revision.Aug 1 2017, 3:15 PM
davide edited edge metadata.Aug 1 2017, 3:17 PM

this is a no brainer, but do you mind to add a test, if possible?

chandlerc accepted this revision.Aug 1 2017, 3:33 PM

Doh! Agree with Davide about a test. I can try to conjure up one if it isn't easy...

This revision is now accepted and ready to land.Aug 1 2017, 3:33 PM

Tried to add a test. But either need to have

  1. a testcase that go through all default optimization pipeline, and make a difference with and without the default AA pipeline (tried test/Analysis/BasicAA/invariant_load.ll, but does not work)
  2. introduce something like -debug-pass-manager to llvm-lto2 so that we can check for passes invoked by llvm-lto2

#2 is beyond the scope of this patch. So I plan to commit the patch as is. I could work on #2 later (maybe after I get AutoFDO + newPM performance back to normal).

Please let me know if the plan does not sound OK, otherwise I'll commit patch before I leave work today.

Thanks,
Dehao

davide added a comment.Aug 1 2017, 4:43 PM

Wondering whether that should be a report_fatal_error instead of llvm_unreachable? (as I did in runNewPMCustomPasses).
[apologies if I'm missing something, I have this code out of cache and my head deep in GVN today].

Also, either 1) or 2) is fine. I'd prefer 2), and I'd really prefer this to be now. If it's too trouble, maybe open a PR and add a FIXME here.
I understand this is blocking a lot of people, so, if Chandler is OK, this can go in as is (with my previous comments addressed).

BTW, thanks for catching this braino!

danielcdh updated this revision to Diff 109259.Aug 1 2017, 6:34 PM

Add test.

I've added the test. Please let me know if you want me to split the patch in 2.

Thanks,
Dehao

davide accepted this revision.Aug 1 2017, 6:41 PM

LGTM. No need to split.

chandlerc accepted this revision.Aug 1 2017, 7:05 PM

LGTM as well FWIW, but happy to defer to Davide here.

davide added a comment.Aug 1 2017, 7:07 PM

Go for it, hopefully you can commit this today and unblock people :)

danielcdh closed this revision.Aug 1 2017, 8:03 PM