mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-01-09 05:28:42 +00:00
use ArgOperand API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106707 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -253,7 +253,7 @@ static bool isDynamicConstant(Value *V, CallInst *CI, ReturnInst *RI) {
|
||||
// If we are passing this argument into call as the corresponding
|
||||
// argument operand, then the argument is dynamically constant.
|
||||
// Otherwise, we cannot transform this function safely.
|
||||
if (CI->getOperand(ArgNo+1) == Arg)
|
||||
if (CI->getArgOperand(ArgNo) == Arg)
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -455,7 +455,7 @@ bool TailCallElim::ProcessReturningBlock(ReturnInst *Ret, BasicBlock *&OldEntry,
|
||||
// required PHI nodes, add entries into the PHI node for the actual
|
||||
// parameters passed into the tail-recursive call.
|
||||
for (unsigned i = 0, e = CI->getNumOperands()-1; i != e; ++i)
|
||||
ArgumentPHIs[i]->addIncoming(CI->getOperand(i+1), BB);
|
||||
ArgumentPHIs[i]->addIncoming(CI->getArgOperand(i), BB);
|
||||
|
||||
// If we are introducing an accumulator variable to eliminate the recursion,
|
||||
// do so now. Note that we _know_ that no subsequent tail recursion
|
||||
|
||||
Reference in New Issue
Block a user