mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-22 12:33:33 +02:00
De-duplicate CS.getCalledFunction() expression.
Not sure if the optimizer will save the call as getCalledFunction() is not a trivial access function but the code is clearer this way. llvm-svn: 242641
This commit is contained in:
parent
8f88f3e249
commit
e53c5e66f9
@ -469,7 +469,8 @@ bool Inliner::runOnSCC(CallGraphSCC &SCC) {
|
||||
// If this is a direct call to an external function, we can never inline
|
||||
// it. If it is an indirect call, inlining may resolve it to be a
|
||||
// direct call, so we keep it.
|
||||
if (CS.getCalledFunction() && CS.getCalledFunction()->isDeclaration())
|
||||
Function *Callee = CS.getCalledFunction();
|
||||
if (Callee && Callee->isDeclaration())
|
||||
continue;
|
||||
|
||||
CallSites.push_back(std::make_pair(CS, -1));
|
||||
|
Loading…
Reference in New Issue
Block a user