EnumSimplification was designed to avoid generating a hashmap from BB to RPO, which is well-intentioned, but I think it's simpler and safer just to use an RPO map here. This patch changes the code to:
EnumSimplification was designed to avoid generating a hashmap from BB to RPO, which is well-intentioned, but I think it's simpler and safer just to use an RPO map here. This patch changes the code to:

- Simplify the code for reading/debugging.

- Skip the sorting step.

- Allow removing this land mine: C++ copy ctors need to really copy.

- Skip the searching step in each loop iteration.

- Be as space efficient. No redundant BB pointers in an array (and removed the AA pointer).

Swift SVN r21102

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