mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-11 11:34:02 +00:00
Replace two manual loops with calls to CallSite::hasArguments (no functional changes).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51947 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9515a8f88a
commit
227c27dd06
@ -26,9 +26,7 @@ using namespace llvm;
|
|||||||
/// takes the address of the function.
|
/// takes the address of the function.
|
||||||
static bool isOnlyADirectCall(Function *F, CallSite CS) {
|
static bool isOnlyADirectCall(Function *F, CallSite CS) {
|
||||||
if (!CS.getInstruction()) return false;
|
if (!CS.getInstruction()) return false;
|
||||||
for (CallSite::arg_iterator I = CS.arg_begin(), E = CS.arg_end(); I != E; ++I)
|
return !CS.hasArgument(F);
|
||||||
if (*I == F) return false;
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
@ -331,13 +331,11 @@ void DAE::SurveyFunction(Function &F) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If the function is PASSED IN as an argument, its address has been taken
|
// If the function is PASSED IN as an argument, its address has been taken
|
||||||
for (CallSite::arg_iterator AI = CS.arg_begin(), E = CS.arg_end();
|
|
||||||
AI != E; ++AI)
|
if (CS.hasArgument(&F)) {
|
||||||
if (AI->get() == &F) {
|
FunctionIntrinsicallyLive = true;
|
||||||
FunctionIntrinsicallyLive = true;
|
break;
|
||||||
break;
|
}
|
||||||
}
|
|
||||||
if (FunctionIntrinsicallyLive) break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FunctionIntrinsicallyLive) {
|
if (FunctionIntrinsicallyLive) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user