Re: Use Bohem's GC for compiler proper in 4.1?

2005-04-01 Thread Joe Buck
On Sat, Apr 02, 2005 at 01:10:42AM -0500, Andrew Pinski wrote: > >Memory bloat is a problem for embedded systems. Attitudes about just > >"buy > >another gigabyte" is why i use C for everything for speed, portability, > >compactness, and conciseness of design. > > But you are not compiling on the

Re: Use Bohem's GC for compiler proper in 4.1?

2005-04-01 Thread Andrew Pinski
On Apr 1, 2005, at 10:11 PM, Russell Shaw wrote: Stefan Strasser wrote: Mike Stump schrieb: On Friday, April 1, 2005, at 08:48 AM, Stefan Strasser wrote: if gcc uses more memory than physically available it spends a _very_ long time swapping Swapping, what's that? Here's $20, go buy a gigabyte.

Re: RFC: #pragma optimization_level

2005-04-01 Thread Georg Bauhaus
E. Weddington wrote: What do you get if you use the C99 construct of declaring the variable in the for statement? Like so: for(volatile int i = 0; i < COUNT; ++i); I get the same code afaics. In fact, I haven't been able to produce an empty loop that isn't translated into an actual loop, volatile

Re: GCC 4.1 bootstrap failed at ia64-*-linux

2005-04-01 Thread James E Wilson
Zagorodnev, Grigory wrote: How it is possible that recent cgraph changes affect ia64 compiler behavior? I see reclaimed callgraph differs on ia64 but not on ia32; therefore ia32/x86_64 compiler remains stable. This is presumably the same problem that is now PR 20717. -- Jim Wilson, GNU Tools Suppor

Re: GNU toolchain for blackfin processor

2005-04-01 Thread James E Wilson
Vinayak Ghate wrote: Do we have GNU toolchain for blackfin processor?? Can anybody help me out in this regard?? I was mistaken. The Blackfin port has already been submitted, but not yet added to our source code repository. There is a chance that it may end up in the upcoming release, gcc-4.0. -

Re: Use Bohem's GC for compiler proper in 4.1?

2005-04-01 Thread Kaveh R. Ghazi
> I do have swapping on a 1 GB machine with 2 CPUs(-> 2 GCCs) If you can demonstrate that say GCC-4.0 uses much more memory than 3.4 or 3.3 to compile some code, then file a PR with preprocessed source and someone will eventually look at it. Don't compare current GCC to 3.2 since the collection

Re: Use Bohem's GC for compiler proper in 4.1?

2005-04-01 Thread Russell Shaw
Stefan Strasser wrote: Mike Stump schrieb: On Friday, April 1, 2005, at 08:48 AM, Stefan Strasser wrote: if gcc uses more memory than physically available it spends a _very_ long time swapping Swapping, what's that? Here's $20, go buy a gigabyte. expect memory to become a problem again with the

Re: RFC: #pragma optimization level

2005-04-01 Thread Paul Schlie
> Joe Buck wrote: >>Georg Bauhaus <[EMAIL PROTECTED]> writes: >> | A busy-loop function is used to effect a delay, not too precise, >> | but portably. Like >> | >> | #define COUNT 1000 >> | >> | void f() { >> |/*volatile*/ /*register*/ int i; >> | >> |for (i = 0; i < COUNT; ++i) >> |

Re: RFC: #pragma optimization_level

