diff options
author | Schrodinger ZHU Yifan <yifanzhu@rochester.edu> | 2023-11-28 23:47:48 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-28 23:47:48 -0500 |
commit | 1886b1a580240fc6aa3173f5a9344d3ead0421b6 (patch) | |
tree | 5fe7d8376bfb634f22604d5ca9f213eeb04bbf42 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | c1511a65d5c09f7cff15feba91ce9bda23d74b6e (diff) | |
download | llvm-1886b1a580240fc6aa3173f5a9344d3ead0421b6.zip llvm-1886b1a580240fc6aa3173f5a9344d3ead0421b6.tar.gz llvm-1886b1a580240fc6aa3173f5a9344d3ead0421b6.tar.bz2 |
[libc] add PREFER_GENERIC flag (#73744)
There are some basic vectorization features in standard architecture
specifications. Such as SSE/SSE2 for x86-64, or NEON for aarch64. Even
though such features are almost always available, we still need some
methods to test fallback routines without any vectorization.
Previous attempt in hsearch adds a DISABLE_SSE2_OPT flag that tries to
compile the code with -mno-sse2 in order to test specific table scanning
routines. However, it turns out that such flag may have some unwanted
side effects hindering portability.
This PR introduces PREFER_GENERIC as an alternative. When a target is
built with PREFER_GENERIC, cmake will define a macro
__LIBC_PREFER_GENERIC such that developers can selectively choose the
fallback routine based on the macro.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions