[clang] [Driver] Enable -ftime-trace for CUDA/HIP device compilation (PR #179701)

Yaxun Liu via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 11 08:56:56 PST 2026


================
@@ -63,6 +63,41 @@
 // UNUSED-NEXT: warning: argument unused during compilation: '-ftime-trace-verbose'
 // UNUSED-NOT:  warning:
 
+/// Test HIP offloading: -ftime-trace should generate traces for both host and device.
+// RUN: %clang -### -ftime-trace -ftime-trace-granularity=0 -x hip d/a.cpp --offload-arch=gfx906 --offload-arch=gfx90a \
+// RUN:   -c -o e/a.o --target=x86_64-linux-gnu 2>&1 \
+// RUN:   | FileCheck %s --check-prefix=HIP
+// HIP-DAG: -cc1{{.*}} "-triple" "amdgcn-amd-amdhsa"{{.*}} "-ftime-trace=e/a-hip-amdgcn-amd-amdhsa-gfx906.json"
----------------
yxsamliu wrote:

will do

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


More information about the cfe-commits mailing list