[llvm-branch-commits] [compiler-rt] 6f22c59 - Revert "[compiler-rt][pgo] Add profile instrumentation test for coroutines (#…"

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Aug 6 11:52:35 PDT 2026


Author: Douglas Yung
Date: 2026-08-06T14:52:30-04:00
New Revision: 6f22c595983de479a1afd8dc7f26fb1cdcf9ad9c

URL: https://github.com/llvm/llvm-project/commit/6f22c595983de479a1afd8dc7f26fb1cdcf9ad9c
DIFF: https://github.com/llvm/llvm-project/commit/6f22c595983de479a1afd8dc7f26fb1cdcf9ad9c.diff

LOG: Revert "[compiler-rt][pgo] Add profile instrumentation test for coroutines (#…"

This reverts commit 2f4043eb92f789541b483dec8c794ecd67d167c1.

Added: 
    

Modified: 
    

Removed: 
    compiler-rt/test/profile/instrprof-coroutine-profile.cpp


################################################################################
diff  --git a/compiler-rt/test/profile/instrprof-coroutine-profile.cpp b/compiler-rt/test/profile/instrprof-coroutine-profile.cpp
deleted file mode 100644
index e4c8bd47ceca5..0000000000000
--- a/compiler-rt/test/profile/instrprof-coroutine-profile.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-// RUN: %clangxx_pgogen -std=c++20 -O2 -o %t %s
-// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t
-// RUN: llvm-profdata show -function=foo -counts %t.profraw | FileCheck %s
-
-#include <coroutine>
-
-struct State {
-  struct promise_type {
-    std::suspend_never initial_suspend() noexcept { return {}; }
-    std::suspend_never final_suspend() noexcept { return {}; }
-    State get_return_object() noexcept {
-      return State{std::coroutine_handle<promise_type>::from_promise(*this)};
-    }
-    void return_void() noexcept {}
-    void unhandled_exception() noexcept {}
-  };
-  std::coroutine_handle<promise_type> handle;
-};
-
-struct Awaitable {
-  bool await_ready() noexcept { return false; }
-  void await_suspend(std::coroutine_handle<> h) noexcept { h.resume(); }
-  void await_resume() noexcept {}
-};
-
-__attribute__((noinline)) State foo(int x) {
-  for (int i = 0; i < x; ++i) {
-    co_await Awaitable{};
-  }
-  co_return;
-}
-
-int main() {
-  foo(5);
-  return 0;
-}
-
-// Note: Index 6 in Block counts (the 7th value '1') represents the function entry count of foo(5).
-// CHECK: Counters:
-// CHECK-NEXT:  {{.*foo.*}}:
-// CHECK-NEXT:    Hash: {{.*}}
-// CHECK-NEXT:    Counters: 8
-// CHECK-NEXT:    Block counts: [0, 5, 5, 5, 1, 1, 1, 1]
-// CHECK-NOT: .resume
-// CHECK-NOT: .destroy
-// CHECK-NOT: .cleanup


        


More information about the llvm-branch-commits mailing list