[CoroFrame] Remove unused insertSpills() return value (NFC)
authorNikita Popov <npopov@redhat.com>
Fri, 4 Mar 2022 14:10:51 +0000 (15:10 +0100)
committerNikita Popov <npopov@redhat.com>
Fri, 4 Mar 2022 14:11:24 +0000 (15:11 +0100)
llvm/lib/Transforms/Coroutines/CoroFrame.cpp

index 1fb4841..53f2756 100644 (file)
@@ -1518,8 +1518,7 @@ static void createFramePtr(coro::Shape &Shape) {
 //    whatever
 //
 //
-static Instruction *insertSpills(const FrameDataInfo &FrameData,
-                                 coro::Shape &Shape) {
+static void insertSpills(const FrameDataInfo &FrameData, coro::Shape &Shape) {
   auto *CB = Shape.CoroBegin;
   LLVMContext &C = CB->getContext();
   IRBuilder<> Builder(C);
@@ -1709,7 +1708,7 @@ static Instruction *insertSpills(const FrameDataInfo &FrameData,
       Alloca->replaceAllUsesWith(G);
       Alloca->eraseFromParent();
     }
-    return FramePtr;
+    return;
   }
 
   // If we found any alloca, replace all of their remaining uses with GEP
@@ -1769,7 +1768,6 @@ static Instruction *insertSpills(const FrameDataInfo &FrameData,
           AliasPtrTyped, [&](Use &U) { return DT.dominates(CB, U); });
     }
   }
-  return FramePtr;
 }
 
 // Moves the values in the PHIs in SuccBB that correspong to PredBB into a new