dberris marked an inline comment as done.
dberris added a comment.
Thanks @rnk!
Comment at: lib/CodeGen/CGBuiltin.cpp:2748
+if (const auto *XRayAttr =
+this->CurFuncDecl->getAttr()) {
+ if (XRayAttr->neverXRayInstrument())
rnk wrote:
> rnk
This revision was automatically updated to reflect the committed changes.
dberris marked an inline comment as done.
Closed by commit rL302492: [XRay] Add __xray_customeevent(...) as a
clang-supported builtin (authored by dberris).
Changed prior to commit:
https://reviews.llvm.org/D30018?vs=9812
rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.
lgtm
Comment at: lib/CodeGen/CGBuiltin.cpp:2748
+if (const auto *XRayAttr =
+this->CurFuncDecl->getAttr()) {
+ if (XRayAttr->neverXRayInstrument())
---
dberris updated this revision to Diff 98129.
dberris marked 6 inline comments as done.
dberris added a comment.
Address comments.
https://reviews.llvm.org/D30018
Files:
include/clang/Basic/Builtins.def
lib/CodeGen/CGBuiltin.cpp
test/CodeGen/xray-customevent.cpp
Index: test/CodeGen/xray-
dberris added inline comments.
Comment at: lib/Headers/xrayintrin.h:28
+extern "C" {
+inline void __xray_customevent(const char*, size_t) {
+ // Does nothing by design. The intent is the compiler's back-end will handle
rnk wrote:
> I don't think you need this he
rnk added inline comments.
Comment at: lib/CodeGen/CGBuiltin.cpp:2748
+if (const auto *XRayAttr =
+this->CurFuncDecl->getAttr()) {
+ if (XRayAttr->neverXRayInstrument())
Don't need `this->`
Comment at: lib/CodeGen/CGBuiltin
dberris added a reviewer: rnk.
dberris added a subscriber: rnk.
dberris added a comment.
@rnk -- if you have time, a review for this would be appreciated too.
https://reviews.llvm.org/D30018
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ht
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 `-fxra