diff --git a/llvm/include/llvm/InitializePasses.h b/llvm/include/llvm/InitializePasses.h --- a/llvm/include/llvm/InitializePasses.h +++ b/llvm/include/llvm/InitializePasses.h @@ -200,7 +200,6 @@ void initializeLowerInvokeLegacyPassPass(PassRegistry&); void initializeLowerSwitchLegacyPassPass(PassRegistry &); void initializeLowerMatrixIntrinsicsLegacyPassPass(PassRegistry &); -void initializeLowerMatrixIntrinsicsMinimalLegacyPassPass(PassRegistry &); void initializeKCFIPass(PassRegistry &); void initializeMIRAddFSDiscriminatorsPass(PassRegistry &); void initializeMIRCanonicalizerPass(PassRegistry &); diff --git a/llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp b/llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp --- a/llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp +++ b/llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp @@ -2632,45 +2632,3 @@ Pass *llvm::createLowerMatrixIntrinsicsPass() { return new LowerMatrixIntrinsicsLegacyPass(); } - -namespace { - -/// A lightweight version of the matrix lowering pass that only requires TTI. -/// Advanced features that require DT, AA or ORE like tiling are disabled. This -/// is used to lower matrix intrinsics if the main lowering pass is not run, for -/// example with -O0. -class LowerMatrixIntrinsicsMinimalLegacyPass : public FunctionPass { -public: - static char ID; - - LowerMatrixIntrinsicsMinimalLegacyPass() : FunctionPass(ID) { - initializeLowerMatrixIntrinsicsMinimalLegacyPassPass( - *PassRegistry::getPassRegistry()); - } - - bool runOnFunction(Function &F) override { - auto &TTI = getAnalysis().getTTI(F); - LowerMatrixIntrinsics LMT(F, TTI, nullptr, nullptr, nullptr, nullptr); - bool C = LMT.Visit(); - return C; - } - - void getAnalysisUsage(AnalysisUsage &AU) const override { - AU.addRequired(); - AU.setPreservesCFG(); - } -}; -} // namespace - -static const char pass_name_minimal[] = "Lower the matrix intrinsics (minimal)"; -char LowerMatrixIntrinsicsMinimalLegacyPass::ID = 0; -INITIALIZE_PASS_BEGIN(LowerMatrixIntrinsicsMinimalLegacyPass, - "lower-matrix-intrinsics-minimal", pass_name_minimal, - false, false) -INITIALIZE_PASS_END(LowerMatrixIntrinsicsMinimalLegacyPass, - "lower-matrix-intrinsics-minimal", pass_name_minimal, false, - false) - -Pass *llvm::createLowerMatrixIntrinsicsMinimalPass() { - return new LowerMatrixIntrinsicsMinimalLegacyPass(); -} diff --git a/llvm/lib/Transforms/Scalar/Scalar.cpp b/llvm/lib/Transforms/Scalar/Scalar.cpp --- a/llvm/lib/Transforms/Scalar/Scalar.cpp +++ b/llvm/lib/Transforms/Scalar/Scalar.cpp @@ -44,7 +44,6 @@ initializeLowerExpectIntrinsicPass(Registry); initializeLowerGuardIntrinsicLegacyPassPass(Registry); initializeLowerMatrixIntrinsicsLegacyPassPass(Registry); - initializeLowerMatrixIntrinsicsMinimalLegacyPassPass(Registry); initializeLowerWidenableConditionLegacyPassPass(Registry); initializeMergeICmpsLegacyPassPass(Registry); initializeMergedLoadStoreMotionLegacyPassPass(Registry);