2005-04-01 Thread Georg Bauhaus
Gabriel Dos Reis wrote: | void f() { |/*volatile*/ /*register*/ int i; | |for (i = 0; i < COUNT; ++i) | ; This must be an FAQ. The above is no way of (no matter how popular the urban legend makes it) implementing delay. As a normative statement, a busy loop might not be the w

Re: Use Bohem's GC for compiler proper in 4.1?

2005-04-01 Thread Stefan Strasser
Mike Stump schrieb: On Friday, April 1, 2005, at 08:48 AM, Stefan Strasser wrote: if gcc uses more memory than physically available it spends a _very_ long time swapping Swapping, what's that? Here's $20, go buy a gigabyte. expect memory to become a problem again with the advent of multicore a

Re: RFC: #pragma optimization_level

2005-04-01 Thread Marcin Dalecki
On 2005-04-01, at 23:36, Mark Mitchell wrote: Richard Guenther wrote: But the question is, do we want all this sort of #pragmas? It would surely better to improve the compilers decisions on applying certain optimizations. As usual, in most of the cases the compiler will be smarter than the user t

Re: RFC: #pragma optimization_level

2005-04-01 Thread Marcin Dalecki
On 2005-04-01, at 23:17, Richard Guenther wrote: On Apr 1, 2005 11:07 PM, Mark Mitchell <[EMAIL PROTECTED]> wrote: Dale Johannesen wrote: Agree. (And documentation will be written.) Yay. It sounds like we're definitely on the same page. I think that as long as we keep the semantics clear, this

Re: Problems using cfg_layout_finalize()

2005-04-01 Thread Grzegorz B. Prokopski
On Fri, 2005-01-04 at 00:10 -0500, Grzegorz B. Prokopski wrote: > /* Leave the rest as it was. */ > FOR_EACH_BB (bb) > if ((bb->next_bb != EXIT_BLOCK_PTR) && (!bb->rbi->next)) > bb->rbi->next = bb->next_bb; This code worked well in some other place from which I copied it, but unfortuna

gcc-3.4-20050401 is now available

2005-04-01 Thread gccadmin
Snapshot gcc-3.4-20050401 is now available on ftp://gcc.gnu.org/pub/gcc/snapshots/3.4-20050401/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 3.4 CVS branch with the following options: -rgcc-ss-3_4-20050401 You'll

Re: RFC: #pragma optimization_level

2005-04-01 Thread E. Weddington
Joe Buck wrote: Georg Bauhaus <[EMAIL PROTECTED]> writes: | A busy-loop function is used to effect a delay, not too precise, | but portably. Like | | #define COUNT 1000 | | void f() { |/*volatile*/ /*register*/ int i; | |for (i = 0; i < COUNT; ++i) | ; Unfortunately, wh

Re: RFC: #pragma optimization_level

2005-04-01 Thread Paul Koning
> "Joe" == Joe Buck <[EMAIL PROTECTED]> writes: Joe> Georg Bauhaus <[EMAIL PROTECTED]> writes: >> | A busy-loop function is used to effect a delay, not too precise, >> | but portably. Like >> | >> | #define COUNT 1000 >> | >> | void f() { | /*volatile*/ /*register*/ int i; >> | >>

Re: RFC: #pragma optimization_level

2005-04-01 Thread Joe Buck
Georg Bauhaus <[EMAIL PROTECTED]> writes: > | A busy-loop function is used to effect a delay, not too precise, > | but portably. Like > | > | #define COUNT 1000 > | > | void f() { > |/*volatile*/ /*register*/ int i; > | > |for (i = 0; i < COUNT; ++i) > | ; On Sat, Apr 02, 200

Re: RFC: #pragma optimization_level

2005-04-01 Thread Gabriel Dos Reis
Georg Bauhaus <[EMAIL PROTECTED]> writes: | Joe Buck wrote: | | > Are you using "volatile" correctly? There are situations where "volatile" | > alone does not suffice and you need more locking, but the Linux and BSD | > kernel folks manage to optimize their device driver code. | | We have just

Re: RFC: #pragma optimization_level

2005-04-01 Thread E. Weddington
Georg Bauhaus wrote: We have just been discussing a similar topic in a de.* newsgroup. A busy-loop function is used to effect a delay, not too precise, but portably. Like #define COUNT 1000 void f() { /*volatile*/ /*register*/ int i; for (i = 0; i < COUNT; ++i) ; } If volatile is used

Re: RFC: #pragma optimization_level

2005-04-01 Thread Georg Bauhaus
Joe Buck wrote: Are you using "volatile" correctly? There are situations where "volatile" alone does not suffice and you need more locking, but the Linux and BSD kernel folks manage to optimize their device driver code. We have just been discussing a similar topic in a de.* newsgroup. A busy-loop

Re: RFC: #pragma optimization_level

2005-04-01 Thread E. Weddington
Richard Guenther wrote: On Apr 1, 2005 11:23 PM, E. Weddington <[EMAIL PROTECTED]> wrote: Is your objection to a grain finer than the function level? Or is it to the whole concept of having pragmas change the optimization level per function? It would be a general objection - I thought we're

Re: memcpy(a,b,CONST) is not inlined by gcc 3.4.1 in Linux kernel

2005-04-01 Thread Jan Hubicka
> On Wednesday 30 March 2005 05:27, Gerold Jury wrote: > > > > >> On Tue, Mar 29, 2005 at 05:37:06PM +0300, Denis Vlasenko wrote: > > >> > /* > > >> > * This looks horribly ugly, but the compiler can optimize it totally, > > >> > * as the count is constant. > > >> > */ > > >> > static inline vo

Re: RFC: #pragma optimization_level

2005-04-01 Thread Mark Mitchell
Richard Guenther wrote: But the question is, do we want all this sort of #pragmas? It would surely better to improve the compilers decisions on applying certain optimizations. As usual, in most of the cases the compiler will be smarter than the user trying to override it (and hereby maybe only wo

Re: RFC: #pragma optimization_level

2005-04-01 Thread Richard Guenther
On Apr 1, 2005 11:23 PM, E. Weddington <[EMAIL PROTECTED]> wrote: > Richard Guenther wrote: > > >But the question is, do we want all this sort of #pragmas? It would > >surely better to improve the compilers decisions on applying certain > >optimizations. As usual, in most of the cases the compil

Re: RFC: #pragma optimization_level

2005-04-01 Thread E. Weddington
Richard Guenther wrote: But the question is, do we want all this sort of #pragmas? It would surely better to improve the compilers decisions on applying certain optimizations. As usual, in most of the cases the compiler will be smarter than the user trying to override it (and hereby maybe only wo

Re: RFC: #pragma optimization_level

2005-04-01 Thread Richard Guenther
On Apr 1, 2005 11:07 PM, Mark Mitchell <[EMAIL PROTECTED]> wrote: > Dale Johannesen wrote: > > Agree. (And documentation will be written.) > > Yay. It sounds like we're definitely on the same page. I think that as > long as we keep the semantics clear, this will be useful functionality. > > >>

Re: RFC: #pragma optimization_level

2005-04-01 Thread Mark Mitchell
Dale Johannesen wrote: Agree. (And documentation will be written.) Yay. It sounds like we're definitely on the same page. I think that as long as we keep the semantics clear, this will be useful functionality. That's what I assumed. Anything finer than that is insane. :-) Actually there are

