Update for ScopStmt iterator name change in LLVM r210927

Contributed-by: Yabin Hu <yabin.hwu@gmail.com>
llvm-svn: 211280
This commit is contained in:
Tobias Grosser 2014-06-19 16:45:04 +00:00
parent d306c3cec2
commit 868832b3fd
1 changed files with 4 additions and 7 deletions

View File

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