mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 05:51:58 +00:00
Rollup merge of #89313 - durin42:llvm-14-thinLTOResolvePrevailingInModule, r=nikic
PassWrapper: handle function rename from upstream D36850 thinLTOResolvePrevailingInModule became thinLTOFinalizeInModule and gained the ability to propagate noRecurse and noUnwind function attributes. I ran codegen tests with it both on and off, as the upstream patch uses it in both modes, and the tests pass both ways. Given that, it seemed reasonable to go ahead and let the propagation be enabled in rustc, and see what happens. See https://reviews.llvm.org/D36850 for more examples of how the new version of the function gets used. r? ``@nikic`` cc ``@nagisa``
This commit is contained in:
commit
403e221dcf
@ -1572,7 +1572,11 @@ extern "C" bool
|
||||
LLVMRustPrepareThinLTOResolveWeak(const LLVMRustThinLTOData *Data, LLVMModuleRef M) {
|
||||
Module &Mod = *unwrap(M);
|
||||
const auto &DefinedGlobals = Data->ModuleToDefinedGVSummaries.lookup(Mod.getModuleIdentifier());
|
||||
#if LLVM_VERSION_GE(14, 0)
|
||||
thinLTOFinalizeInModule(Mod, DefinedGlobals, /*PropagateAttrs=*/true);
|
||||
#else
|
||||
thinLTOResolvePrevailingInModule(Mod, DefinedGlobals);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user