[PATCH] D61634: [clang/llvm] Allow efficient implementation of libc's memory functions in C/C++

David Chisnall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 7 05:40:20 PDT 2019


theraven added a comment.

I wonder if a list of comma-separated names is the right approach.  Would it make more sense to add a new attribute for each of the helpers, such as `#no-runtime-for-memcpy`? That should make querying simpler (one lookup in the table, rather than a lookup and a string scan) and also make it easier to add and remove attributes (merging is now just a matter of trying to add all of them, with the existing logic to deduplicate repeated attributes working).

We probably need to also carefully audit all of the transform passes to find ones that insert calls.  Last time I looked, there were four places in LLVM where memcpy could be expanded, I wonder if there are a similar number where it can be synthesised...


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61634/new/

https://reviews.llvm.org/D61634





More information about the cfe-commits mailing list