[llvm-dev] A "Cross-Platform Runtime Library API" in LLVM IR
Yichao Yu via llvm-dev
llvm-dev at lists.llvm.org
Mon May 23 06:05:44 PDT 2016
On Mon, May 23, 2016 at 8:35 AM, Lorenzo Laneve via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> Actually my idea was not to provide the same library for all languages, but
> it was to provide an API for creating a library that better fits the needs
> of a specific language.
I don't think duplicating the libc API with a different name is very
useful but what I do think would be useful is some way to tell LLVM
that certain runtime functions behaves similar to malloc/free.
For example, it would be great if LLVM can remove the call to our
runtime allocation function (which might be GC'd, making it different
from malloc of course...) if it can prove that the result is never
escaped. (much like what is done with `malloc`/`free` pairs).
There are certain attribute (noalias for example) that helps but IIRC
the removal of malloc/free isn't available for other functions by
More information about the llvm-dev