Re: Abt RTL expression - Optimization

2006-11-03 Thread Ian Lance Taylor
"Rohit Arul Raj" <[EMAIL PROTECTED]> writes: > The relevant part of RTL dump of fgcse pass is given below: > > (insn 13 12 50 0 (set (reg:CC 21 cc) > (compare:CC (reg:SI 29 [ n ]) > (const_int 30 [0x1e]))) 68 {*cmpsi_internal} (nil) > (nil)) > > (insn 50 13 53 0 (paralle

Re: Abt RTL expression - Optimization

2006-10-30 Thread Ian Lance Taylor
"Rohit Arul Raj" <[EMAIL PROTECTED]> writes: > The problem due to which the below mentioned program was not working > is because of CODE HOISTING pass. I just masked the code hoisting step > and the program worked fine. At this point, if you want us to be able to give you useful suggestions, you

Re: Abt RTL expression - Optimization

2006-10-29 Thread Rohit Arul Raj
Hi all, The problem due to which the below mentioned program was not working is because of CODE HOISTING pass. I just masked the code hoisting step and the program worked fine. 1. The instruction no's 11, 12, 13 are removed when -Os optimization is enabled (it considers n, h as dead). Is there a

Re: Abt RTL expression - Optimization

2006-10-26 Thread Ian Lance Taylor
"Rohit Arul Raj" <[EMAIL PROTECTED]> writes: > > > This small bit of code worked fine with all optimization except Os. > > > > > > unsigned int n = 30; > > > void x () > > > { > > > unsigned int h; > > > h = n <= 30; // Line 1 > > > if (h) > > >p = 1; > > > else > > >p = 0; >

Re: Abt RTL expression - Optimization

2006-10-26 Thread Eric Botcazou
> since p is a global variable, it can be used in other functions. Any > other causes? The first thing to do is to post a reproducer. As Ian said, your code doesn't even compile... -- Eric Botcazou

Re: Abt RTL expression - Optimization

2006-10-26 Thread Brooks Moses
Rohit Arul Raj wrote: I am working with a GCC Cross compiler version 4.1.1. This small bit of code worked fine with all optimization except Os. unsigned int n = 30; void x () { unsigned int h; h = n <= 30; // Line 1 if (h) p = 1; else p = 0; } [...] 3. What are the probabl

Re: Abt RTL expression - Optimization

2006-10-26 Thread Rohit Arul Raj
On 26 Oct 2006 22:02:04 -0700, Ian Lance Taylor <[EMAIL PROTECTED]> wrote: "Rohit Arul Raj" <[EMAIL PROTECTED]> writes: > This small bit of code worked fine with all optimization except Os. > > unsigned int n = 30; > void x () > { > unsigned int h; > h = n <= 30; // Line 1 > if (h)

Re: Abt RTL expression - Optimization

2006-10-26 Thread Ian Lance Taylor
"Rohit Arul Raj" <[EMAIL PROTECTED]> writes: > This small bit of code worked fine with all optimization except Os. > > unsigned int n = 30; > void x () > { > unsigned int h; > h = n <= 30; // Line 1 > if (h) >p = 1; > else >p = 0; > } > > when we tried to debug the emitted

Re: Abt RTL expression - Optimization

2006-10-23 Thread Andrew Pinski
On Mon, 2006-10-23 at 16:14 +0530, Rohit Arul Raj wrote: > Hi all, > > This small bit of code worked fine with all optimization except Os. If you are working with 4.0 and greater, there are optimizations that happen before RTL, called the Tree-ssa optimizations. The optimization you are noticing