# HG changeset patch # User Frits van Bommel # Date 1241374789 -7200 # Node ID 0e79fb40c4d018f86bb56d9dedde799b4ab87a68 # Parent dd84ec4353cebadf9179928ecca8e2bf3aa63728 Remove some overly verbose debug output diff -r dd84ec4353ce -r 0e79fb40c4d0 gen/passes/GarbageCollect2Stack.cpp --- a/gen/passes/GarbageCollect2Stack.cpp Sun May 03 20:16:15 2009 +0200 +++ b/gen/passes/GarbageCollect2Stack.cpp Sun May 03 20:19:49 2009 +0200 @@ -98,7 +98,7 @@ /// runOnFunction - Top level algorithm. /// bool GarbageCollect2Stack::runOnFunction(Function &F) { - DEBUG(DOUT << "Running on function " << F.getName() << '\n'); + DEBUG(DOUT << "Running -dgc2stack on function " << F.getName() << '\n'); const TargetData &TD = getAnalysis(); const LoopInfo &LI = getAnalysis(); @@ -115,7 +115,6 @@ // in loops. // TODO: Analyze loops too... if (LI.getLoopFor(BB)) { - DEBUG(DOUT << "Skipping loop block " << *BB << '\n'); continue; } @@ -153,15 +152,12 @@ DEBUG(DOUT << "GarbageCollect2Stack inspecting: " << *Inst); if (PointerMayBeCaptured(Inst, true)) { - DEBUG(DOUT << ">> is captured :(\n"); continue; } - DEBUG(DOUT << ">> is not captured :)\n"); Value* TypeInfo = CS.getArgument(info->TypeInfoArgNr); const Type* Ty = getTypeFor(TypeInfo); if (!Ty) { - DEBUG(DOUT << ">> Couldn't find valid TypeInfo metadata :(\n"); continue; } @@ -193,34 +189,21 @@ if (!ti_global) return NULL; - DEBUG(DOUT << ">> Found typeinfo init\n"; - DOUT << ">> Value: " << *ti_global << "\n"; - DOUT << ">> Name: " << ti_global->getNameStr() << "\n"); - std::string metaname = TD_PREFIX; metaname.append(ti_global->getNameStart(), ti_global->getNameEnd()); - DEBUG(DOUT << ">> Looking for global named " << metaname << "\n"); - GlobalVariable* global = M->getGlobalVariable(metaname); - DEBUG(DOUT << ">> global: " << global->getInitializer() << "\n"); if (!global || !global->hasInitializer()) return NULL; - DEBUG(DOUT << ">> Found metadata global\n"); - MDNode* node = dyn_cast(global->getInitializer()); if (!node) return NULL; - DEBUG(DOUT << ">> Found metadata node\n"); - if (node->getNumOperands() != TD_NumFields || node->getOperand(TD_Confirm)->stripPointerCasts() != ti_global) return NULL; - DEBUG(DOUT << ">> Validated metadata node\n"); - return node->getOperand(TD_Type)->getType(); }