MCPcopy Create free account
hub / github.com/csyonghe/Spire / OpLoad

Method OpLoad

Source/SpireCore/SpirVCodeGen.cpp:1365–1377  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1363 streamFunctionBody.Add(op1);
1364 }
1365 void OpLoad(const int ID, const int typeID, const int variableID, const MemoryAccess ma)
1366 {
1367 sbTextFunctionBody << LR"(%)" << ID << LR"( = OpLoad %)" << typeID << LR"( %)"
1368 << variableID << LR"( )" << MemoryAccessToString(ma) << EndLine;
1369
1370 if (ma != MemoryAccess::None)
1371 throw NotImplementedException("not support memory access in CodeGenerator::OpLoad(): " + MemoryAccessToString(ma));
1372
1373 streamFunctionBody.Add(61 + (4 << 16));
1374 streamFunctionBody.Add(typeID);
1375 streamFunctionBody.Add(ID);
1376 streamFunctionBody.Add(variableID);
1377 }
1378 void OpVariable(const int ID, const int typeID, StorageClass store)
1379 {
1380 StringBuilder instrBuilder;

Callers 1

AddInstrLoadMethod · 0.80

Calls 3

MemoryAccessToStringFunction · 0.85
AddMethod · 0.45

Tested by

no test coverage detected