[ScopInfo] Use getAccessValue to obtain the accessed value

This replaces the use of getOriginalAddrPtr, a value that is stored in
ScopArrayInfo and might at some point not be unique any more. However, the
access value is defined to be unique.

This change is an update on r294576, which only clarified that we need the
original memory access, but where we still remained dependent to have one base
pointer per scop.

This change removes unnecessary uses of MemoryAddress::getOriginalBaseAddr() in
preparation for https://reviews.llvm.org/D28518.

llvm-svn: 294733
This commit is contained in:
Tobias Grosser 2017-02-10 10:09:44 +00:00
parent 2279ee3144
commit 5db171a9da
1 changed files with 1 additions and 1 deletions

View File

@ -1188,7 +1188,7 @@ void ScopStmt::addAccess(MemoryAccess *Access) {
ValueReads[AccessVal] = Access;
} else if (Access->isAnyPHIKind() && Access->isWrite()) {
PHINode *PHI = cast<PHINode>(Access->getOriginalBaseAddr());
PHINode *PHI = cast<PHINode>(Access->getAccessValue());
assert(!PHIWrites.lookup(PHI));
PHIWrites[PHI] = Access;