[silgen] When compiling with sil-ownership use borrows+CopyOnSuccess instead of TakeOnSuccess.
[silgen] When compiling with sil-ownership use borrows+CopyOnSuccess instead of TakeOnSuccess.

This is NFC since all changes are behind a flag. I took a look at the codegen
when this is enabled. It looks pretty optimizable for a -Onone ARC pass. Until I
have that pass though I need this behind a flag.

Basically you see a lot of this pattern:

%0 = begin_borrow %foo
%1 = copy_value %0
...
bb1:
  %2 = begin_borrow %1
  %3 = copy_value %2
  ...
  destroy_value %3
  end_borrow %2 from %1
  destroy_value %1
  end_borrow %0 from %foo
  ...

bb2:
  destroy_value %1
  end_borrow %0 from %foo
  ...

This is really easy to optimize since one can easily see that all of %1's users
are borrows or a final destroy.

rdar://31145255

deyton/swift,gribozavr/swift,zisko/swift,gregomni/swift,aschwaighofer/swift,ahoppen/swift,tinysun212/swift-windows,djwbrown/swift,sschiau/swift,gregomni/swift,danielmartin/swift,benlangmuir/swift,atrick/swift,bitjammer/swift,lorentey/swift,deyton/swift,calebd/swift,felix91gr/swift,sschiau/swift,alblue/swift,karwa/swift,stephentyrone/swift,lorentey/swift,codestergit/swift,tjw/swift,uasys/swift,Jnosh/swift,allevato/swift,hughbe/swift,hooman/swift,jckarter/swift,OscarSwanros/swift,bitjammer/swift,jopamer/swift,tinysun212/swift-windows,zisko/swift,nathawes/swift,gribozavr/swift,xedin/swift,shahmishal/swift,gribozavr/swift,practicalswift/swift,gribozavr/swift,tjw/swift,jmgc/swift,shajrawi/swift,codestergit/swift,codestergit/swift,brentdax/swift,aschwaighofer/swift,huonw/swift,return/swift,OscarSwanros/swift,karwa/swift,alblue/swift,tkremenek/swift,benlangmuir/swift,apple/swift,austinzheng/swift,CodaFi/swift,sschiau/swift,codestergit/swift,xwu/swift,harlanhaskins/swift,jopamer/swift,parkera/swift,benlangmuir/swift,arvedviehweger/swift,alblue/swift,harlanhaskins/swift,bitjammer/swift,danielmartin/swift,bitjammer/swift,return/swift,deyton/swift,JGiola/swift,tjw/swift,brentdax/swift,lorentey/swift,felix91gr/swift,nathawes/swift,jckarter/swift,xedin/swift,nathawes/swift,atrick/swift,roambotics/swift,huonw/swift,milseman/swift,brentdax/swift,milseman/swift,ahoppen/swift,milseman/swift,Jnosh/swift,danielmartin/swift,tinysun212/swift-windows,rudkx/swift,karwa/swift,uasys/swift,roambotics/swift,practicalswift/swift,xedin/swift,karwa/swift,apple/swift,amraboelela/swift,jopamer/swift,brentdax/swift,xedin/swift,amraboelela/swift,calebd/swift,xwu/swift,arvedviehweger/swift,swiftix/swift,stephentyrone/swift,uasys/swift,roambotics/swift,lorentey/swift,jtbandes/swift,hooman/swift,hooman/swift,deyton/swift,JGiola/swift,amraboelela/swift,CodaFi/swift,brentdax/swift,alblue/swift,lorentey/swift,danielmartin/swift,xwu/swift,ahoppen/swift,bitjammer/swift,hughbe/swift,xedin/swift,glessard/swift,jtbandes/swift,hughbe/swift,devincoughlin/swift,amraboelela/swift,zisko/swift,sschiau/swift,karwa/swift,jmgc/swift,milseman/swift,brentdax/swift,calebd/swift,stephentyrone/swift,amraboelela/swift,benlangmuir/swift,tkremenek/swift,aschwaighofer/swift,milseman/swift,CodaFi/swift,tjw/swift,xedin/swift,shajrawi/swift,arvedviehweger/swift,return/swift,shajrawi/swift,CodaFi/swift,swiftix/swift,shajrawi/swift,glessard/swift,allevato/swift,codestergit/swift,lorentey/swift,practicalswift/swift,airspeedswift/swift,jckarter/swift,benlangmuir/swift,felix91gr/swift,calebd/swift,jckarter/swift,apple/swift,shahmishal/swift,hooman/swift,felix91gr/swift,djwbrown/swift,hughbe/swift,parkera/swift,danielmartin/swift,huonw/swift,shahmishal/swift,austinzheng/swift,zisko/swift,amraboelela/swift,swiftix/swift,Jnosh/swift,roambotics/swift,practicalswift/swift,austinzheng/swift,gribozavr/swift,gregomni/swift,uasys/swift,karwa/swift,jtbandes/swift,jtbandes/swift,airspeedswift/swift,felix91gr/swift,karwa/swift,devincoughlin/swift,devincoughlin/swift,return/swift,arvedviehweger/swift,apple/swift,huonw/swift,shajrawi/swift,practicalswift/swift,swiftix/swift,djwbrown/swift,allevato/swift,jmgc/swift,xwu/swift,djwbrown/swift,xwu/swift,tinysun212/swift-windows,tjw/swift,karwa/swift,frootloops/swift,nathawes/swift,natecook1000/swift,natecook1000/swift,jtbandes/swift,airspeedswift/swift,djwbrown/swift,uasys/swift,ahoppen/swift,rudkx/swift,practicalswift/swift,swiftix/swift,OscarSwanros/swift,CodaFi/swift,swiftix/swift,jopamer/swift,ahoppen/swift,devincoughlin/swift,hughbe/swift,glessard/swift,frootloops/swift,shajrawi/swift,jtbandes/swift,hughbe/swift,alblue/swift,allevato/swift,parkera/swift,danielmartin/swift,zisko/swift,frootloops/swift,xedin/swift,zisko/swift,hooman/swift,atrick/swift,stephentyrone/swift,parkera/swift,devincoughlin/swift,shahmishal/swift,OscarSwanros/swift,airspeedswift/swift,huonw/swift,parkera/swift,benlangmuir/swift,tkremenek/swift,uasys/swift,jckarter/swift,tjw/swift,alblue/swift,harlanhaskins/swift,nathawes/swift,jmgc/swift,alblue/swift,glessard/swift,JGiola/swift,tkremenek/swift,parkera/swift,milseman/swift,aschwaighofer/swift,roambotics/swift,hooman/swift,frootloops/swift,return/swift,practicalswift/swift,calebd/swift,atrick/swift,allevato/swift,allevato/swift,frootloops/swift,gregomni/swift,harlanhaskins/swift,shajrawi/swift,natecook1000/swift,natecook1000/swift,austinzheng/swift,return/swift,codestergit/swift,shahmishal/swift,djwbrown/swift,tinysun212/swift-windows,allevato/swift,rudkx/swift,amraboelela/swift,gribozavr/swift,gregomni/swift,felix91gr/swift,tjw/swift,OscarSwanros/swift,tkremenek/swift,bitjammer/swift,shahmishal/swift,zisko/swift,airspeedswift/swift,jopamer/swift,parkera/swift,airspeedswift/swift,atrick/swift,djwbrown/swift,tinysun212/swift-windows,rudkx/swift,JGiola/swift,JGiola/swift,deyton/swift,aschwaighofer/swift,deyton/swift,sschiau/swift,practicalswift/swift,hughbe/swift,tkremenek/swift,roambotics/swift,arvedviehweger/swift,jtbandes/swift,apple/swift,felix91gr/swift,natecook1000/swift,devincoughlin/swift,Jnosh/swift,danielmartin/swift,austinzheng/swift,jmgc/swift,austinzheng/swift,gregomni/swift,devincoughlin/swift,frootloops/swift,CodaFi/swift,calebd/swift,gribozavr/swift,jckarter/swift,ahoppen/swift,harlanhaskins/swift,frootloops/swift,glessard/swift,devincoughlin/swift,shahmishal/swift,tkremenek/swift,milseman/swift,stephentyrone/swift,OscarSwanros/swift,lorentey/swift,nathawes/swift,parkera/swift,hooman/swift,deyton/swift,jopamer/swift,sschiau/swift,CodaFi/swift,aschwaighofer/swift,airspeedswift/swift,nathawes/swift,tinysun212/swift-windows,bitjammer/swift,glessard/swift,stephentyrone/swift,huonw/swift,atrick/swift,OscarSwanros/swift,arvedviehweger/swift,sschiau/swift,rudkx/swift,swiftix/swift,aschwaighofer/swift,xwu/swift,natecook1000/swift,shahmishal/swift,Jnosh/swift,Jnosh/swift,JGiola/swift,natecook1000/swift,harlanhaskins/swift,codestergit/swift,jmgc/swift,jopamer/swift,gribozavr/swift,calebd/swift,brentdax/swift,austinzheng/swift,xwu/swift,shajrawi/swift,xedin/swift,arvedviehweger/swift,huonw/swift,uasys/swift,lorentey/swift,stephentyrone/swift,jckarter/swift,harlanhaskins/swift,apple/swift,Jnosh/swift,rudkx/swift,jmgc/swift,return/swift,sschiau/swift