This is an archive of the discontinued LLVM Phabricator instance.

[Attributor] Move pass after InstCombine to futher eliminate null pointer checks
AbandonedPublic

Authored by xbolva00 on Nov 26 2019, 11:51 AM.

Diff Detail

Event Timeline

xbolva00 created this revision.Nov 26 2019, 11:51 AM

But I am bit worried that we are in a trap.

If I remember well, @spatel's motivating case needs attributor to run before instcombine. So we need atleast two instances of Attributor before/after IC to catch this and spatel's case?

Why is inscombine the pass that adds nonnull to strchr?
This is not a good solution, I'll try to come up with the SCC version of the Attributor soon to add it to the inliner loop

Why is inscombine the pass that adds nonnull to strchr?
This is not a good solution, I'll try to come up with the SCC version of the Attributor soon to add it to the inliner loop

You were fine with this approach..... https://reviews.llvm.org/D53342.

Why is inscombine the pass that adds nonnull to strchr?
This is not a good solution, I'll try to come up with the SCC version of the Attributor soon to add it to the inliner loop

You were fine with this approach..... https://reviews.llvm.org/D53342.

I did not make the connection from SimplifyLibCalls to Instcombine. I think annotating library calls should live in SimplifyLibCalls.

Let me try to come up with the Attributor SCC pass so we can run it early on the entire module and during the inliner loop on an SCC at a time. That would solve the problem. OK? (We should keep the test though)

I need to write the CG update part and some tests but D70767 should solve this properly.

This revision was not accepted when it landed; it landed in state Needs Review.Nov 27 2019, 1:38 PM
This revision was automatically updated to reflect the committed changes.

From the disscussion, i didn't get the impression that there was a consensus on the move?

Sorry, commited accidentally! reverted

xbolva00 reopened this revision.Nov 27 2019, 1:47 PM
xbolva00 abandoned this revision.