LLVM backend for 6502
Go to file
Andrew Trick c846d65f99 Fix PR18361: Invalidate LoopDispositions after LoopSimplify hoists things.
getSCEV for an ashr instruction creates an intermediate zext
expression when it truncates its operand.

The operand is initially inside the loop, so the narrow zext
expression has a non-loop-invariant loop disposition.

LoopSimplify then runs on an outer loop, hoists the ashr operand, and
properly invalidate the SCEVs that are mapped to value.

The SCEV expression for the ashr is now an AddRec with the hoisted
value as the now loop-invariant start value.

The LoopDisposition of this wide value was properly invalidated during
LoopSimplify.

However, if we later get the ashr SCEV again, we again try to create
the intermediate zext expression. We get the same SCEV that we did
earlier, and it is still cached because it was never mapped to a
Value. When we try to create a new AddRec we abort because we're using
the old non-loop-invariant LoopDisposition.

I don't have a solution for this other than to clear LoopDisposition
when LoopSimplify hoists things.

I think the long-term strategy should be to perform LoopSimplify on
all loops before computing SCEV and before running any loop opts on
individual loops. It's possible we may want to rerun LoopSimplify on
individual loops, but it should rarely do anything, so rarely require
invalidating SCEV.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198478 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-04 05:52:49 +00:00
autoconf Update the copyright credits -- Happy new year 2014! 2014-01-01 08:27:31 +00:00
bindings Makefile.ocaml: Tweak to use --system-libs. 2013-12-20 00:36:59 +00:00
cmake [CMake] Add missing set_output_directory after Takumi's change in r198205. 2014-01-02 19:47:45 +00:00
docs Fix typo. 2014-01-03 19:42:04 +00:00
examples [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt. 2013-12-10 11:13:32 +00:00
include Fix PR18361: Invalidate LoopDispositions after LoopSimplify hoists things. 2014-01-04 05:52:49 +00:00
lib Fix PR18361: Invalidate LoopDispositions after LoopSimplify hoists things. 2014-01-04 05:52:49 +00:00
projects Revert "Revert "Windows: Add support for unicode command lines"" 2013-10-07 01:00:07 +00:00
test Fix PR18361: Invalidate LoopDispositions after LoopSimplify hoists things. 2014-01-04 05:52:49 +00:00
tools Port r198087 and r198089 (strip dead code by default) from make to cmake. 2013-12-30 03:36:05 +00:00
unittests Fix break introduced in r198377 due to using a local type as a template parameter. 2014-01-03 00:00:41 +00:00
utils Remove JMP64pcrel32 (jmpq ). There are no tests for it. I'm pretty sure it won't be emitted correctly since it was set to NoImm. And I can't prove that gas accepts 'jmpq' with an immediate either. Remove the special case for it from the disassembler table generator. 2014-01-04 05:09:27 +00:00
.arcconfig Add .arcconfig to the repository. Useful if someone wants to use phabricator's command line tool. 2012-12-01 12:07:58 +00:00
.clang-format Add a clang-format file so that the tool can automatically detect the 2013-09-02 07:19:04 +00:00
.gitignore Add extra vim swap file pattern 2012-10-09 23:48:34 +00:00
CMakeLists.txt [CMake][VS][XCode] Restruct the output directory layout more comfortable, ${BINARY_DIR}/${BUILD_MODE}/(bin|lib) 2013-12-30 06:48:30 +00:00
CODE_OWNERS.TXT Update email address. 2013-12-04 09:42:49 +00:00
configure Update the copyright credits -- Happy new year 2014! 2014-01-01 08:27:31 +00:00
CREDITS.TXT Fix documentation typos 2013-12-20 00:33:39 +00:00
LICENSE.TXT Update the copyright credits -- Happy new year 2014! 2014-01-01 08:27:31 +00:00
llvm.spec.in
LLVMBuild.txt Remove the very substantial, largely unmaintained legacy PGO 2013-10-02 15:42:23 +00:00
Makefile llvm-config: Fixup r197380, tweak for cross compilation. SYSTEM_LIBS should be --host's in BuildTools/llvm-config. 2013-12-16 13:09:06 +00:00
Makefile.common Makefile.common: Update a description, s/Source/SOURCES/ , according to MakefileGuide.html#control-variables . 2012-12-07 01:43:23 +00:00
Makefile.config.in Add an autoconf option for turning on -gsplit-dwarf by default 2013-06-25 01:12:25 +00:00
Makefile.rules [Mips]Work around MIPS linker issues exposed by commit r198087 until bug 18360 is resolved 2014-01-03 22:18:43 +00:00
README.txt Revert "Test commit to check e-mail address. Please discard this." 2013-10-04 10:59:13 +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.