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

Method GetSIntConstId

source/opt/constants.cpp:501–505  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

499}
500
501uint32_t ConstantManager::GetSIntConstId(int32_t val) {
502 Type* sint_type = context()->get_type_mgr()->GetSIntType();
503 const Constant* c = GetConstant(sint_type, {static_cast<uint32_t>(val)});
504 return GetDefiningInstruction(c)->result_id();
505}
506
507const Constant* ConstantManager::GetIntConst(uint64_t val, int32_t bitWidth,
508 bool isSigned) {

Callers 2

Calls 3

GetSIntTypeMethod · 0.80
get_type_mgrMethod · 0.80
result_idMethod · 0.45

Tested by

no test coverage detected