diff options
author | Teresa Johnson <tejohnson@google.com> | 2016-10-30 05:40:44 +0000 |
---|---|---|
committer | Teresa Johnson <tejohnson@google.com> | 2016-10-30 05:40:44 +0000 |
commit | bf28c8fa453a576164633be31eee75b3ac258db2 (patch) | |
tree | f50d17d127fa3acdabc1180d34305af15abd4f50 /llvm/lib/Transforms/Utils | |
parent | 3bc8abdffc648cf1ff17edfed6fcb155b52e823f (diff) | |
download | bcm5719-llvm-bf28c8fa453a576164633be31eee75b3ac258db2.tar.gz bcm5719-llvm-bf28c8fa453a576164633be31eee75b3ac258db2.zip |
[ThinLTO] Use per-summary flag to prevent exporting locals used in inline asm
Summary:
Instead of using the workaround of suppressing the entire index for
modules that call inline asm that may reference locals, use the
NoRename flag on the summary for any locals in the llvm.used set, and
add a reference edge from any functions containing inline asm.
This avoids issues from having no summaries despite the module defining
global values, which was preventing more aggressive index-based
optimization. It will be followed by a subsequent patch to make a
similar fix for local references in module level asm (to fix PR30610).
Reviewers: mehdi_amini
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D26121
llvm-svn: 285513
Diffstat (limited to 'llvm/lib/Transforms/Utils')
-rw-r--r-- | llvm/lib/Transforms/Utils/FunctionImportUtils.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp b/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp index d14920575a4..b9b3606ecfb 100644 --- a/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp +++ b/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp @@ -220,14 +220,6 @@ void FunctionImportGlobalProcessing::processGlobalForThinLTO(GlobalValue &GV) { } void FunctionImportGlobalProcessing::processGlobalsForThinLTO() { - if (!moduleCanBeRenamedForThinLTO(M)) { - // We would have blocked importing from this module by suppressing index - // generation. We still may be able to import into this module though. - assert(!isPerformingImport() && - "Should have blocked importing from module with local used in ASM"); - return; - } - for (GlobalVariable &GV : M.globals()) processGlobalForThinLTO(GV); for (Function &SF : M) |