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 Move --march, --mcpu, and --mattr from JIT/TargetSelect.cpp to lli.cpp. 2010-02-05 16:19:36 +00:00
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 When a constant's type is refined, update the constant in place 2009-09-15 15:58:07 +00:00
Argument.h sink twine.h down out of Value.h. It is annoying that you need 2009-12-29 07:12:03 +00:00
Attributes.h Reduce size of 'StackAlignment' field from 5 to 3 bits. Seriously, who needs a 2010-02-21 04:26:06 +00:00
AutoUpgrade.h Reapply 79977. 2009-08-28 23:24:31 +00:00
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 eliminate a bunch of pointless LLVMContext arguments. 2010-02-01 20:48:08 +00:00
Constants.h Add more information to the getSizeOf comment. 2010-02-25 15:55:28 +00:00
DerivedTypes.h Add support for a union type in LLVM IR. Patch by Talin! 2010-02-12 20:49:41 +00:00
Function.h Finally land the InvokeInst operand reordering. 2010-03-24 13:21:49 +00:00
GlobalAlias.h sink twine.h down out of Value.h. It is annoying that you need 2009-12-29 07:12:03 +00:00
GlobalValue.h Add static methods to handle Linkage Types. 2010-03-06 07:22:39 +00:00
GlobalVariable.h sink twine.h down out of Value.h. It is annoying that you need 2009-12-29 07:12:03 +00:00
GVMaterializer.h Kill ModuleProvider and ghost linkage by inverting the relationship between 2010-01-27 20:34:15 +00:00
InlineAsm.h Three changes: 2010-04-07 05:20:54 +00:00
InstrTypes.h doxygenize some comments, patch by Peter Collingbourne! 2010-02-12 21:54:28 +00:00
Instruction.def rename indbr -> indirectbr to appease the residents of #llvm. 2009-10-28 00:19:10 +00:00
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 Mention vAny and iPTRAny in a comment. 2010-02-09 16:59:14 +00:00
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 fix a warning. 2010-01-16 21:55:24 +00:00
Linker.h Fix "the the" and similar typos. 2010-02-10 16:03:48 +00:00
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 Kill ModuleProvider and ghost linkage by inverting the relationship between 2010-01-27 20:34:15 +00:00
OperandTraits.h fix PR6589 2010-03-16 10:59:48 +00:00
Operator.h Remove a bunch of unused arguments from functions, silencing a 2009-10-14 20:28:33 +00:00
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 eliminate dynamic_cast from the pass manager. 2010-01-21 02:07:07 +00:00
PassManager.h Kill ModuleProvider and ghost linkage by inverting the relationship between 2010-01-27 20:34:15 +00:00
PassManagers.h reapply my timer rewrite with a change for PassManager to store 2010-03-30 04:03:22 +00:00
PassSupport.h add a helper method. 2010-01-20 19:25:45 +00:00
SymbolTableListTraits.h Forward-declare ValueSymbolTable so that SymbolTableListTraits.h can be parsed by itself 2009-09-30 00:08:25 +00:00
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 Pass StringRef by value. 2009-11-06 10:58:06 +00:00
Use.h eliminate all 80-col violations that I have introduced in my recent checkins (and some others more) 2009-08-27 23:44:33 +00:00
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 Before existing NamedMDNode entry in the symbol table, remove any existing entry with the same name. 2010-01-26 22:03:41 +00:00