mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 04:24:00 +00:00
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
This commit is contained in:
@ -977,6 +977,7 @@ static inline bool nodeContainsExternalFunction(const DSNode *N) {
|
||||
}
|
||||
|
||||
static void removeIdenticalCalls(std::vector<DSCallSite> &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<DSCallSite> &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<DSCallSite> &Calls) {
|
||||
else if (CS.getNumPtrArgs() > OCS.getNumPtrArgs())
|
||||
OCS = CS;
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
if (CS.isDirectCall()) {
|
||||
LastCalleeFunc = CS.getCalleeFunc();
|
||||
|
Reference in New Issue
Block a user