Re: A case where PHI-OPT pessimizes the code

2012-04-23 Thread Alan Modra
On Mon, Apr 23, 2012 at 06:07:52PM +0200, Steven Bosscher wrote: > On Mon, Apr 23, 2012 at 4:43 PM, Alan Modra wrote: > > On Mon, Apr 23, 2012 at 02:50:13PM +0200, Steven Bosscher wrote: > >> csui = (ONEUL << a); > >> b = ((csui & cst) != 0); > >> if (b) > >> return 1; > >> else > >>

Re: avr-size -C --format=avr options

2012-04-23 Thread Georg-Johann Lay
Clive Webster schrieb: I've previously used WinAVR and their port of gcc has an 'enhancement' in the avr-size which is option '-C' or '--format=avr' which also needs you to Please notice that this mailing list is about GCC development, not about binutils. size is not a part of GCC. size is par

Re: target specific builtin expansion (middle end and back end definition inconsistence problem?).

2012-04-23 Thread Richard Guenther
On Mon, Apr 23, 2012 at 8:03 PM, Ian Lance Taylor wrote: > Feng LI writes: > >> Yes, you are right. But how could I reference to a backend defined >> builtin >> function in the middle end (I need to generate the builtin function in >> the >> middle end and expand it in x86 b

Re: Failed access check

2012-04-23 Thread Jonathan Wakely
On 23 April 2012 18:48, Ian Lance Taylor wrote: > "Peter A. Felvegi" writes: > >> Should I file a bug report? > > Yes, please.  Thanks. Please check it's not http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24926 first

Re: RFC: Add STB_GNU_SECONDARY

2012-04-23 Thread H.J. Lu
On Sat, Apr 21, 2012 at 12:01 PM, Joern Rennecke wrote: > Quoting "H.J. Lu" : > >> Putting our own foo in a section with a special prefix in section name, >> like .secondary_*, works with linker support.  But it isn't very reliable. > > > In what way is requiring linker support for STB_GNU_SECONDA

avr-size -C --format=avr options

2012-04-23 Thread Clive Webster
I've previously used WinAVR and their port of gcc has an 'enhancement' in the avr-size which is option '-C' or '--format=avr' which also needs you to pass the chip type in '--mmcu=atmega328p' for example. This shows the total amount of flash required (ie code + data), and RAM (ie data + bss) and c

Re: target specific builtin expansion (middle end and back end definition inconsistence problem?).

2012-04-23 Thread Ian Lance Taylor
Feng LI writes: > Yes, you are right. But how could I reference to a backend defined builtin > function in the middle end (I need to generate the builtin function in the > middle end and expand it in x86 backend)? If the function doesn't have a machine-independent definition

Re: Failed access check

2012-04-23 Thread Ian Lance Taylor
"Peter A. Felvegi" writes: > Should I file a bug report? Yes, please. Thanks. Ian

Re: target specific builtin expansion (middle end and back end definition inconsistence problem?).

2012-04-23 Thread Feng LI
Hi Ian, 2012/4/23 Ian Lance Taylor : > Feng LI writes: > >> Hi Ian, >> >> 2012/4/22 Ian Lance Taylor : >>> Feng LI writes: >>> Yes, you are right. But how could I reference to a backend defined builtin function in the middle end (I need to generate the builtin function in the midd

Re: A case where PHI-OPT pessimizes the code

2012-04-23 Thread Steven Bosscher
On Mon, Apr 23, 2012 at 2:50 PM, Steven Bosscher wrote: > I will file a PR for this later today, maybe after trying on a few > other targets to see if this is a middle-end problem or a target > issue. This is now PR target/53087 (http://gcc.gnu.org/PR53087). Actually the poor code looks to be co

Re: target specific builtin expansion (middle end and back end definition inconsistence problem?).

2012-04-23 Thread Ian Lance Taylor
Feng LI writes: > Hi Ian, > > 2012/4/22 Ian Lance Taylor : >> Feng LI writes: >> >>> Yes, you are right. But how could I reference to a backend defined builtin >>> function in the middle end (I need to generate the builtin function in the >>> middle end and expand it in x86 backend)? >> >> If th

Re: A case where PHI-OPT pessimizes the code

2012-04-23 Thread Steven Bosscher
On Mon, Apr 23, 2012 at 4:43 PM, Alan Modra wrote: > On Mon, Apr 23, 2012 at 02:50:13PM +0200, Steven Bosscher wrote: >> csui = (ONEUL << a); >> b = ((csui & cst) != 0); >> if (b) >> return 1; >> else >> return 0; > > We (powerpc) would be much better if this were > > csui = (ONE

Re: [SPAM] Re: Attempting changes to the GIMPLifier

2012-04-23 Thread nkavv
Hi Richard 1. Printing global variables. Look at the cgraph (.000i.cgraph) dump. 2. Preserving function arguments (what I call an "interface"). I think we do that now. Thank you very much! I'll grab the latest release and have a look. Best regards, Nikolaos Kavvadias Both 1 and 2 ar

MIPS: 2'nd pass of ira, causes weird register allocation for 2-op mult

2012-04-23 Thread Klaus Pedersen
The summery goes something like this: It is possible for the second pass of ira to get confused and decide that NO_REGS or a hard float register are better choices for the result of the 2 operand mult. First pass already optimally allocated in GR_AND_MD1_REGS. Two pass ira is enabled with "-fexpe

Re: old archives from 1998

2012-04-23 Thread Jeff Law
On 04/22/2012 11:43 AM, Ian Lance Taylor wrote: When EGCS and GCC merged back together again, the changes made to the FSF version of GCC (that is, the non-EGCS version) were put into FSFChangelog, which is where you found them. There was no attempt to copy all the entries from FSFChangeLog to t

Re: A case where PHI-OPT pessimizes the code

2012-04-23 Thread Jeff Law
On 04/23/2012 06:27 AM, Richard Guenther wrote: On Mon, Apr 23, 2012 at 2:15 PM, Steven Bosscher wrote: Hello, I ported the code to expand switch() statements with bit tests from stmt.c to GIMPLE, and looked at the resulting code to verify that the transformation applies correctly, when I noti

Re: A case where PHI-OPT pessimizes the code

2012-04-23 Thread Alan Modra
On Mon, Apr 23, 2012 at 02:50:13PM +0200, Steven Bosscher wrote: > csui = (ONEUL << a); > b = ((csui & cst) != 0); > if (b) > return 1; > else > return 0; We (powerpc) would be much better if this were csui = (ONEUL << a); return (csui & cst) >> a; Other targets would proba

Re: Is it possible to get unpartitioned LTO with Fortran?

2012-04-23 Thread Jan Hubicka
> > Hi, > > I have a simple IPA pass that requires access to all function bodies in a > program. For C and small Fortran programs doing this at link time causes no > issues. However, when I attempt to compile a larger Fortran program the > pass is called multiple times at link time, each time w

Is it possible to get unpartitioned LTO with Fortran?

2012-04-23 Thread AJM-2
Hi, I have a simple IPA pass that requires access to all function bodies in a program. For C and small Fortran programs doing this at link time causes no issues. However, when I attempt to compile a larger Fortran program the pass is called multiple times at link time, each time with only a por

Failed access check

2012-04-23 Thread Peter A. Felvegi
Hello, clang gave an error on a code that compiled with gcc so far. The reduced test case is: 8<8<8<8<--- class V; struct E { E(const V& v_); char* c; V* v; int i; }; class V { private: union { char* c; struct { V* v; int i; }; }; }; E::E(const V& v_) : c(v_.c), // line 25

Re: A case where PHI-OPT pessimizes the code

2012-04-23 Thread Steven Bosscher
On Mon, Apr 23, 2012 at 2:27 PM, Richard Guenther wrote: > int foo (_Bool b) > { >  if (b) >    return 1; >  else >    return 0; > } Indeed PHI-OPT performs the transformation on this code, too. But the resulting code on powerpc64 is fine: [stevenb@gcc1-power7 gcc]$ cat t.c.149t.optimized ;; Fu

Re: A case where PHI-OPT pessimizes the code

2012-04-23 Thread Richard Guenther
On Mon, Apr 23, 2012 at 2:15 PM, Steven Bosscher wrote: > Hello, > > I ported the code to expand switch() statements with bit tests from > stmt.c to GIMPLE, and looked at the resulting code to verify that the > transformation applies correctly, when I noticed this strange PHI-OPT > transformation

A case where PHI-OPT pessimizes the code

2012-04-23 Thread Steven Bosscher
Hello, I ported the code to expand switch() statements with bit tests from stmt.c to GIMPLE, and looked at the resulting code to verify that the transformation applies correctly, when I noticed this strange PHI-OPT transformation that results in worse code for the test case of PR45830 which looks

Re: [RFC] Converting end of loop computations to MIN_EXPRs.

2012-04-23 Thread Richard Guenther
On Sun, Apr 22, 2012 at 8:50 AM, Ramana Radhakrishnan wrote: > Hi, > > A colleague noticed that we were not vectorizing loops that had end of > loop computations that were MIN type operations that weren't expressed > in the form of a typical min operation. A transform from  (i < x ) && > ( i < y)

Re: Attempting changes to the GIMPLifier

2012-04-23 Thread Richard Guenther
2012/4/22 : > Dear all, > > I have a few questions regarding how to augment the information dumped in > "004t"  GIMPLE dumps (prior any optimization). > > My main concerns are: > > 1. Printing global variables. Look at the cgraph (.000i.cgraph) dump. > 2. Preserving function arguments (what I ca

Re: target specific builtin expansion (middle end and back end definition inconsistence problem?).

2012-04-23 Thread Feng LI
Hi Ian, 2012/4/22 Ian Lance Taylor : > Feng LI writes: > >> Yes, you are right. But how could I reference to a backend defined builtin >> function in the middle end (I need to generate the builtin function in the >> middle end and expand it in x86 backend)? > > If the function doesn't have a mach