LLVM backend for 6502
Go to file
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
autoconf ARM64: initial backend import 2014-03-29 10:18:08 +00:00
bindings [OCaml] Add an ocamlfind package llvm.all_backends. 2014-05-01 21:00:52 +00:00
cmake Use llvm-lit if LLVM source tree is unavailable. 2014-05-21 16:44:03 +00:00
docs Clean up language and grammar. 2014-05-20 17:11:11 +00:00
examples Try to fix the msvc build. 2014-04-29 23:37:02 +00:00
include Make early if conversion dependent upon the subtarget and add 2014-05-21 23:40:26 +00:00
lib Fix a bug in SCEV's backedge taken count computation from my prior fix in Jan. 2014-05-22 00:37:03 +00:00
projects Remove projects/sample. 2014-03-12 22:40:22 +00:00
test Fix a bug in SCEV's backedge taken count computation from my prior fix in Jan. 2014-05-22 00:37:03 +00:00
tools Move MCOptions that aren't shared between programs into their specific 2014-05-21 21:05:09 +00:00
unittests Use std::unique_ptr instead of OwningPtr in the MemoryBuffer unittests. 2014-05-18 21:01:46 +00:00
utils [asm matcher] Fix incorrect assertion when there are exactly 32 SubtargetFeatures 2014-05-21 10:11:24 +00:00
.arcconfig Updated phabricator server. 2014-04-07 03:57:04 +00:00
.clang-format Test commit. 2014-03-02 13:08:46 +00:00
.gitignore Remove projects/sample. 2014-03-12 22:40:22 +00:00
CMakeLists.txt [CMake] Add build rules for llvm-PerfectShuffle utility 2014-05-07 16:54:00 +00:00
CODE_OWNERS.TXT ARM Linux support 2014-04-02 23:03:28 +00:00
configure ARM64: initial backend import 2014-03-29 10:18:08 +00:00
CREDITS.TXT Test commit. 2014-04-10 22:25:51 +00:00
LICENSE.TXT Remove projects/sample. 2014-03-12 22:40:22 +00:00
llvm.spec.in
LLVMBuild.txt
Makefile [configure/make] Propagate names of build host tools when making BuildTools 2014-03-25 21:45:41 +00:00
Makefile.common
Makefile.config.in Add a --enable-clang-plugin-support option to configure. 2014-03-10 16:58:35 +00:00
Makefile.rules autoconf: Fix libLLVM-Major-Minor-Patch.so symlink 2014-05-15 19:50:25 +00:00
README.txt Trivial test commit. 2014-04-26 19:05:45 +00:00

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for the Low Level
Virtual Machine, a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you're writing a package for LLVM, see docs/Packaging.rst for our
suggestions.