[PATCH] D50330: [RFC] Implement out-of-process allocator enumeration for macOS
Dan Liew via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 30 11:20:14 PDT 2018
delcypher added a comment.
@kcc Here is a new version of the patch that tries to address your concern of having two separate in-process and out-of-process implementations.
Just to note at our discussions at LLVMDev you wanted the template type (in this case what I call `ObjectView`) to an allocator parameter. I have not done this because I discovered this is impossible (when ObjectView is templated on the type of the object it is representing) because you end up with mutually recursive types. I.e.
ObjectView<Allocator<Params< ObjectView<Allocator<Params< ... > > > > > >
Instead the methods that need to be used for out-of-process enumeration are templated. This seems like a better choice anyway because it means
- There are not different allocator data types for in and out-of-process enumeration. This means it is impossible to have a data-layout divergence between the two types because there is only one.
- It explicitly documents which methods are involved in out-of-process enumeration because they are templated on `ObjectView`.
I should also note this is not necessarily the final design. I have not finished reworking my internal patch to re-use this new `ObjectView` interface everywhere yet so there might need to be some design tweaks to accommodate this. However I really wanted to get early feedback on this new design because it has large implications on my work.
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D50330
More information about the llvm-commits
mailing list