Fix build

See r210927 and r210847

llvm-svn: 211278
This commit is contained in:
Johannes Doerfert 2014-06-19 16:19:32 +00:00
parent 6ad2444d5b
commit aeed39774d
2 changed files with 12 additions and 14 deletions

View File

@ -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);
}

View File

@ -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";