LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Macros | Functions | Variables
Debug.h File Reference
#include "llvm/Support/raw_ostream.h"
Include dependency graph for Debug.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 llvm
 List of target independent CodeGen pass IDs.
 

Macros

#define DEBUG_TYPE   ""
 
#define DEBUG_WITH_TYPE(TYPE, X)
 
#define DEBUG(X)   DEBUG_WITH_TYPE(DEBUG_TYPE, X)
 

Functions

bool llvm::isCurrentDebugType (const char *Type)
 
void llvm::setCurrentDebugType (const char *Type)
 
raw_ostreamllvm::dbgs ()
 dbgs - Return a circular-buffered debug stream. More...
 

Variables

bool llvm::DebugFlag
 
bool llvm::EnableDebugBuffering = false
 

Macro Definition Documentation

#define DEBUG (   X)    DEBUG_WITH_TYPE(DEBUG_TYPE, X)

Definition at line 97 of file Debug.h.

Referenced by llvm::InstCombineWorklist::Add(), llvm::MipsTargetMachine::addAnalysisPasses(), addChainDependency(), llvm::ExecutionEngine::addGlobalMapping(), llvm::InstCombineWorklist::AddInitialGroup(), AddReachableCodeToWorklist(), llvm::IVUsers::AddUsersImpl(), AdjustStackOffset(), llvm::AggressiveAntiDepBreaker::AggressiveAntiDepBreaker(), llvm::RegAllocBase::allocatePhysRegs(), llvm::AllocationOrder::AllocationOrder(), llvm::HexagonInstrInfo::AnalyzeBranch(), llvm::LiveRegMatrix::assign(), llvm::DwarfDebug::beginFunction(), llvm::CriticalAntiDepBreaker::BreakAntiDependencies(), llvm::AggressiveAntiDepBreaker::BreakAntiDependencies(), BreakUpSubtract(), BUCompareLatency(), BURRSort(), llvm::LiveRangeEdit::calculateRegClassAndHint(), llvm::calculateSpillWeightsAndHints(), CanPropagatePredecessorsForPHIs(), clampStackAlignment(), llvm::ObjectSizeOffsetVisitor::compute(), llvm::ScheduleDAGMI::computeCyclicCriticalPath(), llvm::X86InstrInfo::copyPhysReg(), DeleteInstructionInBlock(), llvm::SCEVAddRecExpr::delinearize(), llvm::DependenceAnalysis::depends(), llvm::InstCombiner::DoOneIteration(), llvm::ConstantUniqueMap< llvm::InlineAsmKeyType, const llvm::InlineAsmKeyType &, llvm::PointerType, llvm::InlineAsm >::dump(), llvm::ConstantAggrUniqueMap< ArrayType, ConstantArray >::dump(), llvm::DWARFContextInMemory::DWARFContextInMemory(), llvm::LiveRangeEdit::eliminateDeadDefs(), EliminateDeadSwitchCases(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::MipsRegisterInfo::eliminateFrameIndex(), llvm::RuntimeDyldImpl::emitCommonSymbols(), llvm::ARMJITInfo::emitFunctionStub(), llvm::ScoreboardHazardRecognizer::EmitInstruction(), llvm::RuntimeDyldImpl::emitSection(), llvm::SplitEditor::enterIntvAfter(), llvm::SplitEditor::enterIntvAtEnd(), llvm::SplitEditor::enterIntvBefore(), llvm::InstCombiner::EraseInstFromFunction(), EvaluateStaticConstructor(), llvm::ARMBaseInstrInfo::expandPostRAPseudo(), llvm::CodeExtractor::extractCodeRegion(), extractInteger(), extractVector(), llvm::SchedDFSImpl::finalize(), llvm::SSAUpdaterImpl< UpdaterT >::FindAvailableVals(), findGCD(), llvm::RegScavenger::FindUnusedReg(), llvm::SplitEditor::finish(), FoldBlockIntoPredecessor(), llvm::FoldBranchToCommonDest(), llvm::InstCombiner::FoldShiftByConstant(), FoldTwoEntryPHINode(), llvm::FunctionLoweringInfo::getArgumentFrameIndex(), llvm::ScoreboardHazardRecognizer::getHazardType(), llvm::Mips16InstrInfo::getInlineAsmLength(), llvm::InlineCostAnalysis::getInlineCost(), GetLoadValueForLoad(), llvm::MemoryDependenceAnalysis::getNonLocalCallDependency(), getPreStartForSignExtend(), llvm::DependenceAnalysis::getSplitIteration(), llvm::MachineSSAUpdater::GetValueInMiddleOfBlock(), llvm::SSAUpdater::GetValueInMiddleOfBlock(), hasOutsideLoopUser(), hasVRegCycleUse(), llvm::ExecutionEngine::InitializeMemory(), llvm::ScheduleDAGMI::initRegPressure(), initVRegCycle(), InlineCallIfPossible(), insertInteger(), llvm::InsertPreheaderForLoop(), insertVector(), llvm::MachineTraceMetrics::Ensemble::invalidate(), llvm::MachineTraceMetrics::invalidate(), isProfitableChain(), isStridedPtr(), KnuthDiv(), llvm::SplitEditor::leaveIntvAfter(), llvm::SplitEditor::leaveIntvAtTop(), llvm::SplitEditor::leaveIntvBefore(), LinearizeExprTree(), LLVMSetLinkage(), LLVMX86CompilationCallback2(), llvm::RuntimeDyldImpl::loadObject(), llvm::HexagonTargetLowering::LowerCall(), llvm::TargetLowering::LowerCallTo(), llvm::MCMachOObjectDisassembler::MCMachOObjectDisassembler(), llvm::AggressiveAntiDepBreaker::Observe(), OptimizeAwayTrappingUsesOfLoads(), OptimizeGlobalAddressOfMalloc(), llvm::OptLevelChanger::OptLevelChanger(), llvm::SplitEditor::overlapIntv(), llvm::cl::ParseCommandLineOptions(), llvm::MipsSETargetLowering::PerformDAGCombine(), PerformHeapAllocSRoA(), llvm::R600SchedStrategy::pickNode(), llvm::ConvergingVLIWScheduler::pickNode(), llvm::ConvergingVLIWScheduler::pickNodeFromQueue(), llvm::RuntimeDyldELF::processRelocationRef(), ProfitableToMerge(), llvm::R600SchedStrategy::releaseBottomNode(), llvm::R600SchedStrategy::releaseTopNode(), llvm::MemoryDependenceAnalysis::removeInstruction(), removeUseSoftFloat(), llvm::SlotIndexes::renumberIndexes(), llvm::InstCombiner::ReplaceInstUsesWith(), ReplaceUsesOfWith(), llvm::VLIWResourceModel::reserveResources(), llvm::MipsSubtarget::resetSubtarget(), llvm::SelectionDAGBuilder::resolveDanglingDebugInfo(), llvm::RuntimeDyldImpl::resolveExternalSymbols(), llvm::RuntimeDyldImpl::resolveRelocations(), llvm::DAGTypeLegalizer::run(), llvm::Interpreter::run(), llvm::BranchProbabilityInfo::runOnFunction(), llvm::RGPassManager::runOnFunction(), llvm::MipsModuleDAGToDAGISel::runOnMachineFunction(), llvm::SelectionDAGISel::runOnMachineFunction(), llvm::LiveIntervals::runOnMachineFunction(), llvm::SlotIndexes::runOnMachineFunction(), llvm::Mips16HardFloat::runOnModule(), llvm::MipsOs16::runOnModule(), llvm::DebugIR::runOnModule(), llvm::Inliner::runOnSCC(), llvm::RegScavenger::scavengeRegister(), llvm::R600SchedStrategy::schedNode(), llvm::VLIWMachineScheduler::schedule(), llvm::ScheduleDAGMI::schedule(), llvm::SchedDFSResult::scheduleTree(), llvm::ConvergingVLIWScheduler::SchedulingCost(), llvm::ScoreboardHazardRecognizer::ScoreboardHazardRecognizer(), llvm::SelectionDAGISel::SelectCodeCommon(), llvm::SplitEditor::selectIntv(), llvm::StackMaps::serializeToStackMapSection(), llvm::BranchProbabilityInfo::setEdgeWeight(), llvm::LiveIntervals::shrinkToUses(), SimplifyBranchOnICmpChain(), SimplifyCondBranchToCondBranch(), SimplifyCondBranchToTwoReturns(), SinkThenElseCodeToEnd(), llvm::InstCombiner::SliceUpIllegalIntegerPHI(), llvm::SparseSolver::Solve(), speculatePHINodeLoads(), speculateSelectInstLoads(), SpeculativelyExecuteBB(), llvm::MachineBasicBlock::SplitCriticalEdge(), llvm::SplitEditor::splitLiveThroughBlock(), llvm::SplitEditor::splitRegInBlock(), llvm::SplitEditor::splitRegOutBlock(), SRAGlobal(), tracePick(), TryToShrinkGlobalToBoolean(), llvm::TryToSimplifyUncondBranchFromEmptyBlock(), llvm::LiveRegMatrix::unassign(), llvm::UnrollLoop(), llvm::LiveIntervals::HMEditor::updateAllRanges(), llvm::ScheduleDAGMI::updatePressureDiffs(), llvm::ScheduleDAGMI::updateScheduledPressure(), llvm::MipsSubtarget::useConstantIslands(), llvm::SplitEditor::useIntv(), verifyCTRBranch(), llvm::Interpreter::visitAllocaInst(), llvm::InstCombiner::visitAllocaInst(), llvm::ObjectSizeOffsetVisitor::visitInstruction(), llvm::ObjectSizeOffsetEvaluator::visitInstruction(), llvm::InstCombiner::visitSExt(), llvm::InstCombiner::visitTrunc(), llvm::InstCombiner::visitZExt(), llvm::MachObjectWriter::WriteObject(), and llvm::OptLevelChanger::~OptLevelChanger().

#define DEBUG_TYPE   ""

DEBUG_TYPE macro - Files can specify a DEBUG_TYPE as a string, which causes all of their DEBUG statements to be activatable with -debug-only=thatstring.

Definition at line 36 of file Debug.h.

#define DEBUG_WITH_TYPE (   TYPE,
  X 
)
Value:
do { if (::llvm::DebugFlag && ::llvm::isCurrentDebugType(TYPE)) { X; } \
} while (0)
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang","erlang-compatible garbage collector")
bool DebugFlag
Definition: Debug.cpp:35
bool isCurrentDebugType(const char *Type)
Definition: Debug.cpp:88

DEBUG_WITH_TYPE macro - This macro should be used by passes to emit debug information. In the '-debug' option is specified on the commandline, and if this is a debug build, then the code specified as the option to the macro will be executed. Otherwise it will not be. Example:

DEBUG_WITH_TYPE("bitset", dbgs() << "Bitset contains: " << Bitset << "\n");

This will emit the debug information if -debug is present, and -debug-only is not specified, or is specified as "bitset".

Definition at line 67 of file Debug.h.

Referenced by llvm::MCAssembler::Finish(), and llvm::SCEVExpander::replaceCongruentIVs().