From 2b809d13906ad0191365b4b71b3fb18901ac437d Mon Sep 17 00:00:00 2001 From: Tobias Grosser Date: Sun, 21 Feb 2016 15:44:34 +0000 Subject: [PATCH] BlockGenerator: Drop unnecessary return value llvm-svn: 261473 --- polly/include/polly/CodeGen/BlockGenerators.h | 16 +++++----------- polly/lib/CodeGen/BlockGenerators.cpp | 7 +++---- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/polly/include/polly/CodeGen/BlockGenerators.h b/polly/include/polly/CodeGen/BlockGenerators.h index 95e66af..05b8f53 100644 --- a/polly/include/polly/CodeGen/BlockGenerators.h +++ b/polly/include/polly/CodeGen/BlockGenerators.h @@ -502,12 +502,8 @@ protected: /// /// The implementation in the BlockGenerator is trivial, however it allows /// subclasses to handle PHIs different. - /// - /// @returns The nullptr as the BlockGenerator does not copy PHIs. - virtual Value *copyPHIInstruction(ScopStmt &, PHINode *, ValueMapT &, - LoopToScevMapT &) { - return nullptr; - } + virtual void copyPHIInstruction(ScopStmt &, PHINode *, ValueMapT &, + LoopToScevMapT &) {} /// @brief Copy a single Instruction. /// @@ -824,11 +820,9 @@ private: /// @param BBMap A mapping from old values to their new values /// (for values recalculated within this basic block). /// @param LTS A map from old loops to new induction variables as SCEVs. - /// - /// @returns The copied instruction or nullptr if no copy was made. - virtual Value *copyPHIInstruction(ScopStmt &Stmt, PHINode *Inst, - ValueMapT &BBMap, - LoopToScevMapT <S) override; + virtual void copyPHIInstruction(ScopStmt &Stmt, PHINode *Inst, + ValueMapT &BBMap, + LoopToScevMapT <S) override; }; } #endif diff --git a/polly/lib/CodeGen/BlockGenerators.cpp b/polly/lib/CodeGen/BlockGenerators.cpp index 54ad1a5..1e72aae 100644 --- a/polly/lib/CodeGen/BlockGenerators.cpp +++ b/polly/lib/CodeGen/BlockGenerators.cpp @@ -1313,9 +1313,9 @@ void RegionGenerator::addOperandToPHI(ScopStmt &Stmt, const PHINode *PHI, PHICopy->addIncoming(OpCopy, BBCopy); } -Value *RegionGenerator::copyPHIInstruction(ScopStmt &Stmt, PHINode *PHI, - ValueMapT &BBMap, - LoopToScevMapT <S) { +void RegionGenerator::copyPHIInstruction(ScopStmt &Stmt, PHINode *PHI, + ValueMapT &BBMap, + LoopToScevMapT <S) { unsigned NumIncoming = PHI->getNumIncomingValues(); PHINode *PHICopy = Builder.CreatePHI(PHI->getType(), NumIncoming, "polly." + PHI->getName()); @@ -1324,5 +1324,4 @@ Value *RegionGenerator::copyPHIInstruction(ScopStmt &Stmt, PHINode *PHI, for (unsigned u = 0; u < NumIncoming; u++) addOperandToPHI(Stmt, PHI, PHICopy, PHI->getIncomingBlock(u), LTS); - return PHICopy; } -- 2.7.4