MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / AddDebugLine

Method AddDebugLine

source/opt/instruction.cpp:574–587  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

572}
573
574bool Instruction::AddDebugLine(const Instruction* inst) {
575 dbg_line_insts_.push_back(*inst);
576 dbg_line_insts_.back().unique_id_ = context()->TakeNextUniqueId();
577 if (inst->IsDebugLineInst()) {
578 uint32_t new_id = context()->TakeNextId();
579 if (new_id == 0) {
580 return false;
581 }
582 dbg_line_insts_.back().SetResultId(new_id);
583 }
584 if (context()->AreAnalysesValid(IRContext::kAnalysisDefUse))
585 context()->get_def_use_mgr()->AnalyzeInstDefUse(&dbg_line_insts_.back());
586 return true;
587}
588
589bool Instruction::IsDebugLineInst() const {
590 NonSemanticShaderDebugInfoInstructions ext_opt = GetShaderDebugOpcode();

Callers 3

AddStoreMethod · 0.80
AddLoadMethod · 0.80
FoldConditionBlockMethod · 0.80

Calls 9

backMethod · 0.80
TakeNextUniqueIdMethod · 0.80
IsDebugLineInstMethod · 0.80
AreAnalysesValidMethod · 0.80
AnalyzeInstDefUseMethod · 0.80
push_backMethod · 0.45
TakeNextIdMethod · 0.45
SetResultIdMethod · 0.45
get_def_use_mgrMethod · 0.45

Tested by

no test coverage detected