[PATCH] D28126: [MemDep] Handle gep with zeros for invariant.group
Piotr Padlewski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 27 11:19:18 PST 2016
Prazek created this revision.
Prazek added reviewers: dberlin, nlewycky, chandlerc.
Prazek added a subscriber: llvm-commits.
gep 0, 0 is equivalent to bitcast. LLVM canonicalizes it
to getelementptr because it make SROA can then handle it.
Simple case like
void g(A &a) {
z(a);
if (glob)
a.foo();
}
void testG() {
A a;
g(a);
}
was not devirtualized with -fstrict-vtable-pointers because luck of
handling for gep 0 in Memory Dependence Analysis
https://reviews.llvm.org/D28126
Files:
lib/Analysis/MemoryDependenceAnalysis.cpp
test/Transforms/GVN/invariant.group.ll
test/Transforms/NewGVN/invariant.group.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28126.82552.patch
Type: text/x-patch
Size: 5669 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161227/b6c53570/attachment.bin>
More information about the llvm-commits
mailing list