Displaying 9 results from an estimated 9 matches for "condinst".
2004 Aug 12
1
[LLVMdev] I got problem in BranchInst+SetCondInst
Hi all,
the small test modeling my problem is attached.
(see comments in file attached)
the problem is that both
SetCondInst* CondInst
= new SetCondInst( Instruction::SetLE, One, Two );
and
SetCondInst* CondInst
= new SetCondInst( Instruction::SetLE, Two, One );
have the same output...
Anyone have a sharper eye?..
---
Valery A.Khamenya
-------------- next part --------------
An embedded and charse...
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
2004 Aug 17
5
[LLVMdev] JIT API example (fibonacci)
....
> > assert(FibF->abegin() != FibF->aend()); // Make sure there's an arg
> >
> > Argument &ArgX = FibF->afront(); // Get the arg
> > ArgX.setName("AnArg"); // Give it a nice symbolic name for fun.
> >
> > SetCondInst* CondInst
> > = new SetCondInst( Instruction::SetLE,
> > &ArgX, Two );
> >
> > BB->getInstList().push_back(CondInst);
> >
> > // Create the true_block
> > BasicBlock* true_bb = new BasicBlock("arg<=2");
> >
&g...
2004 Aug 17
0
[LLVMdev] JIT API example (fibonacci)
...ument of the add1 function...
> assert(FibF->abegin() != FibF->aend()); // Make sure there's an arg
>
> Argument &ArgX = FibF->afront(); // Get the arg
> ArgX.setName("AnArg"); // Give it a nice symbolic name for fun.
>
> SetCondInst* CondInst
> = new SetCondInst( Instruction::SetLE,
> &ArgX, Two );
>
> BB->getInstList().push_back(CondInst);
>
> // Create the true_block
> BasicBlock* true_bb = new BasicBlock("arg<=2");
>
>
> // Create the return i...
2004 Aug 17
0
[LLVMdev] JIT API example (fibonacci)
On Wed, 18 Aug 2004, Valery A.Khamenya wrote:
> 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.
Cool! Hey Valery, before we add this to the CVS repo, can you take a look
at some of the changes I made to your HowToUseJIT example and
2004 Aug 17
0
[LLVMdev] JIT API example (fibonacci)
...assert(FibF->abegin() != FibF->aend()); // Make sure there's an arg
>>>
>>> Argument &ArgX = FibF->afront(); // Get the arg
>>> ArgX.setName("AnArg"); // Give it a nice symbolic name for fun.
>>>
>>> SetCondInst* CondInst
>>> = new SetCondInst( Instruction::SetLE,
>>> &ArgX, Two );
>>>
>>> BB->getInstList().push_back(CondInst);
>>>
>>> // Create the true_block
>>> BasicBlock* true_bb = new BasicBlock("arg<=2"...
2004 Aug 18
1
[LLVMdev] JIT API example (fibonacci)
...n() != FibF->aend()); // Make sure there's an arg
> >>>
> >>> Argument &ArgX = FibF->afront(); // Get the arg
> >>> ArgX.setName("AnArg"); // Give it a nice symbolic name for fun.
> >>>
> >>> SetCondInst* CondInst
> >>> = new SetCondInst( Instruction::SetLE,
> >>> &ArgX, Two );
> >>>
> >>> BB->getInstList().push_back(CondInst);
> >>>
> >>> // Create the true_block
> >>> BasicBlock* true_bb =...
2011 Jun 18
1
[LLVMdev] loop only executes once
...t(IntType, 0, 0)
LLVMBuildStore(Builder,Zero,C)
LLVMBuildStore(Builder,ArgX,D)
//If argx <= 2 : Return 1 : Goto Else
IFBB = LLVMAppendBasicBlockInContext(Context, Fib2, "IF")
ElseBB = LLVMAppendBasicBlockInContext(Context, Fib2, "Else")
Two = LLVMConstInt(IntType, 2, 0)
CondInst = LLVMBuildICmp(Builder, #LLVMIntSLE, ArgX,Two, "cond")
LLVMBuildCondBr(Builder, CondInst, IFBB, ElseBB)
//If
LLVMPositionBuilderAtEnd(Builder, IFBB)
LLVMBuildRet(Builder,One)
//Else
LLVMPositionBuilderAtEnd(Builder, ElseBB)
WhileBB = LLVMAppendBasicBlockInContext(Context, Fib2, "wh...
2007 Nov 25
2
[LLVMdev] Fibonacci example in OCaml
..._int i32_type 2 in
let argx = param fibf 0 in
set_value_name "AnArg" argx;
let retbb = append_block "return" fibf in
let retb = builder_at_end retbb in
let recursebb = append_block "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 ar...