[polly] r270432 - Remove some unused local variables. NFC.

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Mon May 23 06:00:42 PDT 2016


Author: meinersbur
Date: Mon May 23 08:00:41 2016
New Revision: 270432

URL: http://llvm.org/viewvc/llvm-project?rev=270432&view=rev
Log:
Remove some unused local variables. NFC.

Found by clang static analyzer (http://llvm.org/reports/scan-build/)
and Visual Studio.

Modified:
    polly/trunk/lib/Analysis/ScopInfo.cpp
    polly/trunk/lib/CodeGen/BlockGenerators.cpp

Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=270432&r1=270431&r2=270432&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Mon May 23 08:00:41 2016
@@ -1405,7 +1405,6 @@ void ScopStmt::buildDomain() {
 void ScopStmt::deriveAssumptionsFromGEP(GetElementPtrInst *GEP, LoopInfo &LI) {
   isl_ctx *Ctx = Parent.getIslCtx();
   isl_local_space *LSpace = isl_local_space_from_space(getDomainSpace());
-  Type *Ty = GEP->getPointerOperandType();
   ScalarEvolution &SE = *Parent.getSE();
 
   // The set of loads that are required to be invariant.
@@ -1416,10 +1415,6 @@ void ScopStmt::deriveAssumptionsFromGEP(
 
   std::tie(Subscripts, Sizes) = getIndexExpressionsFromGEP(GEP, SE);
 
-  if (auto *PtrTy = dyn_cast<PointerType>(Ty)) {
-    Ty = PtrTy->getElementType();
-  }
-
   int IndexOffset = Subscripts.size() - Sizes.size();
 
   assert(IndexOffset <= 1 && "Unexpected large index offset");
@@ -4397,7 +4392,6 @@ bool ScopInfo::buildAccessMultiDimParam(
       dyn_cast<SCEVUnknown>(SE->getPointerBase(AccessFunction));
 
   assert(BasePointer && "Could not find base pointer");
-  AccessFunction = SE->getMinusSCEV(AccessFunction, BasePointer);
 
   auto &InsnToMemAcc = scop->getInsnToMemAccMap();
   auto AccItr = InsnToMemAcc.find(Inst);

Modified: polly/trunk/lib/CodeGen/BlockGenerators.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/BlockGenerators.cpp?rev=270432&r1=270431&r2=270432&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/BlockGenerators.cpp (original)
+++ polly/trunk/lib/CodeGen/BlockGenerators.cpp Mon May 23 08:00:41 2016
@@ -1078,8 +1078,6 @@ void RegionGenerator::copyStmt(ScopStmt
   assert(Stmt.isRegionStmt() &&
          "Only region statements can be copied by the region generator");
 
-  Scop *S = Stmt.getParent();
-
   // Forget all old mappings.
   BlockMap.clear();
   RegionMaps.clear();
@@ -1106,17 +1104,6 @@ void RegionGenerator::copyStmt(ScopStmt
     if (!R->contains(*PI))
       BlockMap[*PI] = EntryBBCopy;
 
-  // Determine the original exit block of this subregion. If it the exit block
-  // is also the scop's exit, it it has been changed to polly.merge_new_and_old.
-  // We move one block back to find the original block. This only happens if the
-  // scop required simplification.
-  // If the whole scop consists of only this non-affine region, then they share
-  // the same Region object, such that we cannot change the exit of one and not
-  // the other.
-  BasicBlock *ExitBB = R->getExit();
-  if (!S->hasSingleExitEdge() && ExitBB == S->getExit())
-    ExitBB = *(++pred_begin(ExitBB));
-
   // Iterate over all blocks in the region in a breadth-first search.
   std::deque<BasicBlock *> Blocks;
   SmallPtrSet<BasicBlock *, 8> SeenBlocks;




More information about the llvm-commits mailing list