Displaying 14 results from an estimated 14 matches for "iftmp".
2007 Aug 02
0
[LLVMdev] Debug info for conditionally defined variables?
Hi,
I have this piece of code:
tm = local ? localtime(&curr) : gmtime(&curr);
if (!tm) return NULL;
which translates into something like:
----------------------------------------------
entry:
%iftmp.0 = alloca %struct.tm*, align 8
%tm = alloca %struct.tm*, align 8
...
// Declares iftmp.0 as iftmp.0
call void @llvm.dbg.declare( { }* %iftmp.0, { }* bitcast
(%llvm.dbg.variable.type* @llvm.dbg.variable792014 to { }*) )
// Declares tm as tm
call void @llvm.dbg.declare( {...
2017 May 26
2
Moving instructions from source Basic Block to dest Basic Block
Hi,
I have been trying to move some instructions between basic blocks ,
After looking at the API , I found llvm::Instruction::clone() but there
is no result value for this.
For example-
source Basic block :
continuation: ; preds = %else, %then
%iftmp = phi i32 [ 5, %then ], [ 9, %else ]
store i32 %iftmp, i32* %datasize
; 3 instructions below being copied
store i8000000 0, i8000000* %res
%res4 = load i8000000, i8000000* %res
ret i8000000 %res4
After copying the 3 instructions above to destination basic block.
destination basic block...
2011 May 31
2
[LLVMdev] How to identify LLVM version?
Hi, all
I'd like to write a code that can build different codes based on LLVM version.
Like code snippets in the below.
#ifdef __LLVM_29__
PHINode *PN = Builder.CreatePHI (Type::getDoubleTy(getGlobalContext()), 2, "iftmp");
#elif __LLVM_28__
PHINode *PN = Builder.CreatePHI (Type::getDoubleTy(getGlobalContext()), "iftmp");
#else
assert ("wrong version");
#endif
I've been trying to find something like these (__LLVM_29__, __LLVM_28__), but I couldn't find them yet.
Thanks for...
2017 Jun 16
2
simplify CFG Pass in llvm
...%gclone1 = alloca i32
store i32 0, i32* %gclone1
ret i5 0
else: ; preds = %entry
%gclone4 = alloca i64
store i64 0, i64* %gclone4
ret i5 0
continuation: ; No predecessors!
%iftmp = phi i32 [ 32, %then ], [ 64, %else ], !range !0
%datasize = alloca i32
store i32 %iftmp, i32* %datasize
%g = alloca i8 ---------------------> Issue
store i8 0, i8* %g ---------------------> Issue
ret i5 0
}
Can someone please explain why this error crops...
2013 Sep 05
2
[LLVMdev] Optimisation pass to move an alloca'd array to a global constant array
...%6 = sext i32 %i to i64
%7 = getelementptr [5 x i32]* %"Array literal space", i64 0, i64 %6
%8 = load i32* %7, align 4
br label %"elem(array<int, 5>, int).exit"
"elem(array<int, 5>, int).exit": ; preds = %entry,
%in-bounds.i
%iftmp.i = phi i32 [ %8, %in-bounds.i ], [ 0, %entry ]
ret i32 %iftmp.i
}
attributes #0 = { nounwind readnone }
2011 Jul 06
1
[LLVMdev] Confusion with a Use of a getelementptr instruction being a Use of a select instruction instead
...e Def/Use analysis, and I'm hung up on one tricky spot. The BB
in question is attached. Ignore the red.
The issue is that '%13 = load...' instruction does not show up as a Use for
the '%scevgep25' definition, and I feel like it should. Instead, it shows
up as a Use for '%iftmp.55.0 = select...', though Operand(0) for this '%13 =
load' instruction [listed as a Use for '%iftmp.55.0 = select...'] is
reported as the %scevgep25 instruction, which is correct.
Sorry if that was a bit convoluted. Essentially, it seems that
'getelementptr' instructio...
2008 Oct 08
0
[LLVMdev] [PATCH] Lost instcombine opportunity: "or"s of "icmp"s (commutability)
...est/Transforms/InstCombine/2006-05-06-Infloop.ll. The original code
truncates two i32 values to i8 and eventually ORs them together. The
patch has it optimized to OR the two values first then truncate a
single value.
%tmp264not = xor i8 %tmp264, -1 ; <i8> [#uses=1]
%tmp212 = trunc i32 %iftmp.36.0 to i8 ; <i8> [#uses=2]
%tmp265 = trunc i32 %tmp261 to i8 ; <i8> [#uses=1]
%tmp266 = or i8 %tmp212, %tmp264not ; <i8> [#uses=2]
%tmp268 = or i8 %tmp266, %tmp265 ; <i8> [#uses=1]
%tmp264not = xor i8 %tmp264, -1 ; <i8> [#uses=2]
%a.c45 = or i32...
2008 May 27
2
[LLVMdev] Min and max
Hi all,
I'm trying to implement a floating-point 'min' and 'max' operation using
select. For 'min' I get the expected x86 assembly minss instruction, but for
'max' I get a branch instead of maxss.
The corresponding C syntax code looks like this:
float z = (x > y) ? x : y;
Any clues?
Could someone maybe explain to me the basics of
2008 Oct 08
3
[LLVMdev] Lost instcombine opportunity: "or"s of "icmp"s (commutability)
instcombine can handle certain orders of "icmp"s that are "or"ed together:
x != 5 OR x > 10 OR x == 8 becomes..
x != 5 OR x == 8 becomes..
x != 5
However, a different ordering prevents the simplification:
x == 8 OR x > 10 OR x != 5 becomes..
%or.eq8.gt10 OR x != 5
and that can't be simplified because we now have an "or" OR "icmp".
What would I
2009 Mar 17
2
[LLVMdev] PHIs with Same Basic Block Listed Twice
Dear All,
I have, in an LLVM bitcode program, the following phi node:
%iftmp.225.0 = phi i8* [ getelementptr ([10 x i8]* @.str12597431, i32 0,
i32 0), %bb114 ], [ getelementptr ([10 x i8]* @.str1258, i32 0, i32 0),
%bb111 ], [ getelementptr ([10 x i8]* @.str1258, i32 0, i32 0), %bb111 ]
This phi instruction has two arguments for the same incoming basic
block. The only rea...
2009 Mar 17
0
[LLVMdev] PHIs with Same Basic Block Listed Twice
On Mar 17, 2009, at 11:37 AMPDT, John Criswell wrote:
> Dear All,
>
> I have, in an LLVM bitcode program, the following phi node:
>
> %iftmp.225.0 = phi i8* [ getelementptr ([10 x i8]* @.str12597431,
> i32 0,
> i32 0), %bb114 ], [ getelementptr ([10 x i8]* @.str1258, i32 0, i32
> 0),
> %bb111 ], [ getelementptr ([10 x i8]* @.str1258, i32 0, i32 0),
> %bb111 ]
>
> This phi instruction has two arguments for the...
2011 May 31
0
[LLVMdev] How to identify LLVM version?
...t;aixer77 at gmail.com> writes:
> Hi, all
>
> I'd like to write a code that can build different codes based on LLVM version.
> Like code snippets in the below.
>
> #ifdef __LLVM_29__
> PHINode *PN = Builder.CreatePHI (Type::getDoubleTy(getGlobalContext()), 2, "iftmp");
> #elif __LLVM_28__
> PHINode *PN = Builder.CreatePHI (Type::getDoubleTy(getGlobalContext()), "iftmp");
> #else
> assert ("wrong version");
> #endif
>
> I've been trying to find something like these (__LLVM_29__,
> __LLVM_28__), but I co...
2008 Jan 12
1
[LLVMdev] Labels
...mp16, -1
br i1 %tmp21, label %cond_next, label %cond_true
cond_true:
%tmp24 = load i8** @yybuf, align 4
%tmp25 = load i32* @yypos, align 4
%tmp2627 = trunc i32 %tmp16 to i8
%tmp28 = getelementptr i8* %tmp24, i32 %tmp25
store i8 %tmp2627, i8* %tmp28, align 1
br label %cond_next
cond_next:
%iftmp.29.0 = phi i32 [ 1, %cond_true ], [ 0, %bb13 ]
%tmp31 = icmp eq i32 %iftmp.29.0, 0
br i1 %tmp31, label %UnifiedReturnBlock, label %cond_next36
cond_next36:
%tmp37 = load i32* @yylimit, align 4
%tmp39 = add i32 %tmp37, %iftmp.29.0
store i32 %tmp39, i32* @yylimit, align 4
ret i32 1
UnifiedRet...
2007 Jul 12
1
[LLVMdev] backend problem with LiveInterval::removeRange
...el %bb62
CGP: Found local addrmode: [Base:%argc_addr]
CGP: Found local addrmode: [Base:%argv_addr]
CGP: Found local addrmode: [Base:%argc_addr]
CGP: Found local addrmode: [Base:%argv_addr]
CGP: Found local addrmode: [4 + Base:%tmp4]
CGP: Found local addrmode: [Base:%iftmp.0]
CGP: Found local addrmode: [Base:%iftmp.0]
CGP: Found local addrmode: [Base:%iftmp.0]
CGP: Found local addrmode: [Base:%NUM]
CGP: Found local addrmode: [Base:%count]
CGP: Found local addrmode: [Base:%count]
CGP: Found local addrmode: [Base:%i]
CGP: Found local...