Index: llvm/lib/Analysis/AssumeBundleQueries.cpp =================================================================== --- llvm/lib/Analysis/AssumeBundleQueries.cpp +++ llvm/lib/Analysis/AssumeBundleQueries.cpp @@ -6,8 +6,6 @@ // //===----------------------------------------------------------------------===// -#define DEBUG_TYPE "assume-queries" - #include "llvm/Analysis/AssumeBundleQueries.h" #include "llvm/ADT/Statistic.h" #include "llvm/Analysis/AssumptionCache.h" @@ -18,6 +16,8 @@ #include "llvm/IR/PatternMatch.h" #include "llvm/Support/DebugCounter.h" +#define DEBUG_TYPE "assume-queries" + using namespace llvm; using namespace llvm::PatternMatch; Index: llvm/lib/Target/AArch64/AArch64PBQPRegAlloc.cpp =================================================================== --- llvm/lib/Target/AArch64/AArch64PBQPRegAlloc.cpp +++ llvm/lib/Target/AArch64/AArch64PBQPRegAlloc.cpp @@ -14,8 +14,6 @@ // independent, non-quadword FP/ASIMD floating-point multiply-accumulates. //===----------------------------------------------------------------------===// -#define DEBUG_TYPE "aarch64-pbqp" - #include "AArch64PBQPRegAlloc.h" #include "AArch64.h" #include "AArch64RegisterInfo.h" @@ -28,6 +26,8 @@ #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" +#define DEBUG_TYPE "aarch64-pbqp" + using namespace llvm; namespace { Index: llvm/lib/Target/ARC/ARCBranchFinalize.cpp =================================================================== --- llvm/lib/Target/ARC/ARCBranchFinalize.cpp +++ llvm/lib/Target/ARC/ARCBranchFinalize.cpp @@ -10,8 +10,6 @@ // range conditional branches. //===----------------------------------------------------------------------===// -#define DEBUG_TYPE "arc-branch-finalize" - #include "ARCInstrInfo.h" #include "ARCTargetMachine.h" #include "MCTargetDesc/ARCInfo.h" @@ -24,6 +22,8 @@ #include "llvm/Support/Debug.h" #include +#define DEBUG_TYPE "arc-branch-finalize" + using namespace llvm; namespace llvm { Index: llvm/lib/Target/AVR/MCTargetDesc/AVRMCELFStreamer.cpp =================================================================== --- llvm/lib/Target/AVR/MCTargetDesc/AVRMCELFStreamer.cpp +++ llvm/lib/Target/AVR/MCTargetDesc/AVRMCELFStreamer.cpp @@ -10,14 +10,14 @@ // instructions on to the real streamer. // //===----------------------------------------------------------------------===// -#define DEBUG_TYPE "avrmcelfstreamer" - #include "MCTargetDesc/AVRMCELFStreamer.h" #include "llvm/MC/MCContext.h" #include "llvm/MC/MCExpr.h" #include "llvm/MC/MCSymbol.h" #include "llvm/MC/MCObjectWriter.h" +#define DEBUG_TYPE "avrmcelfstreamer" + using namespace llvm; void AVRMCELFStreamer::emitValueForModiferKind( Index: llvm/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp =================================================================== --- llvm/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp +++ llvm/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp @@ -6,8 +6,6 @@ // //===----------------------------------------------------------------------===// -#define DEBUG_TYPE "mcasmparser" - #include "HexagonTargetStreamer.h" #include "MCTargetDesc/HexagonMCChecker.h" #include "MCTargetDesc/HexagonMCELFStreamer.h" @@ -58,6 +56,8 @@ #include #include +#define DEBUG_TYPE "mcasmparser" + using namespace llvm; static cl::opt WarnMissingParenthesis( Index: llvm/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp =================================================================== --- llvm/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp +++ llvm/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp @@ -6,8 +6,6 @@ // //===----------------------------------------------------------------------===// -#define DEBUG_TYPE "hexagon-disassembler" - #include "MCTargetDesc/HexagonBaseInfo.h" #include "MCTargetDesc/HexagonMCChecker.h" #include "MCTargetDesc/HexagonMCInstrInfo.h" @@ -32,6 +30,8 @@ #include #include +#define DEBUG_TYPE "hexagon-disassembler" + using namespace llvm; using namespace Hexagon; Index: llvm/lib/Target/Hexagon/HexagonBranchRelaxation.cpp =================================================================== --- llvm/lib/Target/Hexagon/HexagonBranchRelaxation.cpp +++ llvm/lib/Target/Hexagon/HexagonBranchRelaxation.cpp @@ -6,8 +6,6 @@ // //===----------------------------------------------------------------------===// -#define DEBUG_TYPE "hexagon-brelax" - #include "Hexagon.h" #include "HexagonInstrInfo.h" #include "HexagonSubtarget.h" @@ -29,6 +27,8 @@ #include #include +#define DEBUG_TYPE "hexagon-brelax" + using namespace llvm; // Since we have no exact knowledge of code layout, allow some safety buffer Index: llvm/lib/Target/Hexagon/HexagonConstPropagation.cpp =================================================================== --- llvm/lib/Target/Hexagon/HexagonConstPropagation.cpp +++ llvm/lib/Target/Hexagon/HexagonConstPropagation.cpp @@ -6,8 +6,6 @@ // //===----------------------------------------------------------------------===// -#define DEBUG_TYPE "hcp" - #include "HexagonInstrInfo.h" #include "HexagonRegisterInfo.h" #include "HexagonSubtarget.h" @@ -45,6 +43,8 @@ #include #include +#define DEBUG_TYPE "hcp" + using namespace llvm; namespace { Index: llvm/lib/Target/Hexagon/HexagonGenMux.cpp =================================================================== --- llvm/lib/Target/Hexagon/HexagonGenMux.cpp +++ llvm/lib/Target/Hexagon/HexagonGenMux.cpp @@ -19,8 +19,6 @@ // the predicate register, they cannot use the .new form. In such cases it // is better to collapse them back to a single MUX instruction. -#define DEBUG_TYPE "hexmux" - #include "HexagonInstrInfo.h" #include "HexagonRegisterInfo.h" #include "HexagonSubtarget.h" @@ -47,6 +45,8 @@ #include #include +#define DEBUG_TYPE "hexmux" + using namespace llvm; namespace llvm { Index: llvm/lib/Target/Hexagon/HexagonSplitDouble.cpp =================================================================== --- llvm/lib/Target/Hexagon/HexagonSplitDouble.cpp +++ llvm/lib/Target/Hexagon/HexagonSplitDouble.cpp @@ -6,8 +6,6 @@ // //===----------------------------------------------------------------------===// -#define DEBUG_TYPE "hsdr" - #include "HexagonInstrInfo.h" #include "HexagonRegisterInfo.h" #include "HexagonSubtarget.h" @@ -42,6 +40,8 @@ #include #include +#define DEBUG_TYPE "hsdr" + using namespace llvm; namespace llvm { Index: llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp =================================================================== --- llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp +++ llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp @@ -10,8 +10,6 @@ // //===----------------------------------------------------------------------===// -#define DEBUG_TYPE "hexagon-sdata" - #include "HexagonTargetObjectFile.h" #include "llvm/ADT/SmallString.h" #include "llvm/ADT/StringRef.h" @@ -32,6 +30,8 @@ #include "llvm/Support/raw_ostream.h" #include "llvm/Target/TargetMachine.h" +#define DEBUG_TYPE "hexagon-sdata" + using namespace llvm; static cl::opt SmallDataThreshold("hexagon-small-data-threshold", Index: llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCELFStreamer.cpp =================================================================== --- llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCELFStreamer.cpp +++ llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCELFStreamer.cpp @@ -10,7 +10,6 @@ // instructions on to the real streamer. // //===----------------------------------------------------------------------===// -#define DEBUG_TYPE "hexagonmcelfstreamer" #include "MCTargetDesc/HexagonMCELFStreamer.h" #include "MCTargetDesc/HexagonMCInstrInfo.h" @@ -37,6 +36,8 @@ #include #include +#define DEBUG_TYPE "hexagonmcelfstreamer" + using namespace llvm; static cl::opt GPSize Index: llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCShuffler.cpp =================================================================== --- llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCShuffler.cpp +++ llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCShuffler.cpp @@ -11,8 +11,6 @@ // //===----------------------------------------------------------------------===// -#define DEBUG_TYPE "hexagon-shuffle" - #include "MCTargetDesc/HexagonMCShuffler.h" #include "MCTargetDesc/HexagonMCInstrInfo.h" #include "MCTargetDesc/HexagonShuffler.h" @@ -24,6 +22,8 @@ #include "llvm/Support/raw_ostream.h" #include +#define DEBUG_TYPE "hexagon-shuffle" + using namespace llvm; static cl::opt Index: llvm/lib/Target/Hexagon/MCTargetDesc/HexagonShuffler.cpp =================================================================== --- llvm/lib/Target/Hexagon/MCTargetDesc/HexagonShuffler.cpp +++ llvm/lib/Target/Hexagon/MCTargetDesc/HexagonShuffler.cpp @@ -11,8 +11,6 @@ // //===----------------------------------------------------------------------===// -#define DEBUG_TYPE "hexagon-shuffle" - #include "MCTargetDesc/HexagonShuffler.h" #include "MCTargetDesc/HexagonBaseInfo.h" #include "MCTargetDesc/HexagonMCInstrInfo.h" @@ -33,6 +31,8 @@ #include #include +#define DEBUG_TYPE "hexagon-shuffle" + using namespace llvm; namespace { Index: llvm/lib/Target/Lanai/Disassembler/LanaiDisassembler.h =================================================================== --- llvm/lib/Target/Lanai/Disassembler/LanaiDisassembler.h +++ llvm/lib/Target/Lanai/Disassembler/LanaiDisassembler.h @@ -13,10 +13,10 @@ #ifndef LLVM_LIB_TARGET_LANAI_DISASSEMBLER_LANAIDISASSEMBLER_H #define LLVM_LIB_TARGET_LANAI_DISASSEMBLER_LANAIDISASSEMBLER_H -#define DEBUG_TYPE "lanai-disassembler" - #include "llvm/MC/MCDisassembler/MCDisassembler.h" +#define DEBUG_TYPE "lanai-disassembler" + namespace llvm { class LanaiDisassembler : public MCDisassembler { Index: llvm/lib/Target/M68k/M68kRegisterInfo.cpp =================================================================== --- llvm/lib/Target/M68k/M68kRegisterInfo.cpp +++ llvm/lib/Target/M68k/M68kRegisterInfo.cpp @@ -11,8 +11,6 @@ /// //===----------------------------------------------------------------------===// -#define DEBUG_TYPE "m68k-reg-info" - #include "M68kRegisterInfo.h" #include "M68k.h" @@ -32,6 +30,8 @@ #define GET_REGINFO_TARGET_DESC #include "M68kGenRegisterInfo.inc" +#define DEBUG_TYPE "m68k-reg-info" + using namespace llvm; static cl::opt EnableBasePointer( Index: llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp =================================================================== --- llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp +++ llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp @@ -41,8 +41,6 @@ // *++p = c; //===----------------------------------------------------------------------===// -#define DEBUG_TYPE "ppc-loop-instr-form-prep" - #include "PPC.h" #include "PPCSubtarget.h" #include "PPCTargetMachine.h" @@ -79,6 +77,8 @@ #include #include +#define DEBUG_TYPE "ppc-loop-instr-form-prep" + using namespace llvm; static cl::opt MaxVarsPrep("ppc-formprep-max-vars", Index: llvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp =================================================================== --- llvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp +++ llvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp @@ -17,8 +17,6 @@ #include "llvm/IR/Instructions.h" #include "llvm/InitializePasses.h" -#define AA_NAME "alignment-from-assumptions" -#define DEBUG_TYPE AA_NAME #include "llvm/Transforms/Scalar/AlignmentFromAssumptions.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/Statistic.h" @@ -37,6 +35,9 @@ #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Transforms/Scalar.h" + +#define AA_NAME "alignment-from-assumptions" +#define DEBUG_TYPE AA_NAME using namespace llvm; STATISTIC(NumLoadAlignChanged, Index: llvm/lib/Transforms/Scalar/Float2Int.cpp =================================================================== --- llvm/lib/Transforms/Scalar/Float2Int.cpp +++ llvm/lib/Transforms/Scalar/Float2Int.cpp @@ -13,8 +13,6 @@ #include "llvm/InitializePasses.h" #include "llvm/Support/CommandLine.h" -#define DEBUG_TYPE "float2int" - #include "llvm/Transforms/Scalar/Float2Int.h" #include "llvm/ADT/APInt.h" #include "llvm/ADT/APSInt.h" @@ -31,6 +29,9 @@ #include "llvm/Transforms/Scalar.h" #include #include // For std::function + +#define DEBUG_TYPE "float2int" + using namespace llvm; // The algorithm is simple. Start at instructions that convert from the Index: llvm/lib/Transforms/Scalar/LoopDataPrefetch.cpp =================================================================== --- llvm/lib/Transforms/Scalar/LoopDataPrefetch.cpp +++ llvm/lib/Transforms/Scalar/LoopDataPrefetch.cpp @@ -13,7 +13,6 @@ #include "llvm/Transforms/Scalar/LoopDataPrefetch.h" #include "llvm/InitializePasses.h" -#define DEBUG_TYPE "loop-data-prefetch" #include "llvm/ADT/DepthFirstIterator.h" #include "llvm/ADT/Statistic.h" #include "llvm/Analysis/AssumptionCache.h" @@ -33,6 +32,9 @@ #include "llvm/Transforms/Utils/BasicBlockUtils.h" #include "llvm/Transforms/Utils/ScalarEvolutionExpander.h" #include "llvm/Transforms/Utils/ValueMapper.h" + +#define DEBUG_TYPE "loop-data-prefetch" + using namespace llvm; // By default, we limit this to creating 16 PHIs (which is a little over half Index: llvm/utils/TableGen/DFAEmitter.cpp =================================================================== --- llvm/utils/TableGen/DFAEmitter.cpp +++ llvm/utils/TableGen/DFAEmitter.cpp @@ -19,7 +19,6 @@ // to the NFA. // //===----------------------------------------------------------------------===// -#define DEBUG_TYPE "dfa-emitter" #include "DFAEmitter.h" #include "CodeGenTarget.h" @@ -39,6 +38,8 @@ #include #include +#define DEBUG_TYPE "dfa-emitter" + using namespace llvm; //===----------------------------------------------------------------------===// Index: llvm/utils/TableGen/DFAPacketizerEmitter.cpp =================================================================== --- llvm/utils/TableGen/DFAPacketizerEmitter.cpp +++ llvm/utils/TableGen/DFAPacketizerEmitter.cpp @@ -14,8 +14,6 @@ // //===----------------------------------------------------------------------===// -#define DEBUG_TYPE "dfa-emitter" - #include "CodeGenSchedule.h" #include "CodeGenTarget.h" #include "DFAEmitter.h" @@ -34,6 +32,8 @@ #include #include +#define DEBUG_TYPE "dfa-emitter" + using namespace llvm; // We use a uint64_t to represent a resource bitmask.