Re: RFC: #pragma optimization_level

2005-04-01 Thread Dale Johannesen
On Apr 1, 2005, at 11:24 AM, Mark Mitchell wrote: Dale Johannesen wrote: So I guess question 1 is, Mark, do you feel negatively enough about this feature to block its acceptance in mainline? I'm not sure that I *could* block it, but, no, I don't feel that negatively. Well, in theory nobody can bl

Re: RFC: #pragma optimization_level

2005-04-01 Thread Gabriel Dos Reis
Diego Novillo <[EMAIL PROTECTED]> writes: | On Fri, Apr 01, 2005 at 11:24:06AM -0800, Mark Mitchell wrote: | > Dale Johannesen wrote: | > | > >So I guess question 1 is, Mark, do you feel negatively enough about this | > >feature to block its acceptance in mainline? | > | > I'm not sure that I *c

Re: RFC: #pragma optimization_level

2005-04-01 Thread Mark Mitchell
Richard Guenther wrote: On Apr 1, 2005 9:36 PM, Mark Mitchell <[EMAIL PROTECTED]> wrote: Diego Novillo wrote: On Fri, Apr 01, 2005 at 11:24:06AM -0800, Mark Mitchell wrote: Dale Johannesen wrote: So I guess question 1 is, Mark, do you feel negatively enough about this feature to block its accepta

Re: RFC: #pragma optimization_level

2005-04-01 Thread Richard Guenther
On Apr 1, 2005 9:36 PM, Mark Mitchell <[EMAIL PROTECTED]> wrote: > Diego Novillo wrote: > > On Fri, Apr 01, 2005 at 11:24:06AM -0800, Mark Mitchell wrote: > > > >>Dale Johannesen wrote: > >> > >> > >>>So I guess question 1 is, Mark, do you feel negatively enough about this > >>>feature to block its

Re: PR 20505

2005-04-01 Thread Nathan Sidwell
James E Wilson wrote: The testcase is not portable, as I pointed out in the PR. Trying this on an x86_64-linux system, I get 27 "excess errors" failures. All of them are error: cast from 'int*' to 'int' loses precision Using long works better than int, but is still not fool proof, as there ar

Re: PR 20505

2005-04-01 Thread James E Wilson
On Fri, 2005-04-01 at 00:38, Nathan Sidwell wrote: > Here it is, ok? The patch is OK. The ChangeLog entry should refer to INTEGER_CST instead of INT_CST. You are missing a ChangeLog entry for the testcase. The testcase is not portable, as I pointed out in the PR. Trying this on an x86_64-linux

Re: RFC: #pragma optimization_level

