[Simplify] Remove some leftover dead code
authorTobias Grosser <tobias@grosser.es>
Sun, 14 May 2017 09:20:56 +0000 (09:20 +0000)
committerTobias Grosser <tobias@grosser.es>
Sun, 14 May 2017 09:20:56 +0000 (09:20 +0000)
llvm-svn: 303007

polly/lib/Transform/Simplify.cpp

index 35f788a..920d835 100644 (file)
@@ -36,32 +36,6 @@ STATISTIC(TotalRedundantWritesRemoved,
           "Number of writes of same value removed in any SCoP");
 STATISTIC(TotalStmtsRemoved, "Number of statements removed in any SCoP");
 
-/// Find the llvm::Value that is written by a MemoryAccess. Return nullptr if
-/// there is no such unique value.
-static Value *getWrittenScalar(MemoryAccess *WA) {
-  assert(WA->isWrite());
-
-  if (WA->isOriginalAnyPHIKind()) {
-    Value *Result = nullptr;
-    for (auto Incoming : WA->getIncoming()) {
-      assert(Incoming.second);
-
-      if (!Result) {
-        Result = Incoming.second;
-        continue;
-      }
-
-      if (Result == Incoming.second)
-        continue;
-
-      return nullptr;
-    }
-    return Result;
-  }
-
-  return WA->getAccessInstruction();
-}
-
 static bool isImplicitRead(MemoryAccess *MA) {
   return MA->isRead() && MA->isOriginalScalarKind();
 }