1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
Go to file
Chris Lattner b9f858943a Implement rdar://7415680 - Twine integer support lacks greatness
Microoptimize Twine's with unsigned and int to not pin their value to
the stack.  This saves stack space in common cases and allows mem2reg
in the caller.  A simple example is:

void foo(const Twine &);
void bar(int x) {
  foo("xyz: " + Twine(x));
}

Before:

__Z3bari:
	subq	$40, %rsp
	movl	%edi, 36(%rsp)
	leaq	L_.str3(%rip), %rax
	leaq	36(%rsp), %rcx
	leaq	8(%rsp), %rdi
	movq	%rax, 8(%rsp)
	movq	%rcx, 16(%rsp)
	movb	$3, 24(%rsp)
	movb	$7, 25(%rsp)
	callq	__Z3fooRKN4llvm5TwineE
	addq	$40, %rsp
	ret

After:

__Z3bari:
	subq	$24, %rsp
	leaq	L_.str3(%rip), %rax
	movq	%rax, (%rsp)
	movslq	%edi, %rax
	movq	%rax, 8(%rsp)
	movb	$3, 16(%rsp)
	movb	$7, 17(%rsp)
	leaq	(%rsp), %rdi
	callq	__Z3fooRKN4llvm5TwineE
	addq	$24, %rsp
	ret

It saves 16 bytes of stack and one instruction in this case.

llvm-svn: 103107
2010-05-05 18:40:33 +00:00
autoconf Default OPTIMIZE_OPTION to -O2 on FreeBSD, at the request of the Clang/FreeBSD 2010-04-30 17:12:23 +00:00
bindings add attributes and module level asm to the ocaml bindings, 2010-04-10 17:52:58 +00:00
cmake Tell Valgrind when we modify already-executed machine code so it knows 2010-03-15 04:57:55 +00:00
docs one more thing. 2010-05-04 18:16:00 +00:00
examples Remove the -enable-sjlj-eh option, which doesn't do anything. 2010-05-02 15:36:26 +00:00
include Implement rdar://7415680 - Twine integer support lacks greatness 2010-05-05 18:40:33 +00:00
lib Implement rdar://7415680 - Twine integer support lacks greatness 2010-05-05 18:40:33 +00:00
projects Testing subversion commit access 2010-02-23 15:11:17 +00:00
runtime Delete a blank line. 2010-04-16 13:32:55 +00:00
test MC/Mach-O/x86_64: Relocations in debug sections should use local relocations 2010-05-05 17:22:39 +00:00
tools Remove the -enable-sjlj-eh option, which doesn't do anything. 2010-05-02 15:36:26 +00:00
unittests Update BitVectorTest.cpp to stay in sync with SmallBitVectorTest.cpp, 2010-04-30 20:50:28 +00:00
utils Rearrange the suppressions files to be by-architecture instead of by-problem. 2010-05-05 18:39:16 +00:00
website
build-for-llvm-top.sh
CMakeLists.txt CMake: Add options for using static runtime on MSVC++ build. 2010-03-18 13:52:05 +00:00
configure Regenerate. 2010-04-30 17:12:26 +00:00
CREDITS.TXT Adding the MicroBlaze backend. 2010-02-23 19:15:24 +00:00
LICENSE.TXT 2010 is upon us. 2010-01-09 18:40:31 +00:00
llvm.spec.in
Makefile Update for CIndex rename. 2010-04-30 23:36:47 +00:00
Makefile.common
Makefile.config.in Add an autoconf check for -retain-symbols-file and conditionalize 2010-04-16 22:58:15 +00:00
Makefile.rules Don't use 'else ifdef', I guess this is a 3.81 feature? 2010-04-30 22:00:17 +00:00
ModuleInfo.txt
README.txt Give packagers some advice about how to build LLVM so it's useful to 2010-02-26 00:54:42 +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.