This is an archive of the discontinued LLVM Phabricator instance.

[ThinLTO] Ensure anonymous globals renamed even at -O0
ClosedPublic

Authored by tejohnson on Sep 17 2016, 12:59 PM.

Details

Summary

This fixes an issue when files are compiled with -flto=thin
at default -O0. We need to rename anonymous globals before attempting
to write the module summary because all values need names for
the summary. This was happening at -O1 and above, but not before
the early exit when constructing the pipeline for -O0.

Also add an internal -prepare-for-thinlto option to enable this
to be tested via opt.

Fixes PR30419.

Diff Detail

Repository
rL LLVM

Event Timeline

tejohnson updated this revision to Diff 71738.Sep 17 2016, 12:59 PM
tejohnson retitled this revision from to [ThinLTO] Ensure anonymous globals renamed even at -O0.
tejohnson updated this object.
tejohnson added a reviewer: mehdi_amini.
tejohnson added subscribers: llvm-commits, probinson.
mehdi_amini accepted this revision.Sep 17 2016, 1:47 PM
mehdi_amini edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Sep 17 2016, 1:47 PM
This revision was automatically updated to reflect the committed changes.