LLVM  14.0.0git
Macros | Functions
VarLocBasedImpl.cpp File Reference
#include "LiveDebugValues.h"
#include "llvm/ADT/CoalescingBitVector.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/PostOrderIterator.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/SmallVector.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/RegisterScavenging.h"
#include "llvm/CodeGen/TargetFrameLowering.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/CodeGen/TargetLowering.h"
#include "llvm/CodeGen/TargetPassConfig.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/IR/DIBuilder.h"
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/IR/DebugLoc.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Module.h"
#include "llvm/InitializePasses.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/TypeSize.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetMachine.h"
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <functional>
#include <map>
#include <queue>
#include <tuple>
#include <utility>
#include <vector>

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "livedebugvalues"
 

Functions

 STATISTIC (NumInserted, "Number of DBG_VALUE instructions inserted")
 
static bool isRegOtherThanSPAndFP (const MachineOperand &Op, const MachineInstr &MI, const TargetRegisterInfo *TRI)
 If Op is a stack or frame register return true, otherwise return false. More...
 
static void collectRegDefs (const MachineInstr &MI, DefinedRegsSet &Regs, const TargetRegisterInfo *TRI)
 Collect all register defines (including aliases) for the given instruction. More...
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "livedebugvalues"

Definition at line 166 of file VarLocBasedImpl.cpp.

Function Documentation

◆ collectRegDefs()

static void collectRegDefs ( const MachineInstr MI,
DefinedRegsSet &  Regs,
const TargetRegisterInfo TRI 
)
static

Collect all register defines (including aliases) for the given instruction.

Definition at line 2068 of file VarLocBasedImpl.cpp.

References llvm::MachineOperand::getReg(), llvm::MachineOperand::isDef(), llvm::MachineOperand::isReg(), llvm::MCRegAliasIterator::isValid(), MI, and TRI.

◆ isRegOtherThanSPAndFP()

static bool isRegOtherThanSPAndFP ( const MachineOperand Op,
const MachineInstr MI,
const TargetRegisterInfo TRI 
)
static

If Op is a stack or frame register return true, otherwise return false.

This is used to avoid basing the debug entry values on the registers, since we do not support it at the moment.

Definition at line 173 of file VarLocBasedImpl.cpp.

References FP, llvm::TargetRegisterInfo::getFrameRegister(), llvm::TargetLoweringBase::getStackPointerRegisterToSaveRestore(), llvm::MachineFunction::getSubtarget(), llvm::TargetSubtargetInfo::getTargetLowering(), MI, Reg, and TRI.

◆ STATISTIC()

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