[PATCH] D21039: Fix memory access local dominance function for live on entry
Sebastian Pop via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 6 13:11:56 PDT 2016
sebpop created this revision.
sebpop added reviewers: dberlin, george.burgess.iv.
sebpop added a subscriber: llvm-commits.
sebpop set the repository for this revision to rL LLVM.
A memory access defined on function entry cannot be locally dominated by another memory access.
The patch was split from D19338 which exposes the problem.
Repository:
rL LLVM
http://reviews.llvm.org/D21039
Files:
llvm/lib/Transforms/Utils/MemorySSA.cpp
Index: llvm/lib/Transforms/Utils/MemorySSA.cpp
===================================================================
--- llvm/lib/Transforms/Utils/MemorySSA.cpp
+++ llvm/lib/Transforms/Utils/MemorySSA.cpp
@@ -623,6 +623,12 @@
assert((Dominator->getBlock() == Dominatee->getBlock()) &&
"Asking for local domination when accesses are in different blocks!");
+
+ // When Dominatee is defined on function entry, it cannot be dominated by
+ // another memory access.
+ if (isLiveOnEntryDef(Dominatee))
+ return false;
+
// Get the access list for the block
const AccessListType *AccessList = getBlockAccesses(Dominator->getBlock());
AccessListType::const_reverse_iterator It(Dominator->getIterator());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21039.59770.patch
Type: text/x-patch
Size: 725 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160606/6a802c40/attachment.bin>
More information about the llvm-commits
mailing list