Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:48:20

0001 //===-PollyDebug.h -Provide support for debugging Polly passes-*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 //
0009 // Functions to aid printing Debug Info of all polly passes.
0010 //
0011 //===----------------------------------------------------------------------===//
0012 
0013 #ifndef POLLY_DEBUG_H
0014 #define POLLY_DEBUG_H
0015 
0016 #include "llvm/Support/Debug.h"
0017 
0018 namespace polly {
0019 using namespace llvm;
0020 bool getPollyDebugFlag();
0021 
0022 #ifndef NDEBUG
0023 #define POLLY_DEBUG(X)                                                         \
0024   do {                                                                         \
0025     if (polly::getPollyDebugFlag()) {                                          \
0026       X;                                                                       \
0027     } else {                                                                   \
0028       DEBUG_WITH_TYPE(DEBUG_TYPE, X);                                          \
0029     }                                                                          \
0030   } while (0)
0031 #else
0032 #define POLLY_DEBUG(X)                                                         \
0033   do {                                                                         \
0034   } while (false)
0035 #endif
0036 
0037 } // namespace polly
0038 #endif