llvm-project/polly/lib/Support/PollyDebug.cpp
Karthika Devi C 601d7eab06
[polly] Add polly-debug flag to print debug info from all parts of polly (#78549)
This flag enable the user to print debug Info from all the passes and
helpers inside polly at once. This will help a novice user as well to
work in polly without explicitly having to know which parts of polly has
actually kicked in and pass them via -debug-only.
2024-03-26 12:02:27 -07:00

28 lines
1.0 KiB
C++

//===-PollyDebug.cpp -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.
//
//===----------------------------------------------------------------------===//
#include "polly/Support/PollyDebug.h"
#include "llvm/Support/CommandLine.h"
using namespace polly;
using namespace llvm;
bool PollyDebugFlag;
bool polly::getPollyDebugFlag() { return PollyDebugFlag; }
// -debug - Command line option to enable the DEBUG statements in the passes.
// This flag may only be enabled in debug builds.
static cl::opt<bool, true>
PollyDebug("polly-debug",
cl::desc("Enable debug output for only polly passes."),
cl::Hidden, cl::location(PollyDebugFlag), cl::ZeroOrMore);