Mercurial > projects > ldc
changeset 1305:8215dbf0e09f
Postpone (expensive) escape analysis until we're sure it's needed.
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Wed, 06 May 2009 14:11:37 +0200 |
parents | 1e30cc395d2e |
children | b61db48127fd |
files | gen/passes/GarbageCollect2Stack.cpp |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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;