summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp
diff options
context:
space:
mode:
authorMax Kazantsev <max.kazantsev@azul.com>2018-04-03 05:57:19 +0000
committerMax Kazantsev <max.kazantsev@azul.com>2018-04-03 05:57:19 +0000
commitc01e47b43f46a1fe2ad95245fad71b21341abe64 (patch)
tree791e45a2374282bf4522d12200eca9ca9fb57a5c /llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp
parent597bfd84483fdb37d019dd7619dc984e841e6456 (diff)
downloadbcm5719-llvm-c01e47b43f46a1fe2ad95245fad71b21341abe64.tar.gz
bcm5719-llvm-c01e47b43f46a1fe2ad95245fad71b21341abe64.zip
[SCEV] Make computeExitLimit more simple and more powerful
Current implementation of `computeExitLimit` has a big piece of code the only purpose of which is to prove that after the execution of this block the latch will be executed. What it currently checks is actually a subset of situations where the exiting block dominates latch. This patch replaces all these checks for simple particular cases with domination check over loop's latch which is the only necessary condition of taking the exiting block into consideration. This change allows to calculate exact loop taken count for simple loops like for (int i = 0; i < 100; i++) { if (cond) {...} else {...} if (i > 50) break; . . . } Differential Revision: https://reviews.llvm.org/D44677 Reviewed By: efriedma llvm-svn: 329047
Diffstat (limited to 'llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud