Changes in directory llvm/lib/Analysis/DataStructure:
DataStructure.cpp updated: 1.248 -> 1.249 --- Log message: Allow loop detection during debug in forwarding nodes, and revert auxcall patch as it make 176.gcc untenable --- Diffs of the changes: (+20 -8) DataStructure.cpp | 28 ++++++++++++++++++++-------- 1 files changed, 20 insertions(+), 8 deletions(-) Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.248 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.249 --- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.248 Thu Nov 2 14:25:49 2006 +++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Tue Nov 7 14:36:02 2006 @@ -62,7 +62,17 @@ DSNode *DSNodeHandle::HandleForwarding() const { assert(N->isForwarding() && "Can only be invoked if forwarding!"); - + DEBUG( + { //assert not looping + DSNode* NH = N; + std::set<DSNode*> seen; + while(NH && NH->isForwarding()) { + assert(seen.find(NH) == seen.end() && "Loop detected"); + seen.insert(NH); + NH = NH->ForwardNH.N; + } + } + ); // Handle node forwarding here! DSNode *Next = N->ForwardNH.getNode(); // Cause recursive shrinkage Offset += N->ForwardNH.getOffset(); @@ -421,6 +431,8 @@ /// bool DSNode::mergeTypeInfo(const Type *NewTy, unsigned Offset, bool FoldIfIncompatible) { + DEBUG(std::cerr << "merging " << *NewTy << " at " << Offset + << " with " << *Ty << "\n"); const TargetData &TD = getTargetData(); // Check to make sure the Size member is up-to-date. Size can be one of the // following: @@ -1595,13 +1607,13 @@ for (afc_iterator I = Graph.afc_begin(), E = Graph.afc_end(); I!=E; ++I) if (SCCFinder.PathExistsToClonedNode(*I)) AuxCallToCopy.push_back(&*I); - else if (I->isIndirectCall()){ - //If the call node doesn't have any callees, clone it - std::vector< Function *> List; - I->getCalleeNode()->addFullFunctionList(List); - if (!List.size()) - AuxCallToCopy.push_back(&*I); - } +// else if (I->isIndirectCall()){ +// //If the call node doesn't have any callees, clone it +// std::vector< Function *> List; +// I->getCalleeNode()->addFullFunctionList(List); +// if (!List.size()) +// AuxCallToCopy.push_back(&*I); +// } const DSScalarMap &GSM = Graph.getScalarMap(); for (DSScalarMap::global_iterator GI = GSM.global_begin(), _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits