[polly] r261789 - Add assertion to MemoryAccess::addIncoming. NFC.

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 24 14:08:11 PST 2016


Author: meinersbur
Date: Wed Feb 24 16:08:11 2016
New Revision: 261789

URL: http://llvm.org/viewvc/llvm-project?rev=261789&view=rev
Log:
Add assertion to MemoryAccess::addIncoming. NFC.

MemoryAccess::addIncoming exists to remember which values come from that
statement in PHI writes, relevant for subregions that have multiple
exiting edges to an exit block. The exit block can be separated from the
exiting block by regions simplifications. It should not be called for
any read accesses.

Modified:
    polly/trunk/include/polly/ScopInfo.h

Modified: polly/trunk/include/polly/ScopInfo.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/ScopInfo.h?rev=261789&r1=261788&r2=261789&view=diff
==============================================================================
--- polly/trunk/include/polly/ScopInfo.h (original)
+++ polly/trunk/include/polly/ScopInfo.h Wed Feb 24 16:08:11 2016
@@ -663,6 +663,7 @@ public:
   /// @param IncomingValue The value when reacing the PHI from the @p
   ///                      IncomingBlock.
   void addIncoming(BasicBlock *IncomingBlock, Value *IncomingValue) {
+    assert(!isRead());
     assert(isAnyPHIKind());
     Incoming.emplace_back(std::make_pair(IncomingBlock, IncomingValue));
   }




More information about the llvm-commits mailing list