- std::vector<const analysis::Constant*> constants;
- for (uint32_t i = 0; i < inst->NumInOperands(); i++) {
- const ir::Operand* operand = &inst->GetInOperand(i);
- if (operand->type != SPV_OPERAND_TYPE_ID) {
- constants.push_back(nullptr);
- } else {
- uint32_t id = operand->words[0];
- const analysis::Constant* constant =
- const_manger->FindDeclaredConstant(id);
- constants.push_back(constant);
- }
- }