Commits

Chris Lattner committed 91a80673b71
Enhance the swift_retainAndReturnThree optimizer to be able to handle the case when swift_retainAndReturnThree is inlined from a previously optimized function. The upshot of this is that we compile: var a : String func f() -> String { return a } into: __T1t3fooFT_NSs6String: pushq %rax movq __T1t1xNSs6String+16(%rip), %rcx movq __T1t1xNSs6String+8(%rip), %rdx movq __T1t1xNSs6String(%rip), %rsi movq %rcx, %rdi callq _swift_retainAndReturnThree popq %rsi ret instead of: __T1t3fooFT_NSs6String: pushq %r14 pushq %rbx pushq %rax movq __T1t1aNSs6String+8(%rip), %r14 movq __T1t1aNSs6String(%rip), %rbx movq __T1t1aNSs6String+16(%rip), %rdi callq _swift_retain movq %rax, %rcx movq %rbx, %rax movq %r14, %rdx addq $8, %rsp popq %rbx popq %r14 ret Swift SVN r2102