OSDN Git Service

[LoopUnrollAnalyzer] Don't treat gep-instructions with simplified offset as simplified.
authorMichael Zolotukhin <mzolotukhin@apple.com>
Fri, 13 May 2016 01:42:34 +0000 (01:42 +0000)
committerMichael Zolotukhin <mzolotukhin@apple.com>
Fri, 13 May 2016 01:42:34 +0000 (01:42 +0000)
commitcbd66afc98d0231f2e64c39a9b4a5b9386d886dd
treed74389d2a9e743174d6564d2981d6c326ff85324
parent49414096bd6b26a735b5b71643e8b60ace874c2f
[LoopUnrollAnalyzer] Don't treat gep-instructions with simplified offset as simplified.

Summary:
Currently we consider such instructions as simplified, which is incorrect,
because if their user isn't simplified, we can't actually simplify them too.
This biases our estimates of profitability: for instance the analyzer expects
much more gains from unrolling memcpy loops than there actually are.

Reviewers: hfinkel, chandlerc

Subscribers: mzolotukhin, llvm-commits

Differential Revision: http://reviews.llvm.org/D17365

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269387 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/LoopUnrollAnalyzer.cpp
test/Transforms/LoopUnroll/full-unroll-heuristics-cmp.ll
test/Transforms/LoopUnroll/full-unroll-heuristics-geps.ll [new file with mode: 0644]