[llvm] db86e5c - Revert "[Coroutine] Add statistics for the number of elided coroutine"

Nico Weber via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 30 07:22:54 PDT 2021


Author: Nico Weber
Date: 2021-06-30T10:22:45-04:00
New Revision: db86e5c91477286b6432a75857edf012652c58d9

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

LOG: Revert "[Coroutine] Add statistics for the number of elided coroutine"

This reverts commit 1d9539cf49a585e7c3cd8faa1b8e7291e0ce285c.
Test fails in LLVM_ENABLE_ASSERTIONS=OFF builds (such as regular
release builds).

Added: 
    

Modified: 
    llvm/lib/Transforms/Coroutines/CoroElide.cpp
    llvm/test/Transforms/Coroutines/coro-elide.ll

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Coroutines/CoroElide.cpp b/llvm/lib/Transforms/Coroutines/CoroElide.cpp
index 18bd56c45de19..9f0adae58948a 100644
--- a/llvm/lib/Transforms/Coroutines/CoroElide.cpp
+++ b/llvm/lib/Transforms/Coroutines/CoroElide.cpp
@@ -9,7 +9,6 @@
 #include "llvm/Transforms/Coroutines/CoroElide.h"
 #include "CoroInternal.h"
 #include "llvm/ADT/DenseMap.h"
-#include "llvm/ADT/Statistic.h"
 #include "llvm/Analysis/AliasAnalysis.h"
 #include "llvm/Analysis/InstructionSimplify.h"
 #include "llvm/IR/Dominators.h"
@@ -22,8 +21,6 @@ using namespace llvm;
 
 #define DEBUG_TYPE "coro-elide"
 
-STATISTIC(NumOfCoroElided, "The # of coroutine get elided.");
-
 namespace {
 // Created on demand if the coro-elide pass has work to do.
 struct Lowerer : coro::LowererBase {
@@ -347,7 +344,6 @@ bool Lowerer::processCoroId(CoroIdInst *CoroId, AAResults &AA,
     elideHeapAllocations(CoroId->getFunction(), FrameSizeAndAlign.first,
                          FrameSizeAndAlign.second, AA);
     coro::replaceCoroFree(CoroId, /*Elide=*/true);
-    NumOfCoroElided++;
   }
 
   return true;

diff  --git a/llvm/test/Transforms/Coroutines/coro-elide.ll b/llvm/test/Transforms/Coroutines/coro-elide.ll
index 040a1a05d5c6d..674996b79e923 100644
--- a/llvm/test/Transforms/Coroutines/coro-elide.ll
+++ b/llvm/test/Transforms/Coroutines/coro-elide.ll
@@ -1,8 +1,8 @@
 ; Tests that the coro.destroy and coro.resume are devirtualized where possible,
 ; SCC pipeline restarts and inlines the direct calls.
 ; RUN: opt < %s -S \
-; RUN:   -passes='cgscc(repeat<2>(inline,function(coro-elide,dce)))' -stats \
-; RUN: 2>&1 | FileCheck %s --check-prefixes=CHECK,STATS
+; RUN:   -passes='cgscc(repeat<2>(inline,function(coro-elide,dce)))' \
+; RUN:   | FileCheck %s
 
 declare void @print(i32) nounwind
 
@@ -165,4 +165,3 @@ declare i8* @llvm.coro.begin(token, i8*)
 declare i8* @llvm.coro.frame()
 declare i8* @llvm.coro.subfn.addr(i8*, i8)
 declare i1 @llvm.coro.alloc(token)
-; STATS: 2 coro-elide  - The # of coroutine get elided.
\ No newline at end of file


        


More information about the llvm-commits mailing list