llvm-6502/include/llvm
Chris Lattner ea03e10fac 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.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103107 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-05 18:40:33 +00:00
..
ADT Implement rdar://7415680 - Twine integer support lacks greatness 2010-05-05 18:40:33 +00:00
Analysis Added a variant of InlineCostAnalyzer::getInlineCost() that takes the called function as an explicit argument, for use when inlining function pointers. 2010-05-01 15:47:41 +00:00
Assembly Ok, third time's the charm. No changes from last time except the CMake 2010-04-02 23:17:14 +00:00
Bitcode Don't write into MemoryBuffers. 2010-04-19 16:15:31 +00:00
CodeGen Teach liveintervalanalysis about virtual registers which are defined by reg_sequence instructions that are formed by registers defined by distinct instructions. e.g. 2010-05-05 18:27:40 +00:00
CompilerDriver Make it not an error to specify -O* options several times. 2010-03-05 04:46:39 +00:00
Config Add a check for posix_spawn. 2010-04-16 05:14:21 +00:00
ExecutionEngine
MC MC: Rename MCSymbol::{g,s}etValue -> MCSymbol::{g,s}etVariableValue. 2010-05-05 17:41:00 +00:00
Support Properly escape edge source and destination labels. 2010-04-30 18:27:57 +00:00
System Fix typo. 2010-04-29 05:54:29 +00:00
Target MC/Matcher: Add support for over-riding the default MatchInstruction function 2010-05-04 00:33:13 +00:00
Transforms Combine the implementations of the core part of the SSAUpdater and 2010-05-04 23:18:19 +00:00
AbstractTypeUser.h
Argument.h
Attributes.h
AutoUpgrade.h
BasicBlock.h Skip debug info when looking for existing EH calls at the 2010-04-02 21:49:27 +00:00
CallGraphSCCPass.h move ReplaceNode out of line, rename scc_iterator::fini -> isAtEnd(). 2010-04-16 22:59:24 +00:00
CallingConv.h add support, testcases, and dox for the new GHC calling 2010-03-11 00:22:57 +00:00
CMakeLists.txt
Constant.h
Constants.h Add more information to the getSizeOf comment. 2010-02-25 15:55:28 +00:00
DerivedTypes.h
Function.h Finally land the InvokeInst operand reordering. 2010-03-24 13:21:49 +00:00
GlobalAlias.h
GlobalValue.h Add static methods to handle Linkage Types. 2010-03-06 07:22:39 +00:00
GlobalVariable.h
GVMaterializer.h
InlineAsm.h Three changes: 2010-04-07 05:20:54 +00:00
InstrTypes.h
Instruction.def
Instruction.h rename NewDebugLoc -> DebugLoc, prune #includes in DebugLoc.h. 2010-04-02 20:21:22 +00:00
Instructions.h Revert 101465, it broke internal OpenGL testing. 2010-04-16 23:37:20 +00:00
IntrinsicInst.h Revert 101465, it broke internal OpenGL testing. 2010-04-16 23:37:20 +00:00
Intrinsics.h
Intrinsics.td Reapply address space patch after fixing an issue in MemCopyOptimizer. 2010-04-04 03:10:48 +00:00
IntrinsicsAlpha.td
IntrinsicsARM.td [llvm_void_ty] is no longer needed for result types, 2010-03-23 23:46:07 +00:00
IntrinsicsCellSPU.td
IntrinsicsPowerPC.td [llvm_void_ty] is no longer needed for result types, 2010-03-23 23:46:07 +00:00
IntrinsicsX86.td Remove the palignr intrinsics now that we lower them to vector shuffles, 2010-04-20 00:59:54 +00:00
IntrinsicsXCore.td
LinkAllPasses.h SCCVN, we hardly knew ye! 2010-04-13 05:24:08 +00:00
LinkAllVMCore.h
Linker.h
LLVMContext.h introduce a new recoverable error handling API to LLVMContext 2010-04-07 23:40:44 +00:00
Metadata.h Fix comment typo. 2010-04-29 12:32:45 +00:00
Module.h
OperandTraits.h fix PR6589 2010-03-16 10:59:48 +00:00
Operator.h
Pass.h Ok, third time's the charm. No changes from last time except the CMake 2010-04-02 23:17:14 +00:00
PassAnalysisSupport.h
PassManager.h
PassManagers.h reapply my timer rewrite with a change for PassManager to store 2010-03-30 04:03:22 +00:00
PassSupport.h
SymbolTableListTraits.h
Type.h VMCore: Add Type::getIntN[Ptr]Ty, which are the obvious generic forms of 2010-04-13 01:39:07 +00:00
TypeSymbolTable.h
Use.h
User.h
Value.h Switch isa_impl from a function template to a class template with a 2010-03-30 18:05:52 +00:00
ValueSymbolTable.h