search for: setcondinst

Displaying 15 results from an estimated 15 matches for "setcondinst".

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
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
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)
...n... > > 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...
2002 Sep 27
2
[LLVMdev] Accessing instruction arguments
...access the arguments of an arbitrary instruction? The programmer's manual describes how to iterate over the values a given instruction uses, but that doesn't seem to be exactly the same thing. For instance, given a pointer to a FreeInst, how can I get the pointer that is freed? Or from a SetCondInst pointer, the two values that are compared in the appropriate order? Is iterating over the use-def chain the right way to do it, or am I missing something? Thanks, Scott Mikula
2004 Aug 17
0
[LLVMdev] JIT API example (fibonacci)
...argument 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...
2002 Sep 29
0
[LLVMdev] Re: llvm question
Sorry for the delay Lee, I was out of town yesterday. In general it's better to send questions to the LLVMdev list... > hi. all i want to do now is make a new SetCondInst that i can replace > some old ones with, and it is turning out *impossible*. the first > parameter is the opcode, which is of class BinaryOps, which turns out to > be an enum i can't understand in Instruction; i'm not sure how i'd just Do something like this: BinaryOperator::...
2004 Aug 17
0
[LLVMdev] JIT API example (fibonacci)
...gt; 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&quot...
2004 Aug 18
1
[LLVMdev] JIT API example (fibonacci)
...egin() != 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 =...
2006 May 17
0
[LLVMdev] Obfuscation with LLVM
...->getParent(), prevBB->getNext() ); // If not all cases was handled ... if( caseIdx != switchInst->getNumCases() ) { // Instructions for checking the case. LoadInst* testValue = new LoadInst( testValuePtr, "test_value", caseBlock ); SetCondInst* setCondInst = new SetCondInst( Instruction::SetEQ, testValue, switchInst->getCaseValue( caseIdx ), "is_case", caseBlock ); // Get a reference to the basic block for the next case. BasicBlock* nextCaseBlock = ProcessCase( switchInst, caseIdx + 1, caseBlock, testValu...
2005 May 19
1
[LLVMdev] Re: Preferring cast over seteq with 0
>> Is there a pass that will transform this: >> %cc = seteq ushort %val, 0 >> >> into this: >> %cc = cast ushort %val to bool >> >> Would instcombine be the logical place to do this? >> >> In my situation, this bool value feeds a select instruction. Because >> casting inverts the condition, the select would have to switch the
2004 May 09
2
[LLVMdev] Strange SetCond Behavior
Before I file a bug, I thought I'd check to make sure something hasn't changed. Stacker used to work in 1.2, now it fails on six tests. All six tests pertain to use of the SetLT, SetGT, SetLE, and SetGE SetCondInst. In my test programs they all fail, regardless of the values. The *only* thing I've done to Stacker is to change the base type involved in the comparison from int to long. Is there something "different" about the comparison of longs? The code generated by Stacker Compiler is like:...
2002 Sep 27
0
[LLVMdev] Accessing instruction arguments
...rguments of an arbitrary } instruction? The programmer's manual describes how to iterate over the } values a given instruction uses, but that doesn't seem to be exactly the } same thing. } } For instance, given a pointer to a FreeInst, how can I get the pointer } that is freed? Or from a SetCondInst pointer, the two values that are } compared in the appropriate order? Is iterating over the use-def chain } the right way to do it, or am I missing something? } Check out llvm/include/llvm/User.h line 25 or so... -- || Bill? Wendling wendling at isanbard.org
2004 May 09
0
[LLVMdev] Strange SetCond Behavior
On Sun, 9 May 2004, Reid Spencer wrote: > Before I file a bug, I thought I'd check to make sure something hasn't > changed. Stacker used to work in 1.2, now it fails on six tests. All six > tests pertain to use of the SetLT, SetGT, SetLE, and SetGE SetCondInst. > In my test programs they all fail, regardless of the values. > > The *only* thing I've done to Stacker is to change the base type > involved in the comparison from int to long. Is there something > "different" about the comparison of longs? > > The code generat...
2005 Feb 10
1
[LLVMdev] Emitting PPC branches
Hi, I want to take an intrinsic function, and get the PowerPC back end to emit: loop: lwarx ... add ... stwcx. ... bne- loop I can successfully emit: lwarx ... add ... stwcx. ... How do I emit a label and a branch instruction? Thanks, Brent