forked from OSchip/llvm-project
parent
ca4d4bd2db
commit
5879f9c24d
|
@ -64,13 +64,13 @@ static Function *CreateFibFunction(Module *M) {
|
|||
|
||||
// create fib(x-1)
|
||||
Value *Sub = BinaryOperator::createSub(ArgX, One, "arg", RecurseBB);
|
||||
Value *CallFibX1 = new CallInst(FibF, Sub, "fibx1", RecurseBB);
|
||||
CallFibX1->setTailCall(true);
|
||||
CallInst *CallFibX1 = new CallInst(FibF, Sub, "fibx1", RecurseBB);
|
||||
CallFibX1->setTailCall();
|
||||
|
||||
// create fib(x-2)
|
||||
Sub = BinaryOperator::createSub(ArgX, Two, "arg", RecurseBB);
|
||||
Value *CallFibX2 = new CallInst(FibF, Sub, "fibx2", RecurseBB);
|
||||
CallFibX2->setTailCall(true);
|
||||
CallInst *CallFibX2 = new CallInst(FibF, Sub, "fibx2", RecurseBB);
|
||||
CallFibX2->setTailCall();
|
||||
|
||||
|
||||
// fib(x-1)+fib(x-2)
|
||||
|
|
Loading…
Reference in New Issue