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

Function MaybeGetIntegerConstant

source/fuzz/fuzzer_util.cpp:1409–1420  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1407}
1408
1409uint32_t MaybeGetIntegerConstant(
1410 opt::IRContext* ir_context,
1411 const TransformationContext& transformation_context,
1412 const std::vector<uint32_t>& words, uint32_t width, bool is_signed,
1413 bool is_irrelevant) {
1414 if (auto type_id = MaybeGetIntegerType(ir_context, width, is_signed)) {
1415 return MaybeGetOpConstant(ir_context, transformation_context, words,
1416 type_id, is_irrelevant);
1417 }
1418
1419 return 0;
1420}
1421
1422uint32_t MaybeGetIntegerConstantFromValueAndType(opt::IRContext* ir_context,
1423 uint32_t value,

Callers 6

IsApplicableMethod · 0.85
ApplyMethod · 0.85
IsApplicableMethod · 0.85
MaybeGetScalarConstantFunction · 0.85
TESTFunction · 0.85

Calls 2

MaybeGetIntegerTypeFunction · 0.85
MaybeGetOpConstantFunction · 0.85

Tested by 1

TESTFunction · 0.68