[NFC] [Coroutines] Remove unused CoroFree
authorChuanqi Xu <yedeng.yd@linux.alibaba.com>
Wed, 14 Jul 2021 11:12:57 +0000 (19:12 +0800)
committerChuanqi Xu <yedeng.yd@linux.alibaba.com>
Wed, 14 Jul 2021 11:13:12 +0000 (19:13 +0800)
llvm/lib/Transforms/Coroutines/CoroElide.cpp

index 18bd56c..d35a5de 100644 (file)
@@ -32,7 +32,6 @@ struct Lowerer : coro::LowererBase {
   SmallVector<CoroAllocInst *, 1> CoroAllocs;
   SmallVector<CoroSubFnInst *, 4> ResumeAddr;
   DenseMap<CoroBeginInst *, SmallVector<CoroSubFnInst *, 4>> DestroyAddr;
-  SmallVector<CoroFreeInst *, 1> CoroFrees;
   SmallPtrSet<const SwitchInst *, 4> CoroSuspendSwitches;
 
   Lowerer(Module &M) : LowererBase(M) {}
@@ -290,7 +289,6 @@ bool Lowerer::processCoroId(CoroIdInst *CoroId, AAResults &AA,
                             DominatorTree &DT) {
   CoroBegins.clear();
   CoroAllocs.clear();
-  CoroFrees.clear();
   ResumeAddr.clear();
   DestroyAddr.clear();
 
@@ -300,8 +298,6 @@ bool Lowerer::processCoroId(CoroIdInst *CoroId, AAResults &AA,
       CoroBegins.push_back(CB);
     else if (auto *CA = dyn_cast<CoroAllocInst>(U))
       CoroAllocs.push_back(CA);
-    else if (auto *CF = dyn_cast<CoroFreeInst>(U))
-      CoroFrees.push_back(CF);
   }
 
   // Collect all coro.subfn.addrs associated with coro.begin.