Identifying Pure and Const Functions

2015-05-29 Thread Pritam Gharat
Hi, How do we identify whether a function is a pure or a const function? Is there any flag associated with its cgraph_node or the tree node (decl of cgraph_node)? Thanks, Pritam Gharat

Re: Identifying Pure and Const Functions

2015-05-29 Thread Marek Polacek
On Fri, May 29, 2015 at 01:16:32PM +0530, Pritam Gharat wrote: > How do we identify whether a function is a pure or a const function? > Is there any flag associated with its cgraph_node or the tree node > (decl of cgraph_node)? You'll want to look into ipa-pure-const.c. Marek

Re: Better info for combine results in worse code generated

2015-05-29 Thread Segher Boessenkool
On Fri, May 29, 2015 at 12:41:20PM +0930, Alan Modra wrote: > I'll tell you one of the reasons why they are > slower, as any decent hardware engineer could probably figure this out > themselves anyway. The record form instructions are cracked into two > internal ops, the basic arithmetic/logic op,

Re: Better info for combine results in worse code generated

2015-05-29 Thread Alan Modra
On Fri, May 29, 2015 at 07:58:38AM -0500, Segher Boessenkool wrote: > On Fri, May 29, 2015 at 12:41:20PM +0930, Alan Modra wrote: > > +/* Describe how rtl operations on registers behave on this target when > > + operating on less than the entire register. */ > > +#define EXTEND_OP(OP) \ > > + (

Re: Better info for combine results in worse code generated

2015-05-29 Thread Segher Boessenkool
On Fri, May 29, 2015 at 11:20:08PM +0930, Alan Modra wrote: > On Fri, May 29, 2015 at 07:58:38AM -0500, Segher Boessenkool wrote: > > On Fri, May 29, 2015 at 12:41:20PM +0930, Alan Modra wrote: > > > +/* Describe how rtl operations on registers behave on this target when > > > + operating on less

Re: Identifying Pure and Const Functions

2015-05-29 Thread Pritam Gharat
I had a look at the file ipa-pure-const.c. I have wriiten a Simple IPA Pass which identifies pure and const functions in the program. I have inserted this pass after ipa-pta pass which is executed after ipa-pure-const pass. Also, the option -fipa-pure-const is enabled. I am using DECL_PURE_P(t) and

Re: Identifying Chain of Recurrence

2015-05-29 Thread Pritam Gharat
I am writing a Simple IPA Pass which is inserted after ipa-pta. This pass identifies whether a chain of recurrence is built by gcc or not. I have used tree_is_chrec(t) to check if t represents chain of recurrence and function find_var_scev_info(bb, var) to obtain the scev information generated (wh

Re: Relocations to use when eliding plts

2015-05-29 Thread Richard Henderson
On 05/28/2015 01:36 PM, Rich Felker wrote: > On Thu, May 28, 2015 at 09:40:57PM +0200, Jakub Jelinek wrote: >> On Thu, May 28, 2015 at 03:29:02PM -0400, Rich Felker wrote: You're not missing anything. But do you want the performance of a library to depend on how the main executable is co

Re: [RFC] Design and Implementation for Path Splitting for Loop with Conditional IF-THEN-ELSE

2015-05-29 Thread Jeff Law
On 05/16/2015 06:49 AM, Ajit Kumar Agarwal wrote: I have Designed and implemented with the following design for the path splitting of the loops with conditional IF-THEN-ELSE. The implementation has gone through the bootstrap for Microblaze target along DEJA GNU regressions tests and running th

Re: Relocations to use when eliding plts

2015-05-29 Thread H.J. Lu
On Fri, May 29, 2015 at 8:38 AM, Richard Henderson wrote: > On 05/28/2015 01:36 PM, Rich Felker wrote: >> On Thu, May 28, 2015 at 09:40:57PM +0200, Jakub Jelinek wrote: >>> On Thu, May 28, 2015 at 03:29:02PM -0400, Rich Felker wrote: > You're not missing anything. But do you want the performa

Re: Relocations to use when eliding plts

2015-05-29 Thread H.J. Lu
On Fri, May 29, 2015 at 10:59 AM, H.J. Lu wrote: > On Fri, May 29, 2015 at 8:38 AM, Richard Henderson wrote: >> On 05/28/2015 01:36 PM, Rich Felker wrote: >>> On Thu, May 28, 2015 at 09:40:57PM +0200, Jakub Jelinek wrote: On Thu, May 28, 2015 at 03:29:02PM -0400, Rich Felker wrote: >> Yo

s390: SImode pointers vs LR

2015-05-29 Thread DJ Delorie
In config/s390/s390.c we accept addresses that are SImode: if (!REG_P (base) || (GET_MODE (base) != SImode && GET_MODE (base) != Pmode)) return false; However, there doesn't seem to be anything in the s390's opcodes that masks the top half of address registe

Re: Better info for combine results in worse code generated

2015-05-29 Thread Alan Modra
On Fri, May 29, 2015 at 10:00:04AM -0500, Segher Boessenkool wrote: > On Fri, May 29, 2015 at 11:20:08PM +0930, Alan Modra wrote: > > On Fri, May 29, 2015 at 07:58:38AM -0500, Segher Boessenkool wrote: > > > On Fri, May 29, 2015 at 12:41:20PM +0930, Alan Modra wrote: > > > > +/* Describe how rtl op

Re: Identifying Chain of Recurrence

2015-05-29 Thread Bin.Cheng
On Fri, May 29, 2015 at 11:14 PM, Pritam Gharat wrote: > I am writing a Simple IPA Pass which is inserted after ipa-pta. This > pass identifies whether a chain of recurrence is built by gcc or not. > I have used tree_is_chrec(t) to check if t represents chain of > recurrence and function find_var_

Re: s390: SImode pointers vs LR

2015-05-29 Thread Jeff Law
On 05/29/2015 06:57 PM, DJ Delorie wrote: In config/s390/s390.c we accept addresses that are SImode: if (!REG_P (base) || (GET_MODE (base) != SImode && GET_MODE (base) != Pmode)) return false; However, there doesn't seem to be anything in the s390's opcode