This is an archive of the discontinued LLVM Phabricator instance.

[3.9.1] Port "[ThinLTO] Disable importing and other cross-module optis at -O0"
Needs ReviewPublic

Authored by tejohnson on Nov 1 2016, 8:43 AM.

Details

Summary

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

This change avoids 3.9 bug PR30774, which is due to the old DIGlobalVariable
references to GlobalVariable, and only at -O0 since the dangling
reference to a non-imported variable is not cleaned up. This is the
simplest workaround for the issue, which was addressed by reversing the
DIGlobalVariable to GlobalVariable edges (r281284).

Fixes PR30774.

Event Timeline

tejohnson updated this revision to Diff 76564.Nov 1 2016, 8:43 AM
tejohnson retitled this revision from to [3.9.1] Port "[ThinLTO] Disable importing and other cross-module optis at -O0".
tejohnson updated this object.
tejohnson added a reviewer: pcc.

Adding @tstellar since this is targeting 3.9.1.
(This is a bit particular since it is not a cherry-pick)