================ @@ -80,6 +80,28 @@ llvm::MDNode *CodeGenTBAA::getChar() { return Char; } +llvm::MDNode *CodeGenTBAA::getAnyPtr(unsigned PtrDepth) { + assert(PtrDepth >= 1 && "Pointer must have some depth"); + + // Populate at least PtrDepth elements in AnyPtrs. These are the type nodes + // for "any" pointers of increasing pointer depth, and are organized in the + // hierarchy: any pointer <- any p2 pointer <- any p3 pointer <- ... ---------------- brunodf-snps wrote:
I've extended the comment based on your suggestion, let me know what you think! > I'm suggesting `>` here rather than arrows because I think it expresses the > subtype relationship more clearly, but I might be abnormally comfortable with > subtyping lattices, so let me know what you think. Yeah, I did not find this very clear. I used arrows to express the parent relationships. I don't think it is common to describe TBAA type nodes with subtyping, whereas "parent" is the term used in the documentation and API? I can still adapt this if you or others prefer[^1]. [^1]: I will say that I'm more used to the symbol `<:` for the subtype relationship, e.g.:  https://github.com/llvm/llvm-project/pull/126047 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits