aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
diff options
context:
space:
mode:
authorWang Pengcheng <wangpengcheng.pp@bytedance.com>2024-02-21 13:08:01 +0800
committerWang Pengcheng <wangpengcheng.pp@bytedance.com>2024-02-21 13:12:14 +0800
commitb8ed69ecc01385c03844e8fa05ba418a5670d322 (patch)
treedda10574f7ac8cb8a4719a14166ee8e61ad61038 /clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
parente4057aacc52bf8b352898504be8e7f8190841aac (diff)
downloadllvm-b8ed69ecc01385c03844e8fa05ba418a5670d322.zip
llvm-b8ed69ecc01385c03844e8fa05ba418a5670d322.tar.gz
llvm-b8ed69ecc01385c03844e8fa05ba418a5670d322.tar.bz2
[RISCV] Support llvm.readsteadycounter intrinsic
This intrinsic was introduced by #81331, which is a lot like `llvm.readcyclecounter`. For the RISCV implementation, we rename `ReadCycleWide` pseudo to `ReadCounterWide` and make it accept two operands (the low and high parts of the counter). As for legalization and lowering parts, we reuse the code of `ISD::READCYCLECOUNTER` (make it able to handle both intrinsics), and we use `time` CSR for `ISD::READSTEADYCOUNTER`. Tests using Clang builtins are runned on real hardware and it works as excepted. Reviewers: asb, MaskRay, dtcxzyw, preames, topperc, jhuber6 Reviewed By: jhuber6, asb, MaskRay, dtcxzyw Pull Request: https://github.com/llvm/llvm-project/pull/82322
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp')
0 files changed, 0 insertions, 0 deletions