Remove Passes dependency on CodeGen
authorYuanfang Chen <yuanfang.chen@sony.com>
Wed, 24 Jun 2020 02:52:58 +0000 (19:52 -0700)
committerYuanfang Chen <yuanfang.chen@sony.com>
Wed, 24 Jun 2020 21:52:46 +0000 (14:52 -0700)
The dependency was introduced in
5134020ea62d1e1e125fdac48d251a26b80e9781. The only functional change
from this removal would be the new PM interface for the two codegen
passes. This is not necessary since we don't have codegen pipeline using
new PM yet. This removal is to break the potential circular dependency between
Passes and CodeGen once the codegen begins to gain new PM support.

llvm/lib/Passes/LLVMBuild.txt
llvm/lib/Passes/PassBuilder.cpp
llvm/lib/Passes/PassRegistry.def
llvm/test/CodeGen/X86/unreachableblockelim.ll
llvm/test/Transforms/PreISelIntrinsicLowering/load-relative.ll
llvm/test/Transforms/PreISelIntrinsicLowering/objc-arc.ll

index 438fc5c..4a26946 100644 (file)
@@ -18,4 +18,4 @@
 type = Library
 name = Passes
 parent = Libraries
-required_libraries = AggressiveInstCombine Analysis CodeGen Core Coroutines IPO InstCombine Scalar Support Target TransformUtils Vectorize Instrumentation
+required_libraries = AggressiveInstCombine Analysis Core Coroutines IPO InstCombine Scalar Support Target TransformUtils Vectorize Instrumentation
index d7f2a64..eda5454 100644 (file)
@@ -57,9 +57,6 @@
 #include "llvm/Analysis/TargetLibraryInfo.h"
 #include "llvm/Analysis/TargetTransformInfo.h"
 #include "llvm/Analysis/TypeBasedAliasAnalysis.h"
-#include "llvm/CodeGen/MachineModuleInfo.h"
-#include "llvm/CodeGen/PreISelIntrinsicLowering.h"
-#include "llvm/CodeGen/UnreachableBlockElim.h"
 #include "llvm/IR/Dominators.h"
 #include "llvm/IR/IRPrintingPasses.h"
 #include "llvm/IR/PassManager.h"
index c2d4669..0899218 100644 (file)
@@ -73,7 +73,6 @@ MODULE_PASS("partial-inliner", PartialInlinerPass())
 MODULE_PASS("pgo-icall-prom", PGOIndirectCallPromotion())
 MODULE_PASS("pgo-instr-gen", PGOInstrumentationGen())
 MODULE_PASS("pgo-instr-use", PGOInstrumentationUse())
-MODULE_PASS("pre-isel-intrinsic-lowering", PreISelIntrinsicLoweringPass())
 MODULE_PASS("print-profile-summary", ProfileSummaryPrinterPass(dbgs()))
 MODULE_PASS("print-callgraph", CallGraphPrinterPass(dbgs()))
 MODULE_PASS("print", PrintModulePass(dbgs()))
@@ -250,7 +249,6 @@ FUNCTION_PASS("speculative-execution", SpeculativeExecutionPass())
 FUNCTION_PASS("spec-phis", SpeculateAroundPHIsPass())
 FUNCTION_PASS("sroa", SROA())
 FUNCTION_PASS("tailcallelim", TailCallElimPass())
-FUNCTION_PASS("unreachableblockelim", UnreachableBlockElimPass())
 FUNCTION_PASS("unroll-and-jam", LoopUnrollAndJamPass())
 FUNCTION_PASS("vector-combine", VectorCombinePass())
 FUNCTION_PASS("verify", VerifierPass())
index adaedb5..4aafa21 100644 (file)
@@ -1,5 +1,4 @@
 ; RUN: opt -S < %s -unreachableblockelim | FileCheck %s
-; RUN: opt -S < %s -passes=unreachableblockelim | FileCheck %s
 
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
index 43cb0cc..56bedd9 100644 (file)
@@ -1,5 +1,4 @@
 ; RUN: opt -pre-isel-intrinsic-lowering -S -o - %s | FileCheck %s
-; RUN: opt -passes='pre-isel-intrinsic-lowering' -S -o - %s | FileCheck %s
 
 ; CHECK: define i8* @foo32(i8* [[P:%.*]], i32 [[O:%.*]])
 define i8* @foo32(i8* %p, i32 %o) {
index 5ff620a..aff0191 100644 (file)
@@ -1,5 +1,4 @@
 ; RUN: opt -pre-isel-intrinsic-lowering -S -o - %s | FileCheck %s
-; RUN: opt -passes='pre-isel-intrinsic-lowering' -S -o - %s | FileCheck %s
 
 ; Make sure calls to the objc intrinsics are translated to calls in to the
 ; runtime