Displaying 7 results from an estimated 7 matches for "callfibx1".
2004 Aug 17
5
[LLVMdev] JIT API example (fibonacci)
...ue case:
> > true_bb->getInstList().push_back(new ReturnInst(One));
> >
> > // Create an exit block
> > BasicBlock* exit_bb = new BasicBlock("arg>2");
> >
> > {
> >
> > // create fib(x-1)
> > CallInst* CallFibX1;
> > {
> > // Create the sub instruction... does not insert...
> > Instruction *Sub
> > = BinaryOperator::create(Instruction::Sub, &ArgX, One,
> > "arg");
> >
> > exit_bb->getInstList().push_back(Sub);
> >
> >...
2012 Feb 09
1
[LLVMdev] Difficulty inserting putchar in IR
...showing
proper output.
Function *putchar_func = cast<Function>(M->
getOrInsertFunction("putchar", IntegerType::getInt32Ty(Context),
IntegerType::getInt32Ty(Context), NULL));
Value *One = ConstantInt::get(Type::getInt32Ty(Context), 1);
CallInst *CallFibX1 = CallInst::Create(putchar_func, One, "fibx1", BB);
CallFibX1->setTailCall();
Thanks and Regards,
Tarun Agrawal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120210/9bcd728b/attachment.htm...
2004 Aug 17
0
[LLVMdev] JIT API example (fibonacci)
...// to the basic block for true case:
> true_bb->getInstList().push_back(new ReturnInst(One));
>
> // Create an exit block
> BasicBlock* exit_bb = new BasicBlock("arg>2");
>
> {
>
> // create fib(x-1)
> CallInst* CallFibX1;
> {
> // Create the sub instruction... does not insert...
> Instruction *Sub
> = BinaryOperator::create(Instruction::Sub, &ArgX, One,
> "arg");
>
> exit_bb->getInstList().push_back(Sub);
>
> CallFibX1 = new CallInst(Fi...
2004 Aug 17
0
[LLVMdev] JIT API example (fibonacci)
...true_bb->getInstList().push_back(new ReturnInst(One));
>>>
>>> // Create an exit block
>>> BasicBlock* exit_bb = new BasicBlock("arg>2");
>>>
>>> {
>>>
>>> // create fib(x-1)
>>> CallInst* CallFibX1;
>>> {
>>> // Create the sub instruction... does not insert...
>>> Instruction *Sub
>>> = BinaryOperator::create(Instruction::Sub, &ArgX, One,
>>> "arg");
>>>
>>> exit_bb->getInstList().push_back(Sub);
>&...
2004 Aug 18
1
[LLVMdev] JIT API example (fibonacci)
...new ReturnInst(One));
> >>>
> >>> // Create an exit block
> >>> BasicBlock* exit_bb = new BasicBlock("arg>2");
> >>>
> >>> {
> >>>
> >>> // create fib(x-1)
> >>> CallInst* CallFibX1;
> >>> {
> >>> // Create the sub instruction... does not insert...
> >>> Instruction *Sub
> >>> = BinaryOperator::create(Instruction::Sub, &ArgX, One,
> >>> "arg");
> >>>
> >>> exit_bb->...
2004 Aug 17
4
[LLVMdev] JIT API example (fibonacci)
Hi LLVMers,
the example attached I have used to prove that JIT and some visible
optimizations are really invoked.
Proved OK. I got 30% speed-up in comparison to gcc 3.3.3
on my Athlon XP 1500.
Nice.
P.S. guys, no fears, I don't plan to flood the cvs repository
with my "brilliant" examples ;)
---
Valery A.Khamenya
-------------- next part --------------
An
2007 Nov 25
2
[LLVMdev] Fibonacci example in OCaml
...k "recurse" fibf in
let recurseb = builder_at_end recursebb in
let condinst = build_icmp Icmp_sle argx two "cond" bb in
ignore(build_cond_br condinst retbb recursebb bb);
ignore(build_ret one retb);
let sub = build_sub argx one "arg" recurseb in
let callfibx1 = build_call fibf [|sub|] "fibx1" recurseb in
let sub = build_sub argx two "arg" recurseb in
let callfibx2 = build_call fibf [|sub|] "fibx2" recurseb in
let sum = build_add callfibx1 callfibx2 "addresult" recurseb in
build_ret sum recurseb;...