Avoid the quadratic append trap in flattenCmmAGraph
Avoid the quadratic append trap in flattenCmmAGraph

Fixes a perf problem in perf/compiler/T783

anton-dessiatov/ghc,nathyong/microghc-ghc,TomMD/ghc,frantisekfarka/ghc-dsi,christiaanb/ghc,spacekitteh/smcghc,oldmanmike/ghc,lukexi/ghc-7.8-arm64,siddhanathan/ghc,christiaanb/ghc,acowley/ghc,wxwxwwxxx/ghc,vTurbine/ghc,GaloisInc/halvm-ghc,sgillespie/ghc,nushio3/ghc,elieux/ghc,hferreiro/replay,urbanslug/ghc,mcschroeder/ghc,nkaretnikov/ghc,siddhanathan/ghc,urbanslug/ghc,green-haskell/ghc,tjakway/ghcjvm,holzensp/ghc,fmthoma/ghc,mcschroeder/ghc,oldmanmike/ghc,christiaanb/ghc,anton-dessiatov/ghc,da-x/ghc,nushio3/ghc,vTurbine/ghc,olsner/ghc,nomeata/ghc,fmthoma/ghc,tjakway/ghcjvm,nathyong/microghc-ghc,holzensp/ghc,ezyang/ghc,TomMD/ghc,hferreiro/replay,ml9951/ghc,ezyang/ghc,holzensp/ghc,green-haskell/ghc,oldmanmike/ghc,christiaanb/ghc,acowley/ghc,gridaphobe/ghc,ekmett/ghc,GaloisInc/halvm-ghc,ryantm/ghc,ml9951/ghc,da-x/ghc,mfine/ghc,gridaphobe/ghc,mettekou/ghc,anton-dessiatov/ghc,urbanslug/ghc,shlevy/ghc,mcschroeder/ghc,snoyberg/ghc,nathyong/microghc-ghc,ezyang/ghc,nathyong/microghc-ghc,siddhanathan/ghc,green-haskell/ghc,sgillespie/ghc,snoyberg/ghc,vikraman/ghc,lukexi/ghc,hferreiro/replay,GaloisInc/halvm-ghc,ekmett/ghc,vTurbine/ghc,vTurbine/ghc,TomMD/ghc,jstolarek/ghc,gcampax/ghc,nomeata/ghc,ryantm/ghc,AlexanderPankiv/ghc,green-haskell/ghc,ekmett/ghc,elieux/ghc,hferreiro/replay,wxwxwwxxx/ghc,jstolarek/ghc,forked-upstream-packages-for-ghcjs/ghc,shlevy/ghc,oldmanmike/ghc,bitemyapp/ghc,anton-dessiatov/ghc,tjakway/ghcjvm,christiaanb/ghc,ghc-android/ghc,mcschroeder/ghc,ezyang/ghc,fmthoma/ghc,tibbe/ghc,nushio3/ghc,nkaretnikov/ghc,forked-upstream-packages-for-ghcjs/ghc,ghc-android/ghc,ezyang/ghc,spacekitteh/smcghc,wxwxwwxxx/ghc,mfine/ghc,nomeata/ghc,elieux/ghc,gcampax/ghc,lukexi/ghc-7.8-arm64,forked-upstream-packages-for-ghcjs/ghc,ryantm/ghc,frantisekfarka/ghc-dsi,anton-dessiatov/ghc,lukexi/ghc,lukexi/ghc,ml9951/ghc,lukexi/ghc,fmthoma/ghc,nkaretnikov/ghc,tibbe/ghc,GaloisInc/halvm-ghc,nkaretnikov/ghc,jstolarek/ghc,nushio3/ghc,acowley/ghc,acowley/ghc,mettekou/ghc,forked-upstream-packages-for-ghcjs/ghc,gridaphobe/ghc,ezyang/ghc,ghc-android/ghc,siddhanathan/ghc,elieux/ghc,ml9951/ghc,mfine/ghc,ryantm/ghc,jstolarek/ghc,anton-dessiatov/ghc,GaloisInc/halvm-ghc,tjakway/ghcjvm,wxwxwwxxx/ghc,wxwxwwxxx/ghc,shlevy/ghc,da-x/ghc,AlexanderPankiv/ghc,tjakway/ghcjvm,tibbe/ghc,gridaphobe/ghc,siddhanathan/ghc,oldmanmike/ghc,nushio3/ghc,sgillespie/ghc,vikraman/ghc,AlexanderPankiv/ghc,elieux/ghc,acowley/ghc,AlexanderPankiv/ghc,sdiehl/ghc,lukexi/ghc-7.8-arm64,gcampax/ghc,GaloisInc/halvm-ghc,lukexi/ghc,ml9951/ghc,da-x/ghc,shlevy/ghc,ekmett/ghc,mettekou/ghc,snoyberg/ghc,mfine/ghc,sdiehl/ghc,wxwxwwxxx/ghc,forked-upstream-packages-for-ghcjs/ghc,gcampax/ghc,siddhanathan/ghc,bitemyapp/ghc,nomeata/ghc,da-x/ghc,da-x/ghc,nathyong/microghc-ghc,mfine/ghc,hferreiro/replay,TomMD/ghc,vikraman/ghc,ryantm/ghc,mcschroeder/ghc,vikraman/ghc,tibbe/ghc,sdiehl/ghc,fmthoma/ghc,mcschroeder/ghc,ekmett/ghc,holzensp/ghc,ezyang/ghc,ghc-android/ghc,snoyberg/ghc,AlexanderPankiv/ghc,sgillespie/ghc,gcampax/ghc,nathyong/microghc-ghc,olsner/ghc,nkaretnikov/ghc,vTurbine/ghc,lukexi/ghc-7.8-arm64,shlevy/ghc,sdiehl/ghc,urbanslug/ghc,forked-upstream-packages-for-ghcjs/ghc,gridaphobe/ghc,mfine/ghc,gcampax/ghc,spacekitteh/smcghc,olsner/ghc,AlexanderPankiv/ghc,spacekitteh/smcghc,ghc-android/ghc,urbanslug/ghc,olsner/ghc,green-haskell/ghc,nushio3/ghc,jstolarek/ghc,oldmanmike/ghc,holzensp/ghc,nathyong/microghc-ghc,hferreiro/replay,vTurbine/ghc,TomMD/ghc,oldmanmike/ghc,vTurbine/ghc,vikraman/ghc,frantisekfarka/ghc-dsi,nomeata/ghc,tjakway/ghcjvm,vikraman/ghc,sgillespie/ghc,christiaanb/ghc,olsner/ghc,ghc-android/ghc,mettekou/ghc,bitemyapp/ghc,nkaretnikov/ghc,urbanslug/ghc,olsner/ghc,TomMD/ghc,lukexi/ghc-7.8-arm64,gridaphobe/ghc,hferreiro/replay,forked-upstream-packages-for-ghcjs/ghc,bitemyapp/ghc,ml9951/ghc,snoyberg/ghc,olsner/ghc,acowley/ghc,mcschroeder/ghc,anton-dessiatov/ghc,fmthoma/ghc,fmthoma/ghc,ml9951/ghc,acowley/ghc,siddhanathan/ghc,bitemyapp/ghc,frantisekfarka/ghc-dsi,christiaanb/ghc,mettekou/ghc,mettekou/ghc,frantisekfarka/ghc-dsi,gridaphobe/ghc,GaloisInc/halvm-ghc,ml9951/ghc,mfine/ghc,tjakway/ghcjvm,sgillespie/ghc,sgillespie/ghc,AlexanderPankiv/ghc,shlevy/ghc,tibbe/ghc,mettekou/ghc,sdiehl/ghc,sdiehl/ghc,vikraman/ghc,elieux/ghc,sdiehl/ghc,nkaretnikov/ghc,wxwxwwxxx/ghc,TomMD/ghc,snoyberg/ghc,shlevy/ghc,snoyberg/ghc,spacekitteh/smcghc,elieux/ghc,gcampax/ghc,urbanslug/ghc,da-x/ghc,nushio3/ghc,ghc-android/ghc