* cgraph.h (varpool_node_hook, varpool_node_hook_list,
	varpool_add_node_removal_hook, varpool_add_variable_insertion_hook,
	varpool_remove_variable_insertion_hook): Declare.
	* varpool.c (varpool_node_hook_list): New structure.
	(first_varpool_node_removal_hook,
	first_varpool_variable_insertion_hook): New variables.
	(varpool_add_node_removal_hook, varpool_remove_node_removal_hook,
	varpool_call_node_removal_hooks, varpool_add_variable_insertion_hook,
	varpool_remove_variable_insertion_hook,
	varpool_call_variable_insertion_hooks): New functions.
	(varpool_remove_node): Use it.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202367 138bc75d-0d04-0410-961f-82ee72b054a4
	* testsuite/g++.dg/ipa/devirt-11.C: Update template.
	* testsuite/g++.dg/ipa/devirt-16.C: New testcase.
	* testsuite/g++.dg/ipa/devirt-17.C: New testcase.
	* testsuite/g++.dg/ipa/devirt-18.C: New testcase.

	* cgraphunit.c (walk_polymorphic_call_targets): Permit 0 possible
	targets and devirtualize to BUILT_IN_UNREACHABLE.
	* timevar.def (TV_IPA_UNREACHABLE): New timevar.
	* ipa.c (walk_polymorphic_call_targets): New function.
	(symtab_remove_unreachable_nodes): Use it; do not keep all virtual
	functions; use the new timevar.
	* ipa-devirt.c (maybe_record_node): Do not insert static nodes that
	was removed from the program.
	(record_binfo): If BINFO corresponds to an anonymous namespace, we may
	not consider it in the walk when its vtable is dead.
	(possible_polymorphic_call_targets_1): Pass anonymous flag to
	record_binfo.
	(devirt_variable_node_removal_hook): New function.
	(possible_polymorphic_call_targets): Also register
	devirt_variable_node_removal_hook.
	(ipa_devirt): Do not do non-speculative devirtualization.
	(gate_ipa_devirt): One execute if devirtualizing speculatively.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202368 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/
	* ira.c (update_equiv_regs): Only call set_paradoxical_subreg
	for non-debug insns.
	* lra.c (new_insn_reg): Take the containing insn as a parameter.
	Only modify lra_reg_info[].biggest_mode if it's non-debug insn.
	(collect_non_operand_hard_regs, add_regs_to_insn_regno_info): Update
	accordingly.

gcc/testsuite/
	* g++.dg/debug/ra1.C: New test.


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

	* ipa.c (walk_polymorphic_call_targets): Fix inliner summary update.


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