@@ -57,10 +57,8 @@ using namespace PatternMatch;
57
57
#define DEBUG_TYPE " lower-matrix-intrinsics"
58
58
59
59
STATISTIC (FlattenedMatrices, " Number of matrix flattenings" );
60
- #ifndef NDEBUG
61
60
STATISTIC (ReshapedMatrices, " Number of matrix reshapes" );
62
61
STATISTIC (SplitMatrices, " Number of matrix splits" );
63
- #endif
64
62
65
63
static cl::opt<bool >
66
64
FuseMatrix (" fuse-matrix" , cl::init(true ), cl::Hidden,
@@ -627,27 +625,29 @@ class LowerMatrixIntrinsics {
627
625
SplitVecs.push_back (V);
628
626
}
629
627
630
- LLVM_DEBUG ( if (Instruction *Inst = dyn_cast<Instruction>(MatrixVal)) {
628
+ if (Instruction *Inst = dyn_cast<Instruction>(MatrixVal)) {
631
629
if (Found != Inst2ColumnMatrix.end ()) {
632
630
// FIXME: re: "at least": SplitVecs.size() doesn't count the shuffles
633
631
// that embedInVector created.
634
- dbgs () << " matrix reshape from " << Found->second .shape () << " to "
635
- << SI << " using at least " << SplitVecs. size ()
636
- << " shuffles on behalf of:\n "
637
- << *Inst << ' \n ' ;
632
+ LLVM_DEBUG ( dbgs () << " matrix reshape from " << Found->second .shape ()
633
+ << " to " << SI << " using at least "
634
+ << SplitVecs. size () << " shuffles on behalf of:\n "
635
+ << *Inst << ' \n ' ) ;
638
636
ReshapedMatrices++;
639
637
} else if (!ShapeMap.contains (MatrixVal)) {
640
- dbgs () << " splitting a " << SI << " matrix with " << SplitVecs.size ()
641
- << " shuffles beacuse we do not have a shape-aware lowering for "
642
- " its def:\n "
643
- << *Inst << ' \n ' ;
638
+ LLVM_DEBUG (
639
+ dbgs ()
640
+ << " splitting a " << SI << " matrix with " << SplitVecs.size ()
641
+ << " shuffles beacuse we do not have a shape-aware lowering for "
642
+ " its def:\n "
643
+ << *Inst << ' \n ' );
644
644
SplitMatrices++;
645
645
} else {
646
646
// The ShapeMap has it, so it's a case where we're being lowered
647
647
// before the def, and we expect that InstCombine will clean things up
648
648
// afterward.
649
649
}
650
- });
650
+ }
651
651
652
652
return {SplitVecs};
653
653
}
0 commit comments