mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-03 21:43:14 +01:00
Postpone (expensive) escape analysis until we're sure it's needed.
This commit is contained in:
@@ -167,10 +167,6 @@ bool GarbageCollect2Stack::runOnFunction(Function &F) {
|
||||
|
||||
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 @@ bool GarbageCollect2Stack::runOnFunction(Function &F) {
|
||||
Ty = PtrTy->getElementType();
|
||||
}
|
||||
|
||||
if (PointerMayBeCaptured(Inst, true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Let's alloca this!
|
||||
Changed = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user