[llvm-dev] [RFC][clang/llvm] Allow efficient implementation of libc's memory functions in C/C++

David Chisnall via llvm-dev llvm-dev at lists.llvm.org
Tue Apr 30 09:28:20 PDT 2019


On 30/04/2019 15:01, Guillaume Chatelet wrote:
> David what do you think about the additional version that restrict the 
> effect to a few named functions?
>  > e.g. __attribute__((disable_call_synthesis("memset", "memcpy", "sqrt")))

I would find that exceptionally useful.  For the libm example, 
preventing LLVM from synthesising calls to other libm functions that may 
call this one would be the fine-grained control that we want.  For an 
Objective-C runtime, being able to explicitly disable synthesising ARC 
calls would be similarly useful (though I can no longer construct an 
example where LLVM does the wrong thing, so maybe this is fixed already 
in the ARC passes).

David


More information about the llvm-dev mailing list