LLVM backend for 6502
Go to file
Will Dietz e4b44c1617 MachineSink: Fix and tweak critical-edge breaking heuristic.
Per original comment, the intention of this loop
is to go ahead and break the critical edge
(in order to sink this instruction) if there's
reason to believe doing so might "unblock" the
sinking of additional instructions that define
registers used by this one.  The idea is that if
we have a few instructions to sink "together"
breaking the edge might be worthwhile.

This commit makes a few small changes
to help better realize this goal:

First, modify the loop to ignore registers
defined by this instruction.  We don't
sink definitions of physical registers,
and sinking an SSA definition isn't
going to unblock an upstream instruction.

Second, ignore uses of physical registers.
Instructions that define physical registers are
rejected for sinking, and so moving this one
won't enable moving any defining instructions.
As an added bonus, while virtual register
use-def chains are generally small due
to SSA goodness, iteration over the uses
and definitions (used by hasOneNonDBGUse)
for physical registers like EFLAGS
can be rather expensive in practice.
(This is the original reason for looking at this)

Finally, to keep things simple continue
to only consider this trick for registers that
have a single use (via hasOneNonDBGUse),
but to avoid spuriously breaking critical edges
only do so if the definition resides
in the same MBB and therefore this one directly
blocks it from being sunk as well.
If sinking them together is meant to be,
let the iterative nature of this pass
sink the definition into this block first.

Update tests to accomodate this change,
add new testcase where sinking avoids pipeline stalls.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192608 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-14 16:57:17 +00:00
autoconf Update so that it uses the `-V' command line option and supports Python 3.x. 2013-10-12 08:42:59 +00:00
bindings
cmake cmake: don't set LLVM_COMPILER_IS_GCC_COMPATIBLE when using clang-cl 2013-10-07 22:03:23 +00:00
docs Add warning about CHECK-DAG with variable definition 2013-10-11 18:50:22 +00:00
examples Add missing #include's to cctype when using isdigit/alpha/etc. 2013-10-12 00:55:57 +00:00
include Remove the now unused strong phi elimination pass. 2013-10-14 16:39:04 +00:00
lib MachineSink: Fix and tweak critical-edge breaking heuristic. 2013-10-14 16:57:17 +00:00
projects Revert "Revert "Windows: Add support for unicode command lines"" 2013-10-07 01:00:07 +00:00
test MachineSink: Fix and tweak critical-edge breaking heuristic. 2013-10-14 16:57:17 +00:00
tools yaml2coff/elf: Touchup for compatibility. 2013-10-12 21:29:16 +00:00
unittests Silencing an MSVC warning. 2013-10-05 19:41:41 +00:00
utils Remove utils/profile.pl. 2013-10-14 16:48:32 +00:00
.arcconfig
.clang-format
.gitignore
CMakeLists.txt Restore LLVM_BUILD_RUNTIME option that was deleted in r191835, but is still used to control building of compiler-rt and libcxx 2013-10-04 10:41:38 +00:00
CODE_OWNERS.TXT
configure Update so that it uses the `-V' command line option and supports Python 3.x. 2013-10-12 08:42:59 +00:00
CREDITS.TXT Update. 2013-09-27 20:40:40 +00:00
LICENSE.TXT
llvm.spec.in
LLVMBuild.txt Remove the very substantial, largely unmaintained legacy PGO 2013-10-02 15:42:23 +00:00
Makefile Remove the very substantial, largely unmaintained legacy PGO 2013-10-02 15:42:23 +00:00
Makefile.common
Makefile.config.in
Makefile.rules
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.