aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
diff options
context:
space:
mode:
authorPhilip Reames <preames@rivosinc.com>2024-07-23 08:48:28 -0700
committerGitHub <noreply@github.com>2024-07-23 08:48:28 -0700
commitd1e28e2a7bd4642e6a5ec963a5ca2ad2ba1b2b59 (patch)
treee01df0be9f24aaa69ff197062ca309a0dd2928f8 /clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
parent0cf92b1a464e20a397cb64f463b2af6992125e1d (diff)
downloadllvm-d1e28e2a7bd4642e6a5ec963a5ca2ad2ba1b2b59.zip
llvm-d1e28e2a7bd4642e6a5ec963a5ca2ad2ba1b2b59.tar.gz
llvm-d1e28e2a7bd4642e6a5ec963a5ca2ad2ba1b2b59.tar.bz2
[RISCV] Support __builtin_cpu_init and __builtin_cpu_supports (#99700)
This implements the __builtin_cpu_init and __builtin_cpu_supports builtin routines based on the compiler runtime changes in https://github.com/llvm/llvm-project/pull/85790. This is inspired by https://github.com/llvm/llvm-project/pull/85786. Major changes are a) a restriction in scope to only the builtins (which have a much narrower user interface), and the avoidance of false generality. This change deliberately only handles group 0 extensions (which happen to be all defined ones today), and avoids the tblgen changes from that review. I don't have an environment in which I can actually test this, but @BeMg has been kind enough to report that this appears to work as expected. Before this can make it into a release, we need a change such as https://github.com/llvm/llvm-project/pull/99958. The gcc docs claim that cpu_support can be called by "normal" code without calling the cpu_init routine because the init routine will have been called by a high priority constructor. Our current compiler-rt mechanism does not do this.
Diffstat (limited to 'clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp')
0 files changed, 0 insertions, 0 deletions