From d2d4f16806650bde47d99803782c023bea95c9d0 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Tue, 25 May 2021 21:07:14 +0200 Subject: [PATCH] [Matrix] Use LLVM_DEBUG for a debug flag dump() doesn't exist in release builds. ld.lld: error: undefined symbol: llvm::Value::dump() const >>> referenced by LowerMatrixIntrinsics.cpp >>> LowerMatrixIntrinsics.o:((anonymous namespace)::LowerMatrixIntrinsics::Visit()) --- llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp b/llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp index c7ad5d1..8a9a819 100644 --- a/llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp +++ b/llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp @@ -80,9 +80,6 @@ static cl::opt MatrixLayout( clEnumValN(MatrixLayoutTy::RowMajor, "row-major", "Use row-major layout"))); -static cl::opt PrintAfterTransposeOpt("matrix-print-after-transpose-opt", - cl::init(false)); - /// Helper function to either return Scope, if it is a subprogram or the /// attached subprogram for a local scope. static DISubprogram *getSubprogram(DIScope *Scope) { @@ -813,10 +810,10 @@ public: if (!isMinimal()) { optimizeTransposes(); - if (PrintAfterTransposeOpt) { + LLVM_DEBUG({ dbgs() << "Dump after matrix transpose optimization:\n"; Func.dump(); - } + }); } bool Changed = false; -- 2.7.4