[polly] r211278 - Fix build
Johannes Doerfert
jdoerfert at codeaurora.org
Thu Jun 19 09:19:32 PDT 2014
Author: jdoerfert
Date: Thu Jun 19 11:19:32 2014
New Revision: 211278
URL: http://llvm.org/viewvc/llvm-project?rev=211278&view=rev
Log:
Fix build
See r210927 and r210847
Modified:
polly/trunk/lib/Exchange/ScopLib.cpp
polly/trunk/lib/Transform/Pocc.cpp
Modified: polly/trunk/lib/Exchange/ScopLib.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Exchange/ScopLib.cpp?rev=211278&r1=211277&r2=211278&view=diff
==============================================================================
--- polly/trunk/lib/Exchange/ScopLib.cpp (original)
+++ polly/trunk/lib/Exchange/ScopLib.cpp Thu Jun 19 11:19:32 2014
@@ -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::createAccessMa
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);
}
Modified: polly/trunk/lib/Transform/Pocc.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Transform/Pocc.cpp?rev=211278&r1=211277&r2=211278&view=diff
==============================================================================
--- polly/trunk/lib/Transform/Pocc.cpp (original)
+++ polly/trunk/lib/Transform/Pocc.cpp Thu Jun 19 11:19:32 2014
@@ -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) co
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";
More information about the llvm-commits
mailing list