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

Method DerefDebugExpression

source/opt/debug_info_manager.cpp:373–389  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

371}
372
373Instruction* DebugInfoManager::DerefDebugExpression(Instruction* dbg_expr) {
374 assert(dbg_expr->GetCommonDebugOpcode() == CommonDebugInfoDebugExpression);
375 std::unique_ptr<Instruction> deref_expr(dbg_expr->Clone(context()));
376 uint32_t result_id = context()->TakeNextId();
377 if (result_id == 0) return nullptr;
378 deref_expr->SetResultId(result_id);
379 Instruction* deref_op = GetDebugOperationWithDeref();
380 if (!deref_op) return nullptr;
381 deref_expr->InsertOperand(kDebugExpressOperandOperationIndex,
382 {SPV_OPERAND_TYPE_ID, {deref_op->result_id()}});
383 auto* deref_expr_instr =
384 context()->ext_inst_debuginfo_end()->InsertBefore(std::move(deref_expr));
385 AnalyzeDebugInst(deref_expr_instr);
386 if (context()->AreAnalysesValid(IRContext::Analysis::kAnalysisDefUse))
387 context()->get_def_use_mgr()->AnalyzeInstDefUse(deref_expr_instr);
388 return deref_expr_instr;
389}
390
391Instruction* DebugInfoManager::GetDebugInfoNone() {
392 if (debug_info_none_inst_ != nullptr) return debug_info_none_inst_;

Callers 2

UpdateUsesMethod · 0.80

Calls 11

GetCommonDebugOpcodeMethod · 0.80
InsertOperandMethod · 0.80
AreAnalysesValidMethod · 0.80
AnalyzeInstDefUseMethod · 0.80
CloneMethod · 0.45
TakeNextIdMethod · 0.45
SetResultIdMethod · 0.45
result_idMethod · 0.45
InsertBeforeMethod · 0.45
get_def_use_mgrMethod · 0.45

Tested by

no test coverage detected