forked from OSchip/llvm-project
[PM/AA] Remove the last relics of the separate IPA library from LLVM,
folding the code into the main Analysis library. There already wasn't much of a distinction between Analysis and IPA. A number of the passes in Analysis are actually IPA passes, and there doesn't seem to be any advantage to separating them. Moreover, it makes it hard to have interactions between analyses that are both local and interprocedural. In trying to make the Alias Analysis infrastructure work with the new pass manager, it becomes particularly awkward to navigate this split. I've tried to find all the places where we referenced this, but I may have missed some. I have also adjusted the C API to continue to be equivalently functional after this change. Differential Revision: http://reviews.llvm.org/D12075 llvm-svn: 245318
This commit is contained in:
parent
201d065259
commit
7adc3a2b0e
|
@ -465,9 +465,6 @@ def register_library(library):
|
|||
library.LLVMInitializeAnalysis.argtypes = [PassRegistry]
|
||||
library.LLVMInitializeAnalysis.restype = None
|
||||
|
||||
library.LLVMInitializeIPA.argtypes = [PassRegistry]
|
||||
library.LLVMInitializeIPA.restype = None
|
||||
|
||||
library.LLVMInitializeCodeGen.argtypes = [PassRegistry]
|
||||
library.LLVMInitializeCodeGen.restype = None
|
||||
|
||||
|
@ -621,7 +618,6 @@ def initialize_llvm():
|
|||
lib.LLVMInitializeIPO(p)
|
||||
lib.LLVMInitializeInstrumentation(p)
|
||||
lib.LLVMInitializeAnalysis(p)
|
||||
lib.LLVMInitializeIPA(p)
|
||||
lib.LLVMInitializeCodeGen(p)
|
||||
lib.LLVMInitializeTarget(p)
|
||||
|
||||
|
|
|
@ -53,9 +53,6 @@ void initializeInstrumentation(PassRegistry&);
|
|||
/// initializeAnalysis - Initialize all passes linked into the Analysis library.
|
||||
void initializeAnalysis(PassRegistry&);
|
||||
|
||||
/// initializeIPA - Initialize all passes linked into the IPA library.
|
||||
void initializeIPA(PassRegistry&);
|
||||
|
||||
/// initializeCodeGen - Initialize all passes linked into the CodeGen library.
|
||||
void initializeCodeGen(PassRegistry&);
|
||||
|
||||
|
|
|
@ -28,6 +28,9 @@ void llvm::initializeAnalysis(PassRegistry &Registry) {
|
|||
initializeBasicAliasAnalysisPass(Registry);
|
||||
initializeBlockFrequencyInfoWrapperPassPass(Registry);
|
||||
initializeBranchProbabilityInfoWrapperPassPass(Registry);
|
||||
initializeCallGraphWrapperPassPass(Registry);
|
||||
initializeCallGraphPrinterPass(Registry);
|
||||
initializeCallGraphViewerPass(Registry);
|
||||
initializeCostModelAnalysisPass(Registry);
|
||||
initializeCFGViewerPass(Registry);
|
||||
initializeCFGPrinterPass(Registry);
|
||||
|
@ -47,6 +50,7 @@ void llvm::initializeAnalysis(PassRegistry &Registry) {
|
|||
initializePostDomPrinterPass(Registry);
|
||||
initializePostDomOnlyViewerPass(Registry);
|
||||
initializePostDomOnlyPrinterPass(Registry);
|
||||
initializeGlobalsModRefPass(Registry);
|
||||
initializeIVUsersPass(Registry);
|
||||
initializeInstCountPass(Registry);
|
||||
initializeIntervalPartitionPass(Registry);
|
||||
|
@ -74,6 +78,10 @@ void LLVMInitializeAnalysis(LLVMPassRegistryRef R) {
|
|||
initializeAnalysis(*unwrap(R));
|
||||
}
|
||||
|
||||
void LLVMInitializeIPA(LLVMPassRegistryRef R) {
|
||||
initializeAnalysis(*unwrap(R));
|
||||
}
|
||||
|
||||
LLVMBool LLVMVerifyModule(LLVMModuleRef M, LLVMVerifierFailureAction Action,
|
||||
char **OutMessages) {
|
||||
raw_ostream *DebugOS = Action != LLVMReturnStatusAction ? &errs() : nullptr;
|
||||
|
|
|
@ -13,6 +13,9 @@ add_llvm_library(LLVMAnalysis
|
|||
CFGPrinter.cpp
|
||||
CFLAliasAnalysis.cpp
|
||||
CGSCCPassManager.cpp
|
||||
CallGraph.cpp
|
||||
CallGraphSCCPass.cpp
|
||||
CallPrinter.cpp
|
||||
CaptureTracking.cpp
|
||||
CostModel.cpp
|
||||
CodeMetrics.cpp
|
||||
|
@ -23,7 +26,9 @@ add_llvm_library(LLVMAnalysis
|
|||
DivergenceAnalysis.cpp
|
||||
DomPrinter.cpp
|
||||
DominanceFrontier.cpp
|
||||
GlobalsModRef.cpp
|
||||
IVUsers.cpp
|
||||
InlineCost.cpp
|
||||
InstCount.cpp
|
||||
InstructionSimplify.cpp
|
||||
Interval.cpp
|
||||
|
@ -69,5 +74,3 @@ add_llvm_library(LLVMAnalysis
|
|||
)
|
||||
|
||||
add_dependencies(LLVMAnalysis intrinsics_gen)
|
||||
|
||||
add_subdirectory(IPA)
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
add_llvm_library(LLVMipa
|
||||
CallGraph.cpp
|
||||
CallGraphSCCPass.cpp
|
||||
CallPrinter.cpp
|
||||
GlobalsModRef.cpp
|
||||
IPA.cpp
|
||||
InlineCost.cpp
|
||||
)
|
||||
|
||||
add_dependencies(LLVMipa intrinsics_gen)
|
|
@ -1,30 +0,0 @@
|
|||
//===-- IPA.cpp -----------------------------------------------------------===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This file implements the common initialization routines for the IPA library.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/InitializePasses.h"
|
||||
#include "llvm-c/Initialization.h"
|
||||
#include "llvm/PassRegistry.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
/// initializeIPA - Initialize all passes linked into the IPA library.
|
||||
void llvm::initializeIPA(PassRegistry &Registry) {
|
||||
initializeCallGraphWrapperPassPass(Registry);
|
||||
initializeCallGraphPrinterPass(Registry);
|
||||
initializeCallGraphViewerPass(Registry);
|
||||
initializeGlobalsModRefPass(Registry);
|
||||
}
|
||||
|
||||
void LLVMInitializeIPA(LLVMPassRegistryRef R) {
|
||||
initializeIPA(*unwrap(R));
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
;===- ./lib/Analysis/IPA/LLVMBuild.txt -------------------------*- Conf -*--===;
|
||||
;
|
||||
; The LLVM Compiler Infrastructure
|
||||
;
|
||||
; This file is distributed under the University of Illinois Open Source
|
||||
; License. See LICENSE.TXT for details.
|
||||
;
|
||||
;===------------------------------------------------------------------------===;
|
||||
;
|
||||
; 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 = IPA
|
||||
parent = Libraries
|
||||
library_name = ipa
|
||||
required_libraries = Analysis Core Support
|
|
@ -1,15 +0,0 @@
|
|||
##===- lib/Analysis/IPA/Makefile ---------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
LEVEL = ../../..
|
||||
LIBRARYNAME = LLVMipa
|
||||
BUILD_ARCHIVE = 1
|
||||
|
||||
include $(LEVEL)/Makefile.common
|
||||
|
|
@ -15,9 +15,6 @@
|
|||
;
|
||||
;===------------------------------------------------------------------------===;
|
||||
|
||||
[common]
|
||||
subdirectories = IPA
|
||||
|
||||
[component_0]
|
||||
type = Library
|
||||
name = Analysis
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
LEVEL = ../..
|
||||
LIBRARYNAME = LLVMAnalysis
|
||||
DIRS = IPA
|
||||
BUILD_ARCHIVE = 1
|
||||
|
||||
include $(LEVEL)/Makefile.common
|
||||
|
|
|
@ -25,7 +25,6 @@ required_libraries =
|
|||
BitWriter
|
||||
CodeGen
|
||||
Core
|
||||
IPA
|
||||
IPO
|
||||
InstCombine
|
||||
Linker
|
||||
|
|
|
@ -19,4 +19,4 @@
|
|||
type = Library
|
||||
name = Passes
|
||||
parent = Libraries
|
||||
required_libraries = Analysis Core IPA IPO InstCombine Scalar Support TransformUtils Vectorize
|
||||
required_libraries = Analysis Core IPO InstCombine Scalar Support TransformUtils Vectorize
|
||||
|
|
|
@ -20,4 +20,4 @@ type = Library
|
|||
name = IPO
|
||||
parent = Transforms
|
||||
library_name = ipo
|
||||
required_libraries = Analysis Core IPA InstCombine Scalar Support TransformUtils Vectorize
|
||||
required_libraries = Analysis Core InstCombine Scalar Support TransformUtils Vectorize
|
||||
|
|
|
@ -19,4 +19,4 @@
|
|||
type = Library
|
||||
name = TransformUtils
|
||||
parent = Transforms
|
||||
required_libraries = Analysis Core IPA Support
|
||||
required_libraries = Analysis Core Support
|
||||
|
|
|
@ -3,7 +3,6 @@ set(LLVM_LINK_COMPONENTS
|
|||
BitWriter
|
||||
CodeGen
|
||||
Core
|
||||
IPA
|
||||
IPO
|
||||
IRReader
|
||||
InstCombine
|
||||
|
|
|
@ -126,7 +126,6 @@ int main(int argc, char **argv) {
|
|||
initializeVectorization(Registry);
|
||||
initializeIPO(Registry);
|
||||
initializeAnalysis(Registry);
|
||||
initializeIPA(Registry);
|
||||
initializeTransformUtils(Registry);
|
||||
initializeInstCombine(Registry);
|
||||
initializeInstrumentation(Registry);
|
||||
|
|
|
@ -18,7 +18,6 @@ if(NOT DEFINED LLVM_DYLIB_COMPONENTS)
|
|||
DebugInfoDWARF
|
||||
DebugInfoPDB
|
||||
ExecutionEngine
|
||||
IPA
|
||||
IPO
|
||||
IRReader
|
||||
InstCombine
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
set(LLVM_LINK_COMPONENTS
|
||||
Analysis
|
||||
Core
|
||||
IPA
|
||||
Support
|
||||
)
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ set(LLVM_LINK_COMPONENTS
|
|||
BitWriter
|
||||
CodeGen
|
||||
Core
|
||||
IPA
|
||||
IPO
|
||||
IRReader
|
||||
InstCombine
|
||||
|
|
|
@ -312,7 +312,6 @@ int main(int argc, char **argv) {
|
|||
initializeVectorization(Registry);
|
||||
initializeIPO(Registry);
|
||||
initializeAnalysis(Registry);
|
||||
initializeIPA(Registry);
|
||||
initializeTransformUtils(Registry);
|
||||
initializeInstCombine(Registry);
|
||||
initializeInstrumentation(Registry);
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
set(LLVM_LINK_COMPONENTS
|
||||
IPA
|
||||
Analysis
|
||||
AsmParser
|
||||
Core
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
LEVEL = ../..
|
||||
TESTNAME = Analysis
|
||||
LINK_COMPONENTS := ipa analysis asmparser
|
||||
LINK_COMPONENTS := analysis asmparser
|
||||
|
||||
include $(LEVEL)/Makefile.config
|
||||
include $(LLVM_SRC_ROOT)/unittests/Makefile.unittest
|
||||
|
|
|
@ -2,7 +2,6 @@ set(LLVM_LINK_COMPONENTS
|
|||
Analysis
|
||||
AsmParser
|
||||
Core
|
||||
IPA
|
||||
Support
|
||||
)
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
LEVEL = ../..
|
||||
TESTNAME = IR
|
||||
LINK_COMPONENTS := core ipa asmparser
|
||||
LINK_COMPONENTS := core analysis asmparser
|
||||
|
||||
include $(LEVEL)/Makefile.config
|
||||
include $(LLVM_SRC_ROOT)/unittests/Makefile.unittest
|
||||
|
|
Loading…
Reference in New Issue