LLVM 24.0.0git
SPIRVNonSemanticDebugHandler.cpp File Reference

Go to the source code of this file.

Enumerations

enum class  NonSemanticDebugOp : uint32_t {
  Deref = 0 , Plus = 1 , Minus = 2 , PlusUconst = 3 ,
  BitPiece = 4 , Swap = 5 , Xderef = 6 , StackValue = 7 ,
  Constu = 8 , Fragment = 9
}

Functions

static bool isBooleanType (const DIBasicType *BT)
static uint64_t constantBits (uint64_t Value, const DIBasicType *BT)
static uint64_t constantBits (const APInt &Value, const DIBasicType *BT)
static const DIBasicType * stripToScalarType (const DIType *Ty)
static void collectDebugLocationsAndLocalVariables (const Module &M, SetVector< const DILocation * > &Locations, SetVector< const DILocalVariable * > &LVs)
static void collectLexicalBlockChain (const DIScope *S, SetVector< const DIScope * > &Out)
static MCRegister getResultId (const MachineInstr &MI, SPIRV::ModuleAnalysisInfo &MAI)
static bool scalarTypeNeedsCapability (const DIBasicType *BT)
static bool constantHasValue (const MachineInstr &MI, uint64_t Value, bool IsWide)
static std::optional< NonSemanticDebugOp > mapDwarfOpToNonSemanticOp (uint64_t DwarfOp)
static std::optional< SmallVector< uint32_t, 3 > > mapExprOperand (const DIExpression::ExprOperand &Op)
static std::optional< Register > getDebugDeclareStorageReg (const MachineInstr &MI)
static std::optional< std::pair< const DIBasicType *, uint64_t > > getConstantDbgValueBits (const MachineInstr &MI)
static std::optional< Register > getDebugValueReg (const MachineInstr &MI)
static bool isMergeInstruction (unsigned Opcode)
static bool isEmitted (const MachineInstr *MI, SPIRV::ModuleAnalysisInfo &MAI)
static bool isDebugLocTarget (const MachineInstr *MI, SPIRV::ModuleAnalysisInfo &MAI)
static const MachineInstr * findAdjacentEmittedInstruction (const MachineInstr *MI, SPIRV::ModuleAnalysisInfo &MAI, bool Forward)
static void forEachDebugValueLike (const MachineModuleInfo &ModuleInfo, function_ref< void(const MachineInstr &)> Fn)

Enumeration Type Documentation

◆ NonSemanticDebugOp

enum class NonSemanticDebugOp : uint32_t
strong
Enumerator
Deref 
Plus 
Minus 
PlusUconst 
BitPiece 
Swap 
Xderef 
StackValue 
Constu 
Fragment 

Definition at line 1091 of file SPIRVNonSemanticDebugHandler.cpp.

Function Documentation

◆ collectDebugLocationsAndLocalVariables()

void collectDebugLocationsAndLocalVariables ( const Module & M,
SetVector< const DILocation * > & Locations,
SetVector< const DILocalVariable * > & LVs )
static

◆ collectLexicalBlockChain()

◆ constantBits() [1/2]

uint64_t constantBits ( const APInt & Value,
const DIBasicType * BT )
static

Definition at line 282 of file SPIRVNonSemanticDebugHandler.cpp.

References constantBits(), isBooleanType(), and uint64_t.

◆ constantBits() [2/2]

uint64_t constantBits ( uint64_t Value,
const DIBasicType * BT )
static

Definition at line 271 of file SPIRVNonSemanticDebugHandler.cpp.

References isBooleanType(), and uint64_t.

Referenced by constantBits(), and getConstantDbgValueBits().

◆ constantHasValue()

bool constantHasValue ( const MachineInstr & MI,
uint64_t Value,
bool IsWide )
static

Definition at line 728 of file SPIRVNonSemanticDebugHandler.cpp.

References llvm::getImm(), I, MI, and uint64_t.

◆ findAdjacentEmittedInstruction()

const MachineInstr * findAdjacentEmittedInstruction ( const MachineInstr * MI,
SPIRV::ModuleAnalysisInfo & MAI,
bool Forward )
static

Definition at line 1814 of file SPIRVNonSemanticDebugHandler.cpp.

References isEmitted(), and MI.

◆ forEachDebugValueLike()

◆ getConstantDbgValueBits()

std::optional< std::pair< const DIBasicType *, uint64_t > > getConstantDbgValueBits ( const MachineInstr & MI)
static

◆ getDebugDeclareStorageReg()

std::optional< Register > getDebugDeclareStorageReg ( const MachineInstr & MI)
static

Definition at line 1673 of file SPIRVNonSemanticDebugHandler.cpp.

References llvm::Register::isVirtual(), and MI.

◆ getDebugValueReg()

std::optional< Register > getDebugValueReg ( const MachineInstr & MI)
static

Definition at line 1766 of file SPIRVNonSemanticDebugHandler.cpp.

References llvm::Register::isVirtual(), and MI.

◆ getResultId()

MCRegister getResultId ( const MachineInstr & MI,
SPIRV::ModuleAnalysisInfo & MAI )
static

◆ isBooleanType()

bool isBooleanType ( const DIBasicType * BT)
static

◆ isDebugLocTarget()

bool isDebugLocTarget ( const MachineInstr * MI,
SPIRV::ModuleAnalysisInfo & MAI )
static

Definition at line 1797 of file SPIRVNonSemanticDebugHandler.cpp.

References isEmitted(), and MI.

◆ isEmitted()

bool isEmitted ( const MachineInstr * MI,
SPIRV::ModuleAnalysisInfo & MAI )
static

◆ isMergeInstruction()

bool isMergeInstruction ( unsigned Opcode)
static

Definition at line 1787 of file SPIRVNonSemanticDebugHandler.cpp.

◆ mapDwarfOpToNonSemanticOp()

std::optional< NonSemanticDebugOp > mapDwarfOpToNonSemanticOp ( uint64_t DwarfOp)
static

◆ mapExprOperand()

std::optional< SmallVector< uint32_t, 3 > > mapExprOperand ( const DIExpression::ExprOperand & Op)
static

◆ scalarTypeNeedsCapability()

bool scalarTypeNeedsCapability ( const DIBasicType * BT)
static

Definition at line 663 of file SPIRVNonSemanticDebugHandler.cpp.

References isBooleanType().

◆ stripToScalarType()