[polly] r220876 - Delete some unnecessary code

Tobias Grosser tobias at grosser.es
Wed Oct 29 15:09:54 PDT 2014


Author: grosser
Date: Wed Oct 29 17:09:54 2014
New Revision: 220876

URL: http://llvm.org/viewvc/llvm-project?rev=220876&view=rev
Log:
Delete some unnecessary code

Originally we have needed this code to map the isl_id of an array to its base
pointer. However, as now the isl_id contains a reference to the array itself we
obtain the base pointer from this isl_id and we do not need to add this
information to the IDToValue map.

Modified:
    polly/trunk/lib/CodeGen/IslCodeGeneration.cpp

Modified: polly/trunk/lib/CodeGen/IslCodeGeneration.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/IslCodeGeneration.cpp?rev=220876&r1=220875&r2=220876&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/IslCodeGeneration.cpp (original)
+++ polly/trunk/lib/CodeGen/IslCodeGeneration.cpp Wed Oct 29 17:09:54 2014
@@ -64,8 +64,6 @@ public:
 
   ~IslNodeBuilder() { delete Rewriter; }
 
-  /// @brief Add the mappings from array id's to array llvm::Value's.
-  void addMemoryAccesses(Scop &S);
   void addParameters(__isl_take isl_set *Context);
   void create(__isl_take isl_ast_node *Node);
   IslExprBuilder &getExprBuilder() { return ExprBuilder; }
@@ -561,15 +559,6 @@ void IslNodeBuilder::addParameters(__isl
   isl_set_free(Context);
 }
 
-void IslNodeBuilder::addMemoryAccesses(Scop &S) {
-  for (ScopStmt *Stmt : S)
-    for (MemoryAccess *MA : *Stmt) {
-      isl_id *Id = MA->getArrayId();
-      IDToValue[Id] = MA->getBaseAddr();
-      isl_id_free(Id);
-    }
-}
-
 namespace {
 class IslCodeGeneration : public ScopPass {
 public:
@@ -620,7 +609,6 @@ public:
     PollyIRBuilder Builder = createPollyIRBuilder(EnteringBB, Annotator);
 
     IslNodeBuilder NodeBuilder(Builder, Annotator, this, *LI, *SE, *DT);
-    NodeBuilder.addMemoryAccesses(S);
     NodeBuilder.addParameters(S.getContext());
 
     Value *RTC = buildRTC(Builder, NodeBuilder.getExprBuilder());





More information about the llvm-commits mailing list