[llvm-commits] CVS: llvm/lib/Analysis/IPA/IPModRef.cpp

Chris Lattner lattner at cs.uiuc.edu
Wed Feb 5 16:01:03 PST 2003


Changes in directory llvm/lib/Analysis/IPA:

IPModRef.cpp updated: 1.13 -> 1.14

---
Log message:

Implement optimization for direct function call case.  This dramatically
reduces the number of function nodes created and speeds up analysis by
about 10% overall.



---
Diffs of the changes:

Index: llvm/lib/Analysis/IPA/IPModRef.cpp
diff -u llvm/lib/Analysis/IPA/IPModRef.cpp:1.13 llvm/lib/Analysis/IPA/IPModRef.cpp:1.14
--- llvm/lib/Analysis/IPA/IPModRef.cpp:1.13	Fri Jan 31 22:51:57 2003
+++ llvm/lib/Analysis/IPA/IPModRef.cpp	Wed Feb  5 15:59:58 2003
@@ -144,7 +144,7 @@
   Result->maskNodeTypes(~(DSNode::Modified | DSNode::Read));
 
   // Step #3: clone the bottom up graphs for the callees into the caller graph
-  if (const Function *F = CI.getCalledFunction())
+  if (Function *F = CI.getCalledFunction())
     {
       assert(!F->isExternal());
 
@@ -162,7 +162,7 @@
           Args.push_back(Result->getNodeForValue(CI.getOperand(i)));
 
       // Build the call site...
-      DSCallSite CS(CI, RetVal, 0, Args);
+      DSCallSite CS(CI, RetVal, F, Args);
 
       // Perform the merging now of the graph for the callee, which will
       // come with mod/ref bits set...





More information about the llvm-commits mailing list