2005-04-01 Thread Mike Stump
On Friday, April 1, 2005, at 10:16 AM, Kelly Murphy wrote: There's the case where we'd like to have the files of a subsystem to be optimized but we want a handful of functions that directly access hardware be unoptimized. (We found that the optimization did some write reordering that the hardware

Re: Use Bohem's GC for compiler proper in 4.1?

2005-04-01 Thread Mike Stump
On Friday, April 1, 2005, at 08:48 AM, Stefan Strasser wrote: if gcc uses more memory than physically available it spends a _very_ long time swapping Swapping, what's that? Here's $20, go buy a gigabyte. Now, having said that, we do believe that it would make for interesting research to try le

Re: i want to connect gcc's front-end to my'back-end

2005-04-01 Thread Mike Stump
On Thursday, March 31, 2005, at 10:38 PM, GOEBAX wrote: my project is that Connect to Gcc's front-end and My back-end We generally don't support this concept. We'd rather you enhance and extend gcc's back end. Because of this, this is beyond the scope of this list. On topic for this list, w

Re: RFC: #pragma optimization_level

2005-04-01 Thread Mark Mitchell
Diego Novillo wrote: On Fri, Apr 01, 2005 at 11:24:06AM -0800, Mark Mitchell wrote: Dale Johannesen wrote: So I guess question 1 is, Mark, do you feel negatively enough about this feature to block its acceptance in mainline? I'm not sure that I *could* block it, but, no, I don't feel that negative

Re: RFC: #pragma optimization_level

2005-04-01 Thread Diego Novillo
On Fri, Apr 01, 2005 at 11:24:06AM -0800, Mark Mitchell wrote: > Dale Johannesen wrote: > > >So I guess question 1 is, Mark, do you feel negatively enough about this > >feature to block its acceptance in mainline? > > I'm not sure that I *could* block it, but, no, I don't feel that negatively. >

Re: RFC: #pragma optimization_level

2005-04-01 Thread Mark Mitchell
Dale Johannesen wrote: So I guess question 1 is, Mark, do you feel negatively enough about this feature to block its acceptance in mainline? I'm not sure that I *could* block it, but, no, I don't feel that negatively. I think that a #pragma (or attribute) that affects only optimization options is

Re: i want to connect gcc's front-end to my'back-end

2005-04-01 Thread Stefan Strasser
a) what makes your backend different from gcc's backend so it is worth porting it? 하태준 schrieb: > sorry, my english is not good, > > Umm... > > my project is that Connect to Gcc's front-end and My back-end > > first gcc parse sorce code there is an IR created while parsing which is simply ca

Re: RFC: #pragma optimization_level

2005-04-01 Thread Joe Buck
On Fri, Apr 01, 2005 at 10:16:44AM -0800, Kelly Murphy wrote: > I know we'd find something like that really handy for some of the > embedded stuff we're doing. > > There's the case where we'd like to have the files of a subsystem to > be optimized but we want a handful of functions that directly a

Re: RFC: #pragma optimization_level

