1- // ===- HashRecognize.h -- ----------------------------------------*- C++ -*-===//
1+ // ===- HashRecognize.cpp ----------------------------------------*- C++ -*-===//
22//
33// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44// See https://llvm.org/LICENSE.txt for license information.
@@ -274,7 +274,7 @@ struct RecurrenceInfo {
274274 RecurrenceInfo (const Loop &L) : L(L) {}
275275 operator bool () const { return BO; }
276276
277- void print (raw_ostream &OS, unsigned Indent) const {
277+ void print (raw_ostream &OS, unsigned Indent = 0 ) const {
278278 OS.indent (Indent) << " Phi: " ;
279279 Phi->print (OS);
280280 OS << " \n " ;
@@ -294,6 +294,10 @@ struct RecurrenceInfo {
294294 }
295295 }
296296
297+ #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
298+ LLVM_DUMP_METHOD void dump () const { print (dbgs ()); }
299+ #endif
300+
297301 bool matchSimpleRecurrence (const PHINode *P);
298302 bool matchConditionalRecurrence (
299303 const PHINode *P,
@@ -628,6 +632,10 @@ void CRCTable::print(raw_ostream &OS) const {
628632 }
629633}
630634
635+ #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
636+ void CRCTable::dump () const { print (dbgs ()); }
637+ #endif
638+
631639void HashRecognize::print (raw_ostream &OS) const {
632640 if (!L.isInnermost ())
633641 return ;
@@ -671,6 +679,10 @@ void HashRecognize::print(raw_ostream &OS) const {
671679 genSarwateTable (Info.RHS , Info.ByteOrderSwapped ).print (OS);
672680}
673681
682+ #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
683+ void HashRecognize::dump () const { print (dbgs ()); }
684+ #endif
685+
674686HashRecognize::HashRecognize (const Loop &L, ScalarEvolution &SE)
675687 : L(L), SE(SE) {}
676688
0 commit comments