[PATCH 02/10] Drop uncast_insn from param 1 of final_scan_insn

2014-09-04 Thread David Malcolm
gcc/ * output.h (final_scan_insn): Strengthen first param from rtx to rtx_insn *. * final.c (final_scan_insn): Likewise, renaming it back from "uncast_insn" to "insn", eliminating the checked cast. * config/h8300/h8300.md (define_insn "jump"): Replace loca

[PATCH 00/10] More use of rtx subclasses

2014-09-04 Thread David Malcolm
The following patches are followups to the 236-patch kit; they use the new classes in more places, in some cases eliminating checked casts, and should enable some bigger cleanups that I'm working towards (e.g. converting the params of single_set and recog_memoized to require rtx_insn * rather than

[PATCH 03/10] for_each_eh_label callbacks take an rtx_code_label

2014-09-04 Thread David Malcolm
gcc/ * except.c (for_each_eh_label): Within param "callback", strengthen param from rtx to rtx_code_label *. Strengthen local "lab" from rtx to rtx_code_label *. Remove redundant check on LABEL_P (lab), since this is known from the type rtx_code_label *. *

[PATCH 09/10] Simplification within reorg.c

2014-09-04 Thread David Malcolm
gcc/ * reorg.c (relax_delay_slots): Move declaration of "trial_seq" above the conditional, and convert the check on GET_CODE to a dyn_cast, so that "trial_seq" is available as an rtx_sequence * in the conditional. Simplify the conditional by using methods of

[PATCH 06/10] Use rtx_insn more within peep2

2014-09-04 Thread David Malcolm
gcc/ * recog.c (peep2_attempt): Strengthen return type from rtx to rtx_insn *. (peep2_update_life): Likewise for params "last", "prev", removing a checked cast made redundant by this. (peephole2_optimize): Likewise for local "last". --- gcc/recog.c | 9 +

[PATCH 10/10] Use rtx_insn for various jump-handling functions and predicates

2014-09-04 Thread David Malcolm
gcc/ * config/arc/arc.c (arc_print_operand): Use insn method of final_sequence for type-safety. * config/bfin/bfin.c (bfin_hardware_loop): Strengthen param "insn" from rtx to rtx_insn *. * config/frv/frv.c (frv_print_operand_jump_hint): Likewise. * co

[PATCH 04/10] Eliminate the checked cast from get_call_reg_set_usage

2014-09-04 Thread David Malcolm
gcc/ * caller-save.c (setup_save_areas): Strengthen local "insn" from rtx to rtx_insn *. * final.c (get_call_reg_set_usage): Likewise for first param, eliminating a checked cast. * regs.h (get_call_reg_set_usage): Likewise for first param. * resource.

[PATCH 07/10] Use rtx_insn for more scheduler things, plus CONST_CAST_RTX_INSN

