This is an archive of the discontinued LLVM Phabricator instance.

[clang][NewPM] Do not eliminate available_externally durng `-O2 -flto` runs
ClosedPublic

Authored by leonardchan on Jun 19 2019, 4:32 PM.

Details

Summary

This fixes CodeGen/available-externally-suppress.c when the new pass manager is turned on by default. available_externally was not emitted during -O2 -flto runs when it should still be retained for link time inlining purposes. This can be fixed by checking that we aren't LTOPrelinking when adding the EliminateAvailableExternallyPass.

Diff Detail

Event Timeline

leonardchan created this revision.Jun 19 2019, 4:32 PM
chandlerc accepted this revision.Jun 19 2019, 5:58 PM

LGTM, again, really nice. Tiny tweak below.

llvm/test/Other/available-externally-lto.ll
2

Wrap to 80-columns?

This revision is now accepted and ready to land.Jun 19 2019, 5:58 PM
This revision was automatically updated to reflect the committed changes.
leonardchan marked an inline comment as done.