* config/sparc/sparc-opts.h (enum sparc_memory_model_type): New.
* config/sparc/sparc.opt (mmemory-model=): New option.
* doc/invoke.texi (Sparc Options): Document it.
* config/sparc/sparc.c (sparc_option_override): Provide default
for sparc_memory_model.
(sparc_emit_membar_for_model): Omit barrier combinations that are
implied by the memory model.
From-SVN: r181853
* config/sparc/constraints.md ("w"): New.
* config/sparc/predicates.md (mem_noofs_operand): New.
* config/sparc/sparc.c (sparc_expand_compare_and_swap_12): Make static.
Generate the boolean result of the atomic_compare_exchange.
(sparc_expand_compare_and_swap): New.
* config/sparc/sync.md (atomic_compare_and_swap<I>): New.
(atomic_compare_and_swap<I48MODE>_1): Rename from
*sync_compare_and_swap<I48MODE>, use mem_noofs_operand.
(*atomic_compare_and_swapdi_v8plus): Rename from
*sync_compare_and_swapdi_v8plus, use mem_noofs_operand.
(sync_compare_and_swap<I12MODE>): Remove.
(sync_compare_and_swap<I48MODE>): Remove.
From-SVN: r181851
PR libgomp/51298
* config/linux/bar.h: Use atomic rather than sync builtins.
* config/linux/bar.c: Likewise. Add missing acquire
synchronisation on generation field.
* task.c (gomp_barrier_handle_tasks): Regain lock so as to not
double unlock.
From-SVN: r181833
PR tree-optimization/51247
* tree-vrp.c (extract_range_from_assert): For signed 1-bit precision
types instead of adding 1 subtract -1 and instead of subtracting 1
add -1 to avoid overflows.
* gcc.c-torture/compile/pr51247.c: New test.
From-SVN: r181818
2011-11-29 Andrew MacLeod <amacleod@redhat.com>
PR target/50123
* optabs.c (maybe_optimize_fetch_op): New. Look for more optimal
instructions for a FECTH_OP or OP_FECTH sequence.
(expand_atomic_fetch_op): Call maybe_optimize_fetch_op.
* testsuite/gcc.dg/atomic-op-optimize.c: New. Test for optimizations.
From-SVN: r181815
From Sanjoy Das.
* go-location.h: New file.
* go-linemap.cc: New file.
* go-gcc.cc: Change all uses of source_location to Location.
* Make-lang.in (GO_OBJS): Add go/go-linemap.o.
(GO_LINEMAP_H): New variable.
(GO_LEX_H): Use $(GO_LINEMAP_H).
(GO_GOGO_H, GO_TYPES_H, GO_IMPORT_H): Likewise.
(go/go-linemap.o): New target.
Co-Authored-By: Ian Lance Taylor <iant@google.com>
From-SVN: r181813
2011-11-29 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/40958
* module.c (prev_module_line): New variable.
(prev_module_column): New variable.
(prev_character): New variable.
(module_char): Update the new variables.
(module_unget_char): New function.
(parse_string): Use module_unget_char.
(parse_integer): Likewise.
(parse_name): Likewise.
From-SVN: r181810
* haifa-sched.c (recompute_todo_spec): Simplify and correct the
code checking for a clobber of a condition register when deciding
whether to predicate.
From-SVN: r181806
* gimple.c (gimple_call_set_cannot_inline): Move from gimple.h.
Update field call_stmt_cannot_inline_p from call graph edge, if
needed.
* gimple.h (gimple_call_set_cannot_inline): Move to gimple.c.
From-SVN: r181803
2011-11-29 François Dumont <fdumont@gcc.gnu.org>
* include/bits/hashtable.h (_Hashtable<>::_M_rehash): Remove code
useless now that the hashtable implementation put the hash code in
cache if the hash functor throws.
* testsuite/23_containers/unordered_set/erase/1.cc: Enhance test by
checking also distance between begin and end iterators to validate
underlying data model.
* testsuite/23_containers/unordered_multiset/erase/1.cc: Likewise.
* testsuire/23_containers/unordered_map/erase/1.cc: Likewise.
* testsuite/23_containers/unordered_multimap/erase/1.cc: Likewise.
* testsuite/23_containers/unordered_multiset/erase/2.cc: New.
* testsuite/23_containers/unordered_multimap/erase/2.cc: New.
From-SVN: r181799
PR tree-optimization/51301
* tree-vect-patterns.c (vect_recog_over_widening_pattern): Check
that the last statement doesn't convert to a bigger type than the
original type of the computation.
From-SVN: r181797
* config/rs6000/rs6000.c (rs6000_expand_atomic_compare_and_swap): Get
new pseudo for target after convert_modes.
(rs6000_expand_atomic_exchange, rs6000_expand_atomic_op): Likewise.
From-SVN: r181795
PR debug/50317
* tree-ssa.c (execute_update_addresses_taken): Remove
var ={v} {CLOBBER} stmts instead of rewriting them into
var_N ={v} {CLOBBER}.
From-SVN: r181788
PR tree-optimization/50078
* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Copy over
TREE_THIS_VOLATILE also from the old to new lhs resp. rhs.
* gcc.dg/pr50078.c: New test.
From-SVN: r181786
* c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
predefines in one place. Add LOCK_FREE predefines.
(c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
new func.
libstdc++-v3
* include/bits/atomic_base.h (ATOMIC_*_LOCK_FREE): Use new cpp
predefined macros.
* testsuite/29_atomics/headers/atomic/macros.cc: Add BOOL and POINTER
macro checks. Check for expected compile time values.
From-SVN: r181784