similar to: [LLVMdev] Question about inserting IR code

Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] Question about inserting IR code"

2005 Jan 11
2
[LLVMdev] Loop IR insertion
Hi, I am trying to insert a Loop IR into the existed bytecode file. insertion part by C code, char *p[n]; // pointer array for storing the address of strings int i; for(i=0;i<n;i++){ (p[i])[2] = (p[i])[2] ^ 0x27; } My questions are 1. for local variable 'char *p[n]' , it is represented by IR as alloca ...., so could I insert local variable (pointer array) directly as same way
2004 Aug 17
0
[LLVMdev] JIT API example (fibonacci)
Valery, That's pretty cute actually. Do you want this "brilliant" :) example in the cvs repository? I'd be happy to put it in. Reid. Valery A.Khamenya wrote: > 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 >
2004 Aug 17
5
[LLVMdev] JIT API example (fibonacci)
On Tue, 17 Aug 2004, Reid Spencer wrote: > That's pretty cute actually. Do you want this "brilliant" :) example in the cvs > repository? I'd be happy to put it in. Here's an idea: how about we take the ModuleMaker, Valery's previous example, and this one and put them all in one "small examples" project? -Chris > Valery A.Khamenya wrote: > >
2004 Aug 17
0
[LLVMdev] JIT API example (fibonacci)
On second thought, the makefiles don't (easily) allow this do they? You can only build one program per directory. Were you suggesting that you wanted me to move the entire directories under a "small examples" directory? Reid. Chris Lattner wrote: > On Tue, 17 Aug 2004, Reid Spencer wrote: > > >>That's pretty cute actually. Do you want this
2004 Aug 18
1
[LLVMdev] JIT API example (fibonacci)
On Tue, 17 Aug 2004, Reid Spencer wrote: > On second thought, the makefiles don't (easily) allow this do they? You can > only build one program per directory. Were you suggesting that you wanted me to > move the entire directories under a "small examples" directory? You're right. The simples way to do this would be to have: projects/ SmallExamples/
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
2014 Jun 25
2
[LLVMdev] Question Regarding Sign-Overflow
Sorry, the old title didn't make sense. > Hi, > > I have doubts on the following transformation in InstCombineAddSub.cpp. Is > it always safe to preserve NSW/NUW in this case? > > // If this is a 'B = x-(-A)', change to B = x+A. This preserves NSW/NUW. if (Value
2008 Jul 01
2
[LLVMdev] vmkit on x86_64
Hello, I'm trying to compile vmkit on a x86_64 linux box with gcc-4.1.2, but I'm running into troubles because of various problems with casts between pointers and integers. Is there anybody who succeeded in this task? Az I see, some of the problems can be fixed with an appropriate typedef/macro declaration, but in VMCore/JavaObject.cpp some lowlevel bitmanipulation is used, to mark
2004 Aug 09
1
[LLVMdev] API on JIT, code snippets
Valery, First response of several. I don't know why the demo page at UIUC is unavailable but there is an enhanced copy of it running on the mirror at http://llvm.x10sys.com/demo/ if you ever need it. Running it produced the following LLVM equivalent for the C code in your example. implementation ; Functions: int %add1(int %x) { entry: %tmp.1 = add int %x, 1 ; <int> [#uses=1]
2011 Dec 06
1
[LLVMdev] Problem with IR code instruction
Hi... I'm having some trouble with an IR instruction. I'm triying to modify it. I was trying to create a BinaryOperator "op" with some operands from Instruction "inst": op = BinaryOperator::Create(Instruction::Add,cast<Value>(inst->getOperand(0)),cast<Value>(r),inst->getNameStr(),inst); But when executed, my pass throw a segfault and a stacktrace:
2004 Aug 09
5
[LLVMdev] API on JIT, code snippets
Valery, Attached are three files: "valery.cpp" which contains your original, "reid.cpp" which contains corrections to most of the FIXME items and "diffs" which shows the differences between them. The differences should be instructive on what to do. You were really, really close .. just a few details changing. The code in "reid.cpp" compiles but I
2004 Aug 09
0
[LLVMdev] API on JIT, code snippets
On Mon, 9 Aug 2004, Reid Spencer wrote: > Attached are three files: "valery.cpp" which contains your original, "reid.cpp" > which contains corrections to most of the FIXME items and "diffs" which shows > the differences between them. The differences should be instructive on what to > do. You were really, really close .. just a few details changing. The
2008 Jul 01
0
[LLVMdev] vmkit on x86_64
Hi Zsombor, Thanks for the patch! Unfortunately I can't apply it because the llvm API has moved from BinaryOperator::create to BinaryOperator::Create. Are you using svn head? Now on the x86_64 part. There has been very little work on porting vmkit on x86_64. If you're having compilation problems, I suppose it's in the garbage collector directory (GCMmap2). If you could make the
2011 Jan 24
3
[LLVMdev] How to change the type of an Instruction?
Hi, Nick, thanks for the reply. I still have a problem: I only need to "clone" an Instruction, changing its type. That is, I would like to keep all characteristics of the old Instruction and create a new one only with a different type. I am trying create a new Instruction thus: %3 = add nsw i32 %1, %2 ; <i16> [#uses=2] //Old Instruction Value* Op0 = I->getOperand(0); Value*
2013 Jan 01
2
[LLVMdev] clang with -emit-llvm
Hello, I have just started using llvm. I was trying to debug how *clang* generates IR for very simple C testcases (few assignments and if-condsitions). To get a hold on the basic functions, I put some break points on following functions but debugger *didn't stop*: llvm::BasicBlock::Create llvm::BinaryOperator::CreateAdd (design has binary op) llvm::Value::Value llvm::BranchInst::Create
2004 Aug 09
0
[LLVMdev] API on JIT, code snippets
Reid wrote: > I have to agree with Misha on this. None of us knows "everything" about > LLVM and as you can see, Misha responded three hours before I did :). > Asking questions here is encouraged, so please feel free to post them on > LLVMdev. We'll always help where we can. well, OK :) Please find the attachment with the first approach to such an example i've
2011 Jan 21
0
[LLVMdev] How to change the type of an Instruction?
On 21 January 2011 12:56, Douglas do Couto Teixeira < douglasdocouto at gmail.com> wrote: > Hello guys, > > I wonder how I can change the type of an integer variable. For instance, > given the instruction "%3 = add i32 %1, %2" I would like to alter the > instruction to "%3 = add i16 %1, %2". Is there any way to do this? > No. Instead you create a new
2004 Aug 09
3
[LLVMdev] API on JIT, code snippets
Valery, I have to agree with Misha on this. None of us knows "everything" about LLVM and as you can see, Misha responded three hours before I did :). Asking questions here is encouraged, so please feel free to post them on LLVMdev. We'll always help where we can. Thanks, Reid. On Mon, 2004-08-09 at 06:37, Misha Brukman wrote: > On Mon, Aug 09, 2004 at 12:32:33PM +0400, Valery
2011 Jan 24
0
[LLVMdev] How to change the type of an Instruction?
On 01/24/2011 04:41 AM, Douglas do Couto Teixeira wrote: > Hi, > > Nick, thanks for the reply. > I still have a problem: I only need to "clone" an Instruction, changing > its type. That is, I would like to keep all characteristics of the old > Instruction and create a new one only with a different type. Sure, but what about its operands? An "add" instruction
2012 Feb 04
0
[LLVMdev] How to properly use copyValue?
Ryan Taylor wrote: > Since there are no constructors for Value, how do you properly insert a > new Value? Value is a pure base. If you want to construct a new Value, then you want to construct a global variable or instruction or argument or something in particular. > If I create a pointer Value *newValue and then call > AA.copyValue(oldValue, newValue), this does not work, since