LLVM backend for 6502
Go to file
Richard Sandiford 9608ed1311 Fix overly pessimistic shortcut in post-RA MachineLICM
Post-RA LICM keeps three sets of registers: PhysRegDefs, PhysRegClobbers
and TermRegs.  When it sees a definition of R it adds all aliases of R
to the corresponding set, so that when it needs to test for membership
it only needs to test a single register, rather than worrying about
aliases there too.  E.g. the final candidate loop just has:

    unsigned Def = Candidates[i].Def;
    if (!PhysRegClobbers.test(Def) && ...) {

to test whether register Def is multiply defined.

However, there was also a shortcut in ProcessMI to make sure we didn't
add candidates if we already knew that they would fail the final test.
This shortcut was more pessimistic than the final one because it
checked whether _any alias_ of the defined register was multiply defined.
This is too conservative for targets that define register pairs.
E.g. on z, R0 and R1 are sometimes used as a pair, so there is a
128-bit register that aliases both R0 and R1.  If a loop used
R0 and R1 independently, and the definition of R0 came first,
we would be able to hoist the R0 assignment (because that used
the final test quoted above) but not the R1 assignment (because
that meant we had two definitions of the paired R0/R1 register
and would fail the shortcut in ProcessMI).

This patch just uses the same check for the ProcessMI shortcut as
we use in the final candidate loop.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188774 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-20 09:11:13 +00:00
autoconf Recognize NetBSD's terminfo implementation. 2013-08-17 11:06:00 +00:00
bindings
cmake Suppress an annoying CMake warning in ChooseMSVCCRT.cmake 2013-08-19 20:25:26 +00:00
docs Add a llvm.copysign intrinsic 2013-08-19 23:35:46 +00:00
examples
include [mips][msa] Added and.v, bmnz.v, bmz.v, bsel.v, nor.v, or.v, xor.v 2013-08-20 08:38:21 +00:00
lib Fix overly pessimistic shortcut in post-RA MachineLICM 2013-08-20 09:11:13 +00:00
projects Port the detection of zlib from the main autoconf system to the sample 2013-08-18 01:55:15 +00:00
runtime
test Fix overly pessimistic shortcut in post-RA MachineLICM 2013-08-20 09:11:13 +00:00
tools
unittests Introduce SpecialCaseList::isIn overload for GlobalAliases. 2013-08-19 19:00:35 +00:00
utils [lit] Rewrite TODO list, and elaborate on some things. 2013-08-16 23:30:23 +00:00
.arcconfig
.gitignore
CMakeLists.txt CMake: polish the Windows packaging rules 2013-08-15 23:44:31 +00:00
CODE_OWNERS.TXT Add more owners to CODE_OWNERS.TXT (Kostya Serebryany: AddressSanitizer and ThreadSanitizer; Evgeniy Stepanov: MemorySanitizer) 2013-06-27 08:47:12 +00:00
configure Recognize NetBSD's terminfo implementation. 2013-08-17 11:06:00 +00:00
CREDITS.TXT
LICENSE.TXT Be more specific and capitalize filenames. 2013-05-21 21:22:34 +00:00
llvm.spec.in
LLVMBuild.txt LLVMBuild: Introduce a common section which currently has a list of the 2011-12-12 22:45:54 +00:00
Makefile
Makefile.common
Makefile.config.in
Makefile.rules Makefile.rules: Avoid -fomit-frame-pointer also on cygwin due to PR14646. 2013-08-18 03:38:40 +00:00
README.txt test 2013-04-17 05:34:03 +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.