[llvm-dev] Inline SmallVectorBase::grow_pod?
Mehdi Amini via llvm-dev
llvm-dev at lists.llvm.org
Tue Apr 12 18:08:45 PDT 2016
> On Apr 12, 2016, at 5:59 PM, David Farler via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> Hello llvm-dev,
>
> I'm working on some out-of-process reflection support for Swift and I'd like to switch over some of my memory management to context-based with a bump-pointer allocator. I hit a linker error that `grow_pod` was missing. Eventually, some of this code will get linked into the Swift runtime and we are trying to avoid directly linking LLVM into the runtime to keep the size down, so I can't link in Support.
If code size is your motivation, any dead-stripping by the linker should remove all the code from libLLVMSupport that you are not actually using. It's not clear how moving every pieces you need to a header would help here. Have you some elements that shows how much of Support can't be dead-stripped from your binary?
Having things in a header is not nice for compile-time, we should try to move things out-of-headers instead of adding more.
--
Mehdi
>
> I see that this method was pulled out of line for https://llvm.org/bugs/show_bug.cgi?id=3758 back in 2009. Is there a chance we can consider pulling it back into a header? It's kind of a shame to have to have to link Support just to use BumpPointerAllocator.
>
> David
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
More information about the llvm-dev
mailing list