From aeed39774d1bf23a8036fae3a4a9271a539b3295 Mon Sep 17 00:00:00 2001 From: Johannes Doerfert Date: Thu, 19 Jun 2014 16:19:32 +0000 Subject: [PATCH] Fix build See r210927 and r210847 llvm-svn: 211278 --- polly/lib/Exchange/ScopLib.cpp | 18 +++++++----------- polly/lib/Transform/Pocc.cpp | 8 +++++--- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/polly/lib/Exchange/ScopLib.cpp b/polly/lib/Exchange/ScopLib.cpp index 0d7c1d7..d773f86 100644 --- a/polly/lib/Exchange/ScopLib.cpp +++ b/polly/lib/Exchange/ScopLib.cpp @@ -56,12 +56,9 @@ void ScopLib::initializeParameters() { void ScopLib::initializeArrays() { int nb_arrays = 0; - for (Scop::iterator SI = PollyScop->begin(), SE = PollyScop->end(); SI != SE; - ++SI) - for (ScopStmt::memacc_iterator MI = (*SI)->memacc_begin(), - ME = (*SI)->memacc_end(); - MI != ME; ++MI) { - const Value *BaseAddr = (*MI)->getBaseAddr(); + for (ScopStmt *Stmt : *PollyScop) + for (MemoryAccess *MA : *Stmt) { + const Value *BaseAddr = MA->getBaseAddr(); if (ArrayMap.find(BaseAddr) == ArrayMap.end()) { ArrayMap.insert(std::make_pair(BaseAddr, nb_arrays)); ++nb_arrays; @@ -447,17 +444,16 @@ scoplib_matrix_p ScopLib::createAccessMatrix(ScopStmt *S, bool isRead) { unsigned NbColumns = S->getNumIterators() + S->getNumParams() + 2; scoplib_matrix_p m = scoplib_matrix_malloc(0, NbColumns); - for (ScopStmt::memacc_iterator MI = S->memacc_begin(), ME = S->memacc_end(); - MI != ME; ++MI) - if ((*MI)->isRead() == isRead) { + for (MemoryAccess *MA : *S) + if (MA->isRead() == isRead) { // Extract the access function. - isl_map *AccessRelation = (*MI)->getAccessRelation(); + isl_map *AccessRelation = MA->getAccessRelation(); isl_map_foreach_basic_map(AccessRelation, &accessToMatrix_basic_map, m); isl_map_free(AccessRelation); // Set the index of the memory access base element. std::map::iterator BA = - ArrayMap.find((*MI)->getBaseAddr()); + ArrayMap.find(MA->getBaseAddr()); SCOPVAL_set_si(m->p[m->NbRows - 1][0], (*BA).second + 1); } diff --git a/polly/lib/Transform/Pocc.cpp b/polly/lib/Transform/Pocc.cpp index 73d991c..a9d397c 100644 --- a/polly/lib/Transform/Pocc.cpp +++ b/polly/lib/Transform/Pocc.cpp @@ -29,7 +29,6 @@ #include "llvm/Support/Path.h" #include "llvm/Support/Program.h" #include "llvm/Support/MemoryBuffer.h" -#include "llvm/Support/system_error.h" #include "llvm/ADT/SmallString.h" #include "isl/space.h" @@ -37,6 +36,7 @@ #include "isl/constraint.h" #include +#include using namespace llvm; using namespace polly; @@ -253,14 +253,16 @@ void Pocc::printScop(raw_ostream &OS) const { OS << "\n"; - if (error_code ec = MemoryBuffer::getFile(PlutoStdout.str(), stdoutBuffer)) + if (std::error_code ec = + MemoryBuffer::getFile(PlutoStdout.str(), stdoutBuffer)) OS << "Could not open pocc stdout file: " + ec.message() << "\n"; else { OS << "pocc stdout: " << stdoutBuffer->getBufferIdentifier() << "\n"; OS << stdoutBuffer->getBuffer() << "\n"; } - if (error_code ec = MemoryBuffer::getFile(PlutoStderr.str(), stderrBuffer)) + if (std::error_code ec = + MemoryBuffer::getFile(PlutoStderr.str(), stderrBuffer)) OS << "Could not open pocc stderr file: " + ec.message() << "\n"; else { OS << "pocc stderr: " << PlutoStderr << "\n"; -- 2.7.4