diff options
author | Tobias Grosser <tobias@grosser.es> | 2014-06-19 16:45:04 +0000 |
---|---|---|
committer | Tobias Grosser <tobias@grosser.es> | 2014-06-19 16:45:04 +0000 |
commit | 868832b3fd05e123c5db0f18c24151be276b0ec0 (patch) | |
tree | b412a8bd740802a0efbaff3fbbc41dc46c7f7d19 /polly/lib/CodeGen/CodeGeneration.cpp | |
parent | d306c3cec2605ae9100248e6ac097d0325e8aae8 (diff) | |
download | bcm5719-llvm-868832b3fd05e123c5db0f18c24151be276b0ec0.tar.gz bcm5719-llvm-868832b3fd05e123c5db0f18c24151be276b0ec0.zip |
Update for ScopStmt iterator name change in LLVM r210927
Contributed-by: Yabin Hu <yabin.hwu@gmail.com>
llvm-svn: 211280
Diffstat (limited to 'polly/lib/CodeGen/CodeGeneration.cpp')
-rw-r--r-- | polly/lib/CodeGen/CodeGeneration.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
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<Value *> 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<MemoryAccess *, 8>::iterator I = Stmt->memacc_begin(), - E = Stmt->memacc_end(); - I != E; ++I) { - Value *BaseAddr = const_cast<Value *>((*I)->getBaseAddr()); + for (ScopStmt *Stmt : *S) { + for (MemoryAccess *MA : *Stmt) { + Value *BaseAddr = const_cast<Value *>(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."); |