[llvm] e2cc854 - [llvm][NFC] Move content of ML subdirectory into Analysis
Mircea Trofin via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 15 14:35:56 PDT 2020
Author: Mircea Trofin
Date: 2020-06-15T14:35:33-07:00
New Revision: e2cc854015fe962654f439561c84098fb9aadbb2
URL: https://github.com/llvm/llvm-project/commit/e2cc854015fe962654f439561c84098fb9aadbb2
DIFF: https://github.com/llvm/llvm-project/commit/e2cc854015fe962654f439561c84098fb9aadbb2.diff
LOG: [llvm][NFC] Move content of ML subdirectory into Analysis
The initial intent was to organize ML stuff in its own directory, but
it turns out that conflicts with llvm component layering policies: it
is not a component, because subsequent changes want to rely on other
analyses, which would create a cycle; and we don't have a reliable,
cross-platform mechanism to compile files in a subdirectory, and fit in
the existing LLVM build structure.
This change moves the files into Analysis, and subsequent changes will
leverage conditional compilation for those that have optional
dependencies.
Added:
llvm/include/llvm/Analysis/InlineFeaturesAnalysis.h
llvm/lib/Analysis/InlineFeaturesAnalysis.cpp
llvm/unittests/Analysis/InlineFeaturesAnalysisTest.cpp
Modified:
llvm/lib/Analysis/CMakeLists.txt
llvm/lib/Analysis/LLVMBuild.txt
llvm/lib/Passes/LLVMBuild.txt
llvm/lib/Passes/PassBuilder.cpp
llvm/unittests/Analysis/CMakeLists.txt
Removed:
llvm/include/llvm/Analysis/ML/InlineFeaturesAnalysis.h
llvm/lib/Analysis/ML/CMakeLists.txt
llvm/lib/Analysis/ML/InlineFeaturesAnalysis.cpp
llvm/lib/Analysis/ML/LLVMBuild.txt
llvm/unittests/Analysis/ML/CMakeLists.txt
llvm/unittests/Analysis/ML/InlineFeaturesAnalysisTest.cpp
################################################################################
diff --git a/llvm/include/llvm/Analysis/ML/InlineFeaturesAnalysis.h b/llvm/include/llvm/Analysis/InlineFeaturesAnalysis.h
similarity index 100%
rename from llvm/include/llvm/Analysis/ML/InlineFeaturesAnalysis.h
rename to llvm/include/llvm/Analysis/InlineFeaturesAnalysis.h
diff --git a/llvm/lib/Analysis/CMakeLists.txt b/llvm/lib/Analysis/CMakeLists.txt
index faf0a3186fd6..a1ca968e5d79 100644
--- a/llvm/lib/Analysis/CMakeLists.txt
+++ b/llvm/lib/Analysis/CMakeLists.txt
@@ -1,5 +1,3 @@
-add_subdirectory(ML)
-
add_llvm_component_library(LLVMAnalysis
AliasAnalysis.cpp
AliasAnalysisEvaluator.cpp
@@ -43,6 +41,7 @@ add_llvm_component_library(LLVMAnalysis
IndirectCallPromotionAnalysis.cpp
InlineCost.cpp
InlineAdvisor.cpp
+ InlineFeaturesAnalysis.cpp
InstCount.cpp
InstructionPrecedenceTracking.cpp
InstructionSimplify.cpp
diff --git a/llvm/lib/Analysis/ML/InlineFeaturesAnalysis.cpp b/llvm/lib/Analysis/InlineFeaturesAnalysis.cpp
similarity index 94%
rename from llvm/lib/Analysis/ML/InlineFeaturesAnalysis.cpp
rename to llvm/lib/Analysis/InlineFeaturesAnalysis.cpp
index d81e9b3aaf62..013b8bbada34 100644
--- a/llvm/lib/Analysis/ML/InlineFeaturesAnalysis.cpp
+++ b/llvm/lib/Analysis/InlineFeaturesAnalysis.cpp
@@ -1,4 +1,4 @@
-#include "llvm/Analysis/ML/InlineFeaturesAnalysis.h"
+#include "llvm/Analysis/InlineFeaturesAnalysis.h"
#include "llvm/IR/Instructions.h"
using namespace llvm;
diff --git a/llvm/lib/Analysis/LLVMBuild.txt b/llvm/lib/Analysis/LLVMBuild.txt
index ef52c41da8a6..d73b55f037fa 100644
--- a/llvm/lib/Analysis/LLVMBuild.txt
+++ b/llvm/lib/Analysis/LLVMBuild.txt
@@ -14,9 +14,6 @@
;
;===------------------------------------------------------------------------===;
-[common]
-subdirectories = ML
-
[component_0]
type = Library
name = Analysis
diff --git a/llvm/lib/Analysis/ML/CMakeLists.txt b/llvm/lib/Analysis/ML/CMakeLists.txt
deleted file mode 100644
index 28a5f98b793b..000000000000
--- a/llvm/lib/Analysis/ML/CMakeLists.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-add_llvm_component_library(LLVMMLPolicies
- InlineFeaturesAnalysis.cpp
-
- DEPENDS
- intrinsics_gen
- )
diff --git a/llvm/lib/Analysis/ML/LLVMBuild.txt b/llvm/lib/Analysis/ML/LLVMBuild.txt
deleted file mode 100644
index a0bb919bb411..000000000000
--- a/llvm/lib/Analysis/ML/LLVMBuild.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-;===- ./lib/Analysis/ML/LLVMBuild.txt --------------------------*- Conf -*--===;
-;
-; Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-; See https://llvm.org/LICENSE.txt for license information.
-; SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-;
-;===------------------------------------------------------------------------===;
-;
-; This is an LLVMBuild description file for the components in this subdirectory.
-;
-; For more information on the LLVMBuild system, please see:
-;
-; http://llvm.org/docs/LLVMBuild.html
-;
-;===------------------------------------------------------------------------===;
-
-[component_0]
-type = Library
-name = MLPolicies
-parent = Analysis
-required_libraries = Core Support
diff --git a/llvm/lib/Passes/LLVMBuild.txt b/llvm/lib/Passes/LLVMBuild.txt
index 14586b640849..438fc5c7c2d4 100644
--- a/llvm/lib/Passes/LLVMBuild.txt
+++ b/llvm/lib/Passes/LLVMBuild.txt
@@ -18,4 +18,4 @@
type = Library
name = Passes
parent = Libraries
-required_libraries = AggressiveInstCombine Analysis MLPolicies CodeGen Core Coroutines IPO InstCombine Scalar Support Target TransformUtils Vectorize Instrumentation
+required_libraries = AggressiveInstCombine Analysis CodeGen Core Coroutines IPO InstCombine Scalar Support Target TransformUtils Vectorize Instrumentation
diff --git a/llvm/lib/Passes/PassBuilder.cpp b/llvm/lib/Passes/PassBuilder.cpp
index 1c93adee50dd..c145ec42a960 100644
--- a/llvm/lib/Passes/PassBuilder.cpp
+++ b/llvm/lib/Passes/PassBuilder.cpp
@@ -34,13 +34,13 @@
#include "llvm/Analysis/GlobalsModRef.h"
#include "llvm/Analysis/IVUsers.h"
#include "llvm/Analysis/InlineAdvisor.h"
+#include "llvm/Analysis/InlineFeaturesAnalysis.h"
#include "llvm/Analysis/LazyCallGraph.h"
#include "llvm/Analysis/LazyValueInfo.h"
#include "llvm/Analysis/LoopAccessAnalysis.h"
#include "llvm/Analysis/LoopCacheAnalysis.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/LoopNestAnalysis.h"
-#include "llvm/Analysis/ML/InlineFeaturesAnalysis.h"
#include "llvm/Analysis/MemoryDependenceAnalysis.h"
#include "llvm/Analysis/MemorySSA.h"
#include "llvm/Analysis/ModuleSummaryAnalysis.h"
diff --git a/llvm/unittests/Analysis/CMakeLists.txt b/llvm/unittests/Analysis/CMakeLists.txt
index 6cc14d124b15..9f28bc701b58 100644
--- a/llvm/unittests/Analysis/CMakeLists.txt
+++ b/llvm/unittests/Analysis/CMakeLists.txt
@@ -21,6 +21,7 @@ add_llvm_unittest(AnalysisTests
DivergenceAnalysisTest.cpp
DomTreeUpdaterTest.cpp
GlobalsModRefTest.cpp
+ InlineFeaturesAnalysisTest.cpp
IVDescriptorsTest.cpp
LazyCallGraphTest.cpp
LoadsTest.cpp
@@ -40,6 +41,4 @@ add_llvm_unittest(AnalysisTests
ValueLatticeTest.cpp
ValueTrackingTest.cpp
VectorUtilsTest.cpp
- )
-
-add_subdirectory(ML)
\ No newline at end of file
+ )
\ No newline at end of file
diff --git a/llvm/unittests/Analysis/ML/InlineFeaturesAnalysisTest.cpp b/llvm/unittests/Analysis/InlineFeaturesAnalysisTest.cpp
similarity index 97%
rename from llvm/unittests/Analysis/ML/InlineFeaturesAnalysisTest.cpp
rename to llvm/unittests/Analysis/InlineFeaturesAnalysisTest.cpp
index 4dfc0bd153f7..a3df767b7650 100644
--- a/llvm/unittests/Analysis/ML/InlineFeaturesAnalysisTest.cpp
+++ b/llvm/unittests/Analysis/InlineFeaturesAnalysisTest.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include "llvm/Analysis/ML/InlineFeaturesAnalysis.h"
+#include "llvm/Analysis/InlineFeaturesAnalysis.h"
#include "llvm/AsmParser/Parser.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/LLVMContext.h"
diff --git a/llvm/unittests/Analysis/ML/CMakeLists.txt b/llvm/unittests/Analysis/ML/CMakeLists.txt
deleted file mode 100644
index 8d1c90312ad0..000000000000
--- a/llvm/unittests/Analysis/ML/CMakeLists.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-set(LLVM_LINK_COMPONENTS
- Analysis
- AsmParser
- Core
- MLPolicies
- Support
- TransformUtils
- )
-
-add_llvm_unittest(MLAnalysisTests
- InlineFeaturesAnalysisTest.cpp
- )
More information about the llvm-commits
mailing list