LLVM  6.0.0svn
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/MachineModuleInfo.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/CodeGen/PseudoSourceValue.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 "llvm/Target/TargetFrameLowering.h"
#include "llvm/Target/TargetInstrInfo.h"
#include "llvm/Target/TargetLowering.h"
#include "llvm/Target/TargetRegisterInfo.h"
#include "llvm/Target/TargetSubtargetInfo.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 64 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 292 of file LiveDebugValues.cpp.

References assert(), llvm::ReversePostOrderTraversal< GraphT, GT >::begin(), llvm::BuildMI(), llvm::SmallPtrSetImpl< PtrType >::count(), llvm::dbgs(), DEBUG, llvm::MachineInstr::dump(), 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::MachineInstr::getMF(), llvm::MachineBasicBlock::getName(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineBasicBlock::getParent(), llvm::PassRegistry::getPassRegistry(), llvm::MachineOperand::getReg(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::TargetLoweringBase::getStackPointerRegisterToSaveRestore(), llvm::Function::getSubprogram(), llvm::MachineFunction::getSubtarget(), llvm::TargetSubtargetInfo::getTargetLowering(), llvm::MachineInstr::hasOneMemOperand(), llvm::initializeLiveDebugValuesPass(), llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::MachineBasicBlock::instr_back(), llvm::MachineBasicBlock::instr_begin(), llvm::MachineInstr::isCall(), isDbgValueDescribedByReg(), llvm::MachineInstr::isDebugValue(), isDescribedByReg(), llvm::MachineInstr::isIndirectDebugValue(), llvm::MachineFrameInfo::isSpillSlotObjectIndex(), llvm::MachineInstr::isTerminator(), llvm::MCRegAliasIterator::isValid(), llvm::DILocalVariable::isValidLocationForIntrinsic(), llvm::join(), llvm::PseudoSourceValue::kind(), llvm::AArch64CC::LS, llvm::MachineInstr::memoperands_begin(), MI, llvm::DICompileUnit::NoDebug, llvm::DIExpression::NoDeref, llvm::MachineInstr::operands(), llvm::MachineBasicBlock::pred_empty(), llvm::MachineBasicBlock::predecessors(), llvm::DIExpression::prepend(), llvm::PrintReg(), llvm::SparseBitVector< ElementSize >::set(), llvm::MachineOperand::setImm(), llvm::AnalysisUsage::setPreservesCFG(), and TII.

◆ isDbgValueDescribedByReg()

static unsigned isDbgValueDescribedByReg ( const MachineInstr MI)
static

Definition at line 70 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::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, second, llvm::MachineFunctionProperties::set(), and TII.

Referenced by INITIALIZE_PASS().

◆ STATISTIC()

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