[PATCH 2/6] dwarf2cfi: Unify add_fde_cfi and add_cie_cfi.

2011-07-09 Thread Richard Henderson
--- gcc/dwarf2cfi.c | 82 --- gcc/dwarf2out.c |8 +++--- 2 files changed, 40 insertions(+), 50 deletions(-) diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c index d96aa70..ca9b503 100644 --- a/gcc/dwarf2cfi.c +++ b/gcc/dwarf2cfi.c @@ -146,6

[PATCH 6/6] dwarf2: Move CFI output routines to dwarf2cfi.c.

2011-07-09 Thread Richard Henderson
--- gcc/defaults.h | 22 ++ gcc/dwarf2cfi.c | 567 gcc/dwarf2out.c | 638 +-- gcc/dwarf2out.h |7 + 4 files changed, 604 insertions(+), 630 deletions(-) diff --git a/gcc/defaults.h

Re: PATCH [4/n] X32: Use ptr_mode for vtable adjustment

2011-07-09 Thread Richard Henderson
On 07/09/2011 02:36 PM, H.J. Lu wrote: Hi, Thunk is in ptr_mode, not Pmode. OK for trunk? Thanks. H.J. --- 2011-07-09 H.J. Lu hongjiu...@intel.com * config/i386/i386.c (x86_output_mi_thunk): Use ptr_mode instead of Pmode for vtable adjustment. diff --git

Re: PATCH [5/n] X32: Fix x32 trampoline

2011-07-09 Thread Richard Henderson
On 07/09/2011 02:41 PM, H.J. Lu wrote: Hi, X32 uses movl instead of movabs for trampoline. OK for trunk? Thanks. H.J. --- 2011-07-09 H.J. Lu hongjiu...@intel.com * config/i386/i386.c (ix86_trampoline_init): Use movl instead of movabs for x32. diff --git

Re: PATCH [5/n] X32: Fix x32 trampoline

2011-07-09 Thread Richard Henderson
On 07/09/2011 04:05 PM, H.J. Lu wrote: Is this change actually necessary? I would think that the predicate has already been adjusted... Since we always use short version for x32, there is no need to call. x86_64_zext_immediate_operand. Yes, but using the shorter condition, i.e. always

[rfc, i386] Convert output_mi_thunk to rtl

2011-07-09 Thread Richard Henderson
I developed this patch while working on the dwarf2 pass series. This was before I bypassed the entire problem by removing the !deep branch prediction paths. Ideally, we'd do this generically from gimple. Less ideally, but still better, is to always emit rtl, and support that in the middle end

Re: [rfc, i386] Convert output_mi_thunk to rtl

2011-07-09 Thread Richard Henderson
On 07/09/2011 06:42 PM, H.J. Lu wrote: On Sat, Jul 9, 2011 at 6:34 PM, Richard Henderson r...@redhat.com wrote: I developed this patch while working on the dwarf2 pass series. This was before I bypassed the entire problem by removing the !deep branch prediction paths. Ideally, we'd do

Re: [rfc, i386] Convert output_mi_thunk to rtl

2011-07-10 Thread Richard Henderson
On 07/10/2011 02:33 AM, Uros Bizjak wrote: On Sun, Jul 10, 2011 at 3:34 AM, Richard Henderson r...@redhat.com wrote: I developed this patch while working on the dwarf2 pass series. This was before I bypassed the entire problem by removing the !deep branch prediction paths. Ideally, we'd do

Re: [rfc, i386] Convert output_mi_thunk to rtl

2011-07-10 Thread Richard Henderson
On 07/10/2011 02:33 AM, Uros Bizjak wrote: + reload_completed = 1; + epilogue_completed = 1; Do we really need these? Perhaps a comment should be added here, it is not obvious at the first sight... We didn't need these. ia64 did because there we run a split pass to properly generate the

Re: PATCH [5/n] X32: Fix x32 trampoline

2011-07-10 Thread Richard Henderson
On 07/10/2011 12:45 PM, H.J. Lu wrote: * config/i386/i386.c (ix86_trampoline_init): Use movl instead of movabs for x32. Ok. r~

Re: PATCH [3/n] X32: Promote pointers to Pmode

2011-07-10 Thread Richard Henderson
On 07/10/2011 12:43 PM, H.J. Lu wrote: +/* Pointer function arguments and return values are promoted to Pmode. + If FOR_RETURN is 1, this function must behave in the same way with + regard to function returns as TARGET_FUNCTION_VALUE. */ + +static enum machine_mode

Re: [PATCH] Create smaller DWARF ops for some int_loc_descriptor constants etc. (PR debug/49676)

2011-07-11 Thread Richard Henderson
On 07/11/2011 09:33 AM, Jakub Jelinek wrote: PR debug/49676 * dwarf2out.c (int_shift_loc_descriptor): New function. (int_loc_descriptor): If shorter, emit i as (i shift), shift, DW_OP_shl for suitable shift value. Similarly, try to optimize large negative values

Re: [build] Move crtfastmath to toplevel libgcc

2011-07-11 Thread Richard Henderson
On 07/11/2011 10:26 AM, Rainer Orth wrote: There's one other question here: alpha/t-crtfm uses -frandom-seed=gcc-crtfastmath with this comment: # FIXME drow/20061228 - I have preserved this -frandom-seed option # while migrating this rule from the GCC directory, but I do not # know why it

