search for: memeq_lib_function

Displaying 2 results from an estimated 2 matches for "memeq_lib_function".

2019 Jan 04
2
[RFC] Adding a -memeq-lib-function flag to allow the user to specify a memeq function.
Thanks for the suggestions Hal, So if I understand correctly, you're recommending we add a module flag <https://llvm.org/docs/LangRef.html#module-flags-metadata> to LLVM, something like: !llvm.module.flags = !{..., !123} !123 = !{i32 1, !"memeq_lib_function", !"user_memeq"} I've given it a try in the following patch: https://reviews.llvm.org/D56311 If this sounds reasonable I can start working on adding a CodeGenOptions to clang to see what this entails. I don't think the function attribute works here because we want this to b...
2019 Jan 03
4
[RFC] Adding a -memeq-lib-function flag to allow the user to specify a memeq function.
Hi all, We'd like to suggest *adding a -memeq-lib-function* flag to allow the user to specify a `*memeq()*` function to improve string equality check performance. Right now, when llvm encounters a *string equality check*, e.g. `if (memcmp(a, b, s) == 0)`, it tries to expand to an equality comparison if `s` is a small compile-time constant, and falls back on calling `memcmp()` else. This is