llvm-6502/lib
Andrew Trick facca6e3f3 Fix a bug in SCEV's backedge taken count computation from my prior fix in Jan.
This has to do with the trip count computation for loops with multiple
exits, which is quite subtle. Most passes just ask for a single trip
count number, so we must be conservative assuming any exit could be
taken.  Normally, we rely on the "exact" trip count, which was
correctly given as "unknown". However, SCEV also gives a "max"
back-edge taken count. The loops max BE taken count is conservatively
a maximum over the max of each exit's non-exiting iterations
count. Note that some exit tests can be skipped so the max loop
back-edge taken count can actually exceed the max non-exiting
iterations for some exits. However, when we know the loop *latch*
cannot be skipped, we can directly use its max taken count
disregarding other exits. I previously took the minimum here without
checking whether the other exit could be skipped. The correct, and
simpler thing to do here is just to directly use the loop latch's max
non-exiting iterations as the loops max back-edge count.

In the problematic test case, the first loop exit had a max of zero
non-exiting iterations, but could be skipped. The loop latch was known
not to be skipped but had max of one non-exiting iteration. We
incorrectly claimed the loop back-edge could be taken zero times, when
it is actually taken one time.

Fixes Loop %for.body.i: <multiple exits> Unpredictable backedge-taken count.
Loop %for.body.i: max backedge-taken count is 1.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209358 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-22 00:37:03 +00:00
..
Analysis Fix a bug in SCEV's backedge taken count computation from my prior fix in Jan. 2014-05-22 00:37:03 +00:00
AsmParser [modules] Add module maps for LLVM. These are not quite ready for prime-time 2014-05-21 02:46:14 +00:00
Bitcode [modules] Add module maps for LLVM. These are not quite ready for prime-time 2014-05-21 02:46:14 +00:00
CodeGen Similar to bitcast, treat addrspacecast as a foldable operand. 2014-05-22 00:02:52 +00:00
DebugInfo [modules] Add module maps for LLVM. These are not quite ready for prime-time 2014-05-21 02:46:14 +00:00
ExecutionEngine [RuntimeDyld] Fix x86-64 MachO GOT relocation handling. 2014-05-19 19:21:25 +00:00
IR [modules] Add module maps for LLVM. These are not quite ready for prime-time 2014-05-21 02:46:14 +00:00
IRReader
LineEditor
Linker
LTO
MC Revert "DebugInfo: Don't put fission type units in comdat sections." 2014-05-21 23:27:41 +00:00
Object Update MachOObjectFile::getSymbolAddress so it returns UnknownAddressOrSize 2014-05-20 23:04:47 +00:00
Option
ProfileData
Support Clean up language and grammar. 2014-05-20 17:11:11 +00:00
TableGen [modules] Add module maps for LLVM. These are not quite ready for prime-time 2014-05-21 02:46:14 +00:00
Target Fix compilation issues. 2014-05-21 23:51:57 +00:00
Transforms [LSR] Canonicalize reg1 + ... + regN into reg1 + ... + 1*regN. 2014-05-20 19:25:04 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile