From: Chris Lattner Date: Fri, 8 Nov 2002 19:13:14 +0000 (+0000) Subject: Fix IPModRef to use new DS interface X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d321593330f0e3c9a1cabf688e7e964f7bda09f5;p=oota-llvm.git Fix IPModRef to use new DS interface git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4628 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/DataStructure/IPModRef.cpp b/lib/Analysis/DataStructure/IPModRef.cpp index 3631514b557..3832cb3cad1 100644 --- a/lib/Analysis/DataStructure/IPModRef.cpp +++ b/lib/Analysis/DataStructure/IPModRef.cpp @@ -117,14 +117,7 @@ DSGraph *FunctionModRefInfo::ResolveCallSiteModRefInfo(CallInst &CI, std::map &NodeMap) { // Step #1: Clone the top-down graph... - std::map RawNodeMap; - DSGraph *Result = new DSGraph(funcTDGraph, RawNodeMap); - - // Convert the NodeMap from a map to DSNode* to be a map to DSNodeHandle's - NodeMap.insert(RawNodeMap.begin(), RawNodeMap.end()); - - // We are now done with the old map... so free it's memory... - RawNodeMap.clear(); + DSGraph *Result = new DSGraph(funcTDGraph, NodeMap); // Step #2: Clear Mod/Ref information... Result->maskNodeTypes(~(DSNode::Modified | DSNode::Read)); diff --git a/lib/Analysis/IPA/IPModRef.cpp b/lib/Analysis/IPA/IPModRef.cpp index 3631514b557..3832cb3cad1 100644 --- a/lib/Analysis/IPA/IPModRef.cpp +++ b/lib/Analysis/IPA/IPModRef.cpp @@ -117,14 +117,7 @@ DSGraph *FunctionModRefInfo::ResolveCallSiteModRefInfo(CallInst &CI, std::map &NodeMap) { // Step #1: Clone the top-down graph... - std::map RawNodeMap; - DSGraph *Result = new DSGraph(funcTDGraph, RawNodeMap); - - // Convert the NodeMap from a map to DSNode* to be a map to DSNodeHandle's - NodeMap.insert(RawNodeMap.begin(), RawNodeMap.end()); - - // We are now done with the old map... so free it's memory... - RawNodeMap.clear(); + DSGraph *Result = new DSGraph(funcTDGraph, NodeMap); // Step #2: Clear Mod/Ref information... Result->maskNodeTypes(~(DSNode::Modified | DSNode::Read));