[PATCH] D46201: [DA] Use SCEV to conclude DVEntry::EQ in some cases.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 27 11:14:56 PDT 2018
fhahn created this revision.
fhahn added reviewers: hfinkel, sebpop, grosser.
Herald added subscribers: javed.absar, mehdi_amini.
This is a very naive approach to conclude that both accesses to Arr1 in the
loop below access the same memory location.
void foo(unsigned **Arr1) {
for (int i = 0; i < 1024; ++i)
for(int j = 0; j < 1024; ++j)
Arr1[j][i] = Arr1[j][i] 10;
}
By using SCEV, we can conclude that both accesses to Arr1 access the
same location in each loop iteration. I am probably missing something,
but this seems to work for loop variant accesses in the same loop.
It would be great if you could have a look and let me know what I am
missing :)
For SPEC2006 and the test-suite with LTO, this triggers in around 1100
cases. It also helps LoopInterchange to interchange a few more loops.
https://reviews.llvm.org/D46201
Files:
lib/Analysis/DependenceAnalysis.cpp
test/Analysis/DependenceAnalysis/AA.ll
test/Analysis/DependenceAnalysis/Banerjee.ll
test/Analysis/DependenceAnalysis/GCD.ll
test/Analysis/DependenceAnalysis/Invariant.ll
test/Analysis/DependenceAnalysis/NonCanonicalizedSubscript.ll
test/Analysis/DependenceAnalysis/PR21585.ll
test/Analysis/DependenceAnalysis/Preliminary.ll
test/Analysis/DependenceAnalysis/Propagating.ll
test/Analysis/DependenceAnalysis/Separability.ll
test/Analysis/DependenceAnalysis/Symbolic.ll
test/Analysis/DependenceAnalysis/SymbolicRDIV.ll
test/Analysis/DependenceAnalysis/WeakZeroSrcSIV.ll
test/Transforms/LoopInterchange/currentLimitation.ll
test/Transforms/LoopInterchange/loop-interchange-optimization-remarks.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46201.144371.patch
Type: text/x-patch
Size: 21532 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180427/3f42ccfa/attachment.bin>
More information about the llvm-commits
mailing list