[compiler-rt] [XRay][SystemZ] Use stckf for non-clang compilers (PR #125289)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 1 01:00:07 PST 2025


================
@@ -96,7 +96,13 @@ namespace __xray {
 inline bool probeRequiredCPUFeatures() XRAY_NEVER_INSTRUMENT { return true; }
 
 ALWAYS_INLINE uint64_t readTSC(uint8_t &CPU) XRAY_NEVER_INSTRUMENT {
+#if defined(__clang__)
----------------
MaskRay wrote:

`__has_builtin(__builtin_readcyclecounter)` ?

https://github.com/llvm/llvm-project/pull/125289


More information about the llvm-commits mailing list