• Home
  • Raw
  • Download

Lines Matching refs:opCode

64         const spv::Op opCode = asOpCode(word);  in asOpCodeHash()  local
68 switch (opCode) { in asOpCodeHash()
75 return opCode * 19 + offset; // 19 = small prime in asOpCodeHash()
78 spirvbin_t::range_t spirvbin_t::literalRange(spv::Op opCode) const in literalRange()
82 switch (opCode) { in literalRange()
97 spirvbin_t::range_t spirvbin_t::typeRange(spv::Op opCode) const in typeRange()
101 if (isConstOp(opCode)) in typeRange()
104 switch (opCode) { in typeRange()
118 spirvbin_t::range_t spirvbin_t::constRange(spv::Op opCode) const in constRange()
122 switch (opCode) { in constRange()
136 const spv::Op opCode = asOpCode(typeStart); in typeSizeInWords() local
141 switch (opCode) { in typeSizeInWords()
163 bool spirvbin_t::isStripOp(spv::Op opCode) const in isStripOp()
165 switch (opCode) { in isStripOp()
176 bool spirvbin_t::isFlowCtrl(spv::Op opCode) const in isFlowCtrl()
178 switch (opCode) { in isFlowCtrl()
192 bool spirvbin_t::isTypeOp(spv::Op opCode) const in isTypeOp()
194 switch (opCode) { in isTypeOp()
220 bool spirvbin_t::isConstOp(spv::Op opCode) const in isConstOp()
222 switch (opCode) { in isConstOp()
367 [&](spv::Op opCode, unsigned start) { in stripDebug() argument
369 if (isStripOp(opCode)) in stripDebug()
380 [&](spv::Op opCode, unsigned start) { in stripDeadRefs() argument
382 switch (opCode) { in stripDeadRefs()
423 [&](spv::Op opCode, unsigned start) { in buildLocalMaps() argument
427 if (spv::InstructionDesc[opCode].hasType()) in buildLocalMaps()
431 if (spv::InstructionDesc[opCode].hasResult()) { in buildLocalMaps()
446 if (opCode == spv::Op::OpName) { in buildLocalMaps()
451 } else if (opCode == spv::Op::OpFunctionCall) { in buildLocalMaps()
453 } else if (opCode == spv::Op::OpEntryPoint) { in buildLocalMaps()
455 } else if (opCode == spv::Op::OpFunction) { in buildLocalMaps()
463 } else if (opCode == spv::Op::OpFunctionEnd) { in buildLocalMaps()
472 } else if (isConstOp(opCode)) { in buildLocalMaps()
478 } else if (isTypeOp(opCode)) { in buildLocalMaps()
520 spv::Op opCode = asOpCode(instructionStart); in processInstruction() local
530 if (instFn(opCode, instructionStart)) in processInstruction()
534 if (spv::InstructionDesc[opCode].hasType()) { in processInstruction()
539 if (spv::InstructionDesc[opCode].hasResult()) { in processInstruction()
546 if (opCode == spv::OpExtInst) { in processInstruction()
568 if (opCode == spv::OpSpecConstantOp) { in processInstruction()
570opCode = asOpCode(word++); // this is the opcode embedded in the SpecConstantOp. in processInstruction()
575 switch (spv::InstructionDesc[opCode].operands.getClass(op)) { in processInstruction()
599 if (opCode == OpSwitch) { in processInstruction()
748 const spv::Op opCode = asOpCode(start); in mapFnBodies() local
750 if (opCode == spv::OpFunction) in mapFnBodies()
753 if (opCode == spv::OpFunctionEnd) in mapFnBodies()
757 if (spv::InstructionDesc[opCode].hasResult()) { in mapFnBodies()
758 … const unsigned word = start + (spv::InstructionDesc[opCode].hasType() ? 2 : 1); in mapFnBodies()
790 [&](spv::Op opCode, unsigned start) { in mapFnBodies() argument
791 switch (opCode) { in mapFnBodies()
819 ++opCounter[opCode]; in mapFnBodies()
821 thisOpCode = opCode; in mapFnBodies()
858 [&](spv::Op opCode, unsigned start) { in forwardLoadStores() argument
860 if ((opCode == spv::OpVariable && asWordCount(start) == 4) && in forwardLoadStores()
866 if (opCode == spv::OpAccessChain && fnLocalVars.count(asId(start+3)) > 0) in forwardLoadStores()
869 if (opCode == spv::OpLoad && fnLocalVars.count(asId(start+3)) > 0) { in forwardLoadStores()
888 [&](spv::Op opCode, unsigned start) { in forwardLoadStores() argument
890 if ((opCode == spv::OpVariable && asWordCount(start) == 4) && in forwardLoadStores()
894 if (opCode == spv::OpStore && fnLocalVars.count(asId(start+1)) > 0) { in forwardLoadStores()
927 [&](spv::Op opCode, unsigned start) { in optLoadStore() argument
931 if (isFlowCtrl(opCode)) in optLoadStore()
935 …if ((opCode == spv::OpVariable && spv[start+3] == spv::StorageClassFunction && asWordCount(start) … in optLoadStore()
941 …if ((opCode == spv::OpAccessChain || opCode == spv::OpInBoundsAccessChain) && fnLocalVars.count(as… in optLoadStore()
947 if (opCode == spv::OpLoad && fnLocalVars.count(asId(start+3)) > 0) { in optLoadStore()
973 if (opCode == spv::OpStore && fnLocalVars.count(asId(start+1)) > 0) { in optLoadStore()
1017 [&](spv::Op opCode, unsigned start) { in optLoadStore() argument
1018 if (opCode == spv::OpLoad && fnLocalVars.count(asId(start+3)) > 0) in optLoadStore()
1043 [&](spv::Op opCode, unsigned start) { in optLoadStore() argument
1044 if ((opCode == spv::OpLoad && fnLocalVars.count(asId(start+3)) > 0) || in optLoadStore()
1045 (opCode == spv::OpStore && fnLocalVars.count(asId(start+1)) > 0) || in optLoadStore()
1046 (opCode == spv::OpVariable && fnLocalVars.count(asId(start+2)) > 0)) { in optLoadStore()
1091 [&](spv::Op opCode, unsigned start) { in dceFuncs() argument
1092 if (opCode == spv::Op::OpFunctionCall) { in dceFuncs()
1124 [&](spv::Op opCode, unsigned start) { in dceVars() argument
1125 if (opCode == spv::OpVariable) { in dceVars()
1128 } else if (opCode == spv::OpEntryPoint) { in dceVars()
1146 [&](spv::Op opCode, unsigned start) { in dceVars() argument
1148 if (opCode == spv::OpVariable) in dceVars()
1150 if (opCode == spv::OpDecorate || opCode == spv::OpName) in dceVars()
1222 const spv::Op opCode = asOpCode(typeStart); in matchType() local
1225 if (opCode != opOpCode(gdata[0]) || wordCount != opWordCount(gdata[0])) in matchType()
1237 const auto cmpConst = [&]() { return cmpIdRange(constRange(opCode)); }; in matchType()
1238 const auto cmpSubType = [&]() { return cmpIdRange(typeRange(opCode)); }; in matchType()
1242 const auto range = literalRange(opCode); in matchType()
1248 assert(isTypeOp(opCode) || isConstOp(opCode)); in matchType()
1250 switch (opCode) { in matchType()
1291 const spv::Op opCode = asOpCode(typeStart); in hashType() local
1293 switch (opCode) { in hashType()