2014-05-16  Richard Biener  <rguenther@suse.de>

	* tree-ssa-sccvn.c (visit_use): Also constant-fold calls.

	* gcc.dg/tree-ssa/ssa-fre-41.c: New testcase.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210491 138bc75d-0d04-0410-961f-82ee72b054a4
2014-05-16  Richard Biener  <rguenther@suse.de>

	* tree-ssa-sccvn.c: Include tree-cfg.h and domwalk.h.
	(set_ssa_val_to): Handle unexpected sets to VN_TOP.
	(visit_phi): Ignore edges marked as not executable.
	(class cond_dom_walker): New.
	(cond_dom_walker::before_dom_children): Value-number
	control statements and mark successor edges as not
	executable if possible.
	(run_scc_vn): First walk all control statements in
	dominator order, marking edges as not executable.
	* tree-inline.c (copy_edges_for_bb): Be not confused
	about random edge flags.

	* gcc.dg/tree-ssa/ssa-fre-39.c: New testcase.
	* gcc.dg/tree-ssa/ssa-fre-40.c: Likewise.
	* gcc.dg/tree-ssa/ssa-pre-8.c: One more elimination.
	* gcc.dg/tree-ssa/struct-aliasing-2.c: Scan cddce1 dump.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210492 138bc75d-0d04-0410-961f-82ee72b054a4
[AArch64 costs 1/18] Refactor aarch64_address_costs.

gcc/

	* config/aarch64/aarch64-protos.h (scale_addr_mode_cost): New.
	(cpu_addrcost_table): Use it.
	* config/aarch64/aarch64.c (generic_addrcost_table): Initialize it.
	(aarch64_address_cost): Rewrite using aarch64_classify_address,
	move it.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210493 138bc75d-0d04-0410-961f-82ee72b054a4
[AArch64 costs 2/18] Add cost tables for Cortex-A57

gcc/

	* config/aarch64/aarch64.c (cortexa57_addrcost_table): New.
	(cortexa57_vector_cost): Likewise.
	(cortexa57_tunings): Use them.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210494 138bc75d-0d04-0410-961f-82ee72b054a4
[AArch64 costs 3/18] Wrap aarch64_rtx_costs to dump verbose output

gcc/

	* config/aarch64/aarch64.c (aarch64_rtx_costs_wrapper): New.
	(TARGET_RTX_COSTS): Call it.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210495 138bc75d-0d04-0410-961f-82ee72b054a4
[AArch64 costs 4/18] Better estimate cost of building a constant

gcc/

	* config/aarch64/aarch64.c (aarch64_build_constant): Conditionally
	emit instructions, return number of instructions which would
	be emitted.
	(aarch64_add_constant): Update call to aarch64_build_constant.
	(aarch64_output_mi_thunk): Likewise.
	(aarch64_rtx_costs): Estimate cost of a CONST_INT, cost
	a CONST_DOUBLE.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210496 138bc75d-0d04-0410-961f-82ee72b054a4