From 868832b3fd05e123c5db0f18c24151be276b0ec0 Mon Sep 17 00:00:00 2001 From: Tobias Grosser Date: Thu, 19 Jun 2014 16:45:04 +0000 Subject: Update for ScopStmt iterator name change in LLVM r210927 Contributed-by: Yabin Hu llvm-svn: 211280 --- polly/lib/CodeGen/CodeGeneration.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'polly/lib/CodeGen/CodeGeneration.cpp') diff --git a/polly/lib/CodeGen/CodeGeneration.cpp b/polly/lib/CodeGen/CodeGeneration.cpp index 37d9801484d..dd1aad9f2a4 100644 --- a/polly/lib/CodeGen/CodeGeneration.cpp +++ b/polly/lib/CodeGen/CodeGeneration.cpp @@ -671,18 +671,15 @@ SetVector ClastStmtCodeGen::getGPUValues(unsigned &OutputBytes) { OutputBytes = 0; // Record the memory reference base addresses. - for (Scop::iterator SI = S->begin(), SE = S->end(); SI != SE; ++SI) { - ScopStmt *Stmt = *SI; - for (SmallVector::iterator I = Stmt->memacc_begin(), - E = Stmt->memacc_end(); - I != E; ++I) { - Value *BaseAddr = const_cast((*I)->getBaseAddr()); + for (ScopStmt *Stmt : *S) { + for (MemoryAccess *MA : *Stmt) { + Value *BaseAddr = const_cast(MA->getBaseAddr()); Values.insert((BaseAddr)); // FIXME: we assume that there is one and only one array to be written // in a SCoP. int NumWrites = 0; - if ((*I)->isWrite()) { + if (MA->isWrite()) { ++NumWrites; assert(NumWrites <= 1 && "We support at most one array to be written in a SCoP."); -- cgit v1.2.3