[dwarf2cfi] Cleanup interpretation of cfa.reg

2011-07-11 Thread Richard Henderson
Sometimes we compare cfa.reg with REGNO, and sometimes with something that has been passed through DWARF_FRAME_REGNUM. This leads to all sorts of confusion. I think that ideally we'd leave dw_cfa_location.reg in the GCC regno space, because that's convenient for the majority of the code that

Re: [dwarf2cfi] Cleanup interpretation of cfa.reg

2011-07-12 Thread Richard Henderson
On 07/12/2011 02:05 AM, Andreas Schwab wrote: Richard Henderson r...@redhat.com writes: @@ -261,6 +262,15 @@ extern void dwarf2out_set_demangle_name_func (const char *(*) (const char *)); extern void dwarf2out_vms_debug_main_pointer (void); #endif +/* Unfortunately

Re: CFT: [build] Move fp-bit support to toplevel libgcc

2011-07-12 Thread Richard Henderson
On 07/12/2011 10:07 AM, Rainer Orth wrote: Only a couple of special defines (like FLOAT_WORD_ORDER_MISMATCH, QUIET_NAN_NEGATED) are moved to special t-* files in libgcc/config with [FDT]PBIT_CFLAGS similar to e.g. LIBGCC_SYNC_CFLAGS. If it were possible to have gcc define some __LIBGCC_*

[i386, darwin] Fix pr/49714

2011-07-12 Thread Richard Henderson
It *appears* as if the references we were generating before switching the thunk to rtl weren't valid. Certainly those same references don't pass legitimate_address_p, which is the direct cause of the assertion failure. Fixed by using the same address transformation that ix86_expand_call would

[dwarf2cfi] Fix pr/49713

2011-07-12 Thread Richard Henderson
On 07/12/2011 02:29 AM, Richard Earnshaw wrote: On 12/07/11 10:05, Andreas Schwab wrote: I think this has caused the bootstrap failure on ia64: In file included from ../../gcc/dwarf2cfi.c:31:0: ../../gcc/dwarf2out.h: In function 'dwarf_frame_regnum': ../../gcc/dwarf2out.h:271:3: error:

Re: Fix warnings in build with G++

2011-07-12 Thread Richard Henderson
On 07/12/2011 01:07 PM, Eric Botcazou wrote: - while (*constraint++ != ','); + while (*constraint++ != ',') + ; FWIW, elsewhere in gcc we use continue; for empty loop bodies. r~

Re: AVX generic mode tuning discussion.

2011-07-12 Thread Richard Henderson
On 07/12/2011 02:22 PM, harsha.jaga...@amd.com wrote: We would like to propose changing AVX generic mode tuning to generate 128-bit AVX instead of 256-bit AVX. You indicate a 3% reduction on bulldozer with avx256. How does avx128 compare to -mno-avx -msse4.2? Will the next AMD generation have a

Re: PATCH [3/n] X32: Promote pointers to Pmode

2011-07-13 Thread Richard Henderson
On 07/13/2011 07:02 AM, H.J. Lu wrote: Hi Richard, Is my patch OK? No, I don't think it is. r~

Re: PING: PATCH [4/n] X32: Use ptr_mode for vtable adjustment

