This is an archive of the discontinued LLVM Phabricator instance.

[ThinLTO] Disable importing and other cross-module optis at -O0
ClosedPublic

Authored by tejohnson on Oct 24 2016, 12:29 PM.

Details

Summary

There is no point to importing at -O0, since we won't inline. We should
also disable other cross-module optimizations.

(Plan to backport this fix to the 3.9 branch to fix PR30774)

Diff Detail

Repository
rL LLVM

Event Timeline

tejohnson updated this revision to Diff 75623.Oct 24 2016, 12:29 PM
tejohnson retitled this revision from to [ThinLTO] Disable importing and other cross-module optis at -O0.
tejohnson updated this object.
tejohnson added a reviewer: pcc.
tejohnson added subscribers: mehdi_amini, johanengelen.

Forgot to add llvm-commits before, just added. There haven't been any comments yet, so only thing missing on mailing list is the original description:

There is no point to importing at -O0, since we won't inline. We should
also disable other cross-module optimizations.

(Plan to backport this fix to the 3.9 branch to fix PR30774)

pcc accepted this revision.Oct 31 2016, 10:54 AM
pcc edited edge metadata.

LGTM

Regarding 3.9 I don't think it's worth backporting this as a workaround for some other bug, you'd need a separate patch anyway since 3.9 branched before the new LTO API landed.

This revision is now accepted and ready to land.Oct 31 2016, 10:54 AM

The list does not have the patch either

In D25918#583785, @pcc wrote:

LGTM

Regarding 3.9 I don't think it's worth backporting this as a workaround for some other bug, you'd need a separate patch anyway since 3.9 branched before the new LTO API landed.

That's true it won't be a straight backport to 3.9, due to the different implementation. But I think it is the most straightforward way to address the other bug, which doesn't have a simple fix.

This revision was automatically updated to reflect the committed changes.