1
- // ===- HashRecognize.h -- ----------------------------------------*- C++ -*-===//
1
+ // ===- HashRecognize.cpp ----------------------------------------*- C++ -*-===//
2
2
//
3
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
4
// See https://llvm.org/LICENSE.txt for license information.
@@ -274,7 +274,7 @@ struct RecurrenceInfo {
274
274
RecurrenceInfo (const Loop &L) : L(L) {}
275
275
operator bool () const { return BO; }
276
276
277
- void print (raw_ostream &OS, unsigned Indent) const {
277
+ void print (raw_ostream &OS, unsigned Indent = 0 ) const {
278
278
OS.indent (Indent) << " Phi: " ;
279
279
Phi->print (OS);
280
280
OS << " \n " ;
@@ -294,6 +294,10 @@ struct RecurrenceInfo {
294
294
}
295
295
}
296
296
297
+ #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
298
+ LLVM_DUMP_METHOD void dump () const { print (dbgs ()); }
299
+ #endif
300
+
297
301
bool matchSimpleRecurrence (const PHINode *P);
298
302
bool matchConditionalRecurrence (
299
303
const PHINode *P,
@@ -628,6 +632,10 @@ void CRCTable::print(raw_ostream &OS) const {
628
632
}
629
633
}
630
634
635
+ #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
636
+ void CRCTable::dump () const { print (dbgs ()); }
637
+ #endif
638
+
631
639
void HashRecognize::print (raw_ostream &OS) const {
632
640
if (!L.isInnermost ())
633
641
return ;
@@ -671,6 +679,10 @@ void HashRecognize::print(raw_ostream &OS) const {
671
679
genSarwateTable (Info.RHS , Info.ByteOrderSwapped ).print (OS);
672
680
}
673
681
682
+ #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
683
+ void HashRecognize::dump () const { print (dbgs ()); }
684
+ #endif
685
+
674
686
HashRecognize::HashRecognize (const Loop &L, ScalarEvolution &SE)
675
687
: L(L), SE(SE) {}
676
688
0 commit comments