Month: May 2023

Adding TBAA metadata to tinylang – Advanced IR Generation-2Adding TBAA metadata to tinylang – Advanced IR Generation-2

llvm::MDNode *CGTBAA::getTypeInfo(TypeDeclaration *Ty) {if (llvm::MDNode *N = MetadataCache[Ty])return N;if (auto *Pervasive =llvm::dyn_cast(Ty)) {StringRef Name = Pervasive->getName();return createScalarTypeNode(Pervasive, Name, getRoot());}if (auto *Pointer =llvm::dyn_cast(Ty)) {StringRef Name = “any pointer”;return createScalarTypeNode(Pointer, Name, getRoot());}if [...]