[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.
This commit is contained in:
Mircea Trofin 2020-06-15 13:18:13 -07:00
parent 89b7fb0173
commit 534cba2336
11 changed files with 7 additions and 51 deletions

View File

@ -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

View File

@ -1,4 +1,4 @@
#include "llvm/Analysis/ML/InlineFeaturesAnalysis.h"
#include "llvm/Analysis/InlineFeaturesAnalysis.h"
#include "llvm/IR/Instructions.h"
using namespace llvm;

View File

@ -14,9 +14,6 @@
;
;===------------------------------------------------------------------------===;
[common]
subdirectories = ML
[component_0]
type = Library
name = Analysis

View File

@ -1,6 +0,0 @@
add_llvm_component_library(LLVMMLPolicies
InlineFeaturesAnalysis.cpp
DEPENDS
intrinsics_gen
)

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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)
)

View File

@ -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"

View File

@ -1,12 +0,0 @@
set(LLVM_LINK_COMPONENTS
Analysis
AsmParser
Core
MLPolicies
Support
TransformUtils
)
add_llvm_unittest(MLAnalysisTests
InlineFeaturesAnalysisTest.cpp
)