search for: tmp23

Displaying 20 results from an estimated 25 matches for "tmp23".

Did you mean: tmp2
2010 Jun 29
0
[LLVMdev] Confuse on getSCEVAtScope
On Jun 29, 2010, at 7:08 AM, ether zhhb wrote: > > why computeSCEVAtScope not try to get the operands in the current > scope like the function do with SCEVCommutativeExpr, like: > > if (const SCEVAddRecExpr *AddRec = dyn_cast<SCEVAddRecExpr>(V)) { > if (!L || !AddRec->getLoop()->contains(L)) { > ... > // Then, evaluate the AddRec. >
2010 Jun 29
2
[LLVMdev] Confuse on getSCEVAtScope
hi all, i have SCEVAddRec {{(32 + @edge.8265),+,32}<Loop0>,+,4}<Loop1> where Loop0 and Loop1 are brothers (loops at the same level of the loopnest), and Loop0 have a computable backedge taken count. when i call getSCEVAtScope({{(32 + @edge.8265),+,32}<Loop0>,+,4}<Loop1> , Loop1), it just give me a {{(32 + @edge.8265),+,32}<Loop0>,+,4}<Loop1>, instead of
2008 May 02
4
[LLVMdev] Pointer sizes, GetElementPtr, and offset sizes
...128:128:128-a0:0:64-f80:32:32" target triple = "i686-pc-linux-gnu" define i32 @main() nounwind { entry: %x = alloca [2 x i32*] ; <[2 x i32*]*> [#uses=2] %tmp1 = getelementptr [2 x i32*]* %x, i32 0, i32 1 ; <i32**> [#uses=1] %tmp23 = ptrtoint i32** %tmp1 to i32 ; <i32> [#uses=1] %x45 = ptrtoint [2 x i32*]* %x to i32 ; <i32> [#uses=1] %tmp6 = sub i32 %tmp23, %x45 ; <i32> [#uses=1] %tmp7 = ashr i32 %tmp6, 2 ; <i32> [#uses=1] re...
2008 May 02
0
[LLVMdev] Pointer sizes, GetElementPtr, and offset sizes
...t main() { > int *x[2]; > int **y = &x[1]; > return (y - x); > } Idefine i32 @main() nounwind { entry: %x = alloca [2 x i32*] ; <[2 x i32*]*> [#uses=2] %tmp1 = getelementptr [2 x i32*]* %x, i32 0, i32 1 ; <i32**> [#uses=1] %tmp23 = ptrtoint i32** %tmp1 to i32 ; <i32> [#uses=1] %x45 = ptrtoint [2 x i32*]* %x to i32 ; <i32> [#uses=1] %tmp6 = sub i32 %tmp23, %x45 ; <i32> [#uses=1] %size = getelementptr i32** null, i32 1 ; <i32**> [#uses=1]...
2007 Jun 12
3
[LLVMdev] ARM backend problem ?
...then4: %tmp14 = load i32* %i %tmp16 = load i32* %n %tmp18 = load i32* %inc %tmp15 = add i32 %tmp16, %tmp18 %tmp13 = icmp slt i32 %tmp14, %tmp15 br i1 %tmp13, label %then11, label %else12 then11: %tmp20 = load i32* %f %tmp22 = alloca i32 store i32 1 , i32* %tmp22 %tmp23 = load i32* %tmp22 %tmp24 = load i32* %i %tmp21 = add i32 %tmp24, %tmp23 store i32 %tmp21, i32* %i %tmp19 = mul i32 %tmp20, %tmp21 store i32 %tmp19, i32* %f br label %then4 else12: %tmp25 = load i32* %f %tmp335 = getelementptr [4 x i8]* @.str1, i32 0, i3...
2007 Jun 12
0
[LLVMdev] ARM backend problem ?
...* %inc > > %tmp15 = add i32 %tmp16, %tmp18 > > %tmp13 = icmp slt i32 %tmp14, %tmp15 > > br i1 %tmp13, label %then11, label %else12 > > > > then11: > > %tmp20 = load i32* %f > > %tmp22 = alloca i32 > > store i32 1 , i32* %tmp22 > > %tmp23 = load i32* %tmp22 > > %tmp24 = load i32* %i > > %tmp21 = add i32 %tmp24, %tmp23 > > store i32 %tmp21, i32* %i > > %tmp19 = mul i32 %tmp20, %tmp21 > > store i32 %tmp19, i32* %f > > br label %then4 > > > > else12: > > %tmp25 = load...
2011 Jul 25
1
[LLVMdev] print the memory address computed by getelementptr
...k you, your suggestion worked well. I was looking for a pointer to void actually. But it seems that I do not get the memory address when passing the value of the GEP instruction.  For instance, when I print the address accessed by the second operandof the store instruction store %struct.linked* %tmp23.reload8, %struct.linked** %curr.037.reg2mem I obtain a memory address of the form 7fff29c28ac8 But when I try to get the address stored in the GEP %tmp18 = getelementptr inbounds %struct.linked* %curr.025.reload, i64 0, i32 0 I obtain 2084a10 which is not the memory location I expect. Is this...
2010 Nov 07
0
[LLVMdev] Hoisting elements of array argument into registers
...-5 %tmp22.i = mul i32 %tmp21.i, %tmp12.i %tmp9.i = mul i32 %a, %a %.promoted2.i = load i32* %2, align 4 %tmp25.i = mul i32 %tmp18.i, 5 %tmp.i = sub i32 %.promoted1.i, %a %tmp10.i = add i32 %tmp9.i, 1 %tmp11.i = sub i32 %tmp10.i, %tmp18.i %tmp19.i = add i32 %tmp11.i, %.promoted2.i %tmp23.i = sub i32 %tmp20.i, %tmp25.i %tmp26.i = add i32 %tmp23.i, %tmp22.i store i32 0, i32* %0, align 4 store i32 %tmp19.i, i32* %2, align 4 store i32 %tmp.i, i32* %1, align 4 store i32 %tmp26.i, i32* %3, align 4 br label %wf.exit wf.exit: ; preds =...
2008 Jan 12
1
[LLVMdev] Labels
...%tmp12 = load i8** @yybuf, align 4 %tmp13 = load i32* @yypos, align 4 %tmp14 = getelementptr i8* %tmp12, i32 %tmp13 %tmp15 = load i8* %tmp14, align 1 %tmp1516 = sext i8 %tmp15 to i32 %tmp18 = icmp eq i32 %tmp1516, %c br i1 %tmp18, label %cond_true21, label %UnifiedReturnBlock cond_true21: %tmp23 = add i32 %tmp13, 1 store i32 %tmp23, i32* @yypos, align 4 ret i32 1 UnifiedReturnBlock: ret i32 0 } define i32 @yymatchString(i8* %s) { entry: %tmp1 = load i32* @yypos, align 4 %tmp3243 = load i8* %s, align 1 %tmp3344 = icmp eq i8 %tmp3243, 0 br i1 %tmp3344, label %UnifiedReturnBlock, lab...
2009 Dec 07
4
[LLVMdev] 2.6 JIT using wrong address for external functions
...#uses=1] br i1 %correctParamCount, label %copyParams, label %invalidParams copyParams: ; preds = %entry %tmp4.i.i.i.i.i = tail call i64 @ContextFrame_getInt64Value(%struct.ContextFrame* %context, i32 0, i64 726) nounwind readonly ; <i64> [#uses=1] %tmp23.i.i.i.i.i = sitofp i64 %tmp4.i.i.i.i.i to double ; <double> [#uses=1] ... (gdb) x/100i 0xfffffd7ff9302528 0xfffffd7ff9302528: push %r14 0xfffffd7ff930252a: push %rbx 0xfffffd7ff930252b: sub $0x18,%rsp 0xfffffd7ff930252f: test %rdx,%rdx 0xfffffd7ff9302532: jne...
2011 Jul 17
0
[LLVMdev] Trying to optimize out store/load pair
...r.body25: ; preds = %for.body25, %for.cond21.preheader %indvar4 = phi i64 [ 0, %for.cond21.preheader ], [ %indvar.next5, %for.body25 ] %tmp19 = shl i64 %indvar4, 2 %tmp21 = add i64 %tmp20, %tmp19 %arrayidx = getelementptr i8* %inputBuffer, i64 %tmp21 %tmp23 = add i64 %tmp2227, %tmp19 %arrayidx42 = getelementptr i8* %inputBuffer, i64 %tmp23 %tmp25 = add i64 %tmp2428, %tmp19 %arrayidx49 = getelementptr i8* %inputBuffer, i64 %tmp25 %tmp7 = shl i64 %indvar4, 1 %tmp = trunc i64 %tmp7 to i32 %tmp37 = load i8* %arrayidx, align 1, !tbaa !0 %conv...
2011 Jul 17
0
[LLVMdev] Trying to optimize out store/load pair
...5 for.body25: ; preds = %for.body25, %for.cond21.preheader %indvar4 = phi i64 [ 0, %for.cond21.preheader ], [ %indvar.next5, %for.body25 ] %tmp19 = shl i64 %indvar4, 2 %tmp21 = add i64 %tmp20, %tmp19 %arrayidx = getelementptr i8* %inputBuffer, i64 %tmp21 %tmp23 = add i64 %tmp2227, %tmp19 %arrayidx42 = getelementptr i8* %inputBuffer, i64 %tmp23 %tmp25 = add i64 %tmp2428, %tmp19 %arrayidx49 = getelementptr i8* %inputBuffer, i64 %tmp25 %tmp7 = shl i64 %indvar4, 1 %tmp = trunc i64 %tmp7 to i32 %tmp37 = load i8* %arrayidx, align 1, !tbaa !0 %conv = zext...
2010 Sep 29
0
[LLVMdev] spilling & xmm register usage
...ign 4 > %tmp5.i = fmul float %tmp3.i, 1.000000e+01 > %tmp7.i = fsub float 1.000000e+00, %tmp3.i > %tmp8.i = fmul float %tmp7.i, 1.000000e+02 > %tmp9.i = fadd float %tmp5.i, %tmp8.i > %tmp20.i = fmul float %tmp7.i, 1.000000e+01 > %tmp21.i = fadd float %tmp3.i, %tmp20.i > %tmp23.i = fmul float %tmp3.i, 0x3F847AE140000000 > %tmp26.i = fmul float %tmp7.i, 0x3FA99999A0000000 > %tmp27.i = fadd float %tmp23.i, %tmp26.i > %tmp32.i = fmul float %tmp7.i, 0x3FB99999A0000000 > %tmp33.i = fadd float %tmp23.i, %tmp32.i > %call36.i = tail call float @llvm.sqrt.f32(f...
2010 Nov 06
2
[LLVMdev] Hoisting elements of array argument into registers
I am seeing the wf loop get optimized just fine with llvm 2.8 (and almost as good with head). I'm running on Mac OS X 10.6. I have an apple supplied llvm-gcc and a self compiled llvm 2.8. When I run $ llvm-gcc -emit-llvm -S M.c $ opt -O2 M.s | llvm-dis I see that: 1. Tail recursion has been eliminated from wf 2. The accesses to sp have been promoted to registers 3. The loop has
2010 Sep 29
3
[LLVMdev] spilling & xmm register usage
Hello everybody, I have stumbled upon a test case (the attached module is a slightly reduced version) that shows extremely reduced performance on linux compared to windows when executed using LLVM's JIT. We narrowed the problem down to the actual code being generated, the source IR on both systems is the same. Try compiling the attached module: llc -O3 -filetype=asm -o BAD.s BAD.ll Under
2009 Dec 07
0
[LLVMdev] 2.6 JIT using wrong address for external functions
...ramCount, label %copyParams, label %invalidParams > > copyParams:                                       ; preds = %entry >  %tmp4.i.i.i.i.i = tail call i64 > @ContextFrame_getInt64Value(%struct.ContextFrame* %context, i32 0, i64 > 726) nounwind readonly ; <i64> [#uses=1] >  %tmp23.i.i.i.i.i = sitofp i64 %tmp4.i.i.i.i.i to double ; <double> > [#uses=1] > ... > > > (gdb) x/100i 0xfffffd7ff9302528 > 0xfffffd7ff9302528:     push   %r14 > 0xfffffd7ff930252a:     push   %rbx > 0xfffffd7ff930252b:     sub    $0x18,%rsp > 0xfffffd7ff930252f:     test...
2008 Jul 16
0
[LLVMdev] allocating an array
...me size and looking at the resulting > bitcode didn't provide an answer to my question. > Do you mean a variable length array (as in C99) or something else? LLVM will convert VLAs into an "alloca": int foo(int X) { int a[X]; ... } define i32 @foo(i32 %X) nounwind { entry: %tmp23 = alloca i32, i32 %X ; <i32*> [#uses=2] ... } If you are doing the zero-sized array hack, then you'll have to call malloc on it anyway. Something like: struct a { char c; int d[0]; }; And then in your program do something like this: void bar(int z) { struct a *fnord = malloc(si...
2008 Jul 16
3
[LLVMdev] allocating an array
How can I allocate an array with a size that is not known at compile time? The language reference says that the array size must be a constant integer value. It also says that variable sized arrays are represented by using zero as the number of elements. Obviously I cannot use zero in the array type when it is allocated. llvm-gcc seems to use a pointer type instead of an array type, so compiling a
2011 Jul 20
0
[LLVMdev] print the memory address computed by getelementptr
On 7/20/11 10:02 AM, Jimborean Alexandra wrote: > Hi, > > I want to print the memory locations computed by getelementptr. As I > understood, getelementptr does not access the memory, but it contains > the address it computes. I want to print these addresses at runtime > (or process them). So, I try to build a function that takes as > argument a pointer and prints its
2008 Mar 04
0
[LLVMdev] Deleting Instructions after Intrinsic Creation
...p14.i to i32 ; <i32> [#uses=1] %tmp18.i = add i32 %tmp45.i, %tmp5.i ; <i32> [#uses=1] %tmp20.i = sub i32 %tmp18.i, %tmp910.i ; <i32> [#uses=1] %tmp22.i = add i32 %tmp20.i, %tmp1415.i ; <i32> [#uses=1] %tmp23.i = srem i32 %tmp22.i, 7 ; <i32> [#uses=0] %tmp2.i2 = and i32 %tmp5.i, 3 ; <i32> [#uses=1] %tmp3.i3 = icmp eq i32 %tmp2.i2, 0 ; <i1> [#uses=0] %migrate_begin = call i32 (...)* @llvm.migrate_begin( ) ; <i32> [#us...