diff options
author | Dehao Chen <dehao@google.com> | 2017-10-02 18:13:14 +0000 |
---|---|---|
committer | Dehao Chen <dehao@google.com> | 2017-10-02 18:13:14 +0000 |
commit | f464627f2828b3496456a41b5697f31c6756431f (patch) | |
tree | 5c74c754c0bf8c82e24f97a18b4d0c896308c04c /llvm/lib/Transforms/IPO/FunctionImport.cpp | |
parent | bf11424b7fcabf997c2d43c7d0d9949351588b45 (diff) | |
download | bcm5719-llvm-f464627f2828b3496456a41b5697f31c6756431f.tar.gz bcm5719-llvm-f464627f2828b3496456a41b5697f31c6756431f.zip |
Update getMergedLocation to check the instruction type and merge properly.
Summary: If the merged instruction is call instruction, we need to set the scope to the closes common scope between 2 locations, otherwise it will cause trouble when the call is getting inlined.
Reviewers: dblaikie, aprantl
Reviewed By: dblaikie, aprantl
Subscribers: llvm-commits, sanjoy
Differential Revision: https://reviews.llvm.org/D37877
llvm-svn: 314694
Diffstat (limited to 'llvm/lib/Transforms/IPO/FunctionImport.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/FunctionImport.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/FunctionImport.cpp b/llvm/lib/Transforms/IPO/FunctionImport.cpp index 670a84862e0..55599c9149d 100644 --- a/llvm/lib/Transforms/IPO/FunctionImport.cpp +++ b/llvm/lib/Transforms/IPO/FunctionImport.cpp @@ -463,6 +463,10 @@ void llvm::computeDeadSymbols( // Make value live and add it to the worklist if it was not live before. // FIXME: we should only make the prevailing copy live here auto visit = [&](ValueInfo VI) { + for (auto &S : VI.getSummaryList()) + S->setLive(true); + ++LiveSymbols; + Worklist.push_back(VI); // FIXME: If we knew which edges were created for indirect call profiles, // we could skip them here. Any that are live should be reached via // other edges, e.g. reference edges. Otherwise, using a profile collected |