about summary refs log tree commit diff
path: root/src/test/incremental/thinlto
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2018-05-12 14:07:20 +0200
committerNikita Popov <nikita.ppv@gmail.com>2018-05-12 14:07:20 +0200
commita70ef4cb49295563a09b254de4751c016c79e262 (patch)
tree9f326ad2710a9d1d9d698ec6096a3a9a11a38264 /src/test/incremental/thinlto
parentc705877b1df780acfb2dcba4ebca6f30102dd8a2 (diff)
downloadrust-a70ef4cb49295563a09b254de4751c016c79e262.tar.gz
rust-a70ef4cb49295563a09b254de4751c016c79e262.zip
Set PrepareForThinLTO flag when using ThinLTO
The LLVM PassManager has a PrepareForThinLTO flag, which is intended
when compilation occurs in conjunction with linking by ThinLTO. The
flag has two effects:

 * The NameAnonGlobal pass is run after all other passes, which
   ensures that all globals have a name.
 * In optimized builds, a number of late passes (mainly related to
   vectorization and unrolling) are disabled, on the rationale that
   these a) will increase codesize of the intermediate artifacts
   and b) will be run by ThinLTO again anyway.

This patch enables the use of PrepareForThinLTO if Thin or ThinLocal
linking is used.

The background for this change is the CI failure in #49479, which
we assume to be caused by the NameAnonGlobal pass not being run.
As this changes which passes LLVM runs, this might have performance
(or other) impact, so we want to land this separately.
Diffstat (limited to 'src/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions