This renames the gimple_statement_base struct to gimple removes the
typedef of gimple_statement_base * to gimple, and then adjusts all of
the places that use the type.
gcc/ChangeLog:
2015-09-19 Trevor Saunders <tbsaunde@tbsaunde.org>
* coretypes.h (gimple): Change typedef to be a forward
declaration.
* gimple.h (gimple_statement_base): rename to gimple.
* (all functions and types using gimple): Adjust.
* *.[ch]: Likewise.
gcc/cp/ChangeLog:
2015-09-19 Trevor Saunders <tbsaunde@tbsaunde.org>
* cp-gimplify.c (gimplify_must_not_throw_expr): Adjust.
From-SVN: r227941
PR tree-optimization/47679
* tree-ssa-dom.c (avail_exprs_stack): No longer file scoped. Move
it here ...
(dom_opt_dom_walker): New private member holding the avail_exprs_stack
object. Update constructor.
(pass_dominator::execute): Corresponding chagnes to declaration
and initialization of avail_exprs_stack. Update constructor call
for dom_opt_dom_walker object.
(lookup_avail_expr, record_cond): Accept additional argument. Pass
it down to children as needed.
(record_equivalences_from_incoming_edge): Likewise.
(eliminate_redundant_computations): Likewise.
(record_equivalences_from_stmt): Likewise.
(simplify_stmt_for_jump_threading): Likewise.
(record_temporary_equivalences): Likewise.
(optimize_stmt): Likewise.
(dom_opt_dom_walker::thread_across_edge): Update access to
avail_exprs_stack object and pass it to children as needed.
(dom_opt_dom_walker::before_dom_children): Similarly.
(dom_opt_dom_walker::after_dom_children): Similarly.
* tree-ssa-threadedge.c (pfn_simplify): New typedef.
(record_temporary_equivalences_from_stmts_at_dest): Use new typedef.
Add avail_expr_stack argument. Pass it to children as needed.
(dummy_simplify): Likewise.
(simplify_control_stmt_condition): Likewise.
(thread_around_empty_blocks): Likewise.
(thread_through_normal_block): Likewise.
(thread_across_edge): Likewise.
* tree-ssa-threadedge.h (thread_across_edge): Update prototype.
* tree-vrp.c (simplify_stmt_for_jump_threading): Update.
From-SVN: r227931
gcc/cp/ChangeLog:
2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
* parser.c (pragma_lex): Add loc argument. Rearrange the code to
make it more similar to the C version.
gcc/c-family/ChangeLog:
2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
* c-pragma.c (handle_pragma_diagnostic): Use explicit location
when warning.
* c-pragma.h (pragma_lex): Add optional loc argument.
gcc/c/ChangeLog:
2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
* c-parser.c (pragma_lex): Add loc argument.
gcc/testsuite/ChangeLog:
2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
* gcc.dg/pragma-diag-5.c: New test.
From-SVN: r227923
PR tree-optimization/47679
* tree-ssa-dom.c (const_and_copies): No longer file scoped. Move
it here ...
(dom_opt_dom_walker): New private member holding the const_and_copies
object. Update constructor.
(pass_dominator::execute): Corresponding changes to declaration
and initialization of const_and_copies. Update constructor call
for the dom_opt_dom_walker object.
(record_temporary_equivalences): Accept const_and_copies argument
pass it down to children as needed.
(record_equality): Likewise.
(record_equivalences_from_incoming_edge): Likewise.
(cprop_into_successor_phis, optimize_stmt): Likewise.
(eliminate_redundant_computations): Likewise.
(dom_opt_dom_walker::thread_across_edge): Update access to
const_and_copies object and pass it to children as needed.
(dom_opt_dom_walker::before_dom_children): Similarly.
(dom_opt_dom_walker::after_dom_children): Similarly.
From-SVN: r227922
* tree-ssa-dom.c (avail_exprs): No longer file scoped. Bury
it into the avail_exprs_stack class.
(pass_dominator::execute): Corresponding changes to declaration
and initialization of avail_exprs. Pass avail_exprs to
dump_dominator_optimization_stats.
(record_cond): Extract avail_exprs from avail_exprs_stack.
(lookup_avail_expr): Similarly.
(htab_staticstics): Remove unnecessary prototype. Move to earlier
position in file.
(dump_dominator_optimization_stats): Make static and prototype.
Add argument for the hash table to dump.
(debug_dominator_optimization_stats): Remove.
* tree-ssa-dom.h (dump_dominator_optimization_stats): Remove
prototype.
(debug_dominator_optimization_stats): Similarly.
* tree-ssa-scopedtables.h (class avail_exprs_stack): Add missing
"void" in prototype for pop_to_marker method. Add accessor method
for the underlying avail_exprs table.
* tree-ssa-threadedge.c: Remove trailing whitespace.
From-SVN: r227921
PR middle-end/67619
* except.c (expand_builtin_eh_return): Use copy_addr_to_reg to copy
the address to a register.
testsuite/ChangeLog:
PR middle-end/67619
* gcc.dg/torture/pr67619.c: New test.
From-SVN: r227909
2015-09-18 Richard Biener <rguenther@suse.de>
* dwarf2out.c (append_entry_to_tmpl_value_parm_die_table): Assert
we're in early phase.
(schedule_generic_params_dies_gen): Likewise.
(gen_remaining_tmpl_value_param_die_attribute): Do only as much
work as possible, retaining unhandled cases.
(gen_scheduled_generic_parms_dies): Set early-dwarf flag and
clear out generic_type_instances at the end.
(dwarf2out_finish): Move call to gen_scheduled_generic_parms_dies...
(dwarf2out_early_finish): ... here. Do most of
gen_remaining_tmpl_value_param_die_attribute here.
From-SVN: r227905
* include/precompiled/extc++.h: Fix bootstrap error due to
unconditional inclusion of <ext/enc_filebuf.h>.
* include/ext/random: Check for definition of UINT32_C.
From-SVN: r227902
2015-09-18 Richard Biener <rguenther@suse.de>
PR tree-optimization/66142
* fold-const.c (operand_equal_p): When OEP_ADDRESS_OF
treat MEM[&x] and x the same.
* tree-ssa-sccvn.h (vn_reference_fold_indirect): Remove.
* tree-ssa-sccvn.c (vn_reference_fold_indirect): Return true
when we simplified sth.
(vn_reference_maybe_forwprop_address): Likewise.
(valueize_refs_1): When we simplified through
vn_reference_fold_indirect or vn_reference_maybe_forwprop_address
set valueized_anything to true.
(vn_reference_lookup_3): Use stmt_kills_ref_p to see whether
one ref kills the other instead of just a offset-based test.
* tree-ssa-alias.c (stmt_kills_ref_p): Use OEP_ADDRESS_OF
for the operand_equal_p test to compare bases and also compare
sizes.
From-SVN: r227896
gcc:
2015-09-17 Richard Henderson <rth@redhat.com>
PR libstdc++/65913
* builtins.c (fold_builtin_atomic_always_lock_free): Handle fake
pointers that encode the alignment of the object.
libstdc++-v3:
2015-09-17 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/65913
* include/bits/atomic_base.h (__atomic_base<_TTp>::is_lock_free(),
__atomic_base<_PTp*>::is_lock_free()): Call the built-in with the
immediate pointer value, not a variable.
* include/std/atomic (atomic<T>::is_lock_free()): Likewise.
* testsuite/29_atomics/atomic/65913.cc: New.
From-SVN: r227878
optabs.[hc] is a bit of a behemoth. It includes basic functions for querying
what a target can do, related tree- and gimple-level query functions,
related rtl-level query functions, and the functions that actually
generate code. Some gimple optimisations therefore need:
#include "insn-config.h"
#include "expmed.h"
#include "dojump.h"
#include "explow.h"
#include "emit-rtl.h"
#include "varasm.h"
#include "stmt.h"
#include "expr.h"
purely to query whether the target has support for a particular operation.
This patch splits optabs up as follows:
- optabs-query.[hc]: IL-independent functions for querying what a target
can do natively.
- optabs-tree.[hc]: tree and gimple query functions (an extension of
optabs-query.[hc]).
- optabs-libfuncs.[hc]: optabs-specific libfuncs (an extension of
libfuncs.h)
- optabs.h: For now includes optabs-query.h and optabs-libfuncs.h.
Only two files outside optabs need to include both optabs.h and
optabs-tree.h: expr.c and function.c. I think that's expected given
that both are related to expand.
It might be good to split optabs.h further, but this is already quite
a big patch.
I changed can_conditionally_move_p from returning an int to returning
a bool and fixed a few formatting glitches. There should be no other
changes to the functions themselves.
gcc/
* Makefile.in (OBJS): Add optabs-libfuncs.o, optabs-query.o
and optabs-tree.o.
(GTFILES): Replace optabs.c with optabs-libfunc.c.
* genopinit.c (main): Add an include guard to insn-opinit.h.
Protect the rtx_code parts with NUM_RTX_CODE.
* optabs.h: Split parts out to...
* optabs-libfuncs.h, optabs-query.h, optabs-tree.h: ...these
new files.
* optabs.c: Split parts out to...
* optabs-libfuncs.c, optabs-query.c, optabs-tree.c: ...these
new files.
* cilk-common.c: Include optabs-query.h rather than optabs.h.
* fold-const.c: Likewise.
* target-globals.c: Likewise.
* tree-if-conv.c: Likewise.
* tree-ssa-forwprop.c: Likewise.
* tree-ssa-loop-prefetch.c: Likewise.
* tree-ssa-math-opts.c: Include optabs-tree.h rather than
optabs.h. Remove unncessary include files.
* tree-ssa-phiopt.c: Likewise.
* tree-ssa-reassoc.c: Likewise.
* tree-switch-conversion.c: Likewise.
* tree-vect-data-refs.c: Likewise.
* tree-vect-generic.c: Likewise.
* tree-vect-loop.c: Likewise.
* tree-vect-patterns.c: Likewise.
* tree-vect-slp.c: Likewise.
* tree-vect-stmts.c: Likewise.
* tree-vrp.c: Likewise.
* toplev.c: Include optabs-query.h and optabs-libfuncs.h
rather than optabs.h.
* expr.c: Include optabs-tree.h.
* function.c: Likewise.
From-SVN: r227865
When asking for the type of a receive operation, the compiler would
return an error type if the receive operator was being used on an
invalid channel type and the error would be reported in a later pass.
There are several ways that the type checking pass would not see
the original node and fail to issue the error. This patch modifies
receive operations to give an error immediately once it is known that
the channel type is invalid.
Fixesgolang/go#12323.
Reviewed-on: https://go-review.googlesource.com/13987
From-SVN: r227863
PR middle-end/65958
* config/arm/linux-elf.h (STACK_CHECK_STATIC_BUILTIN): Define.
* config/arm/arm-protos.h (output_probe_stack_range): Declare.
* config/arm/arm.c: Include common/common-target.h.
(use_return_insn): Return 0 if the static chain register was saved
above a non-APCS frame.
(arm_compute_static_chain_stack_bytes): Adjust for stack checking.
(struct scratch_reg): New.
(get_scratch_register_on_entry): New function.
(release_scratch_register_on_entry): Likewise.
(arm_emit_probe_stack_range): Likewise.
(output_probe_stack_range): Likewise.
(arm_expand_prologue): Factor out code dealing with the IP register
for nested function and adjust it for stack checking.
Invoke arm_emit_probe_stack_range if static builtin stack checking
is enabled.
(thumb1_expand_prologue): Sorry out if static builtin stack checking
is enabled.
(arm_expand_epilogue): Add the saved static chain register, if any, to
the amount of pre-pushed registers to pop.
(arm_frame_pointer_required): Return true if static stack checking is
enabled and we want to catch the exception with the EABI unwinder.
* config/arm/unspecs.md (UNSPEC_PROBE_STACK): New constant.
(UNSPEC_PROBE_STACK_RANGE): Likewise.
* config/arm/arm.md (probe_stack): New insn.
(probe_stack_range): Likewise.
From-SVN: r227860