summaryrefslogtreecommitdiffstats
path: root/polly/lib/CodeGen/BlockGenerators.cpp
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2017-02-09 23:54:23 +0000
committerTobias Grosser <tobias@grosser.es>2017-02-09 23:54:23 +0000
commit583be06fb250ef8a2e196fd4ca81c31eeab7c35b (patch)
tree9d3ab270ca8f9ce4dd97096be07a370dee35f2cd /polly/lib/CodeGen/BlockGenerators.cpp
parentfc0d442cf1436ff08786ef64eed4af061e37e6f7 (diff)
downloadbcm5719-llvm-583be06fb250ef8a2e196fd4ca81c31eeab7c35b.tar.gz
bcm5719-llvm-583be06fb250ef8a2e196fd4ca81c31eeab7c35b.zip
[BlockGenerator] Use MemoryAccess::getAccessValue to get load instruction
When generating code in the BlockGenerator we copy all (interesting) instructions and keep track of the new values in a basic block map. To obtain the original llvm::Value that belongs to a load memory access, we use getAccessValue() instead of getOriginalBaseAddr(). The former always references the instruction we use to load values from. The latter, on the other hand, is obtaine from the corresponding ScopArrayInfo and would not be unique in case ScopArrayInfo objects at some point allow memory accesses with different base addresses. This change is an update on r294566, 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: 294669
Diffstat (limited to 'polly/lib/CodeGen/BlockGenerators.cpp')
-rw-r--r--polly/lib/CodeGen/BlockGenerators.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/polly/lib/CodeGen/BlockGenerators.cpp b/polly/lib/CodeGen/BlockGenerators.cpp
index c3263396c98..194fe24e64c 100644
--- a/polly/lib/CodeGen/BlockGenerators.cpp
+++ b/polly/lib/CodeGen/BlockGenerators.cpp
@@ -465,7 +465,7 @@ void BlockGenerator::generateScalarLoads(
DT.dominates(cast<Instruction>(Address)->getParent(),
Builder.GetInsertBlock())) &&
"Domination violation");
- BBMap[MA->getOriginalBaseAddr()] =
+ BBMap[MA->getAccessValue()] =
Builder.CreateLoad(Address, Address->getName() + ".reload");
}
}
@@ -1043,7 +1043,7 @@ void VectorBlockGenerator::generateScalarVectorLoads(
Value *VectorVal = Builder.CreateShuffleVector(
Val, Val, SplatVector, Address->getName() + "_p_splat");
- VectorBlockMap[MA->getOriginalBaseAddr()] = VectorVal;
+ VectorBlockMap[MA->getAccessValue()] = VectorVal;
}
}
OpenPOWER on IntegriCloud