diff options
author | Johannes Doerfert <jdoerfert@codeaurora.org> | 2014-06-19 16:19:32 +0000 |
---|---|---|
committer | Johannes Doerfert <jdoerfert@codeaurora.org> | 2014-06-19 16:19:32 +0000 |
commit | aeed39774d1bf23a8036fae3a4a9271a539b3295 (patch) | |
tree | 553d8e3f5accbe85c53b31662ef7bc978474a9b4 | |
parent | 6ad2444d5bfdeeb75b7cbeb672fc73fce342ec6b (diff) | |
download | bcm5719-llvm-aeed39774d1bf23a8036fae3a4a9271a539b3295.tar.gz bcm5719-llvm-aeed39774d1bf23a8036fae3a4a9271a539b3295.zip |
Fix build
See r210927 and r210847
llvm-svn: 211278
-rw-r--r-- | polly/lib/Exchange/ScopLib.cpp | 18 | ||||
-rw-r--r-- | 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 0d7c1d758aa..d773f86f6e4 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<const Value *, int>::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 73d991c7e28..a9d397c40d1 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 <memory> +#include <system_error> 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"; |