summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2016-12-15 21:39:42 +0000
committerTeresa Johnson <tejohnson@google.com>2016-12-15 21:39:42 +0000
commiteb0ac241722172150c76c9ac60aa8af0ec0e59a6 (patch)
treebed22b2d144ddfb3b863b4c3fcde270452c1b58d /llvm/lib/Transforms/IPO
parent34505083c6530bccfad189a37f9beaac3b442981 (diff)
downloadbcm5719-llvm-eb0ac241722172150c76c9ac60aa8af0ec0e59a6.tar.gz
bcm5719-llvm-eb0ac241722172150c76c9ac60aa8af0ec0e59a6.zip
[ThinLTO] Revert part of r289843 that belonged to another patch.
The code change for D27687 accidentally got committed along with the main change in r289843. Revert it temporarily, so that I can recommit it along with its test as intended. llvm-svn: 289875
Diffstat (limited to 'llvm/lib/Transforms/IPO')
-rw-r--r--llvm/lib/Transforms/IPO/FunctionImport.cpp22
1 files changed, 9 insertions, 13 deletions
diff --git a/llvm/lib/Transforms/IPO/FunctionImport.cpp b/llvm/lib/Transforms/IPO/FunctionImport.cpp
index 7875db2796a..799d402d6e4 100644
--- a/llvm/lib/Transforms/IPO/FunctionImport.cpp
+++ b/llvm/lib/Transforms/IPO/FunctionImport.cpp
@@ -338,7 +338,6 @@ static void computeImportForFunction(
<< ProcessedThreshold << "\n");
continue;
}
- bool PreviouslyImported = ProcessedThreshold != 0;
// Mark this function as imported in this module, with the current Threshold
ProcessedThreshold = AdjThreshold;
@@ -346,18 +345,15 @@ static void computeImportForFunction(
if (ExportLists) {
auto &ExportList = (*ExportLists)[ExportModulePath];
ExportList.insert(GUID);
- if (!PreviouslyImported) {
- // This is the first time this function was exported from its source
- // module, so mark all functions and globals it references as exported
- // to the outside if they are defined in the same source module.
- for (auto &Edge : ResolvedCalleeSummary->calls()) {
- auto CalleeGUID = Edge.first.getGUID();
- exportGlobalInModule(Index, ExportModulePath, CalleeGUID, ExportList);
- }
- for (auto &Ref : ResolvedCalleeSummary->refs()) {
- auto GUID = Ref.getGUID();
- exportGlobalInModule(Index, ExportModulePath, GUID, ExportList);
- }
+ // Mark all functions and globals referenced by this function as exported
+ // to the outside if they are defined in the same source module.
+ for (auto &Edge : ResolvedCalleeSummary->calls()) {
+ auto CalleeGUID = Edge.first.getGUID();
+ exportGlobalInModule(Index, ExportModulePath, CalleeGUID, ExportList);
+ }
+ for (auto &Ref : ResolvedCalleeSummary->refs()) {
+ auto GUID = Ref.getGUID();
+ exportGlobalInModule(Index, ExportModulePath, GUID, ExportList);
}
}
OpenPOWER on IntegriCloud