[PATCH] D30018: [XRay] Add __xray_customeevent(...) as a clang-supported builtin
Dean Michael Berris via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 15 18:30:57 PST 2017
dberris created this revision.
Herald added a subscriber: mehdi_amini.
We define the `__xray_customeevent` builtin that gets translated to
IR calls to the correct intrinsic. The default implementation of this is
a no-op function. The codegen side of this follows the following logic:
- When `-fxray-instrument` is not provided in the driver, we elide all
calls to `__xray_customevent`.
- When `-fxray-instrument` is enabled and a function is marked as "never
instrumented", we elide all calls to `__xray_customevent` in that
function; if either marked as "always instrumented" or subject to
threshold-based instrumentation, we emit a call to the
`llvm.xray.customevent` intrinsic from LLVM for each
`__xray_customevent` occurrence in the function.
This change depends on https://reviews.llvm.org/D27503 (to land in LLVM first).
https://reviews.llvm.org/D30018
Files:
include/clang/Basic/Builtins.def
lib/CodeGen/CGBuiltin.cpp
lib/Headers/xrayintrin.h
test/CodeGen/xray-customevent.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30018.88641.patch
Type: text/x-patch
Size: 5054 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170216/c45bc681/attachment.bin>
More information about the cfe-commits
mailing list