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

Method GetFalseId

source/opt/inline_pass.cpp:123–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123uint32_t InlinePass::GetFalseId() {
124 if (false_id_ != 0) return false_id_;
125 false_id_ = get_module()->GetGlobalValue(spv::Op::OpConstantFalse);
126 if (false_id_ != 0) return false_id_;
127 uint32_t boolId = get_module()->GetGlobalValue(spv::Op::OpTypeBool);
128 if (boolId == 0) {
129 boolId = context()->TakeNextId();
130 if (boolId == 0) {
131 return 0;
132 }
133 get_module()->AddGlobalValue(spv::Op::OpTypeBool, boolId, 0);
134 }
135 false_id_ = context()->TakeNextId();
136 if (false_id_ == 0) {
137 return 0;
138 }
139 get_module()->AddGlobalValue(spv::Op::OpConstantFalse, false_id_, boolId);
140 return false_id_;
141}
142
143void InlinePass::MapParams(
144 Function* calleeFn, BasicBlock::iterator call_inst_itr,

Callers

nothing calls this directly

Calls 3

GetGlobalValueMethod · 0.80
TakeNextIdMethod · 0.45
AddGlobalValueMethod · 0.45

Tested by

no test coverage detected