LLVM backend for 6502
Go to file
Chris Lattner b053fc1c92 fold comparisons of gep'd alloca points with null to false,
implementing PR12013.  We now compile the testcase to:

__Z4testv:                              ## @_Z4testv
## BB#0:                                ## %_ZN4llvm15SmallVectorImplIiE9push_backERKi.exit
	pushq	%rbx
	subq	$64, %rsp
	leaq	32(%rsp), %rbx
	movq	%rbx, (%rsp)
	leaq	64(%rsp), %rax
	movq	%rax, 16(%rsp)
	movl	$1, 32(%rsp)
	leaq	36(%rsp), %rax
	movq	%rax, 8(%rsp)
	leaq	(%rsp), %rdi
	callq	__Z1gRN4llvm11SmallVectorIiLj8EEE
	movq	(%rsp), %rdi
	cmpq	%rbx, %rdi
	je	LBB0_2
## BB#1:
	callq	_free
LBB0_2:                                 ## %_ZN4llvm11SmallVectorIiLj8EED1Ev.exit
	addq	$64, %rsp
	popq	%rbx
	ret

instead of:

__Z4testv:                              ## @_Z4testv
## BB#0:
	pushq	%rbx
	subq	$64, %rsp
	xorl	%eax, %eax
	leaq	(%rsp), %rbx
	addq	$32, %rbx
	movq	%rbx, (%rsp)
	movq	%rbx, 8(%rsp)
	leaq	64(%rsp), %rcx
	movq	%rcx, 16(%rsp)
	je	LBB0_2
## BB#1:
	movl	$1, 32(%rsp)
	movq	%rbx, %rax
LBB0_2:                                 ## %_ZN4llvm15SmallVectorImplIiE9push_backERKi.exit
	addq	$4, %rax
	movq	%rax, 8(%rsp)
	leaq	(%rsp), %rdi
	callq	__Z1gRN4llvm11SmallVectorIiLj8EEE
	movq	(%rsp), %rdi
	cmpq	%rbx, %rdi
	je	LBB0_4
## BB#3:
	callq	_free
LBB0_4:                                 ## %_ZN4llvm11SmallVectorIiLj8EED1Ev.exit
	addq	$64, %rsp
	popq	%rbx
	ret

This doesn't shrink clang noticably though.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150944 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-20 00:42:49 +00:00
autoconf autoconf/m4/visibility_inlines_hidden.m4: Tweak for cygwin-g++-4.5.3. It folded conftest regardress of attributge((noinline)) with >=O1 . 2012-02-19 12:05:12 +00:00
bindings ocaml bindings: landing pad is now the last opcode. 2012-02-07 18:58:19 +00:00
cmake add LLVM_VERSION_MAJOR and _MINOR defines 2012-02-13 18:48:10 +00:00
docs Fix documentation. 2012-02-18 01:38:41 +00:00
examples Switch to a more idiomatic way of silencing unused variable warnings in 2012-02-20 00:02:49 +00:00
include Move constructors out-of-line and flesh out their documentation. No 2012-02-20 00:02:47 +00:00
lib fold comparisons of gep'd alloca points with null to false, 2012-02-20 00:42:49 +00:00
projects
runtime
test fold comparisons of gep'd alloca points with null to false, 2012-02-20 00:42:49 +00:00
tools Remove dead code. Improve llvm_unreachable text. Simplify some control flow. 2012-02-19 11:37:01 +00:00
unittests Hashing.h - utilities for hashing various data types. 2012-02-18 21:00:49 +00:00
utils Remove dead code. Improve llvm_unreachable text. Simplify some control flow. 2012-02-19 11:37:01 +00:00
.gitignore
CMakeLists.txt add LLVM_VERSION_MAJOR and _MINOR defines 2012-02-13 18:48:10 +00:00
configure autoconf/m4/visibility_inlines_hidden.m4: Tweak for cygwin-g++-4.5.3. It folded conftest regardress of attributge((noinline)) with >=O1 . 2012-02-19 12:05:12 +00:00
CREDITS.TXT Update credits. 2012-02-16 18:54:41 +00:00
LICENSE.TXT
llvm.spec.in
LLVMBuild.txt
Makefile
Makefile.common
Makefile.config.in
Makefile.rules On Cygwin/MingW, add SharedLibDir and LLVMToolDir to the library search path, since shared libraries are placed in 'bin'. (static libraries are still in 'lib'). 2012-02-18 10:03:19 +00:00
README.txt test commit 2012-02-07 08:18:05 +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.

If you're writing a package for LLVM, see docs/Packaging.html for our
suggestions.