From 18f07a11b990d59e9ae2317136aa456da6ea6a20 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 1 Jul 2003 16:28:11 +0000 Subject: Rework TD pass to work with the precise call graph constructed by the BU phase git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7031 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/DataStructure/DataStructure.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/Analysis/DataStructure/DataStructure.cpp') diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp index cd73acbc7c..1f5f58ff47 100644 --- a/lib/Analysis/DataStructure/DataStructure.cpp +++ b/lib/Analysis/DataStructure/DataStructure.cpp @@ -977,6 +977,7 @@ static inline bool nodeContainsExternalFunction(const DSNode *N) { } static void removeIdenticalCalls(std::vector &Calls) { + // Remove trivially identical function calls unsigned NumFns = Calls.size(); std::sort(Calls.begin(), Calls.end()); // Sort by callee as primary key! @@ -1022,6 +1023,7 @@ static void removeIdenticalCalls(std::vector &Calls) { LastCalleeContainsExternalFunction = LastCalleeFunc->isExternal(); } +#if 0 if (LastCalleeContainsExternalFunction || // This should be more than enough context sensitivity! // FIXME: Evaluate how many times this is tripped! @@ -1035,6 +1037,7 @@ static void removeIdenticalCalls(std::vector &Calls) { else if (CS.getNumPtrArgs() > OCS.getNumPtrArgs()) OCS = CS; } +#endif } else { if (CS.isDirectCall()) { LastCalleeFunc = CS.getCalleeFunc(); -- cgit v1.2.3-18-g5258