[llvm-branch-commits] [llvm] 95ce32c - [NFC] Move ImportedFunctionsInliningStatistics to Analysis
Mircea Trofin via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Jan 20 13:22:55 PST 2021
Author: Mircea Trofin
Date: 2021-01-20T13:18:03-08:00
New Revision: 95ce32c7878d92a9058c052ebe7b35f97f23569e
URL: https://github.com/llvm/llvm-project/commit/95ce32c7878d92a9058c052ebe7b35f97f23569e
DIFF: https://github.com/llvm/llvm-project/commit/95ce32c7878d92a9058c052ebe7b35f97f23569e.diff
LOG: [NFC] Move ImportedFunctionsInliningStatistics to Analysis
This is related to D94982. We want to call these APIs from the Analysis
component, so we can't leave them under Transforms.
Differential Revision: https://reviews.llvm.org/D95079
Added:
llvm/include/llvm/Analysis/Utils/ImportedFunctionsInliningStatistics.h
llvm/lib/Analysis/ImportedFunctionsInliningStatistics.cpp
Modified:
llvm/include/llvm/Transforms/IPO/Inliner.h
llvm/lib/Analysis/CMakeLists.txt
llvm/lib/Transforms/IPO/Inliner.cpp
llvm/lib/Transforms/Utils/CMakeLists.txt
Removed:
llvm/include/llvm/Transforms/Utils/ImportedFunctionsInliningStatistics.h
llvm/lib/Transforms/Utils/ImportedFunctionsInliningStatistics.cpp
################################################################################
diff --git a/llvm/include/llvm/Transforms/Utils/ImportedFunctionsInliningStatistics.h b/llvm/include/llvm/Analysis/Utils/ImportedFunctionsInliningStatistics.h
similarity index 100%
rename from llvm/include/llvm/Transforms/Utils/ImportedFunctionsInliningStatistics.h
rename to llvm/include/llvm/Analysis/Utils/ImportedFunctionsInliningStatistics.h
diff --git a/llvm/include/llvm/Transforms/IPO/Inliner.h b/llvm/include/llvm/Transforms/IPO/Inliner.h
index b6e793a8a380c..3cac11bce0c55 100644
--- a/llvm/include/llvm/Transforms/IPO/Inliner.h
+++ b/llvm/include/llvm/Transforms/IPO/Inliner.h
@@ -14,8 +14,8 @@
#include "llvm/Analysis/InlineAdvisor.h"
#include "llvm/Analysis/InlineCost.h"
#include "llvm/Analysis/LazyCallGraph.h"
+#include "llvm/Analysis/Utils/ImportedFunctionsInliningStatistics.h"
#include "llvm/IR/PassManager.h"
-#include "llvm/Transforms/Utils/ImportedFunctionsInliningStatistics.h"
#include <utility>
namespace llvm {
diff --git a/llvm/lib/Analysis/CMakeLists.txt b/llvm/lib/Analysis/CMakeLists.txt
index b89b6b3c4c647..f31cf349b09aa 100644
--- a/llvm/lib/Analysis/CMakeLists.txt
+++ b/llvm/lib/Analysis/CMakeLists.txt
@@ -58,6 +58,7 @@ add_llvm_component_library(LLVMAnalysis
IRSimilarityIdentifier.cpp
IVDescriptors.cpp
IVUsers.cpp
+ ImportedFunctionsInliningStatistics.cpp
IndirectCallPromotionAnalysis.cpp
InlineCost.cpp
InlineAdvisor.cpp
diff --git a/llvm/lib/Transforms/Utils/ImportedFunctionsInliningStatistics.cpp b/llvm/lib/Analysis/ImportedFunctionsInliningStatistics.cpp
similarity index 98%
rename from llvm/lib/Transforms/Utils/ImportedFunctionsInliningStatistics.cpp
rename to llvm/lib/Analysis/ImportedFunctionsInliningStatistics.cpp
index ea93f99d69e34..6e14a63806c09 100644
--- a/llvm/lib/Transforms/Utils/ImportedFunctionsInliningStatistics.cpp
+++ b/llvm/lib/Analysis/ImportedFunctionsInliningStatistics.cpp
@@ -9,7 +9,7 @@
// ThinLTO.
//===----------------------------------------------------------------------===//
-#include "llvm/Transforms/Utils/ImportedFunctionsInliningStatistics.h"
+#include "llvm/Analysis/Utils/ImportedFunctionsInliningStatistics.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Module.h"
@@ -186,7 +186,7 @@ ImportedFunctionsInliningStatistics::SortedNodesTy
ImportedFunctionsInliningStatistics::getSortedNodes() {
SortedNodesTy SortedNodes;
SortedNodes.reserve(NodesMap.size());
- for (const NodesMapTy::value_type& Node : NodesMap)
+ for (const NodesMapTy::value_type &Node : NodesMap)
SortedNodes.push_back(&Node);
llvm::sort(SortedNodes, [&](const SortedNodesTy::value_type &Lhs,
diff --git a/llvm/lib/Transforms/IPO/Inliner.cpp b/llvm/lib/Transforms/IPO/Inliner.cpp
index 8be4e93e09dab..3877c0ecb9749 100644
--- a/llvm/lib/Transforms/IPO/Inliner.cpp
+++ b/llvm/lib/Transforms/IPO/Inliner.cpp
@@ -36,6 +36,7 @@
#include "llvm/Analysis/ProfileSummaryInfo.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/Analysis/TargetTransformInfo.h"
+#include "llvm/Analysis/Utils/ImportedFunctionsInliningStatistics.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/DataLayout.h"
@@ -59,7 +60,6 @@
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Utils/CallPromotionUtils.h"
#include "llvm/Transforms/Utils/Cloning.h"
-#include "llvm/Transforms/Utils/ImportedFunctionsInliningStatistics.h"
#include "llvm/Transforms/Utils/Local.h"
#include "llvm/Transforms/Utils/ModuleUtils.h"
#include <algorithm>
diff --git a/llvm/lib/Transforms/Utils/CMakeLists.txt b/llvm/lib/Transforms/Utils/CMakeLists.txt
index a68ba40c2bd55..b3bdc192a877f 100644
--- a/llvm/lib/Transforms/Utils/CMakeLists.txt
+++ b/llvm/lib/Transforms/Utils/CMakeLists.txt
@@ -28,7 +28,6 @@ add_llvm_component_library(LLVMTransformUtils
GlobalStatus.cpp
GuardUtils.cpp
InlineFunction.cpp
- ImportedFunctionsInliningStatistics.cpp
InjectTLIMappings.cpp
InstructionNamer.cpp
IntegerDivision.cpp
More information about the llvm-branch-commits
mailing list