Commit b93f25ad by Martin Liska Committed by Martin Jambor

Bits propagation only for int and ptr types

2018-03-29  Martin Liska  <mliska@suse.cz>
	    Martin Jambor  <mjambor@suse.cz>

	PR ipa/84947
	* ipa-cp.c (propagate_bits_across_jump_function): Bail out if
	param_type is not an integral or pointer type.


Co-Authored-By: Martin Jambor <mjambor@suse.cz>

From-SVN: r259029
parent b79861dc
2018-03-29 Martin Liska <mliska@suse.cz>
Martin Jambor <mjambor@suse.cz>
PR ipa/84947
* ipa-cp.c (propagate_bits_across_jump_function): Bail out if
param_type is not an integral or pointer type.
2018-04-03 Richard Biener <rguenther@suse.de> 2018-04-03 Richard Biener <rguenther@suse.de>
* sese.h (recompute_all_dominators): Remove. * sese.h (recompute_all_dominators): Remove.
......
...@@ -1811,14 +1811,16 @@ propagate_bits_across_jump_function (cgraph_edge *cs, int idx, ...@@ -1811,14 +1811,16 @@ propagate_bits_across_jump_function (cgraph_edge *cs, int idx,
struct ipa_node_params *callee_info = IPA_NODE_REF (callee); struct ipa_node_params *callee_info = IPA_NODE_REF (callee);
tree parm_type = ipa_get_type (callee_info, idx); tree parm_type = ipa_get_type (callee_info, idx);
/* For K&R C programs, ipa_get_type() could return NULL_TREE. /* For K&R C programs, ipa_get_type() could return NULL_TREE. Avoid the
Avoid the transform for these cases. */ transform for these cases. Similarly, we can have bad type mismatches
if (!parm_type) with LTO, avoid doing anything with those too. */
if (!parm_type
|| (!INTEGRAL_TYPE_P (parm_type) && !POINTER_TYPE_P (parm_type)))
{ {
if (dump_file && (dump_flags & TDF_DETAILS)) if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "Setting dest_lattice to bottom, because" fprintf (dump_file, "Setting dest_lattice to bottom, because type of "
" param %i type is NULL for %s\n", idx, "param %i of %s is NULL or unsuitable for bits propagation\n",
cs->callee->name ()); idx, cs->callee->name ());
return dest_lattice->set_to_bottom (); return dest_lattice->set_to_bottom ();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment