LLVM  mainline
Namespaces | Defines | Functions | Variables
Debug.h File Reference

Go to the source code of this file.

Namespaces

namespace  llvm
 

Compute iterated dominance frontiers using a linear time algorithm.


Defines

#define DEBUG_WITH_TYPE(TYPE, X)
 DEBUG_WITH_TYPE macro - This macro should be used by passes to emit debug information.
#define DEBUG(X)   DEBUG_WITH_TYPE(DEBUG_TYPE, X)

Functions

bool llvm::isCurrentDebugType (const char *Type)
 isCurrentDebugType - Return true if the specified string is the debug type specified on the command line, or if none was specified on the command line with the -debug-only=X option.
void llvm::setCurrentDebugType (const char *Type)
 setCurrentDebugType - Set the current debug type, as if the -debug-only=X option were specified.
raw_ostreamllvm::dbgs ()
 dbgs() - This returns a reference to a raw_ostream for debugging messages.

Variables

bool llvm::DebugFlag = false
 DebugFlag - This boolean is set to true if the '-debug' command line option is specified.
bool llvm::EnableDebugBuffering = false
 EnableDebugBuffering - This defaults to false.

Define Documentation

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

Definition at line 92 of file Debug.h.

Referenced by llvm::InstCombineWorklist::Add(), addChainDependency(), llvm::ExecutionEngine::addGlobalMapping(), llvm::InstCombineWorklist::AddInitialGroup(), AddReachableCodeToWorklist(), llvm::LoopAccessInfo::addRuntimeCheck(), llvm::DIEHash::addSLEB128(), llvm::BlockFrequencyInfoImplBase::addToDist(), llvm::DIEHash::addULEB128(), llvm::IVUsers::AddUsersImpl(), llvm::BlockFrequencyInfoImplBase::adjustLoopHeaderMass(), AdjustStackOffset(), llvm::AggressiveAntiDepBreaker::AggressiveAntiDepBreaker(), llvm::RegAllocBase::allocatePhysRegs(), llvm::AllocationOrder::AllocationOrder(), llvm::HexagonInstrInfo::AnalyzeBranch(), llvm::A57ChainingConstraint::apply(), llvm::MemoryDepChecker::areDepsSafe(), llvm::LiveRegMatrix::assign(), llvm::HexagonFrameLowering::assignCalleeSavedSpillSlots(), llvm::CriticalAntiDepBreaker::BreakAntiDependencies(), llvm::AggressiveAntiDepBreaker::BreakAntiDependencies(), BreakUpSubtract(), BUCompareLatency(), llvm::SchedBoundary::bumpCycle(), llvm::SchedBoundary::bumpNode(), BURRSort(), llvm::LiveRangeEdit::calculateRegClassAndHint(), llvm::calculateSpillWeightsAndHints(), CanPropagatePredecessorsForPHIs(), llvm::RuntimeDyldCheckerImpl::check(), llvm::GenericScheduler::checkAcyclicLatency(), llvm::SchedBoundary::checkHazard(), clampStackAlignment(), llvm::objcarc::PtrState::ClearKnownPositiveRefCount(), collectInvolvedReg(), llvm::SCEVAddRecExpr::collectParametricTerms(), combineInstructionsOverFunction(), completeEphemeralValues(), llvm::ObjectSizeOffsetVisitor::compute(), llvm::SCEVAddRecExpr::computeAccessFunctions(), computeADRP(), llvm::ScheduleDAGMILive::computeCyclicCriticalPath(), llvm::BlockFrequencyInfoImplBase::computeLoopScale(), computeOthers(), convertFloatingToInteger(), llvm::SchedBoundary::countResource(), createCleanupHandler(), createIrreducibleLoop(), DeleteInstructionInBlock(), llvm::SCEVAddRecExpr::delinearize(), llvm::DependenceAnalysis::depends(), llvm::BlockFrequencyInfoImplBase::distributeMass(), llvm::BlockFrequencyInfoImpl< BT >::doFunction(), llvm::ConstantUniqueMap< ConstantStruct >::dump(), llvm::DWARFContextInMemory::DWARFContextInMemory(), llvm::LiveRangeEdit::eliminateDeadDefs(), EliminateDeadSwitchCases(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::MipsRegisterInfo::eliminateFrameIndex(), llvm::RuntimeDyldImpl::emitCommonSymbols(), llvm::PPCDispatchGroupSBHazardRecognizer::EmitInstruction(), llvm::ScoreboardHazardRecognizer::EmitInstruction(), llvm::RuntimeDyldImpl::emitSection(), llvm::HexagonMCCodeEmitter::encodeInstruction(), llvm::HexagonMCCodeEmitter::EncodeSingleInstruction(), llvm::SplitEditor::enterIntvAfter(), llvm::SplitEditor::enterIntvAtEnd(), llvm::SplitEditor::enterIntvBefore(), llvm::InstCombiner::EraseInstFromFunction(), EvaluateStaticConstructor(), llvm::ARMBaseInstrInfo::expandPostRAPseudo(), extendSegmentsToUses(), llvm::CodeExtractor::extractCodeRegion(), extractInteger(), extractVector(), llvm::SchedDFSImpl::finalize(), llvm::BlockFrequencyInfoImplBase::finalizeMetrics(), llvm::ScalarEvolution::findArrayDimensions(), llvm::SSAUpdaterImpl< UpdaterT >::FindAvailableVals(), findCallees(), findGCD(), findIrreducibleHeaders(), llvm::SchedBoundary::findMaxLatency(), llvm::RegScavenger::FindUnusedReg(), llvm::SplitEditor::finish(), llvm::ScheduleDAGInstrs::fixupKills(), FoldBlockIntoPredecessor(), llvm::FoldBranchToCommonDest(), llvm::InstCombiner::FoldShiftByConstant(), FoldTwoEntryPHINode(), llvm::ARMTargetLowering::functionArgumentNeedsConsecutiveRegisters(), llvm::FunctionLoweringInfo::getArgumentFrameIndex(), llvm::coverage::CoverageMapping::getCoverageForExpansion(), llvm::coverage::CoverageMapping::getCoverageForFile(), llvm::coverage::CoverageMapping::getCoverageForFunction(), llvm::HexagonMCInstrInfo::getDuplexPossibilties(), llvm::ScoreboardHazardRecognizer::getHazardType(), llvm::Mips16InstrInfo::getInlineAsmLength(), llvm::InlineCostAnalysis::getInlineCost(), GetLoadValueForLoad(), getNewAlignment(), getNewAlignmentDiff(), llvm::MemoryDependenceAnalysis::getNonLocalCallDependency(), llvm::SchedBoundary::getOtherResourceCount(), llvm::HexagonInstrInfo::getPredReg(), llvm::DependenceAnalysis::getSplitIteration(), llvm::MipsTargetMachine::getTargetIRAnalysis(), llvm::MachineSSAUpdater::GetValueInMiddleOfBlock(), llvm::SSAUpdater::GetValueInMiddleOfBlock(), llvm::objcarc::BottomUpPtrState::HandlePotentialAlterRefCount(), llvm::objcarc::TopDownPtrState::HandlePotentialAlterRefCount(), llvm::objcarc::BottomUpPtrState::HandlePotentialUse(), llvm::objcarc::TopDownPtrState::HandlePotentialUse(), hasOutsideLoopUser(), hasVRegCycleUse(), llvm::HexagonMCShuffle(), hoist(), llvm::hoistRegion(), llvm::objcarc::BottomUpPtrState::InitBottomUp(), INITIALIZE_PASS_BEGIN(), llvm::ExecutionEngine::InitializeMemory(), llvm::ScheduleDAGMILive::initRegPressure(), initVRegCycle(), InlineCallIfPossible(), llvm::HexagonInstrInfo::InsertBranch(), insertCopy(), insertInteger(), llvm::InsertPreheaderForLoop(), insertUniqueBackedgeBlock(), insertVector(), llvm::MachineTraceMetrics::Ensemble::invalidate(), llvm::MachineTraceMetrics::invalidate(), isBitfieldExtractOpFromAnd(), isBitfieldExtractOpFromShr(), llvm::isInductionPHI(), isProfitableChain(), llvm::RecurrenceDescriptor::isReductionPHI(), llvm::isStridedPtr(), KnuthDiv(), llvm::LazyCallGraph::LazyCallGraph(), llvm::SplitEditor::leaveIntvAfter(), llvm::SplitEditor::leaveIntvAtTop(), llvm::SplitEditor::leaveIntvBefore(), LinearizeExprTree(), LLVMSetLinkage(), llvm::RuntimeDyldImpl::loadObjectImpl(), llvm::HexagonTargetLowering::LowerCall(), llvm::TargetLowering::LowerCallTo(), llvm::HexagonTargetLowering::LowerDYNAMIC_STACKALLOC(), needsFP(), llvm::MipsRegisterInfo::needsStackRealignment(), llvm::AggressiveAntiDepBreaker::Observe(), OptimizeAwayTrappingUsesOfLoads(), OptimizeGlobalAddressOfMalloc(), llvm::optimizeGlobalCtorsList(), llvm::OptLevelChanger::OptLevelChanger(), llvm::SplitEditor::overlapIntv(), llvm::BlockFrequencyInfoImplBase::packageLoop(), performBitcastCombine(), performConcatVectorsCombine(), llvm::MipsSETargetLowering::PerformDAGCombine(), PerformHeapAllocSRoA(), llvm::R600SchedStrategy::pickNode(), llvm::ConvergingVLIWScheduler::pickNode(), llvm::GenericScheduler::pickNode(), llvm::PostGenericScheduler::pickNode(), llvm::GenericScheduler::pickNodeBidirectional(), llvm::ConvergingVLIWScheduler::pickNodeFromQueue(), llvm::GenericScheduler::pickNodeFromQueue(), llvm::PostGenericScheduler::pickNodeFromQueue(), llvm::RuntimeDyldMachO::populateIndirectSymbolPointersSection(), llvm::HexagonInstrInfo::PredicateInstruction(), print_name(), printReachingDef(), llvm::AArch64FrameLowering::processFunctionBeforeCalleeSavedScan(), llvm::RuntimeDyldCOFFX86_64::processRelocationRef(), llvm::RuntimeDyldELF::processRelocationRef(), ProfitableToMerge(), llvm::promoteLoopAccessesToScalars(), reachedUsesToDefs(), llvm::RuntimeDyldImpl::reassignSectionAddress(), llvm::AArch64TargetLowering::ReconstructShuffle(), registerADRCandidate(), llvm::GenericScheduler::registerRoots(), llvm::PostGenericScheduler::registerRoots(), llvm::R600SchedStrategy::releaseBottomNode(), llvm::SchedBoundary::releasePending(), llvm::R600SchedStrategy::releaseTopNode(), llvm::HexagonInstrInfo::RemoveBranch(), llvm::MemoryDependenceAnalysis::removeInstruction(), llvm::LazyCallGraph::SCC::removeInterSCCEdge(), removeUseSoftFloat(), llvm::SlotIndexes::renumberIndexes(), llvm::replaceDominatedUsesWith(), llvm::InstCombiner::ReplaceInstUsesWith(), llvm::replaceSymbolicStrideSCEV(), ReplaceUsesOfWith(), llvm::GenericScheduler::reschedulePhysRegCopies(), llvm::VLIWResourceModel::reserveResources(), llvm::objcarc::PtrState::ResetSequenceProgress(), llvm::MipsTargetMachine::resetSubtarget(), llvm::HexagonMCShuffler::reshuffleTo(), llvm::SelectionDAGBuilder::resolveDanglingDebugInfo(), llvm::RuntimeDyldImpl::resolveExternalSymbols(), llvm::RuntimeDyldMachOX86_64::resolveRelocation(), llvm::RuntimeDyldMachOI386::resolveRelocation(), llvm::RuntimeDyldMachOARM::resolveRelocation(), llvm::RuntimeDyldMachOAArch64::resolveRelocation(), llvm::RuntimeDyldImpl::resolveRelocations(), llvm::AArch64FrameLowering::restoreCalleeSavedRegisters(), rewriteLoopExitBlock(), llvm::DAGTypeLegalizer::run(), llvm::Interpreter::run(), llvm::InstCombiner::run(), llvm::BranchProbabilityInfo::runOnFunction(), llvm::RGPassManager::runOnFunction(), llvm::SelectionDAGISel::runOnMachineFunction(), llvm::LiveIntervals::runOnMachineFunction(), llvm::SlotIndexes::runOnMachineFunction(), llvm::Inliner::runOnSCC(), llvm::RegScavenger::scavengeRegister(), llvm::R600SchedStrategy::schedNode(), llvm::VLIWMachineScheduler::schedule(), llvm::ScheduleDAGMI::schedule(), llvm::ScheduleDAGMILive::schedule(), llvm::SchedDFSResult::scheduleTree(), llvm::ConvergingVLIWScheduler::SchedulingCost(), llvm::ScoreboardHazardRecognizer::ScoreboardHazardRecognizer(), llvm::SelectionDAGISel::SelectCodeCommon(), llvm::FastISel::selectIntrinsicCall(), llvm::SplitEditor::selectIntv(), separateNestedLoop(), llvm::FaultMaps::serializeToFaultMapSection(), llvm::StackMaps::serializeToStackMapSection(), llvm::BranchProbabilityInfo::setEdgeWeight(), llvm::objcarc::PtrState::SetKnownPositiveRefCount(), llvm::GenericSchedulerBase::setPolicy(), llvm::objcarc::PtrState::SetSeq(), llvm::ARMBaseRegisterInfo::shouldCoalesce(), llvm::LiveIntervals::shrinkToUses(), llvm::HexagonShuffler::shuffle(), SimplifyBranchOnICmpChain(), SimplifyCondBranchToCondBranch(), SimplifyCondBranchToTwoReturns(), simplifyOneLoop(), llvm::sinkRegion(), SinkThenElseCodeToEnd(), llvm::LoopPass::skipOptnoneFunction(), llvm::FunctionPass::skipOptnoneFunction(), llvm::BasicBlockPass::skipOptnoneFunction(), llvm::InstCombiner::SliceUpIllegalIntegerPHI(), llvm::SparseSolver::Solve(), speculatePHINodeLoads(), speculateSelectInstLoads(), SpeculativelyExecuteBB(), llvm::AArch64FrameLowering::spillCalleeSavedRegisters(), llvm::MachineBasicBlock::SplitCriticalEdge(), llvm::SplitEditor::splitLiveThroughBlock(), llvm::SplitEditor::splitRegInBlock(), llvm::SplitEditor::splitRegOutBlock(), SRAGlobal(), llvm::DbgValueHistoryMap::startInstrRange(), tracePick(), truncateIVUse(), llvm::GenericScheduler::tryCandidate(), tryLowerToSLI(), tryPromoteAllocaToVector(), TryToShrinkGlobalToBoolean(), llvm::TryToSimplifyUncondBranchFromEmptyBlock(), llvm::LiveRegMatrix::unassign(), llvm::UnrollLoop(), unwrapLoop(), llvm::LiveIntervals::HMEditor::updateAllRanges(), llvm::ScheduleDAGMILive::updatePressureDiffs(), llvm::ScheduleDAGMILive::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_WITH_TYPE (   TYPE,
  X 
)
Value:
do { if (::llvm::DebugFlag && ::llvm::isCurrentDebugType(TYPE)) { X; } \
  } while (0)

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 62 of file Debug.h.

Referenced by llvm::MCAssembler::Finish(), llvm::object::MachORebaseEntry::moveNext(), llvm::object::MachOBindEntry::moveNext(), and llvm::SCEVExpander::replaceCongruentIVs().