[PATCH] D12470: createScalarInitialization: Always store PHI-node value

Tobias Grosser via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 30 10:33:48 PDT 2015


This revision was automatically updated to reflect the committed changes.
Closed by commit rL246389: createScalarInitialization: Always store PHI-node value (authored by grosser).

Changed prior to commit:
  http://reviews.llvm.org/D12470?vs=33518&id=33541#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D12470

Files:
  polly/trunk/include/polly/CodeGen/BlockGenerators.h
  polly/trunk/include/polly/CodeGen/IslNodeBuilder.h
  polly/trunk/lib/CodeGen/BlockGenerators.cpp

Index: polly/trunk/lib/CodeGen/BlockGenerators.cpp
===================================================================
--- polly/trunk/lib/CodeGen/BlockGenerators.cpp
+++ polly/trunk/lib/CodeGen/BlockGenerators.cpp
@@ -466,8 +466,7 @@
   }
 }
 
-void BlockGenerator::createScalarInitialization(Region &R,
-                                                ValueMapT &GlobalMap) {
+void BlockGenerator::createScalarInitialization(Region &R) {
   // The split block __just before__ the region and optimized region.
   BasicBlock *SplitBB = R.getEnteringBlock();
   BranchInst *SplitBBTerm = cast<BranchInst>(SplitBB->getTerminator());
@@ -482,7 +481,6 @@
   // value prior to entering the optimized region.
   Builder.SetInsertPoint(StartBB->getTerminator());
 
-  ScalarAllocaMapTy EmptyMap;
   for (const auto &PHIOpMapping : PHIOpMap) {
     const PHINode *PHI = cast<PHINode>(PHIOpMapping.getFirst());
 
@@ -493,8 +491,6 @@
       continue;
 
     Value *ScalarValue = PHI->getIncomingValue(idx);
-    ScalarValue =
-        getNewScalarValue(ScalarValue, R, EmptyMap, GlobalMap, GlobalMap);
 
     // If the split block is the predecessor initialize the PHI operator alloca.
     Builder.CreateStore(ScalarValue, PHIOpMapping.getSecond());
@@ -545,8 +541,8 @@
   }
 }
 
-void BlockGenerator::finalizeSCoP(Scop &S, ValueMapT &GlobalMap) {
-  createScalarInitialization(S.getRegion(), GlobalMap);
+void BlockGenerator::finalizeSCoP(Scop &S) {
+  createScalarInitialization(S.getRegion());
   createScalarFinalization(S.getRegion());
 }
 
Index: polly/trunk/include/polly/CodeGen/IslNodeBuilder.h
===================================================================
--- polly/trunk/include/polly/CodeGen/IslNodeBuilder.h
+++ polly/trunk/include/polly/CodeGen/IslNodeBuilder.h
@@ -44,7 +44,7 @@
   /// @brief Finalize code generation for the SCoP @p S.
   ///
   /// @see BlockGenerator::finalizeSCoP(Scop &S)
-  void finalizeSCoP(Scop &S) { BlockGen.finalizeSCoP(S, ValueMap); }
+  void finalizeSCoP(Scop &S) { BlockGen.finalizeSCoP(S); }
 
   IslExprBuilder &getExprBuilder() { return ExprBuilder; }
 
Index: polly/trunk/include/polly/CodeGen/BlockGenerators.h
===================================================================
--- polly/trunk/include/polly/CodeGen/BlockGenerators.h
+++ polly/trunk/include/polly/CodeGen/BlockGenerators.h
@@ -147,9 +147,9 @@
   /// This will initialize and finalize the scalar variables we demoted during
   /// the code generation.
   ///
-  /// @see createScalarInitialization(Region &, ValueMapT &)
+  /// @see createScalarInitialization(Region &)
   /// @see createScalarFinalization(Region &)
-  void finalizeSCoP(Scop &S, ValueMapT &VMap);
+  void finalizeSCoP(Scop &S);
 
   /// @brief An empty destructor
   virtual ~BlockGenerator(){};
@@ -387,7 +387,7 @@
   /// the SCoP we need to initialize the memory cell we demoted the PHI into
   /// with the value corresponding to that predecessor. As a SCoP is a
   /// __single__ entry region there is at most one such predecessor.
-  void createScalarInitialization(Region &R, ValueMapT &VMap);
+  void createScalarInitialization(Region &R);
 
   /// @brief Promote the values of demoted scalars after the SCoP.
   ///


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12470.33541.patch
Type: text/x-patch
Size: 3207 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150830/dfea9e6a/attachment.bin>


More information about the llvm-commits mailing list