RE: GCC -On optimization passes: flag and doc issues
On 27 April 2007 21:51, Joerg Wunsch wrote: > As Steven Bosscher wrote: > >>> The idea behind that tool is great, I only wish the authors had >>> taken a class in portable shell scripting before. It's not that >>> all the world's a Vax these days... > >> Patches welcome, I guess. > > Well, quite an amount of work, alas. There's no central template in > CSiBE where this could be changed, instead, they apparently manually > changed each and any of the Makefiles etc. in the src/ subdirectories > there, so it's almost 50 files to make identical changes to. "find | sed -i" would take most of the pain out of that if you did want to try it... cheers, DaveK -- Can't think of a witty .sigline today
Re: GCC -On optimization passes: flag and doc issues
On Saturday 28 April 2007 13:50:01 Dave Korn wrote: > On 27 April 2007 21:51, Joerg Wunsch wrote: > > > As Steven Bosscher wrote: > > > >>> The idea behind that tool is great, I only wish the authors had > >>> taken a class in portable shell scripting before. It's not that > >>> all the world's a Vax these days... > > > >> Patches welcome, I guess. > > > > Well, quite an amount of work, alas. There's no central template in > > CSiBE where this could be changed, instead, they apparently manually > > changed each and any of the Makefiles etc. in the src/ subdirectories > > there, so it's almost 50 files to make identical changes to. > > "find | sed -i" would take most of the pain out of that if you did want to > try it... sed "-i" is an "evil" GNU extension, likewise :-) -- René Rebe - ExactCODE GmbH - Europe, Germany, Berlin http://exactcode.de | http://t2-project.org | http://rene.rebe.name
Re: GCC -On optimization passes: flag and doc issues
René Rebe <[EMAIL PROTECTED]> writes: > sed "-i" is an "evil" GNU extension, likewise :-) Also a FreeBSD extension. Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."
RE: GCC -On optimization passes: flag and doc issues
On 28 April 2007 16:13, Andreas Schwab wrote: > René Rebe <[EMAIL PROTECTED]> writes: > >> sed "-i" is an "evil" GNU extension, likewise :-) > > Also a FreeBSD extension. I wasn't proposing it be put *into* the source, I was suggesting it be used /on/ the source... cheers, DaveK -- Can't think of a witty .sigline today
debugging quality and gcc
Hi I am wondering if from a developer perspective some body can tell me what debugging quality to expect when using -g with O3. Especially when the following happen 1. When a variable resides in multiple locations in different scopes such as different registers. If this works very well, I am wondering how gcc accomplishes this? 2. A function is inlined. 3. Constant propagation. Due to constraints of my use, I have to generate code without the frame pointer. thanks dz
Re: GCC -On optimization passes: flag and doc issues
As René Rebe wrote: > > "find | sed -i" would take most of the pain out of that if you > > did want to try it... > sed "-i" is an "evil" GNU extension, likewise :-) No, it's similarly available on FreeBSD. That would be fine with me here, as it's only required to tweak the code, but would not be left in the publically available kit afterwards. However, as I already wrote to Dave, I never got the hang of writing multiline sed scripts. Guess even using ed(1) with a here document is more to my liking, but I'll probably end up with a short Perl hack then. I'm simply out of time for all this right now. I did have a few hours of free time slots last week that I could have spent into improving GCC's inlining, but eventually have wasted these into first hacking the tools instead. :-( -- cheers, J"org .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)
A problem with the loop structure
Hi all, I will greatly appreciate any suggestions regarding the following problem I have with the loop structure. I am working on Swing Modulo Scheduling with Sony SDK for SPU (based on gcc 4.1.1). Below there are 3 observation describing the problem. Thanks a lot, Vladimir 1. The problem was unveiled by compiling a testcase with dump turned on. The compilation failed while calling function get_loop_body from flow_loop_dump on the following assert : else if (loop->latch != loop->header) { tv = dfs_enumerate_from (loop->latch, 1, glb_enum_p, tovisit + 1, loop->num_nodes - 1, loop->header) + 1; gcc_assert (tv == loop->num_nodes); The compilation exits successfully if compiled without enabling the dump. 2. SMS pass contained a single call to loop_version on the loop to be SMSed. This happened before any SMS related stuff was done. Trying to call verify_loop_structure(loops) just after the call to loop_version failed on the same assert in get_loop_body as in (1). The loop on which we fail is neither the versioned loop nor the new loop. Below there are dumps to verify_loop_structure called from different places in loop_version: (gdb) n 1466 first_head = entry->dest; (gdb) p verify_loop_structure(loops) $12 = void (gdb) n 1469 if (!cfg_hook_duplicate_loop_to_header_edge (loop, entry, loops, 1, (gdb) p verify_loop_structure(loops) $13 = void (gdb) n 1475 second_head = entry->dest; (gdb) p verify_loop_structure(loops) bmark_lite.c: In function 't_run_test': bmark_lite.c:1225: error: loop 7's header does not have exactly 2 entries Breakpoint 1, fancy_abort ( file=0x884008 "/Develop/sony/build/toolchain/gcc/gcc/cfgloop.c", line=1277, function=0x8841d0 "verify_loop_structure") at /Develop/sony/build/toolchain/gcc/gcc/diagnostic.c:602 602 internal_error ("in %s, at %s:%d", function, trim_filename (file), line); 3. At the very beginning of the SMS pass we build the loop structure using build_loops_structure defined in modulo-sched.c. Just after the call I tried to print in gdb the loop on which we failed in get_loop_body. This failed as well (gdb) p print_loop(dumpfile, 0xbabe20, 0) No symbol "dumpfile" in current context. (gdb) p print_loop(stdout, 0xbabe20, 0) loop_0 { } $1 = void (gdb) p print_loop(stdout, 0xd42e20, 0) loop_7 { bb_21 (preds = {bb_256 }, succs = {bb_23 bb_22 }) { :; matrixA.770 = matrixA; temp.801 = *(matrixA.770 + (varsize * *) ivtmp.701 * 4B); temp.874 = temp.801 + pretmp.130; sum1_lsm.411 = *temp.874; col1_lsm.839 = (int) ivtmp.701; col1_lsm.837 = 0; if (col1_lsm.839 > 0) goto ; else (void) 0; } bb_23 (preds = {bb_21 }, succs = {bb_262 }) { :; ivtmp.694 = 0; } bb_262 (preds = {bb_23 }, succs = {bb_264 bb_263 }) { Breakpoint 1, fancy_abort ( file=0x86e980 "/Develop/sony/build/toolchain/gcc/gcc/tree-flow-inline.h", line=722, function=0x86e9b9 "bsi_start") at /Develop/sony/build/toolchain/gcc/gcc/diagnostic.c:602 602 internal_error ("in %s, at %s:%d", function, trim_filename (file), line); The failure was on the assert in line 722(please find below): (gdb) up #1 0x00469d80 in bsi_start (bb=0x2ebc0100) at /Develop/sony/build/toolchain/gcc/gcc/tree-flow-inline.h:722 722 gcc_assert (bb->index < 0); (gdb) l 717 block_stmt_iterator bsi; 718 if (bb->stmt_list) 719 bsi.tsi = tsi_start (bb->stmt_list); 720 else 721 { 722 gcc_assert (bb->index < 0); 723 bsi.tsi.ptr = NULL; 724 bsi.tsi.container = NULL; 725 } 726 bsi.bb = bb; (gdb)
Re: A problem with the loop structure
Hello, > (based on gcc 4.1.1). now that is a problem; things have changed a lot since then, so I am not sure how much I will be able to help. > 1. The problem was unveiled by compiling a testcase with dump turned > on. The compilation failed while calling function get_loop_body from > flow_loop_dump on the following assert : > > else if (loop->latch != loop->header) >{ > tv = dfs_enumerate_from (loop->latch, 1, glb_enum_p, > tovisit + 1, loop->num_nodes - 1, > loop->header) + 1; > > > gcc_assert (tv == loop->num_nodes); > > The compilation exits successfully if compiled without enabling the dump. this means that there is some problem in some loop transformation, forgetting to record membership of some blocks to their loops or something like that. > 2. SMS pass contained a single call to loop_version on the loop to be > SMSed. This happened before any SMS related stuff was done. Trying to > call verify_loop_structure(loops) just after the call to loop_version > failed on the same assert in get_loop_body as in (1). The loop on > which we fail is neither the versioned loop nor the new loop. Probably it is their superloop? > Below > there are dumps to verify_loop_structure called from different places > in loop_version: These dumps are not very useful, loop structures do not have to be consistent in the middle of the transformation. > 3. At the very beginning of the SMS pass we build the loop structure > using build_loops_structure defined in modulo-sched.c. Just after the > > call I tried to print in gdb the loop on which we failed in > get_loop_body. This failed as well > > (gdb) p print_loop(dumpfile, 0xbabe20, 0) Do not use print_loop, that only works on gimple. Use flow_loops_dump to find which blocks belong to which loops, and possibly debug_bb_n if you need to see the contents of the blocks. Zdenek
how to start using gcc on windows
I have looked hard, but I cannot figure out how to 1) identify gcc for MSwindowsXP from a mirror site I presume gcc-4.1.2.tar.bz2 is for Linux??? 2) How much scattered stuff I need 3) how to find out how to install 4) print bitmaps at sufficient resolution
Re: how to start using gcc on windows
On Apr 28, 2007, at 5:03 PM, [EMAIL PROTECTED] wrote: I have looked hard, but I cannot figure out how to 1) identify gcc for MSwindowsXP from a mirror site google("cygwin") will find what we'd recommend.