[llvm] d2d4f16 - [Matrix] Use LLVM_DEBUG for a debug flag
Benjamin Kramer via llvm-commits
llvm-commits at lists.llvm.org
Tue May 25 12:10:39 PDT 2021
Author: Benjamin Kramer
Date: 2021-05-25T21:10:19+02:00
New Revision: d2d4f16806650bde47d99803782c023bea95c9d0
URL: https://github.com/llvm/llvm-project/commit/d2d4f16806650bde47d99803782c023bea95c9d0
DIFF: https://github.com/llvm/llvm-project/commit/d2d4f16806650bde47d99803782c023bea95c9d0.diff
LOG: [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())
Added:
Modified:
llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp b/llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
index c7ad5d1bf711..8a9a81929996 100644
--- a/llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
+++ b/llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
@@ -80,9 +80,6 @@ static cl::opt<MatrixLayoutTy> MatrixLayout(
clEnumValN(MatrixLayoutTy::RowMajor, "row-major",
"Use row-major layout")));
-static cl::opt<bool> 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 @@ class LowerMatrixIntrinsics {
if (!isMinimal()) {
optimizeTransposes();
- if (PrintAfterTransposeOpt) {
+ LLVM_DEBUG({
dbgs() << "Dump after matrix transpose optimization:\n";
Func.dump();
- }
+ });
}
bool Changed = false;
More information about the llvm-commits
mailing list