LLVM  8.0.1
Macros | Functions
LiveDebugValues.cpp File Reference
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/PostOrderIterator.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/SparseBitVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/UniqueVector.h"
#include "llvm/CodeGen/LexicalScopes.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineMemOperand.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/CodeGen/PseudoSourceValue.h"
#include "llvm/CodeGen/TargetFrameLowering.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/CodeGen/TargetLowering.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/CodeGen/RegisterScavenging.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/IR/DebugLoc.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Module.h"
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/Pass.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <functional>
#include <queue>
#include <utility>
#include <vector>
Include dependency graph for LiveDebugValues.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "livedebugvalues"
 

Functions

 STATISTIC (NumInserted, "Number of DBG_VALUE instructions inserted")
 
static unsigned isDbgValueDescribedByReg (const MachineInstr &MI)
 
 INITIALIZE_PASS (LiveDebugValues, DEBUG_TYPE, "Live DEBUG_VALUE analysis", false, false) LiveDebugValues
 Default construct and initialize the pass. More...
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "livedebugvalues"

Definition at line 65 of file LiveDebugValues.cpp.

Function Documentation

◆ INITIALIZE_PASS()

INITIALIZE_PASS ( LiveDebugValues  ,
DEBUG_TYPE  ,
"Live DEBUG_VALUE analysis ,
false  ,
false   
)

Default construct and initialize the pass.

Definition at line 300 of file LiveDebugValues.cpp.

References llvm::any_of(), assert(), llvm::MachineBasicBlock::back(), llvm::ReversePostOrderTraversal< GraphT, GT >::begin(), llvm::BuildMI(), llvm::SmallPtrSetImpl< PtrType >::count(), llvm::dbgs(), llvm::TargetFrameLowering::determineCalleeSaves(), llvm::MachineInstr::dump(), llvm::MachineBasicBlock::end(), llvm::ReversePostOrderTraversal< GraphT, GT >::end(), llvm::PseudoSourceValue::FixedStack, llvm::MachineFunctionPass::getAnalysisUsage(), llvm::MachineInstr::getDebugExpression(), llvm::MachineInstr::getDebugLoc(), llvm::MachineInstr::getDebugVariable(), llvm::MachineInstr::getDesc(), llvm::MachineFunction::getFrameInfo(), llvm::TargetSubtargetInfo::getFrameLowering(), llvm::MachineFunction::getFunction(), llvm::MachineOperand::getImm(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::ilist_node_impl< OptionsT >::getIterator(), llvm::MachineInstr::getMF(), llvm::Value::getName(), llvm::MachineBasicBlock::getNumber(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::PassRegistry::getPassRegistry(), llvm::MachineMemOperand::getPseudoValue(), llvm::MachineOperand::getReg(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::TargetLoweringBase::getStackPointerRegisterToSaveRestore(), llvm::Function::getSubprogram(), llvm::MachineFunction::getSubtarget(), llvm::TargetSubtargetInfo::getTargetLowering(), llvm::MachineInstr::hasOneMemOperand(), llvm::HexagonInstrInfo::hasStoreToStackSlot(), llvm::initializeLiveDebugValuesPass(), llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::MachineBasicBlock::instr_begin(), llvm::MachineInstr::isCall(), isDbgValueDescribedByReg(), llvm::MachineInstr::isDebugValue(), llvm::MachineOperand::isDef(), isDescribedByReg(), llvm::MachineInstr::isIndirectDebugValue(), llvm::MachineOperand::isKill(), llvm::MachineOperand::isReg(), llvm::MachineFrameInfo::isSpillSlotObjectIndex(), llvm::MachineInstr::isTerminator(), llvm::MachineOperand::isUse(), llvm::MCRegAliasIterator::isValid(), llvm::DILocalVariable::isValidLocationForIntrinsic(), llvm::join(), llvm::PseudoSourceValue::kind(), LLVM_DEBUG, llvm::AArch64CC::LS, llvm::MachineInstr::memoperands_begin(), MI, Name, llvm::DICompileUnit::NoDebug, llvm::DIExpression::NoDeref, llvm::none_of(), llvm::MachineInstr::operands(), llvm::MachineBasicBlock::pred_empty(), llvm::MachineBasicBlock::predecessors(), llvm::DIExpression::prepend(), llvm::MachineInstr::print(), llvm::printReg(), Reg, llvm::SparseBitVector< ElementSize >::set(), llvm::MachineOperand::setImm(), llvm::AnalysisUsage::setPreservesCFG(), TII, and TRI.

◆ isDbgValueDescribedByReg()

static unsigned isDbgValueDescribedByReg ( const MachineInstr MI)
static

Definition at line 71 of file LiveDebugValues.cpp.

References assert(), llvm::DenseMapBase< SmallDenseMap< KeyT, ValueT, InlineBuckets, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::clear(), clear(), llvm::SmallPtrSetImpl< PtrType >::count(), D, llvm::LexicalScopes::dominates(), llvm::dump(), llvm::MachineInstr::dump(), llvm::SmallPtrSetImplBase::empty(), llvm::DenseMapBase< SmallDenseMap< KeyT, ValueT, InlineBuckets, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::empty(), llvm::empty(), llvm::DenseMapBase< SmallDenseMap< KeyT, ValueT, InlineBuckets, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< SmallDenseMap< KeyT, ValueT, InlineBuckets, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::erase(), llvm::DenseMapBase< SmallDenseMap< KeyT, ValueT, InlineBuckets, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::find(), first, llvm::MachineInstr::getDebugLoc(), llvm::MachineInstr::getDebugVariable(), llvm::LexicalScopes::getMachineBasicBlocks(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::DenseMapBase< SmallDenseMap< KeyT, ValueT, InlineBuckets, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::insert(), llvm::MachineInstr::isDebugValue(), isDescribedByReg(), llvm::MachineOperand::isReg(), llvm::join(), Kind, LLVM_DUMP_METHOD, llvm::AArch64CC::LS, MI, llvm::MachineFunctionProperties::NoVRegs, llvm::operator<(), llvm::operator==(), Other, Reg, second, llvm::MachineFunctionProperties::set(), TII, and TRI.

Referenced by INITIALIZE_PASS().

◆ STATISTIC()

STATISTIC ( NumInserted  ,
"Number of DBG_VALUE instructions inserted"   
)