Skip to content

Commit

Permalink
Do not store scalar accesses in InstructionToAccess
Browse files Browse the repository at this point in the history
At code generation, scalar reads are generated before the other
statement's instructions, respectively scalar writes after them, in
contrast to array accesses which are "executed" with the instructions
they are linked to. Therefore it makes sense to not map the scalar
accesses to a place of execution. Follow-up patches will also remove
some of the directs links from a scalar access to a single instruction,
such that only having array accesses in InstructionToAccess ensures
consistency.

Differential Revision: http://reviews.llvm.org/D13676

llvm-svn: 256298
  • Loading branch information
Meinersbur committed Dec 22, 2015
1 parent cc8f47e commit 58fa3bb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions polly/lib/Analysis/ScopInfo.cpp
Expand Up @@ -904,9 +904,12 @@ void ScopStmt::buildAccessRelations() {
void ScopStmt::addAccess(MemoryAccess *Access) {
Instruction *AccessInst = Access->getAccessInstruction();

MemoryAccessList &MAL = InstructionToAccess[AccessInst];
MAL.emplace_front(Access);
MemAccs.push_back(MAL.front());
if (Access->isArrayKind()) {
MemoryAccessList &MAL = InstructionToAccess[AccessInst];
MAL.emplace_front(Access);
}

MemAccs.push_back(Access);
}

void ScopStmt::realignParams() {
Expand Down

0 comments on commit 58fa3bb

Please sign in to comment.