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

Method AddStore

source/opt/inline_pass.cpp:88–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88void InlinePass::AddStore(uint32_t ptr_id, uint32_t val_id,
89 std::unique_ptr<BasicBlock>* block_ptr,
90 const Instruction* line_inst,
91 const DebugScope& dbg_scope) {
92 std::unique_ptr<Instruction> newStore(
93 new Instruction(context(), spv::Op::OpStore, 0, 0,
94 {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {ptr_id}},
95 {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {val_id}}}));
96 if (line_inst != nullptr) {
97 newStore->AddDebugLine(line_inst);
98 }
99 newStore->SetDebugScope(dbg_scope);
100 (*block_ptr)->AddInstruction(std::move(newStore));
101}
102
103void InlinePass::AddLoad(uint32_t type_id, uint32_t resultId, uint32_t ptr_id,
104 std::unique_ptr<BasicBlock>* block_ptr,

Callers 2

UpgradeExtInstMethod · 0.45

Calls 3

AddDebugLineMethod · 0.80
SetDebugScopeMethod · 0.80
AddInstructionMethod · 0.45

Tested by

no test coverage detected