[clang] [clang-tools-extra] [polly] [llvm] [polly] Add polly-debug flag to print debug info from all parts of polly (PR #78549)

Michael Kruse via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 1 06:21:40 PST 2024


================
@@ -0,0 +1,32 @@
+//===-PollyDebug.inc -Provide support for debugging Polly passes-*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// Functions to aid printing Debug Info of all polly passes.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef POLLY_DEBUG_H
+#define POLLY_DEBUG_H
+
+#include "llvm/Support/Debug.h"
+namespace polly {
+using namespace llvm;
+bool getPollyDebugFlag();
+#ifndef NDEBUG
+#undef LLVM_DEBUG
+#define LLVM_DEBUG(X)                                                          \
----------------
Meinersbur wrote:

This conflicts with an existing symbol in LLVM itself. I don't think it's a good idea to overload it for polly. 

You could call it `POLLY_DEBUG`. This will require a search&replace, but IMHO highly preferably over a a header include fiasco.

https://github.com/llvm/llvm-project/pull/78549


More information about the cfe-commits mailing list