# HG changeset patch # User Frits van Bommel # Date 1241611897 -7200 # Node ID 8215dbf0e09f494e5a3faed191118443abae72d9 # Parent 1e30cc395d2ec0a11e8988afe12aa75655573d0e Postpone (expensive) escape analysis until we're sure it's needed. diff -r 1e30cc395d2e -r 8215dbf0e09f gen/passes/GarbageCollect2Stack.cpp --- a/gen/passes/GarbageCollect2Stack.cpp Tue May 05 11:51:00 2009 -0600 +++ b/gen/passes/GarbageCollect2Stack.cpp Wed May 06 14:11:37 2009 +0200 @@ -167,10 +167,6 @@ DEBUG(DOUT << "GarbageCollect2Stack inspecting: " << *Inst); - if (PointerMayBeCaptured(Inst, true)) { - continue; - } - Value* TypeInfo = CS.getArgument(info->TypeInfoArgNr); const Type* Ty = getTypeFor(TypeInfo); if (!Ty) { @@ -203,6 +199,10 @@ Ty = PtrTy->getElementType(); } + if (PointerMayBeCaptured(Inst, true)) { + continue; + } + // Let's alloca this! Changed = true;