2011-07-13 Thread Richard Henderson
On 07/13/2011 07:39 AM, H.J. Lu wrote: * config/i386/i386.c (x86_output_mi_thunk): Support ptr_mode != Pmode. * config/i386/i386.md (*addsi_1_zext): Renamed to ... (addsi_1_zext): This. Ok, except, + if (Pmode == DImode ptr_mode == SImode) if (Pmode !=

Re: PATCH [3/n] X32: Promote pointers to Pmode

2011-07-13 Thread Richard Henderson
On 07/13/2011 08:35 AM, H.J. Lu wrote: On Wed, Jul 13, 2011 at 8:27 AM, Richard Henderson r...@redhat.com wrote: On 07/13/2011 07:02 AM, H.J. Lu wrote: Hi Richard, Is my patch OK? No, I don't think it is. What is your suggestion? Promote the return value. If that means it doesn't

Re: [PATCH] widening_mul: Do cost check when propagating mult into plus/minus expressions

2011-07-13 Thread Richard Henderson
On 07/13/2011 06:13 AM, Andreas Krebbel wrote: + force_operand (gen_rtx_fmt_ee (code, mode, +gen_raw_REG (mode, LAST_VIRTUAL_REGISTER + 1), +gen_raw_REG (mode, LAST_VIRTUAL_REGISTER + 2)), + NULL_RTX); + break; + case

Re: [build] Move crtfastmath to toplevel libgcc

2011-07-13 Thread Richard Henderson
On 07/13/2011 09:57 AM, Rainer Orth wrote: Do you think the revised crtfastmath patch is safe enough to commit together to avoid this mess? Probably. +# -frandom-seed is necessary to keep the mangled name of the constructor on +# Tru64 Unix stable, but harmless otherwise. Instead of

Re: [Patch,AVR]: Cleanup readonly_data_section et al.

2011-07-13 Thread Richard Henderson
On 07/13/2011 09:14 AM, Georg-Johann Lay wrote: gcc/ * config/avr/elf.h (TARGET_ASM_SELECT_SECTION): Remove, i.e. use default_elf_select_section. (TARGET_HAVE_SWITCHABLE_BSS_SECTIONS): Remove. (READONLY_DATA_SECTION_ASM_OP): Remove. (TARGET_ASM_NAMED_SECTION):

Re: [PATCH][1/N][C][C++][Fortran][Java] Change POINTER_PLUS_EXPR offset type requirements

2011-07-14 Thread Richard Henderson
On 07/14/2011 04:28 AM, Richard Guenther wrote: On Tue, 12 Jul 2011, Richard Guenther wrote: This patch is step 1, it abstracts away the type of the offset operand when building a POINTER_PLUS_EXPR. It does so by introducing fold_build_pointer_plus_expr{_hwi,_loc} helpers and use them in

Re: [Patch, AVR]: Fix PR49487 (ICE for wrong rotate scratch)

2011-07-14 Thread Richard Henderson
On 07/14/2011 12:41 AM, Georg-Johann Lay wrote: Ok to commit and back-port to 4.6? Johann PR target/49487 * config/avr/avr.md (rotlmode3): Generate SCRATCH instead of REG. (*rotwmode): Use const_int_operand for operands2. Use match_scatch for operands3.

Re: Correct fix for scheduler bug PR11320

2011-07-14 Thread Richard Henderson
On 07/14/2011 03:03 AM, Bernd Schmidt wrote: +++ gcc/config/ia64/ia64.c(working copy) @@ -1047,7 +1047,7 @@ tmp = gen_rtx_PLUS (Pmode, tmp, pic_offset_table_rtx); emit_insn (gen_rtx_SET (VOIDmode, dest, tmp)); - tmp = gen_rtx_LO_SUM (Pmode, dest, src); + tmp =

Re: Correct fix for scheduler bug PR11320

2011-07-14 Thread Richard Henderson
On 07/14/2011 09:23 AM, Bernd Schmidt wrote: Ok, with gen_const_mem hacked into gcc-3.3 (minus setting MEM_READONLY_P which doesn't exist in that tree) the load stays behind the branch where it should be. RTX_UNCHANGING_P was the bit back then, I believe. r~

Re: Correct fix for scheduler bug PR11320

2011-07-14 Thread Richard Henderson
On 07/14/2011 09:19 AM, Bernd Schmidt wrote: Yes, but not using the fixed got pointer in r1, but a random other register which can have different values in the function. Oh, I think I see. So if this really had been a PLUS, as implied by the LO_SUM, we would have had garbage input, produced

Re: Correct fix for scheduler bug PR11320

2011-07-14 Thread Richard Henderson
On 07/14/2011 09:43 AM, Bernd Schmidt wrote: (Although now I wonder if we could instead use one of the speculative load instructions? There's one that sets the NaT bit if the load would fault, isn't there? It's been so long I can't remember.) We could, but we also have to insert a check load

[PATCH 3/9] dwarf2cfi: Populate CUR_ROW-REG_SAVE.

2011-07-14 Thread Richard Henderson
To be actually used by a subsequent patch. --- gcc/dwarf2cfi.c | 27 +-- 1 files changed, 25 insertions(+), 2 deletions(-) diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c index eb59f28..36fa7f8 100644 --- a/gcc/dwarf2cfi.c +++ b/gcc/dwarf2cfi.c @@ -285,6 +285,17 @@

[PATCH 2/9] dwarf2cfi: Rename cfi_insn to add_cfi_insn.

2011-07-14 Thread Richard Henderson
Make it consistent with add_cfi_vec. --- gcc/dwarf2cfi.c | 20 +++- 1 files changed, 11 insertions(+), 9 deletions(-) diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c index 1c1b74f..eb59f28 100644 --- a/gcc/dwarf2cfi.c +++ b/gcc/dwarf2cfi.c @@ -86,7 +86,7 @@ static GTY(())

[PATCH 7/9] dwarf2cfi: Allocate reg_saved_in_data in the heap.

2011-07-14 Thread Richard Henderson
--- gcc/dwarf2cfi.c | 19 ++- 1 files changed, 10 insertions(+), 9 deletions(-) diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c index a800cb4..1d6413f 100644 --- a/gcc/dwarf2cfi.c +++ b/gcc/dwarf2cfi.c @@ -1109,13 +1109,13 @@ typedef struct GTY(()) reg_saved_in_data { }

[PATCH 6/9] dwarf2cfi: Convert queued_reg_save to a VEC.

2011-07-14 Thread Richard Henderson
Also, allocate it in the heap instead of garbage collected. --- gcc/dwarf2cfi.c | 51 ++- 1 files changed, 26 insertions(+), 25 deletions(-) diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c index 51fb824..a800cb4 100644 --- a/gcc/dwarf2cfi.c +++

[PATCH 4/9] dwarf2cfi: Implement change_cfi_row.

2011-07-14 Thread Richard Henderson
Add a generic function to adjust cfi state from one row to another. Use this to implement text section switching. This will also be usable for arbitrary changes around a cfg for shrink-wrapping. --- gcc/dwarf2cfi.c | 376 +-- gcc/dwarf2out.c |

[RFC PATCH 0/9] CFG aware dwarf2 cfi generation

2011-07-14 Thread Richard Henderson
/rth.git rth/cfi-pass r~ Richard Henderson (9): dwarf2cfi: Introduce a dw_cfi_row state. dwarf2cfi: Rename cfi_insn to add_cfi_insn. dwarf2cfi: Populate CUR_ROW-REG_SAVE. dwarf2cfi: Implement change_cfi_row. dwarf2cfi: Remove dw_cfi_row_ref typedef. dwarf2cfi: Convert queued_reg_save

[PATCH 8/9] dwarf2cfi: Introduce dw_trace_info.

2011-07-14 Thread Richard Henderson
This patch only introduces the structure definition and adjusts the existing routines to use the new cur_trace global to access the variables that were moved into the structure. --- gcc/dwarf2cfi.c | 440 +-- 1 files changed, 266 insertions(+),

[PATCH 9/9] dwarf2cfi: Generate and connect traces.

2011-07-14 Thread Richard Henderson
This kinda-sorta corresponds to Bernd's 007-dw2cfi patch. Certainly the same concepts of splitting the instruction stream into extended basic blocks is the same. This patch does a bit better job with the documentation. Also, I'm a bit more explicit about matching things up with the similar code

[PATCH 5/9] dwarf2cfi: Remove dw_cfi_row_ref typedef.

2011-07-14 Thread Richard Henderson
--- gcc/dwarf2cfi.c | 23 +++ 1 files changed, 11 insertions(+), 12 deletions(-) diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c index 745e137..51fb824 100644 --- a/gcc/dwarf2cfi.c +++ b/gcc/dwarf2cfi.c @@ -74,14 +74,13 @@ typedef struct GTY(()) dw_cfi_row_struct

Re: [RFC] Avoid unnecessary futex_wake syscalls when all threads are busy waiting

2011-07-15 Thread Richard Henderson
On 07/15/2011 02:37 AM, Jakub Jelinek wrote: Any comments? Can anyone see meassurable differences on some benchmark? 2011-07-15 Jakub Jelinek ja...@redhat.com * config/linux/wait.h (do_spin): New inline, largely copied from do_wait, just don't do futex_wait here, instead

Re: [patch] Fix PR target/48220 for the SPARC

2011-07-15 Thread Richard Henderson
On 07/14/2011 02:42 PM, Eric Botcazou wrote: PR target/48220 * doc/md.texi (Standard Names): Document window_save. * cfgexpand.c (expand_debug_parm_decl): New function extracted from expand_debug_expr and expand_debug_source_expr. If the target has a window_save

Re: [RFC] More compact (100x) -g3 .debug_macinfo (take 2)

2011-07-15 Thread Richard Henderson
On 07/15/2011 08:42 AM, Jakub Jelinek wrote: The newly added opcodes: DW_MACINFO_GNU_define_indirect0xe0 This opcode has two arguments, one is uleb128 lineno and the other is offset size long byte offset into .debug_str. Except for the encoding of the

Re: Remove NetWare support

2011-07-15 Thread Richard Henderson
On 07/15/2011 10:19 AM, Rainer Orth wrote: After this patch, the only netware references in-tree are from toplevel configure.ac (still needed for the netware support in src), config.sub (from upstream), and gcc/po/*.po for config/i386/netware.h. Bootstrapped without regressions on

Re: [RFC PATCH 0/9] CFG aware dwarf2 cfi generation

2011-07-15 Thread Richard Henderson
On 07/14/2011 04:07 PM, Richard Henderson wrote: This finally brings us to something that can support shrink-wrapping. As mentioned in the description of the last patch, this is 95% of what Bernd had in his last 007-dw2cfg patch, except for the remember/ restore_state stuff. And hopefully

Re: [RFC PATCH 0/9] CFG aware dwarf2 cfi generation

2011-07-15 Thread Richard Henderson
On 07/15/2011 04:24 PM, Bernd Schmidt wrote: What's wrong with -freorder-blocks-and-partition? Something preexisting, or introduced with these changes? Pre-existing. The .gcc_except_table format includes a encoded displacement from a call site to a handler. We cannot represent this

bb-reorder maintenance [1/n]

2011-07-15 Thread Richard Henderson
A simple conversion of reallocated array into a VEC. More of the subroutines should actually use this VEC rather than iterating over all blocks and edges, but this patch only touches the direct users of the data that became the VEC. Tested on x86_64-linux and committed. r~ *

Re: [build] Move crtfastmath to toplevel libgcc

2011-07-18 Thread Richard Henderson
On 07/15/2011 06:56 AM, Rainer Orth wrote: 2011-07-14 Rainer Orth r...@cebitec.uni-bielefeld.de gcc: * config.gcc (alpha*-*-linux*): Add crtfastmath.o to extra_parts. (alpha*-*-freebsd*): Likewise. (i[34567]86-*-linux*, i[34567]86-*-kfreebsd*-gnu,

Re: [Patch,AVR]: Fix PR36467, PR49687 (better widening mul)

2011-07-18 Thread Richard Henderson
On 07/18/2011 08:41 AM, Georg-Johann Lay wrote: +(define_insn_and_split *muluqihi3.uconst + [(set (match_operand:HI 0 register_operand =r) +(mult:HI (zero_extend:HI (match_operand:QI 1 register_operand r)) + (match_operand:HI 2 u8_operand

Re: [PATCH] Register 3 builtins needed for -finstrument-functions in generic code (PR middle-end/49675)

2011-07-18 Thread Richard Henderson
On 07/18/2011 10:44 AM, Jakub Jelinek wrote: PR middle-end/49675 * tree.c (build_common_builtin_nodes): Register __builtin_return_address, __cyg_profile_func_enter and __cyg_profile_func_exit. * gfortran.dg/pr49675.f90: New test. Ok. r~

Re: [Patch,AVR]: Fix PR36467, PR49687 (better widening mul)

2011-07-18 Thread Richard Henderson
On 07/18/2011 11:05 AM, Georg-Johann Lay wrote: What's bad with pre-reload splits? The only weak point is in target-independent code because there is nothing like split1_completed and other missing information for better pass-awareness. Nothing's wrong with pre-reload splits. However, what

bb-reorder maintenance [2/n]

2011-07-18 Thread Richard Henderson
Split out a helper subroutine to insert a barrier, after we've modified a basic block to not fallthru. Tested on x86_64-linux and committed. r~ * bb-reorder.c (emit_barrier_after_bb): Split out of ... (add_labels_and_missing_jumps): ... here. (fix_up_fall_thru_edges,

Re: bb-reorder maintenance [2/n]

2011-07-18 Thread Richard Henderson
On 07/18/2011 12:09 PM, Steven Bosscher wrote: On Mon, Jul 18, 2011 at 8:48 PM, Richard Henderson r...@redhat.com wrote: Split out a helper subroutine to insert a barrier, after we've modified a basic block to not fallthru. Huh, aren't barriers emitted automatically when going out

Re: bb-reorder maintenance [2/n]

2011-07-18 Thread Richard Henderson
On 07/18/2011 12:09 PM, Steven Bosscher wrote: On Mon, Jul 18, 2011 at 8:48 PM, Richard Henderson r...@redhat.com wrote: Split out a helper subroutine to insert a barrier, after we've modified a basic block to not fallthru. Huh, aren't barriers emitted automatically when going out

Re: [Patch,AVR]: Fix PR36467, PR49687 (better widening mul)

2011-07-18 Thread Richard Henderson
On 07/18/2011 12:15 PM, Georg-Johann Lay wrote: However, what you've done is try very hard to work around reload doing the Right Thing with constant spilling, namely re-generate the constant rather than spill and restore it. I cannot believe that's the right way to proceed. You mean that

bb-reorder maintenance [3/n]

2011-07-18 Thread Richard Henderson
The create_basic_block function will do the right thing with ordering the block label and the block note. No need for us to work hard at that within bb-reorder. r~ * bb-reorder.c (fix_crossing_conditional_branches): Emit all insns before calling create_basic_block. diff --git

Re: PATCH [7/n] X32: Handle address output and calls patterns

2011-07-19 Thread Richard Henderson
On 07/18/2011 09:45 PM, H.J. Lu wrote: @@ -14861,14 +14919,22 @@ ix86_output_addr_vec_elt (FILE *file, int value) { const char *directive = ASM_LONG; + if (TARGET_X32) +{ + fprintf (file, %s%s%d\n, directive, LPREFIX, value); + fprintf (file, %s0\n, directive); Why

Re: [Patch,AVR]: Fix PR36467, PR49687 (better widening mul)

2011-07-19 Thread Richard Henderson
On 07/19/2011 03:21 AM, Georg-Johann Lay wrote: Yes, it is sad that the backends have to work around the fact that sign/zero_extension of constants is invalid rtl. Why is that invalid? (set (reg:HI A) (const_int 1000)) (set (reg:SI B) (mult:SI (zero_extend:SI (reg:HI C))

Re: [RFC PATCH, i386]: Allow SUBREG_PROMOTED_UNSIGNED_P subregs in address

2011-07-20 Thread Richard Henderson
On 07/20/2011 09:41 AM, Uros Bizjak wrote: * config/i386/i386.c (ix86_decompose_address): Also allow promoted paradoxical subregs in base and PLUS chains. Allow only paradoxical subregs and subregs of DImode hard registers in subregs of index.

Re: [Patch,AVR]: Fix PR36467, PR49687 (better widening mul)

2011-07-20 Thread Richard Henderson
On 07/20/2011 04:12 AM, Georg-Johann Lay wrote: Johann PR target/36467 PR target/49687 * config/avr/avr.md (mulhi3): Use register_or_s9_operand for operand2 and expand appropriately if there is a CONST_INT in operand2. (usmulqihi3): New insn.

Re: bb-reorder maintenance [3/n]

2011-07-20 Thread Richard Henderson
On 07/20/2011 11:24 AM, Ulrich Weigand wrote: BB_HEAD (new_bb) = new_label; new_bb is now always NULL at this point, and the assignment crashes. I guess that assignment should now be just deleted as well, since this is done by create_basic_block later? Doh. Yes, that's

Re: PATCH [7/n] X32: Handle address output and calls patterns

2011-07-20 Thread Richard Henderson
On 07/20/2011 02:00 PM, H.J. Lu wrote: operands[0] = expand_simple_binop (Pmode, code, op0, op1, NULL_RTX, 0, OPTAB_DIRECT); } + else if (TARGET_X32) +operands[0] = convert_memory_address (Pmode, operands[0]); }) (define_insn

[PATCH] Dump basic_block flags.

2011-07-20 Thread Richard Henderson
Previously we had no indication of which partition a block has been placed in. Re-use some existing code, rather than duplicate it in print_rtl_with_bb. Bootstrapped on x86_64-linux. r~ * cfg.c (dump_bb_info): Dump basic_block-flags. * cfgrtl.c (print_rtl_with_bb): Use

Re: [PATCH] Dump basic_block flags.

2011-07-20 Thread Richard Henderson
On 07/20/2011 03:23 PM, Steven Bosscher wrote: On Thu, Jul 21, 2011 at 12:16 AM, Richard Henderson wrote: + static const char * const bits[] = { +new, reachable, irr_loop, superblock, disable_sched, +hot_partition, cold_partition, duplicated

Re: [Patch,AVR]: Fix printing of rtx_costs

2011-07-21 Thread Richard Henderson
On 07/21/2011 01:39 AM, Georg-Johann Lay wrote: - fprintf (asm_out_file, /* DEBUG: cost = %d. */\n, -rtx_cost (PATTERN (insn), INSN, !optimize_size)); + rtx set; + + if ((set = single_set (insn), set)) +fprintf (asm_out_file, /* DEBUG: cost = %d. */\n, +

Re: [PATCH] Fix PR49715, (float)unsigned - (float)signed

2011-07-21 Thread Richard Henderson
On 07/21/2011 08:09 AM, Richard Guenther wrote: + /* It's not interesting to widen anything smaller than SImode. */ + if (TYPE_PRECISION (TREE_TYPE (rhs1)) GET_MODE_PRECISION (SImode) + || (!TYPE_UNSIGNED (TREE_TYPE (rhs1)) +TYPE_PRECISION (TREE_TYPE (rhs1)) ==

Re: [PATCH] Fix PR49715, (float)unsigned - (float)signed

2011-07-21 Thread Richard Henderson
On 07/21/2011 08:47 AM, Richard Guenther wrote: Hm, of course some targets define unsigned float expanders just do do the complicated stuff manually (which is why I didn't look at the conversion optabs). Unfortunately, there's no way to tell optabs.c not to widen conversions all the way into

Re: PATCH [9/n] X32: PR target/49798: Zero-extend symbol address to 64bit if needed

2011-07-21 Thread Richard Henderson
On 07/21/2011 09:13 AM, H.J. Lu wrote: PR target/49798 * config/i386/i386.c (ix86_asm_integer): New. (TARGET_ASM_INTEGER): Likewise. This is the updated patch, using the same approach in sparc_assemble_integer. OK for trunk? Is there any reason why we don't simply

Re: PATCH [9/n] X32: PR target/49798: Zero-extend symbol address to 64bit if needed

2011-07-21 Thread Richard Henderson
On 07/21/2011 09:20 AM, H.J. Lu wrote: .quad symbol isn't really valid for 32bit. Why not? We certainly know what value to put there. I can add a new .xquad directive, similar to .xword for sparc... That seems like exactly the same meaningless complication. r~

Re: [RFC] More compact (100x) -g3 .debug_gnu_macro (take 4)

2011-07-21 Thread Richard Henderson
On 07/21/2011 04:22 AM, Jakub Jelinek wrote: Currently, the patch emits 3 byte section headers at the start of the .debug_gnu_macro chunks referenced from .debug_info (through DW_AT_GNU_macros), containing version number (2 byte, 4 ATM) and 1 byte section offset, but the

Re: PATCH [9/n] X32: PR target/49798: Zero-extend symbol address to 64bit if needed

2011-07-21 Thread Richard Henderson
On 07/21/2011 09:28 AM, H.J. Lu wrote: On Thu, Jul 21, 2011 at 9:23 AM, Richard Henderson r...@redhat.com wrote: On 07/21/2011 09:20 AM, H.J. Lu wrote: .quad symbol isn't really valid for 32bit. Why not? We certainly know what value to put there. x32 doesn't support 64bit relocation

Re: PATCH [9/n] X32: PR target/49798: Zero-extend symbol address to 64bit if needed

2011-07-21 Thread Richard Henderson
On 07/21/2011 10:39 AM, Uros Bizjak wrote: IMO, it is OK to disable 64bit relocations, and that compiler is at fault here. Consider that something gets written to the d field (see example of PR49798). Reading a pointer from *m fileld in DImode, we will get non-zero bits in high 32bits of a

[RFC, cfg/dataflow] Properly split EH edges for -freorder-blocks-and-partition

2011-07-21 Thread Richard Henderson
Ignoring all of the other problems that partitioning might have, it does Just So Happen to work for the single most popular target. So let's see about keeping the pass limping along for a while longer. The problem I'm attempting to solve here is the gross hack in convert_to_eh_region_ranges,

Re: [PATCH] Fix PR49715, (float)unsigned - (float)signed

2011-07-21 Thread Richard Henderson
On 07/21/2011 01:16 PM, Joseph S. Myers wrote: On Thu, 21 Jul 2011, Richard Guenther wrote: Patch also handling wider modes and not starting with SImode but the mode of int: Use of target int for anything not about C ABIs is certainly wrong. This might be about what operations the

Re: PATCH [3/n] X32: Promote pointers to Pmode

2011-07-21 Thread Richard Henderson
On 07/21/2011 03:02 PM, H.J. Lu wrote: * config/i386/i386.c (function_value_64): Always return pointers in Pmode. (ix86_promote_function_mode): New. (TARGET_PROMOTE_FUNCTION_MODE): Likewise. Much better, thanks. r~

Re: [RFC, cfg/dataflow] Properly split EH edges for -freorder-blocks-and-partition

2011-07-21 Thread Richard Henderson
On 07/21/2011 03:05 PM, Steven Bosscher wrote: On Thu, Jul 21, 2011 at 11:17 PM, Richard Henderson r...@redhat.com wrote: Suggestions for something better than the df_finish_pass hack that I added at the end of partition_hot_cold_basic_blocks are very welcome. Is it not enough to just

Re: PATCH [3/n] X32: Promote pointers to Pmode

2011-07-21 Thread Richard Henderson
On 07/21/2011 04:28 PM, H.J. Lu wrote: On Thu, Jul 21, 2011 at 3:05 PM, Richard Henderson r...@redhat.com wrote: On 07/21/2011 03:02 PM, H.J. Lu wrote: * config/i386/i386.c (function_value_64): Always return pointers in Pmode. (ix86_promote_function_mode): New

Re: [RFC, cfg/dataflow] Properly split EH edges for -freorder-blocks-and-partition

2011-07-21 Thread Richard Henderson
On 07/21/2011 03:11 PM, Richard Henderson wrote: On 07/21/2011 03:05 PM, Steven Bosscher wrote: On Thu, Jul 21, 2011 at 11:17 PM, Richard Henderson r...@redhat.com wrote: Suggestions for something better than the df_finish_pass hack that I added at the end of partition_hot_cold_basic_blocks

Re: [PATCH] Fix PR49715, (float)unsigned - (float)signed

2011-07-22 Thread Richard Henderson
On 07/22/2011 07:11 AM, Richard Guenther wrote: Does this look sensible as a start? We can always improve things incrementally when we discover a case that is worthwhile. Looks good to me. r~

Re: PATCH [3/n] X32: Promote pointers to Pmode

2011-07-22 Thread Richard Henderson
On 07/22/2011 06:07 AM, H.J. Lu wrote: 2011-07-21 H.J. Lu hongjiu...@intel.com * config/i386/i386.c (ix86_option_override_internal): Disallow MS ABI in x32 mode. (ix86_init_builtins): Call ix86_init_builtins_va_builtins_abi only for TARGET_LP64.

Re: [RFC] More compact (100x) -g3 .debug_gnu_macro (take 5)

2011-07-22 Thread Richard Henderson
On 07/22/2011 06:20 AM, Jakub Jelinek wrote: Ok, based on further discussions here, on Dwarf-discuss and on IRC here is a hopefully final version. Ok by me. The dwarf edits look good too. r~

Re: [PATCH] Fix PR47566

2011-07-22 Thread Richard Henderson
On 07/22/2011 07:42 AM, Ulrich Weigand wrote: Well, it works for me with just adding -lm to the dg-extra-ld-options. This still folds cabs to sqrt in the LTO step, and then satisfies that call via the libm routine ... If I understood your intent correctly, this should still test the same

Re: Correct fix for scheduler bug PR11320

2011-07-22 Thread Richard Henderson
On 07/22/2011 10:00 AM, Eric Botcazou wrote: It's getting confused about loads/stores being control_flow_insns and getting scheduled past each other nonetheless. Mind testing the following? s/flag_non_call_exceptions/cfun-can_throw_non_call_exceptions/ Why test either, since

Re: [PATCH] Fix PR47566

2011-07-22 Thread Richard Henderson
On 07/22/2011 10:19 AM, Ulrich Weigand wrote: Richard Henderson wrote: On 07/22/2011 07:42 AM, Ulrich Weigand wrote: Well, it works for me with just adding -lm to the dg-extra-ld-options. This still folds cabs to sqrt in the LTO step, and then satisfies that call via the libm routine

Re: [RFC, cfg/dataflow] Properly split EH edges for -freorder-blocks-and-partition

2011-07-22 Thread Richard Henderson
On 07/22/2011 01:33 PM, Paolo Bonzini wrote: On Fri, Jul 22, 2011 at 02:09, Richard Henderson r...@redhat.com wrote: I should mention here that I suspect the Cleanest solution is to make DF_DEFER_INSN_RESCAN imply that we also shouldn't grab data from the blocks those new insns are in either

Re: [RFC] More compact (100x) -g3 .debug_gnu_macro (take 4)

2011-07-22 Thread Richard Henderson
On 07/22/2011 02:16 PM, Michael Eager wrote: On 07/22/2011 02:08 PM, Richard Henderson wrote: On 07/22/2011 12:54 PM, Michael Eager wrote: The definition of opcodes in the line number table is different from opcodes in other tables, including a modified macro table. There are many opcodes

Re: [RFC] More compact (100x) -g3 .debug_gnu_macro (take 4)

2011-07-22 Thread Richard Henderson
On 07/22/2011 04:15 PM, Michael Eager wrote: On 07/22/2011 02:20 PM, Richard Henderson wrote: On 07/22/2011 02:16 PM, Michael Eager wrote: On 07/22/2011 02:08 PM, Richard Henderson wrote: On 07/22/2011 12:54 PM, Michael Eager wrote: The definition of opcodes in the line number table

Fix mark_all_labels vs cfglayout mode

2011-07-22 Thread Richard Henderson
I re-tested my dwarf2 cfi propagation pass today, with the partitioning vs eh edge splitting fix included. Only this time I tested languages=all,ada,go instead of just =c,c++. Lo and behold I find another latent problem, this time via a Fortran test case. The dwarf2 cfg pass is set to abort for

Fix pass_partition_blocks vs -O0

2011-07-22 Thread Richard Henderson
Well, technically it's not broken yet. It will be as soon as it starts touching DF data, since this pass runs before pass_df_initialize_no_opt. But the only real consumer of BB_PARTITION is pass_reorder_blocks. And that pass is already gated to only run if optimization is enabled. So really

Re: [RFC, cfg/dataflow] Properly split EH edges for -freorder-blocks-and-partition

2011-07-22 Thread Richard Henderson
On 07/22/2011 01:57 PM, Richard Henderson wrote: On 07/22/2011 01:33 PM, Paolo Bonzini wrote: On Fri, Jul 22, 2011 at 02:09, Richard Henderson r...@redhat.com wrote: I should mention here that I suspect the Cleanest solution is to make DF_DEFER_INSN_RESCAN imply that we also shouldn't grab

Re: [RFC, cfg/dataflow] Properly split EH edges for -freorder-blocks-and-partition

2011-07-23 Thread Richard Henderson
On 07/23/2011 05:12 AM, Paolo Bonzini wrote: On Sat, Jul 23, 2011 at 02:32, Richard Henderson r...@redhat.com wrote: Does anyone object to me committing the patch as-is, with the understanding that either Paulo or myself will, before too long, clean up the DF interface as described above? I

Re: [RFC PATCH 0/9] CFG aware dwarf2 cfi generation

2011-07-24 Thread Richard Henderson
On 07/24/2011 06:22 PM, David Edelsohn wrote: This patch set causes a bootstrap failure on AIX: In file included from /farm/dje/src/src/libgcc/../gcc/unwind-dw2.c:1590:0: /farm/dje/src/src/libgcc/../gcc/unwind.inc: In function '_Unwind_RaiseException':

Re: [Patch,AVR]: Fix PR29560 (map 16-bit shift to 8-bit)

2011-07-25 Thread Richard Henderson
On 07/25/2011 10:30 AM, Georg-Johann Lay wrote: PR target/29560 * config/avr/avr.md: Add peephole2 to map ashlhi3 to ashlqi3 if high part of shift target is unused. Ok. r~

[dwarf2cfi] Generate remember/restore_state.

2011-07-25 Thread Richard Henderson
Fixes an (intentional) .eh_frame size regression from before the rewrite. Without any actual shrink-wrapping, there are not many differences around the function. If two traces do differ, it's easy to look back to the beginning of the previous trace, which is probably an epilogue, and emit the

Fix debug/49841

2011-07-25 Thread Richard Henderson
The ICE caught what it was supposed to catch. However, what the rs6000 port was intending to describe was the unconditional availability of R2 at a given offset after the conditional store. Approved by dje in the PR. r~ PR debug/49841 * config/rs6000/rs6000.c

[PATCH] Remove NOTE_INSN_CFA_RESTORE_STATE.

2011-07-25 Thread Richard Henderson
|6 ++ gcc/final.c|6 +- gcc/insn-notes.def |4 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c86e6da..b2ed72a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2011-07-25 Richard Henderson r

Re: [Patch,AVR]: Fix PR29560 (map 16-bit shift to 8-bit)

2011-07-26 Thread Richard Henderson
On 07/26/2011 02:48 AM, Georg-Johann Lay wrote: Moreover, the original peep2 is not fully correct because it maps a 16-bit shift to a 8-bit one. The correct mapping is (set (match_dup 2) (subreg:QI (ashift:HI (zero_extend:HI (match_dup 2)) (match_dup 1))

Re: [Patch,AVR]: Fix PR29560 (map 16-bit shift to 8-bit)

2011-07-26 Thread Richard Henderson
On 07/26/2011 10:26 AM, Georg-Johann Lay wrote: If -mint8 (word_mode = QImode) ever returns resp. is turned functional again, then the QI version is undefined for offsets = 8 whereas the HI version is only undefined for offsets = 16. It's undefined at the C level, not necessarily at the rtl

Re: [PATCH] Fix one .debug_macro bug and fix -g3 on non-HAVE_AS_DWARF2_DEBUG_LINE (both .debug_macro and .debug_macinfo)

2011-07-26 Thread Richard Henderson
On 07/26/2011 01:38 PM, Jakub Jelinek wrote: * dwarf2out.c (output_macinfo_op): Ensure fd-filename points to GC allocated copy of the string. (dwarf2out_finish): Emit .debug_macinfo or .debug_macro sections before .debug_line, not after it. Ok. r~

<    3   4   5   6   7   8   9   10   11   12   >