[PATCH] D22488: [IR] Introduce a non-integral pointer type

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 28 13:43:01 PDT 2016


sanjoy added inline comments.

================
Comment at: include/llvm/IR/DataLayout.h:150
@@ +149,3 @@
+  /// well-defined bitwise representation.
+  SmallVector<unsigned, 2> NonIntegralAddressSpaces;
+
----------------
arsenm wrote:
> Seems like it should be a SmallSet?
Since this isn't going to change after creation, how about a sorted `SmallVector`?  That way we'll avoid the `isSmall` check in `isNonIntegralPointerType` and will also be able to use a binary search instead of a linear search.


https://reviews.llvm.org/D22488





More information about the llvm-commits mailing list