[PATCH] D142388: [clang] Add builtin_nondet
Manuel Brito via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 23 10:48:05 PST 2023
ManuelJBrito created this revision.
ManuelJBrito added reviewers: aaron.ballman, erichkeane, shafik.
ManuelJBrito added a project: clang.
Herald added a project: All.
ManuelJBrito requested review of this revision.
Herald added a subscriber: cfe-commits.
This patch adds a builtin that returns a non deterministic value of the same type as the argument.
Example:
`int x = __builtin_nondet(x);`
Which is then lowered to freeze(poison).
This is a continuation of the work done in https://reviews.llvm.org/D136737, following the provided feedback.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D142388
Files:
clang/include/clang/Basic/Builtins.def
clang/include/clang/Sema/Sema.h
clang/lib/CodeGen/CGBuiltin.cpp
clang/lib/Sema/SemaChecking.cpp
clang/test/CodeGen/builtins-nondet.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142388.491441.patch
Type: text/x-patch
Size: 3968 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230123/9fd356ea/attachment-0001.bin>
More information about the cfe-commits
mailing list