Remove the locks from getGenericMetadata to accelerate Debug builds.
Remove the locks from getGenericMetadata to accelerate Debug builds.

This commit removes the locks from the family of getXXXXMetadata APIs in the
fast path that does not create a new metadata. We still need the lock for the
cache-miss case because constructing metadata has side effects and we must
not construct two metadatas at the same time.

I am seeing a 25% - 30% boost in performance on most workloads that are built
with -Onone.

Swift SVN r23353

shahmishal/swift,uasys/swift,JaSpa/swift,johnno1962d/swift,devincoughlin/swift,mightydeveloper/swift,shahmishal/swift,swiftix/swift.old,brentdax/swift,mightydeveloper/swift,KrishMunot/swift,MukeshKumarS/Swift,practicalswift/swift,calebd/swift,gottesmm/swift,deyton/swift,hooman/swift,JGiola/swift,johnno1962d/swift,djwbrown/swift,russbishop/swift,tjw/swift,jckarter/swift,lorentey/swift,devincoughlin/swift,parkera/swift,airspeedswift/swift,ahoppen/swift,milseman/swift,adrfer/swift,LeoShimonaka/swift,danielmartin/swift,uasys/swift,shajrawi/swift,CodaFi/swift,alblue/swift,jmgc/swift,zisko/swift,jopamer/swift,JGiola/swift,tkremenek/swift,natecook1000/swift,austinzheng/swift,natecook1000/swift,jckarter/swift,practicalswift/swift,natecook1000/swift,gmilos/swift,swiftix/swift,cbrentharris/swift,practicalswift/swift,stephentyrone/swift,dduan/swift,OscarSwanros/swift,hooman/swift,shajrawi/swift,manavgabhawala/swift,SwiftAndroid/swift,allevato/swift,Ivacker/swift,therealbnut/swift,dduan/swift,hughbe/swift,kentya6/swift,johnno1962d/swift,gottesmm/swift,emilstahl/swift,swiftix/swift.old,tardieu/swift,tinysun212/swift-windows,JaSpa/swift,MukeshKumarS/Swift,parkera/swift,devincoughlin/swift,tjw/swift,cbrentharris/swift,glessard/swift,therealbnut/swift,glessard/swift,natecook1000/swift,swiftix/swift,gmilos/swift,johnno1962d/swift,sdulal/swift,calebd/swift,kstaring/swift,uasys/swift,gregomni/swift,danielmartin/swift,stephentyrone/swift,gregomni/swift,austinzheng/swift,russbishop/swift,khizkhiz/swift,djwbrown/swift,modocache/swift,Jnosh/swift,jckarter/swift,calebd/swift,shajrawi/swift,cbrentharris/swift,jtbandes/swift,benlangmuir/swift,dduan/swift,huonw/swift,gmilos/swift,gribozavr/swift,codestergit/swift,gmilos/swift,emilstahl/swift,cbrentharris/swift,brentdax/swift,deyton/swift,mightydeveloper/swift,glessard/swift,xedin/swift,lorentey/swift,kentya6/swift,parkera/swift,shahmishal/swift,gribozavr/swift,codestergit/swift,jtbandes/swift,felix91gr/swift,OscarSwanros/swift,amraboelela/swift,SwiftAndroid/swift,devincoughlin/swift,airspeedswift/swift,atrick/swift,airspeedswift/swift,jmgc/swift,LeoShimonaka/swift,adrfer/swift,khizkhiz/swift,xwu/swift,frootloops/swift,amraboelela/swift,kperryua/swift,xedin/swift,manavgabhawala/swift,felix91gr/swift,jmgc/swift,swiftix/swift,huonw/swift,manavgabhawala/swift,ken0nek/swift,sdulal/swift,SwiftAndroid/swift,uasys/swift,sdulal/swift,IngmarStein/swift,slavapestov/swift,dduan/swift,dduan/swift,russbishop/swift,slavapestov/swift,emilstahl/swift,return/swift,modocache/swift,CodaFi/swift,ahoppen/swift,JaSpa/swift,slavapestov/swift,hooman/swift,gregomni/swift,arvedviehweger/swift,IngmarStein/swift,karwa/swift,tkremenek/swift,codestergit/swift,emilstahl/swift,SwiftAndroid/swift,JaSpa/swift,manavgabhawala/swift,hughbe/swift,hughbe/swift,sdulal/swift,modocache/swift,nathawes/swift,hooman/swift,alblue/swift,gribozavr/swift,xwu/swift,parkera/swift,shajrawi/swift,roambotics/swift,shajrawi/swift,harlanhaskins/swift,tkremenek/swift,hooman/swift,amraboelela/swift,johnno1962d/swift,tinysun212/swift-windows,harlanhaskins/swift,therealbnut/swift,gribozavr/swift,rudkx/swift,roambotics/swift,swiftix/swift.old,tardieu/swift,karwa/swift,cbrentharris/swift,IngmarStein/swift,manavgabhawala/swift,tjw/swift,aschwaighofer/swift,xedin/swift,aschwaighofer/swift,kentya6/swift,modocache/swift,xedin/swift,JGiola/swift,allevato/swift,kusl/swift,emilstahl/swift,austinzheng/swift,SwiftAndroid/swift,milseman/swift,OscarSwanros/swift,adrfer/swift,alblue/swift,huonw/swift,zisko/swift,milseman/swift,LeoShimonaka/swift,arvedviehweger/swift,parkera/swift,calebd/swift,huonw/swift,tinysun212/swift-windows,gmilos/swift,MukeshKumarS/Swift,natecook1000/swift,kstaring/swift,adrfer/swift,karwa/swift,allevato/swift,sschiau/swift,gmilos/swift,russbishop/swift,calebd/swift,brentdax/swift,kusl/swift,benlangmuir/swift,JGiola/swift,austinzheng/swift,cbrentharris/swift,sdulal/swift,kusl/swift,sschiau/swift,shahmishal/swift,calebd/swift,roambotics/swift,felix91gr/swift,deyton/swift,amraboelela/swift,alblue/swift,slavapestov/swift,karwa/swift,Ivacker/swift,kentya6/swift,Ivacker/swift,russbishop/swift,huonw/swift,sschiau/swift,djwbrown/swift,alblue/swift,brentdax/swift,airspeedswift/swift,arvedviehweger/swift,OscarSwanros/swift,kperryua/swift,kusl/swift,ben-ng/swift,gottesmm/swift,gottesmm/swift,slavapestov/swift,sschiau/swift,gribozavr/swift,ken0nek/swift,deyton/swift,return/swift,deyton/swift,milseman/swift,ben-ng/swift,manavgabhawala/swift,aschwaighofer/swift,LeoShimonaka/swift,manavgabhawala/swift,russbishop/swift,jopamer/swift,aschwaighofer/swift,tkremenek/swift,russbishop/swift,ben-ng/swift,khizkhiz/swift,jopamer/swift,ken0nek/swift,jopamer/swift,mightydeveloper/swift,return/swift,tardieu/swift,ben-ng/swift,KrishMunot/swift,gregomni/swift,kperryua/swift,djwbrown/swift,uasys/swift,kentya6/swift,lorentey/swift,alblue/swift,swiftix/swift,aschwaighofer/swift,IngmarStein/swift,danielmartin/swift,KrishMunot/swift,tinysun212/swift-windows,zisko/swift,sdulal/swift,therealbnut/swift,OscarSwanros/swift,swiftix/swift.old,sschiau/swift,arvedviehweger/swift,ahoppen/swift,frootloops/swift,frootloops/swift,djwbrown/swift,dreamsxin/swift,sdulal/swift,shajrawi/swift,amraboelela/swift,MukeshKumarS/Swift,uasys/swift,tinysun212/swift-windows,lorentey/swift,karwa/swift,IngmarStein/swift,arvedviehweger/swift,KrishMunot/swift,shahmishal/swift,hooman/swift,austinzheng/swift,xwu/swift,ken0nek/swift,codestergit/swift,atrick/swift,CodaFi/swift,danielmartin/swift,shahmishal/swift,danielmartin/swift,nathawes/swift,swiftix/swift,stephentyrone/swift,lorentey/swift,bitjammer/swift,KrishMunot/swift,Ivacker/swift,kperryua/swift,karwa/swift,glessard/swift,tardieu/swift,allevato/swift,ben-ng/swift,gribozavr/swift,Jnosh/swift,nathawes/swift,swiftix/swift,kusl/swift,Jnosh/swift,kstaring/swift,emilstahl/swift,Jnosh/swift,practicalswift/swift,tkremenek/swift,zisko/swift,parkera/swift,danielmartin/swift,sdulal/swift,natecook1000/swift,swiftix/swift,karwa/swift,apple/swift,JaSpa/swift,brentdax/swift,atrick/swift,ken0nek/swift,SwiftAndroid/swift,therealbnut/swift,Jnosh/swift,mightydeveloper/swift,milseman/swift,swiftix/swift.old,mightydeveloper/swift,rudkx/swift,adrfer/swift,tardieu/swift,allevato/swift,jopamer/swift,harlanhaskins/swift,LeoShimonaka/swift,apple/swift,Ivacker/swift,bitjammer/swift,djwbrown/swift,xwu/swift,airspeedswift/swift,kstaring/swift,nathawes/swift,jtbandes/swift,OscarSwanros/swift,KrishMunot/swift,modocache/swift,kperryua/swift,austinzheng/swift,JGiola/swift,kusl/swift,xwu/swift,jopamer/swift,MukeshKumarS/Swift,codestergit/swift,jckarter/swift,emilstahl/swift,CodaFi/swift,jopamer/swift,johnno1962d/swift,devincoughlin/swift,nathawes/swift,jtbandes/swift,benlangmuir/swift,xedin/swift,therealbnut/swift,amraboelela/swift,ahoppen/swift,return/swift,khizkhiz/swift,devincoughlin/swift,harlanhaskins/swift,lorentey/swift,kstaring/swift,therealbnut/swift,khizkhiz/swift,jtbandes/swift,modocache/swift,Jnosh/swift,harlanhaskins/swift,natecook1000/swift,jmgc/swift,gmilos/swift,benlangmuir/swift,jckarter/swift,CodaFi/swift,SwiftAndroid/swift,khizkhiz/swift,tjw/swift,uasys/swift,tinysun212/swift-windows,kperryua/swift,tinysun212/swift-windows,apple/swift,modocache/swift,lorentey/swift,hooman/swift,xedin/swift,JaSpa/swift,codestergit/swift,IngmarStein/swift,arvedviehweger/swift,MukeshKumarS/Swift,tjw/swift,ahoppen/swift,ken0nek/swift,zisko/swift,hughbe/swift,atrick/swift,KrishMunot/swift,gregomni/swift,LeoShimonaka/swift,gottesmm/swift,MukeshKumarS/Swift,bitjammer/swift,kentya6/swift,stephentyrone/swift,rudkx/swift,gregomni/swift,zisko/swift,mightydeveloper/swift,aschwaighofer/swift,deyton/swift,brentdax/swift,nathawes/swift,practicalswift/swift,sschiau/swift,johnno1962d/swift,zisko/swift,glessard/swift,xwu/swift,slavapestov/swift,nathawes/swift,karwa/swift,roambotics/swift,khizkhiz/swift,kperryua/swift,shahmishal/swift,hughbe/swift,bitjammer/swift,gottesmm/swift,atrick/swift,huonw/swift,frootloops/swift,roambotics/swift,kusl/swift,jtbandes/swift,ken0nek/swift,adrfer/swift,benlangmuir/swift,gottesmm/swift,felix91gr/swift,LeoShimonaka/swift,dreamsxin/swift,frootloops/swift,jckarter/swift,djwbrown/swift,adrfer/swift,stephentyrone/swift,mightydeveloper/swift,devincoughlin/swift,jmgc/swift,shajrawi/swift,OscarSwanros/swift,bitjammer/swift,lorentey/swift,codestergit/swift,Ivacker/swift,shajrawi/swift,apple/swift,parkera/swift,tjw/swift,jmgc/swift,dduan/swift,rudkx/swift,huonw/swift,allevato/swift,alblue/swift,jtbandes/swift,benlangmuir/swift,aschwaighofer/swift,felix91gr/swift,milseman/swift,frootloops/swift,tardieu/swift,jmgc/swift,swiftix/swift.old,emilstahl/swift,ben-ng/swift,cbrentharris/swift,Ivacker/swift,stephentyrone/swift,CodaFi/swift,frootloops/swift,return/swift,cbrentharris/swift,LeoShimonaka/swift,ahoppen/swift,tardieu/swift,ben-ng/swift,swiftix/swift.old,return/swift,JaSpa/swift,tjw/swift,gribozavr/swift,IngmarStein/swift,devincoughlin/swift,roambotics/swift,swiftix/swift.old,felix91gr/swift,tkremenek/swift,kstaring/swift,xedin/swift,hughbe/swift,felix91gr/swift,calebd/swift,danielmartin/swift,jckarter/swift,dduan/swift,milseman/swift,shahmishal/swift,kentya6/swift,rudkx/swift,harlanhaskins/swift,return/swift,bitjammer/swift,practicalswift/swift,kentya6/swift,bitjammer/swift,harlanhaskins/swift,gribozavr/swift,Ivacker/swift,kusl/swift,austinzheng/swift,CodaFi/swift,atrick/swift,apple/swift,sschiau/swift,allevato/swift,airspeedswift/swift,amraboelela/swift,glessard/swift,stephentyrone/swift,deyton/swift,xedin/swift,airspeedswift/swift,rudkx/swift,sschiau/swift,parkera/swift,JGiola/swift,tkremenek/swift,arvedviehweger/swift,slavapestov/swift,brentdax/swift,apple/swift,kstaring/swift,Jnosh/swift,xwu/swift,practicalswift/swift,hughbe/swift,practicalswift/swift