LLVM backend for 6502
Go to file
Chris Lattner 9506c930aa When factoring multiply expressions across adds, factor both
positive and negative forms of constants together.  This 
allows us to compile:

int foo(int x, int y) {
    return (x-y) + (x-y) + (x-y);
}

into:

_foo:                                                       ## @foo
	subl	%esi, %edi
	leal	(%rdi,%rdi,2), %eax
	ret

instead of (where the 3 and -3 were not factored):

_foo:
        imull   $-3, 8(%esp), %ecx
        imull   $3, 4(%esp), %eax
        addl    %ecx, %eax
        ret

this started out as:
    movl    12(%ebp), %ecx
    imull   $3, 8(%ebp), %eax
    subl    %ecx, %eax
    subl    %ecx, %eax
    subl    %ecx, %eax
    ret

This comes from PR5359.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92381 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-01 01:13:15 +00:00
autoconf Fix typos. Thanks to John Tytgat for noticing it! 2009-12-07 00:27:35 +00:00
bindings Fix another parallel make race condition. 2009-12-18 20:12:14 +00:00
cmake CMake: Update lib deps. 2009-12-19 21:27:30 +00:00
docs Regenerate. 2009-12-23 12:49:51 +00:00
examples fix PR5649 by making fib use the JIT instead of the interpreter, patch by Perry Lorier! 2009-12-01 01:56:27 +00:00
include Remove old header. 2010-01-01 00:04:49 +00:00
lib When factoring multiply expressions across adds, factor both 2010-01-01 01:13:15 +00:00
projects Move DataTypes.h to include/llvm/System, update all users. This breaks the last 2009-10-26 01:35:46 +00:00
runtime OptimalEdgeProfiling: Creation of profiles. 2009-09-01 19:03:44 +00:00
test When factoring multiply expressions across adds, factor both 2010-01-01 01:13:15 +00:00
tools Mark some debug variables as 'unused' to quiet compiler and analyzer. 2009-12-28 01:34:57 +00:00
unittests Silence compiler warning. 2009-12-31 16:27:13 +00:00
utils lit: Add setuptools support. 2009-12-26 22:58:39 +00:00
website
Xcode Remove the IA-64 backend. 2009-07-24 00:30:09 +00:00
build-for-llvm-top.sh Patch to build llvm with srcdir != objdir from 2009-01-23 08:42:38 +00:00
CMakeLists.txt Don't default warnings to ON on MSVC, the spew is enough to triple the build time. :/ 2009-12-01 19:11:36 +00:00
configure Fix typos. Thanks to John Tytgat for noticing it! 2009-12-07 00:27:35 +00:00
CREDITS.TXT Add myself to the blame list. 2009-08-20 15:20:15 +00:00
LICENSE.TXT Add regular expression matching support, based on OpenBSD regexec()/regcomp() 2009-08-30 08:24:09 +00:00
llvm.spec.in
Makefile Update install-clang target for clang-cc removal. 2009-12-12 21:17:54 +00:00
Makefile.common Removed trailing whitespace from Makefiles. 2009-01-09 16:44:42 +00:00
Makefile.config.in Fix typos. Thanks to John Tytgat for noticing it! 2009-12-07 00:27:35 +00:00
Makefile.rules Add the rest of the build system logic for optional target disassemblers 2009-11-25 04:46:58 +00:00
ModuleInfo.txt Patch to build llvm with srcdir != objdir from 2009-01-23 08:42:38 +00:00
README.txt First test commit 2009-10-05 22:29:11 +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 HTML documentation provided in docs/index.html for further
assistance with LLVM.