LLVM backend for 6502
Go to file
Chandler Carruth a6425604c2 [SDAG] Make the DAGCombine worklist not grow endlessly due to duplicate
insertions.

The old behavior could cause arbitrarily bad memory usage in the DAG
combiner if there was heavy traffic of adding nodes already on the
worklist to it. This commit switches the DAG combine worklist to work
the same way as the instcombine worklist where we null-out removed
entries and only add new entries to the worklist. My measurements of
codegen time shows slight improvement. The memory utilization is
unsurprisingly dominated by other factors (the IR and DAG itself
I suspect).

This change results in subtle, frustrating churn in the particular order
in which DAG combines are applied which causes a number of minor
regressions where we fail to match a pattern previously matched by
accident. AFAICT, all of these should be using AddToWorklist to directly
or should be written in a less brittle way. None of the changes seem
drastically bad, and a few of the changes seem distinctly better.

A major change required to make this work is to significantly harden the
way in which the DAG combiner handle nodes which become dead
(zero-uses). Previously, we relied on the ability to "priority-bump"
them on the combine worklist to achieve recursive deletion of these
nodes and ensure that the frontier of remaining live nodes all were
added to the worklist. Instead, I've introduced a routine to just
implement that precise logic with no indirection. It is a significantly
simpler operation than that of the combiner worklist proper. I suspect
this will also fix some other problems with the combiner.

I think the x86 changes are really minor and uninteresting, but the
avx512 change at least is hiding a "regression" (despite the test case
being just noise, not testing some performance invariant) that might be
looked into. Not sure if any of the others impact specific "important"
code paths, but they didn't look terribly interesting to me, or the
changes were really minor. The consensus in review is to fix any
regressions that show up after the fact here.

Thanks to the other reviewers for checking the output on other
architectures. There is a specific regression on ARM that Tim already
has a fix prepped to commit.

Differential Revision: http://reviews.llvm.org/D4616

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213727 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-23 07:08:53 +00:00
autoconf Drop the udis86 wrapper from llvm::sys 2014-07-17 20:05:29 +00:00
bindings [OCaml] Don't truncate constants over 32 bits in Llvm.const_int. 2014-07-22 13:55:20 +00:00
cmake Add LLVM_TOOLS_BINARY_DIR variable to LLVMConfig.cmake so clients 2014-07-22 17:48:51 +00:00
docs Revert "Treat warnings in Sphinx as errors. The reasons for doing this are..." 2014-07-22 18:09:17 +00:00
examples Added LLVM_ENABLE_RTTI and LLVM_ENABLE_EH options that allow RTTI and EH 2014-07-22 15:41:18 +00:00
include Trailing whitespace. 2014-07-23 00:42:52 +00:00
lib [SDAG] Make the DAGCombine worklist not grow endlessly due to duplicate 2014-07-23 07:08:53 +00:00
projects Remove projects/sample. 2014-03-12 22:40:22 +00:00
test [SDAG] Make the DAGCombine worklist not grow endlessly due to duplicate 2014-07-23 07:08:53 +00:00
tools [MCJIT] Refactor and add stub inspection to the RuntimeDyldChecker framework. 2014-07-22 22:47:39 +00:00
unittests unittests: Actually test reverse iterators in Path tests 2014-07-16 08:18:58 +00:00
utils Add openmp to the list of tagged things. 2014-07-22 03:17:30 +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 Add Polly to the ignored trees. 2014-06-25 13:13:36 +00:00
CMakeLists.txt [CMake] Introduce LLVM_SHLIB_OUTPUT_INTDIR. 2014-07-04 04:23:26 +00:00
CODE_OWNERS.TXT Make myself code owner of MCJIT. 2014-07-17 20:23:31 +00:00
configure Touch configure to force clang's config.h.in reconfiguration on the build servers 2014-06-06 10:36:38 +00:00
CREDITS.TXT Update Credits. 2014-05-29 19:59:58 +00:00
LICENSE.TXT Remove projects/sample. 2014-03-12 22:40:22 +00:00
llvm.spec.in
LLVMBuild.txt Remove the very substantial, largely unmaintained legacy PGO 2013-10-02 15:42:23 +00:00
Makefile [configure/make] Propagate names of build host tools when making BuildTools 2014-03-25 21:45:41 +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 Track clang r213171 2014-07-16 16:50:34 +00:00
Makefile.rules [Make] Fix dependencies for td.expanded 2014-06-20 19:00:41 +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.