MCPcopy Create free account
hub / github.com/NVIDIA/cuda-tile / registerDependentTypes

Method registerDependentTypes

lib/Bytecode/Writer/BytecodeWriter.cpp:428–444  ·  view source on GitHub ↗

Helper to recursively register dependent types before the main type.

Source from the content-addressed store, hash-verified

426
427 // Helper to recursively register dependent types before the main type.
428 void registerDependentTypes(Type type) {
429 // Check if the type itself is already registered or being registered
430 if (typeIndexMap.count(type.getAsOpaquePointer()))
431 return;
432
433 // Auto-generated dependent type registration for CudaTile types.
434#define GEN_DEPENDENT_TYPE_REGISTRATION
435#include "TypeBytecode.inc"
436
437 // FunctionType is not a CudaTile type, handle it manually.
438 if (auto funcType = dyn_cast<FunctionType>(type)) {
439 for (Type input : funcType.getInputs())
440 getTypeIndex(input);
441 for (Type result : funcType.getResults())
442 getTypeIndex(result);
443 }
444 }
445
446 llvm::MapVector<const void *, uint64_t> typeIndexMap;
447 SmallVector<Type> typeList;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected