mirror of
https://github.com/intel/llvm.git
synced 2026-02-01 17:07:36 +08:00
[Modules] Fix potential ODR violations by sinking the DEBUG_TYPE
definition below all of the header #include lines, Polly edition. If you want to know more details about this, you can see the recent commits to Debug.h in LLVM. This is just the Polly segment of a cleanup I'm doing globally for this macro. llvm-svn: 206852
This commit is contained in:
@@ -23,12 +23,11 @@
|
||||
#include "llvm/IR/Value.h"
|
||||
#include "llvm/ADT/Statistic.h"
|
||||
#include "llvm/ADT/Twine.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include <string>
|
||||
|
||||
#define DEBUG_TYPE "polly-detect"
|
||||
#include "llvm/Support/Debug.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
#define BADSCOP_STAT(NAME, DESC) \
|
||||
STATISTIC(Bad##NAME##ForScop, "Number of bad regions for Scop: " DESC)
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
#include "polly/Options.h"
|
||||
#include "polly/ScopInfo.h"
|
||||
#include "polly/Support/GICHelper.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
|
||||
#include <isl/aff.h>
|
||||
#include <isl/ctx.h>
|
||||
#include <isl/flow.h>
|
||||
@@ -32,12 +34,11 @@
|
||||
#include <isl/options.h>
|
||||
#include <isl/set.h>
|
||||
|
||||
#define DEBUG_TYPE "polly-dependence"
|
||||
#include "llvm/Support/Debug.h"
|
||||
|
||||
using namespace polly;
|
||||
using namespace llvm;
|
||||
|
||||
#define DEBUG_TYPE "polly-dependence"
|
||||
|
||||
static cl::opt<int>
|
||||
OptComputeOut("polly-dependences-computeout",
|
||||
cl::desc("Bound the dependence analysis by a maximal amount of "
|
||||
|
||||
@@ -61,15 +61,14 @@
|
||||
#include "llvm/IR/DiagnosticInfo.h"
|
||||
#include "llvm/IR/DiagnosticPrinter.h"
|
||||
#include "llvm/IR/LLVMContext.h"
|
||||
|
||||
#define DEBUG_TYPE "polly-detect"
|
||||
#include "llvm/Support/Debug.h"
|
||||
|
||||
#include <set>
|
||||
|
||||
using namespace llvm;
|
||||
using namespace polly;
|
||||
|
||||
#define DEBUG_TYPE "polly-detect"
|
||||
|
||||
static cl::opt<bool>
|
||||
DetectScopsWithoutLoops("polly-detect-scops-in-functions-without-loops",
|
||||
cl::desc("Detect scops in functions without loops"),
|
||||
|
||||
@@ -31,8 +31,6 @@
|
||||
#include "llvm/Analysis/RegionIterator.h"
|
||||
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
|
||||
#define DEBUG_TYPE "polly-scops"
|
||||
#include "llvm/Support/Debug.h"
|
||||
|
||||
#include "isl/constraint.h"
|
||||
@@ -44,6 +42,7 @@
|
||||
#include "isl/local_space.h"
|
||||
#include "isl/options.h"
|
||||
#include "isl/val.h"
|
||||
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@@ -51,6 +50,8 @@
|
||||
using namespace llvm;
|
||||
using namespace polly;
|
||||
|
||||
#define DEBUG_TYPE "polly-scops"
|
||||
|
||||
STATISTIC(ScopFound, "Number of valid Scops");
|
||||
STATISTIC(RichScopFound, "Number of Scops containing a loop");
|
||||
|
||||
|
||||
@@ -26,13 +26,13 @@
|
||||
#include "llvm/Analysis/ScalarEvolution.h"
|
||||
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
|
||||
#include "llvm/IR/DataLayout.h"
|
||||
|
||||
#define DEBUG_TYPE "polly-analyze-ir"
|
||||
#include "llvm/Support/Debug.h"
|
||||
|
||||
using namespace llvm;
|
||||
using namespace polly;
|
||||
|
||||
#define DEBUG_TYPE "polly-analyze-ir"
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
/// Helper Classes
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include "polly/LinkAllPasses.h"
|
||||
#include "polly/ScopInfo.h"
|
||||
|
||||
#define DEBUG_TYPE "polly-cloog"
|
||||
#include "llvm/IR/Module.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
|
||||
@@ -39,6 +38,8 @@
|
||||
using namespace llvm;
|
||||
using namespace polly;
|
||||
|
||||
#define DEBUG_TYPE "polly-cloog"
|
||||
|
||||
namespace polly {
|
||||
class Cloog {
|
||||
Scop *S;
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include "polly/CodeGen/Cloog.h"
|
||||
#ifdef CLOOG_FOUND
|
||||
|
||||
#define DEBUG_TYPE "polly-codegen"
|
||||
#include "polly/Dependences.h"
|
||||
#include "polly/LinkAllPasses.h"
|
||||
#include "polly/Options.h"
|
||||
@@ -58,6 +57,8 @@
|
||||
using namespace polly;
|
||||
using namespace llvm;
|
||||
|
||||
#define DEBUG_TYPE "polly-codegen"
|
||||
|
||||
struct isl_set;
|
||||
|
||||
namespace polly {
|
||||
|
||||
@@ -25,8 +25,6 @@
|
||||
#include "polly/LinkAllPasses.h"
|
||||
#include "polly/Options.h"
|
||||
#include "polly/ScopInfo.h"
|
||||
|
||||
#define DEBUG_TYPE "polly-ast"
|
||||
#include "llvm/Support/Debug.h"
|
||||
|
||||
#include "isl/union_map.h"
|
||||
@@ -39,6 +37,8 @@
|
||||
using namespace llvm;
|
||||
using namespace polly;
|
||||
|
||||
#define DEBUG_TYPE "polly-ast"
|
||||
|
||||
static cl::opt<bool> UseContext("polly-ast-use-context",
|
||||
cl::desc("Use context"), cl::Hidden,
|
||||
cl::init(false), cl::ZeroOrMore,
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
#include "llvm/Analysis/LoopInfo.h"
|
||||
#include "llvm/Analysis/ScalarEvolutionExpander.h"
|
||||
#include "llvm/IR/Module.h"
|
||||
#define DEBUG_TYPE "polly-codegen-isl"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/IR/DataLayout.h"
|
||||
@@ -52,6 +51,8 @@
|
||||
using namespace polly;
|
||||
using namespace llvm;
|
||||
|
||||
#define DEBUG_TYPE "polly-codegen-isl"
|
||||
|
||||
/// @brief Insert function calls that print certain LLVM values at run time.
|
||||
///
|
||||
/// This class inserts libc function calls to print certain LLVM values at
|
||||
|
||||
@@ -22,8 +22,6 @@
|
||||
#include "llvm/Support/ToolOutputFile.h"
|
||||
#include "llvm/Support/system_error.h"
|
||||
|
||||
#define DEBUG_TYPE "polly-import-jscop"
|
||||
|
||||
#include "json/reader.h"
|
||||
#include "json/writer.h"
|
||||
|
||||
@@ -37,6 +35,8 @@
|
||||
using namespace llvm;
|
||||
using namespace polly;
|
||||
|
||||
#define DEBUG_TYPE "polly-import-jscop"
|
||||
|
||||
STATISTIC(NewAccessMapFound, "Number of updated access functions");
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
|
||||
#include "polly/Support/SCEVValidator.h"
|
||||
#include "polly/ScopInfo.h"
|
||||
|
||||
#define DEBUG_TYPE "polly-scev-validator"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Analysis/ScalarEvolution.h"
|
||||
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
|
||||
#include "llvm/Analysis/RegionInfo.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
#define DEBUG_TYPE "polly-scev-validator"
|
||||
|
||||
namespace SCEVType {
|
||||
/// @brief The type of a SCEV
|
||||
///
|
||||
|
||||
@@ -18,13 +18,13 @@
|
||||
#include "llvm/Analysis/ScalarEvolution.h"
|
||||
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
|
||||
#include "llvm/IR/CFG.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
|
||||
|
||||
#define DEBUG_TYPE "polly-scop-helper"
|
||||
#include "llvm/Support/Debug.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
#define DEBUG_TYPE "polly-scop-helper"
|
||||
|
||||
// Helper function for Scop
|
||||
// TODO: Add assertion to not allow parameter to be null
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
@@ -24,8 +24,6 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#define DEBUG_TYPE "indvars"
|
||||
|
||||
#include "polly/LinkAllPasses.h"
|
||||
#include "llvm/ADT/DenseMap.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
@@ -52,6 +50,8 @@
|
||||
#include "llvm/Transforms/Utils/SimplifyIndVar.h"
|
||||
using namespace llvm;
|
||||
|
||||
#define DEBUG_TYPE "indvars"
|
||||
|
||||
STATISTIC(NumRemoved, "Number of aux indvars removed");
|
||||
STATISTIC(NumWidened, "Number of indvars widened");
|
||||
STATISTIC(NumInserted, "Number of canonical indvars added");
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "llvm/Analysis/ValueTracking.h"
|
||||
#include "llvm/Transforms/Utils/Local.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#define DEBUG_TYPE "polly-independent"
|
||||
#include "llvm/Support/Debug.h"
|
||||
|
||||
#include <vector>
|
||||
@@ -30,6 +29,8 @@
|
||||
using namespace polly;
|
||||
using namespace llvm;
|
||||
|
||||
#define DEBUG_TYPE "polly-independent"
|
||||
|
||||
static cl::opt<bool> DisableIntraScopScalarToArray(
|
||||
"disable-polly-intra-scop-scalar-to-array",
|
||||
cl::desc("Do not rewrite scalar to array to generate independent blocks"),
|
||||
|
||||
@@ -20,8 +20,6 @@
|
||||
#include "polly/Options.h"
|
||||
#include "polly/ScopInfo.h"
|
||||
#include "polly/Support/GICHelper.h"
|
||||
|
||||
#define DEBUG_TYPE "polly-opt-pluto"
|
||||
#include "llvm/Support/Debug.h"
|
||||
|
||||
#include "pluto/libpluto.h"
|
||||
@@ -30,6 +28,8 @@
|
||||
using namespace llvm;
|
||||
using namespace polly;
|
||||
|
||||
#define DEBUG_TYPE "polly-opt-pluto"
|
||||
|
||||
static cl::opt<bool> EnableTiling("polly-pluto-tile", cl::desc("Enable tiling"),
|
||||
cl::Hidden, cl::init(false), cl::ZeroOrMore,
|
||||
cl::cat(PollyCategory));
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
#include "polly/Options.h"
|
||||
#include "polly/ScheduleOptimizer.h"
|
||||
#include "polly/ScopInfo.h"
|
||||
|
||||
#define DEBUG_TYPE "polly-opt-pocc"
|
||||
#include "polly/ScopLib.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/Path.h"
|
||||
#include "llvm/Support/Program.h"
|
||||
@@ -34,8 +33,6 @@
|
||||
#include "llvm/ADT/OwningPtr.h"
|
||||
#include "llvm/ADT/SmallString.h"
|
||||
|
||||
#include "polly/ScopLib.h"
|
||||
|
||||
#include "isl/space.h"
|
||||
#include "isl/map.h"
|
||||
#include "isl/constraint.h"
|
||||
@@ -43,6 +40,8 @@
|
||||
using namespace llvm;
|
||||
using namespace polly;
|
||||
|
||||
#define DEBUG_TYPE "polly-opt-pocc"
|
||||
|
||||
static cl::opt<std::string> PlutoFuse("pluto-fuse", cl::desc(""), cl::Hidden,
|
||||
cl::value_desc("Set fuse mode of Pluto"),
|
||||
cl::init("maxfuse"),
|
||||
|
||||
@@ -30,13 +30,13 @@
|
||||
#include "polly/LinkAllPasses.h"
|
||||
#include "polly/Options.h"
|
||||
#include "polly/ScopInfo.h"
|
||||
|
||||
#define DEBUG_TYPE "polly-opt-isl"
|
||||
#include "llvm/Support/Debug.h"
|
||||
|
||||
using namespace llvm;
|
||||
using namespace polly;
|
||||
|
||||
#define DEBUG_TYPE "polly-opt-isl"
|
||||
|
||||
namespace polly {
|
||||
bool DisablePollyTiling;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user