Displaying 20 results from an estimated 37 matches for "no_exit".
2005 Apr 29
2
[LLVMdev] IntervalPartition bug?
...n
-------------------------------------------------------------
Interval Contents:
entry:
load int* %i ; <int>:0 [#uses=1]
load int* %j ; <int>:1 [#uses=1]
%tmp.24 = setgt int %k, 0 ; <bool> [#uses=1]
%tmp.35 = load int* %i ; <int> [#uses=2]
br bool %tmp.24, label %no_exit.preheader, label %loopexit
no_exit: ; preds = %no_exit, %no_exit.preheader
%indvar = phi uint [ 0, %no_exit.preheader ], [ %indvar.next, %no_exit ] ; <uint> [#uses=2]
%j.tmp.1 = phi int [ %j.promoted, %no_exit.preheader ], [ %tmp.8, %no_exit ] ; <int> [#uses=1]
%tmp.3.0 = phi in...
2004 Mar 31
0
[LLVMdev] A question about induction variables
...g with the
> following simple example:
>
> int main()
> {
> int r(0);
> for (int i = 0; i < 100; ++i)
> r += i;
> ;
> return r;
> }
When I compiled it, I got the following LLVM code:
int %main() {
entry:
call void %__main( )
br label %no_exit
no_exit: ; preds = %entry, %no_exit
%i.0.0 = phi int [ 0, %entry ], [ %inc, %no_exit ]
%r.0.0 = phi int [ 0, %entry ], [ %tmp.4, %no_exit ]
%tmp.4 = add int %r.0.0, %i.0.0 ; <int> [#uses=2]
%inc = add int %i.0.0, 1 ; <int> [#uses=2]
%tmp.1 = setgt int %inc, 99 ; <bool> [...
2004 Mar 31
2
[LLVMdev] A question about induction variables
Hello,
I've just downloaded the latest release of LLVM, and playing with the
following simple example:
int main()
{
int r(0);
for (int i = 0; i < 100; ++i)
r += i;
;
return r;
}
I compile it and then run:
analyze -indvars x.bc
which prints:
Printing analysis 'Induction Variable Analysis' for function 'main':
and nothing else. It is a
2006 Jun 15
2
[LLVMdev] problem with loopinfo
...clude "stdio.h"
#define N 40
void func1() {
int a[N];
int i,j;
for (i=0; i<N; i++) {
if (i==0)
a[i] = i*N;
else
a[i] = i*i;
}
}
Test.ll:
void %func1() {
entry:
%a = alloca [40 x int] ; <[40 x int]*> [#uses=1]
br label %no_exit
no_exit: ; preds = %else, %then, %entry
%i.0.0 = phi int [ 0, %entry ], [ %inc9, %then ], [ %inc, %else ] ; <int> [#uses=7]
%tmp.4 = seteq int %i.0.0, 0 ; <bool> [#uses=1]
%tmp.7 = getelementptr [40 x int]* %a, int 0, int %i.0.0...
2006 Jul 09
2
[LLVMdev] Critical edges
...ng the
code below? It is creating assembly like this one below. Block LBB1_9 was
inserted to break the critical edge between blocks LBB1_3 and LBB1_8. But
it changes the semantics of the original program, because, before, LBB1_8
was falling through LBB1_4, and now it is falling on LBB1_9.
LBB1_3: ;no_exit
lis r4, 21845
ori r4, r4, 21846
mulhw r4, r2, r4
addi r5, r2, -1
li r6, -1
srwi r6, r4, 31
add r4, r4, r6
mulli r4, r4, 3
li r6, 1
subf r2, r4, r2
cmpwi cr0, r2, 0
beq cr0, LBB1_9 ;no_exit
LBB1_7: ;no_ex...
2005 Feb 22
0
[LLVMdev] Area for improvement
...est(unsigned N, complex double *P) {
for (; N != 0; --N)
*P++ = 0;
}
We compile it to this LLVM code:
void %test(uint %N, "complex long double"* %P) {
entry:
%tmp.15 = seteq uint %N, 0 ; <bool> [#uses=1]
br bool %tmp.15, label %return, label %no_exit
no_exit: ; preds = %no_exit, %entry
%indvar = phi uint [ %indvar.next, %no_exit ], [ 0, %entry ] ; <uint> [#uses=3]
%tmp.4 = getelementptr "complex long double"* %P, uint %indvar, uint 0 ; <double*> [#uses=1]
store...
2006 Jun 15
2
[LLVMdev] problem with loopinfo
...) {
>> if (i==0)
>> a[i] = i*N;
>> else
>> a[i] = i*i;
>> }
>> }
>>
>> Test.ll:
>> void %func1() {
>> entry:
>> %a = alloca [40 x int] ; <[40 x int]*> [#uses=1]
>> br label %no_exit
>>
>> no_exit: ; preds = %else, %then, %entry
>> %i.0.0 = phi int [ 0, %entry ], [ %inc9, %then ], [ %inc, %else ]
>> ; <int> [#uses=7]
>> %tmp.4 = seteq int %i.0.0, 0 ; <bool> [#uses=1]
>> %tmp.7 = gete...
2006 Jun 15
0
[LLVMdev] problem with loopinfo
...a[N];
> int i,j;
> for (i=0; i<N; i++) {
> if (i==0)
> a[i] = i*N;
> else
> a[i] = i*i;
> }
> }
>
> Test.ll:
> void %func1() {
> entry:
> %a = alloca [40 x int] ; <[40 x int]*> [#uses=1]
> br label %no_exit
>
> no_exit: ; preds = %else, %then, %entry
> %i.0.0 = phi int [ 0, %entry ], [ %inc9, %then ], [ %inc, %else ] ; <int> [#uses=7]
> %tmp.4 = seteq int %i.0.0, 0 ; <bool> [#uses=1]
> %tmp.7 = getelementptr [40 x int]* %a...
2005 Feb 22
2
[LLVMdev] Area for improvement
...for (; N != 0; --N)
> *P++ = 0;
> }
>
> We compile it to this LLVM code:
>
> void %test(uint %N, "complex long double"* %P) {
> entry:
> %tmp.15 = seteq uint %N, 0 ; <bool> [#uses=1]
> br bool %tmp.15, label %return, label %no_exit
>
> no_exit: ; preds = %no_exit, %entry
> %indvar = phi uint [ %indvar.next, %no_exit ], [ 0, %entry
> ] ; <uint> [#uses=3]
> %tmp.4 = getelementptr "complex long double"* %P, uint
> %indvar, uint 0 ; <double*...
2003 Dec 22
1
[LLVMdev] How to explain?
...rget pointersize = 32
%struct..TorRec = type { int, void ()* }
%struct.TorRec = type { int, void ()* }
%.str_1 = internal constant [13 x sbyte] c"hello world\0A\00"
; <[13 x sbyte]*> [#uses=1]
implementation ; Functions:
int %main() {
entry:
br label %no_exit.i1
no_exit.i1: ; preds = %entry, %no_exit.i1
%Str.0.i = phi sbyte* [ %inc.i, %no_exit.i1 ], [ getelementptr
([13 x sbyte]* %.str_1, long 0, long 0), %entry ]
; <sbyte*> [#uses=2]
%inc.i = getelementptr sbyte* %Str.0.i, long 1 ;
<sb...
2004 Apr 01
1
[LLVMdev] A question about induction variables
...+i)
> > r += i;
> > ;
> > return r;
> > }
>
> When I compiled it, I got the following LLVM code:
The code I get is somewhat different:
int %main() {
entry:
%tmp.1.i = load bool* %Initialized.0__ ; <bool> [#uses=1]
br bool %tmp.1.i, label %no_exit, label %endif.0.i
endif.0.i: ; preds = %entry
store bool true, bool* %Initialized.0__
br label %no_exit
no_exit: ; preds = %entry, %endif.0.i, %no_exit
%i.0.0 = phi int [ %inc, %no_exit ], [ 0, %endif.0.i ], [ 0, %entry ] ;
<int> [#uses=2]
%r.0.0 = phi int [ %tmp.4, %no_exit ], [ 0,...
2006 Jun 15
0
[LLVMdev] problem with loopinfo
...a[i] = i*N;
>>> else
>>> a[i] = i*i;
>>> }
>>> }
>>>
>>> Test.ll:
>>> void %func1() {
>>> entry:
>>> %a = alloca [40 x int] ; <[40 x int]*> [#uses=1]
>>> br label %no_exit
>>>
>>> no_exit: ; preds = %else, %then, %entry
>>> %i.0.0 = phi int [ 0, %entry ], [ %inc9, %then ], [ %inc, %else ] ;
>>> <int> [#uses=7]
>>> %tmp.4 = seteq int %i.0.0, 0 ; <bool> [#uses=1]
>>...
2005 Feb 22
0
[LLVMdev] Area for improvement
...= 0;
>> }
>>
>> We compile it to this LLVM code:
>>
>> void %test(uint %N, "complex long double"* %P) {
>> entry:
>> %tmp.15 = seteq uint %N, 0 ; <bool> [#uses=1]
>> br bool %tmp.15, label %return, label %no_exit
>>
>> no_exit: ; preds = %no_exit, %entry
>> %indvar = phi uint [ %indvar.next, %no_exit ], [ 0, %entry ]
>> ; <uint> [#uses=3]
>> %tmp.4 = getelementptr "complex long double"* %P, uint %indvar,
>> uint 0...
2006 Jul 09
0
[LLVMdev] Critical edges
...creating assembly like this one below. Block LBB1_9 was
> inserted to break the critical edge between blocks LBB1_3 and LBB1_8. But
> it changes the semantics of the original program, because, before, LBB1_8
> was falling through LBB1_4, and now it is falling on LBB1_9.
>
> LBB1_3: ;no_exit
> lis r4, 21845
> ori r4, r4, 21846
> mulhw r4, r2, r4
> addi r5, r2, -1
> li r6, -1
> srwi r6, r4, 31
> add r4, r4, r6
> mulli r4, r4, 3
> li r6, 1
> subf r2, r4, r2
> cmpwi cr0, r2, 0
>...
2004 Dec 04
1
[LLVMdev] Question about writing a pass
...t be splitted, right? the instruction like 'phi..'. If so, how could we check this instruction to see if it can be splitted or not.
3) Here is a piece of code
char a[]="hello world";
int i;
for(i=0;i<10;i++){
a[i]=a[i]+1;
}
And I got IR code like the following
no_exit: ; preds = %strlen.entry, %no_exit
%indvar = phi uint [ %indvar.next, %no_exit ], [ 0, %strlen.entry ] ; <uint> [#uses=3]
%i.0.0 = cast uint %indvar to int ; <int> [#uses=1]
%tmp.24 = getelementptr [12 x sbyte]* %a, int 0, uint %indvar ; <sbyte*> [#uses=2]
%tmp.28 = load...
2005 Feb 22
5
[LLVMdev] Area for improvement
I noticed that fourinarow is one of the programs in which LLVM is much
slower than GCC, so I decided to take a look and see why that is so.
The program has many loops that look like this:
#define ROWS 6
#define COLS 7
void init_board(char b[COLS][ROWS+1])
{
int i,j;
for (i=0;i<COLS;i++)
for (j=0;j<ROWS;j++)
b[i][j]='.';
2006 Jul 04
2
[LLVMdev] Critical edges
.... I am getting a very
> weird dataflow graph (even without the Break Critical edges pass). The
> dataflow generated by MachineFunction::dump() for the program below is
> given here:
> http://compilers.cs.ucla.edu/fernando/projects/soc/images/loop_no_crit2.pdf
...
> The problem is the no_exit block. I think it was changed by one of the
> optimization passes, and was split into three basic blocks. But now there
> is a phi function where both the parameters are defined in the same basic
> block. Any of you guys now which pass I should cut off if I want to avoid
> this optimiza...
2006 Jul 05
0
[LLVMdev] Critical edges
> If you don't want critical edges in the machine code CFG, you're going to
> have to write a machine code CFG critical edge splitting pass: LLVM
> doesn't currently have one.
>
> -Chris
Hey guys,
I've coded a pass to break the critical edges of the machine
control flow graph. The program works fine, but I am sure it is not
the right way of implementing it.
2005 Jul 29
1
[LLVMdev] help with pointer-to-array conversion
OK, thanks Chris, I've found that running
opt -loopsimplify -instcombine -indvars -stats
gives me the setup I need for this transformation, and a small patch
makes it happen in the simple case we discussed. However, I'm having
some trouble when things get a bit more complicated with 3 nesting levels:
int A[3000000], B[20000], C[100], Z;
int main()
{
int i, j, k, *a, *b,
2003 Nov 01
0
[LLVMdev] Cute profiling toy for LLVM
...block option:
$ ~/llvm/utils/profile.pl -block Output/em3d.llvm.bc
<all of the stuff from before>
===-------------------------------------------------------------------------===
Top 20 most frequently executed basic blocks:
## %% Frequency
1. 4.60% 393/8545 make_neighbors() - no_exit.2
2. 4.56% 390/8545 make_neighbors() - loopentry.2
3. 4.56% 390/8545 make_neighbors() - endif.1
4. 4.56% 390/8545 make_neighbors() - endif.2
5. 4.56% 390/8545 make_neighbors() - loopexit.3
6. 4.56% 390/8545 check_percent() - entry
7. 4.53% 387/8545 make_neighbors...