2005-04-01 Thread Kelly Murphy
I know we'd find something like that really handy for some of the embedded stuff we're doing. There's the case where we'd like to have the files of a subsystem to be optimized but we want a handful of functions that directly access hardware be unoptimized. (We found that the optimization did some

Re: gcc and vfp instructions

2005-04-01 Thread Richard Earnshaw
On Fri, 2005-04-01 at 18:09, aram bharathi wrote: > hi > > i have downloaded the gcc4.0 from the gcc web site > and i compiled the above program by the following option > > main() > { > float a=88.88,b=99.99,c=0; > c=a*b; > printf("%f",c); > } > > arm-elf-gcc -mfpu=vfp -S new.c > > but it produ

Re: Use Bohem's GC for compiler proper in 4.1?

2005-04-01 Thread Daniel Jacobowitz
On Fri, Apr 01, 2005 at 06:48:56PM +0200, Stefan Strasser wrote: > Andrew Haley schrieb: > >Sam Lauber writes: > > > I know that Bohem's GC is used in the Java runtime for GCC. > > > However, the compiler proper itself can _really_ cramp people's > > > avalible RAM (for those who don't belive me an

Re: gcc and vfp instructions

2005-04-01 Thread aram bharathi
hi i have downloaded the gcc4.0 from the gcc web site and i compiled the above program by the following option main() { float a=88.88,b=99.99,c=0; c=a*b; printf("%f",c); } arm-elf-gcc -mfpu=vfp -S new.c but it produces the new.s file without any special kind of (vfp instructions) instructions.

Re: Use Bohem's GC for compiler proper in 4.1?

2005-04-01 Thread Stefan Strasser
Andrew Haley schrieb: Sam Lauber writes: > I know that Bohem's GC is used in the Java runtime for GCC. > However, the compiler proper itself can _really_ cramp people's > avalible RAM (for those who don't belive me and have Windows w/ > DJGPP, change all the memory controls from `auto' to the h

Re: GCC 4.1 bootstrap failed at ia64-*-linux

2005-04-01 Thread Mark Mitchell
Giovanni Bajo wrote: James E Wilson <[EMAIL PROTECTED]> wrote: IA64 bootstrap failed at abi_check stage reporting undefined references from libstdc++ (see log at the bottom). This seems indirectly related to bug 20964. Mark's proposed fix to stop building abi-check at bootstrap time means the IA-

Re: Use Bohem's GC for compiler proper in 4.1?

2005-04-01 Thread Larry Evans
On 04/01/2005 08:21 AM, Larry Evans wrote: On 04/01/2005 07:35 AM, Andrew Haley wrote: [snip] To be fair to the Boehm gc, though: it isn't inherently a conservative collector, but will also do precise gc. Wouldn't this require a GC_descr as defined here: http://www.hpl.hp.com/personal/Hans_Boehm

Re: RFC: #pragma optimization_level

2005-04-01 Thread Andi Kleen
Dale Johannesen <[EMAIL PROTECTED]> writes: > I've currently got the job of implementing pragma(s) to change > optimization level in the middle of a file. This has come up a few > times before, Would it be possible to make it a function attribute? I would really like to have void __attribute__(

Re: about new_regalloc

2005-04-01 Thread Michael Matz
Hi, On Thu, 31 Mar 2005, zouq wrote: > in gcc3.4.1,i found rest_of_new_handle_regalloc > why in gcc4.0, it has been removed? It was removed from gcc 4 because it bitrotted and broke on all kinds of code. If you want to see a more recent and more working version look at the new-regalloc-branch

Re: Use Bohem's GC for compiler proper in 4.1?

2005-04-01 Thread Larry Evans
On 04/01/2005 07:35 AM, Andrew Haley wrote: [snip] To be fair to the Boehm gc, though: it isn't inherently a conservative collector, but will also do precise gc. Wouldn't this require a GC_descr as defined here: http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc_typedh.txt for each data st

Re: Use Bohem's GC for compiler proper in 4.1?

2005-04-01 Thread Sam Lauber
Perhaps then a scheme in which the compiler 1) compresses all tree structures (this would be a good project) 2) after each pass, all internal structures are freed unless doing so would create a dead pointer (maybe an -Om option like -Os but saves compilation memory?) 3) dosen't use memory in

Re: Use Bohem's GC for compiler proper in 4.1?

2005-04-01 Thread Andrew Haley
Daniel Berlin writes: > On Fri, 2005-04-01 at 12:43 +0100, Andrew Haley wrote: > > Sam Lauber writes: > > > I know that Bohem's GC is used in the Java runtime for GCC. > > > However, the compiler proper itself can _really_ cramp people's > > > avalible RAM (for those who don't belive me and

Re: Use Bohem's GC for compiler proper in 4.1?

2005-04-01 Thread Daniel Berlin
On Fri, 2005-04-01 at 12:43 +0100, Andrew Haley wrote: > Sam Lauber writes: > > I know that Bohem's GC is used in the Java runtime for GCC. > > However, the compiler proper itself can _really_ cramp people's > > avalible RAM (for those who don't belive me and have Windows w/ > > DJGPP, change a

Re: Use Bohem's GC for compiler proper in 4.1?

2005-04-01 Thread Andrew Haley
Sam Lauber writes: > I know that Bohem's GC is used in the Java runtime for GCC. > However, the compiler proper itself can _really_ cramp people's > avalible RAM (for those who don't belive me and have Windows w/ > DJGPP, change all the memory controls from `auto' to the highest > value and ju

Use Bohem's GC for compiler proper in 4.1?

2005-04-01 Thread Sam Lauber
I know that Bohem's GC is used in the Java runtime for GCC. However, the compiler proper itself can _really_ cramp people's avalible RAM (for those who don't belive me and have Windows w/ DJGPP, change all the memory controls from `auto' to the highest value and just try to compile libiberty/re

Re: PR 20505

2005-04-01 Thread Nathan Sidwell
James E Wilson wrote: Nathan Sidwell wrote: Being conservative I'd go for my patch on 4.0 and yours (if verified) on mainline. I'm fine with that. Have you actually written a patch yet? I don't see one in the bug report or in gcc-patches. My mistake. I'd forgotten the post-to-list part :) Here