forked from OSchip/llvm-project
445d8c6b50
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. llvm-svn: 150944 |
||
---|---|---|
.. | ||
ADCE | ||
ArgumentPromotion | ||
BBVectorize | ||
BlockPlacement | ||
BranchFolding | ||
CodeExtractor | ||
CodeGenPrepare | ||
ConstProp | ||
ConstantMerge | ||
CorrelatedValuePropagation | ||
DeadArgElim | ||
DeadStoreElimination | ||
EarlyCSE | ||
FunctionAttrs | ||
GVN | ||
GlobalDCE | ||
GlobalOpt | ||
IPConstantProp | ||
IndVarSimplify | ||
Inline | ||
InstCombine | ||
InstSimplify | ||
Internalize | ||
JumpThreading | ||
LCSSA | ||
LICM | ||
LoopDeletion | ||
LoopIdiom | ||
LoopRotate | ||
LoopSimplify | ||
LoopStrengthReduce | ||
LoopUnroll | ||
LoopUnswitch | ||
LowerAtomic | ||
LowerExpectIntrinsic | ||
LowerInvoke | ||
LowerSwitch | ||
Mem2Reg | ||
MemCpyOpt | ||
MergeFunc | ||
ObjCARC | ||
PhaseOrdering | ||
PruneEH | ||
Reassociate | ||
SCCP | ||
ScalarRepl | ||
SimplifyCFG | ||
SimplifyLibCalls | ||
Sink | ||
StripSymbols | ||
TailCallElim | ||
TailDup |