[clang] [Driver] Enable -ftime-trace for CUDA/HIP device compilation (PR #179701)
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 4 11:46:04 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"
----------------
jhuber6 wrote:
+1, I've had a nightmare of a time trying to update tests that try to be 'smart' with DAGs and reusing check lines in the past. It's much nicer to have one block of checks for one test.
https://github.com/llvm/llvm-project/pull/179701
More information about the cfe-commits
mailing list