2014-09-04 Thread David Malcolm
gcc/ * sched-deps.c (sched_get_condition_with_rev_uncached): Strengthen param "insn" from const_rtx to const rtx_insn *. (sched_get_reverse_condition_uncached): Likewise. (sched_get_condition_with_rev): Likewise. (sched_has_condition_p): Likewise. (sc

[PATCH 05/10] Convert set_block_for_insn from a macro to an inline function

2014-09-04 Thread David Malcolm
gcc/ * basic-block.h (set_block_for_insn): Eliminate this macro in favor of... * rtl.h (set_block_for_insn): New inline function, imposing the requirement that the "insn" param is an rtx_insn *. --- gcc/basic-block.h | 2 -- gcc/rtl.h | 5 + 2 files chan

[PATCH 08/10] Use rtx_insn_list within haifa-sched.c

2014-09-04 Thread David Malcolm
gcc/ * haifa-sched.c (check_clobbered_conditions): Strengthen local "link" from rtx to rtx_insn_list *, and use its methods for clarity and type-safety. (toggle_cancelled_flags): Likewise. (restore_last_backtrack_point): Likewise. (queue_to_ready): Us

Re: [PATCH 01/10] Use rtx_jump_table_data in jump.c:delete_related_insns

2014-09-04 Thread Jeff Law
On 09/04/14 19:51, David Malcolm wrote: gcc/ * jump.c (delete_related_insns): Introduce a new local "table" by replacing JUMP_TABLE_DATA_P with a dyn_cast, then use the get_labels method of "table" to simplify access to the labels in the jump table. OK. Jeff

Re: [PATCH 02/10] Drop uncast_insn from param 1 of final_scan_insn

2014-09-04 Thread Jeff Law
On 09/04/14 19:51, David Malcolm wrote: gcc/ * output.h (final_scan_insn): Strengthen first param from rtx to rtx_insn *. * final.c (final_scan_insn): Likewise, renaming it back from "uncast_insn" to "insn", eliminating the checked cast. * config/h8300/h

Re: [PATCH 03/10] for_each_eh_label callbacks take an rtx_code_label

2014-09-04 Thread Jeff Law
On 09/04/14 19:52, David Malcolm wrote: gcc/ * except.c (for_each_eh_label): Within param "callback", strengthen param from rtx to rtx_code_label *. Strengthen local "lab" from rtx to rtx_code_label *. Remove redundant check on LABEL_P (lab), since this is known

Re: [PATCH 04/10] Eliminate the checked cast from get_call_reg_set_usage

2014-09-04 Thread Jeff Law
On 09/04/14 19:52, David Malcolm wrote: gcc/ * caller-save.c (setup_save_areas): Strengthen local "insn" from rtx to rtx_insn *. * final.c (get_call_reg_set_usage): Likewise for first param, eliminating a checked cast. * regs.h (get_call_reg_set_usage): Lik

Re: [PATCH 05/10] Convert set_block_for_insn from a macro to an inline function

2014-09-04 Thread Jeff Law
On 09/04/14 19:52, David Malcolm wrote: gcc/ * basic-block.h (set_block_for_insn): Eliminate this macro in favor of... * rtl.h (set_block_for_insn): New inline function, imposing the requirement that the "insn" param is an rtx_insn *. OK. jeff

Re: [PATCH 06/10] Use rtx_insn more within peep2

2014-09-04 Thread Jeff Law
On 09/04/14 19:52, David Malcolm wrote: gcc/ * recog.c (peep2_attempt): Strengthen return type from rtx to rtx_insn *. (peep2_update_life): Likewise for params "last", "prev", removing a checked cast made redundant by this. (peephole2_optimize): Likewise fo

Re: [PATCH 07/10] Use rtx_insn for more scheduler things, plus CONST_CAST_RTX_INSN

2014-09-04 Thread Jeff Law
On 09/04/14 19:52, David Malcolm wrote: gcc/ * sched-deps.c (sched_get_condition_with_rev_uncached): Strengthen param "insn" from const_rtx to const rtx_insn *. (sched_get_reverse_condition_uncached): Likewise. (sched_get_condition_with_rev): Likewise. (sch

[PATCH 1/2] make several emit functions take an rtx_insn *

2014-09-04 Thread tsaunders
From: Trevor Saunders just variable type changes so pre approved committing to trunk. bootstrap + regtest on x86_64-linux-gnu, and config-list.mk Trev gcc/ChangeLog: 2014-09-04 Trevor Saunders * emit-rtl.c (emit_insn_before_noloc): Take an rtx_insn * instead of an rtx.

[PATCH 2/2] make dead_debug_insert_temp take an rtx_insn *

2014-09-04 Thread tsaunders
From: Trevor Saunders just changing argument type so pre approved. bootstrap + regtested on x86_64-linux-gnu. Trev gcc/ChangeLog: 2014-09-04 Trevor Saunders * valtrack.c (dead_debug_insert_temp): Take an rtx_insn * instead of an rtx. * valtrack.h: Adjust. --- gcc/C

Re: [PATCH 08/10] Use rtx_insn_list within haifa-sched.c

2014-09-04 Thread Jeff Law
On 09/04/14 19:52, David Malcolm wrote: gcc/ * haifa-sched.c (check_clobbered_conditions): Strengthen local "link" from rtx to rtx_insn_list *, and use its methods for clarity and type-safety. (toggle_cancelled_flags): Likewise. (restore_last_backtrack_poin

[patch][plugin] Fix PR59335 - missing plugin headers again

2014-09-04 Thread Joey Ye
Trunk fails to build plugin again due to missing plugin header files. This patch fixes it. OK to trunk? ChangeLog: PR plugin/59335 * Makefile.in (PLUGIN_HEADERS): Add wide-int.h, signop.h, hash-map.h, hash-set.h. diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 63124f8..8e7aada 10064

Re: [PATCH 09/10] Simplification within reorg.c

2014-09-04 Thread Jeff Law
On 09/04/14 19:52, David Malcolm wrote: gcc/ * reorg.c (relax_delay_slots): Move declaration of "trial_seq" above the conditional, and convert the check on GET_CODE to a dyn_cast, so that "trial_seq" is available as an rtx_sequence * in the conditional. Simplify t

Re: [PATCH 10/10] Use rtx_insn for various jump-handling functions and predicates

2014-09-04 Thread Jeff Law
On 09/04/14 19:52, David Malcolm wrote: gcc/ * config/arc/arc.c (arc_print_operand): Use insn method of final_sequence for type-safety. * config/bfin/bfin.c (bfin_hardware_loop): Strengthen param "insn" from rtx to rtx_insn *. * config/frv/frv.c (frv_print_

Re: [4.9] PR 62146

2014-09-04 Thread Jeff Law
On 09/04/14 19:27, Easwaran Raman wrote: I've attached the revised patch. Bootstrapped and no test regressions on x86_64/linux with 4.9 branch. Ok for 4.9 branch? While the bug doesn't show up in trunk, seems obvious that this should go to trunk as well. Is it ok for trunk if tests pass? Btw, is

Re: [debug-early] reuse variable DIEs and fix their context

2014-09-04 Thread Aldy Hernandez
On 09/04/14 03:42, Richard Biener wrote: On Wed, Sep 3, 2014 at 7:54 PM, Aldy Hernandez wrote: Flow-wise I still want to move hand-off to the cgraph code to toplev.c, out from the FEs final_write_gloabals hook: /* This must also call finalize_compilation_unit. */ lang_hooks.decls.fina

[patch] remove picochip

2014-09-04 Thread Trevor Saunders
Hi, Looks like the patch is to big to send uncompressed, so sorry if this the second mail you get :) Given picochip has been obsolete for several years at this point, and when I asked a while back if anyone wanted to keep it nobody responded I'm going to claim its time to kill it. bootstrapped +

Re: Use -fbuilding-libgcc for more target macros used in libgcc

2014-09-04 Thread Ian Lance Taylor
On Thu, Sep 4, 2014 at 6:15 PM, Joseph S. Myers wrote: > > gcc/c-family: > 2014-09-05 Joseph Myers > > * c-cppbuiltin.c (c_cpp_builtins): Also define > __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__, > __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__, > __LIB

Re: [patch] remove picochip

2014-09-04 Thread Jeff Law
On 09/04/14 21:16, Trevor Saunders wrote: Hi, Looks like the patch is to big to send uncompressed, so sorry if this the second mail you get :) Given picochip has been obsolete for several years at this point, and when I asked a while back if anyone wanted to keep it nobody responded I'm going t

pr43550 - remove unnecessary uxts in bswap

2014-09-04 Thread Kugan
Hi All, For the bswap built-in, there are unnecessary uxts generated as reported in pr43550. Can we rely on the argument being unsigned and set the SUBREG promoted accordingly. At least in ARM ABI, arguments are supposed to be properly zero/sign extended. Any thoughts? Bootstrapped and regressi

Re: [patch][plugin] Fix PR59335 - missing plugin headers again

2014-09-04 Thread Jeff Law
On 09/04/14 20:32, Joey Ye wrote: Trunk fails to build plugin again due to missing plugin header files. This patch fixes it. OK to trunk? ChangeLog: PR plugin/59335 * Makefile.in (PLUGIN_HEADERS): Add wide-int.h, signop.h, hash-map.h, OK. jeff

Re: [PATCH PR62151]Fix uninitialized register issue caused by distribute_notes in combine pass

2014-09-04 Thread Jeff Law
On 09/01/14 23:14, Bin.Cheng wrote: On Tue, Sep 2, 2014 at 11:40 AM, Jeff Law wrote: On 08/31/14 22:18, Bin.Cheng wrote: Note that i0..i4 need not be consecutive insns, so you'd have to walk the chain from the location with the death note to the proposed death note site. If between those loc

Re: [PATCH PR62151]Fix uninitialized register issue caused by distribute_notes in combine pass

2014-09-04 Thread Jeff Law
On 09/01/14 23:17, Bin.Cheng wrote: For this specific case, I think the reuse of r84 comes from coalescing during expanding, and this is necessary to remove redundant reg-moves. Then we need to fix this in coming passes? Hmmm. Yea, I can see how that might be happening. There's a certain inher

Re: [PATCH] Fix PR63148 - two choices

2014-09-04 Thread Jeff Law
On 09/04/14 06:11, Richard Biener wrote: The following two patches each fix PR63148, a wrong-code issue caused by bogus array indices a-la &global_data.b[(sizetype) i + 536870911] which have a correct address when lowered but bogus index. The case in question can be mitigated by disabling foldi

Re: [RFC] Tweak gcc.c-torture/execute/pr39228.c

2014-09-04 Thread Jeff Law
On 09/03/14 18:22, Kaz Kojima wrote: Jeff Law wrote: * gcc.c-torture/execute/pr39228.c: Use dg-additional-options instead of dg-options and remove sh*-*-* from its target list. Add "inline" keyword to test functions. Wouldn't we be better off moving this into execute/ie

Re: [PATCH, ira] Miss checks in split_live_ranges_for_shrink_wrap

2014-09-04 Thread Jeff Law
On 09/01/14 02:13, Zhenqiang Chen wrote: To split live-range of register, split_live_ranges_for_shrink_wrap will introduce additional register copies. If such copies can not be optimized by later optimizations, it will lead to code size and performance regression. My tests on ARM THUMB1 code siz

[PATCH] Enable -fsanitize-recover for KASan

2014-09-04 Thread Yury Gribov
Hi all, This patch enables -fsanitize-recover for KASan by default. This causes KASan to continue execution after error in case of inline instrumentation. This feature is needed because - reports during early bootstrap won't even be printed - needed to run all tests w/o rebooting machine for e

<    1   2