2011-12-13 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/51362
* ipa-cp.c (estimate_local_effects): When estimated size of a
specialized clone is zero, bump it to one.
* testsuite/gcc.dg/ipa/pr51362.c: New test.
From-SVN: r182288
+2011-12-13 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/51362
+ * ipa-cp.c (estimate_local_effects): When estimated size of a
+ specialized clone is zero, bump it to one.
+
2011-12-13 Richard Guenther <rguenther@suse.de>
PR lto/48354
+ devirtualization_time_bonus (node, known_csts, known_binfos)
+ removable_params_cost + emc;
+ gcc_checking_assert (size >=0);
+ /* The inliner-heuristics based estimates may think that in certain
+ contexts some functions do not have any size at all but we want
+ all specializations to have at least a tiny cost, not least not to
+ divide by zero. */
+ if (size == 0)
+ size = 1;
+
if (dump_file && (dump_flags & TDF_DETAILS))
{
fprintf (dump_file, " - estimates for value ");
+2011-12-13 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/51362
+ * gcc.dg/ipa/pr51362.c: New test.
+
2011-12-13 Uros Bizjak <ubizjak@gmail.com>
PR testsuite/51524
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O -fipa-cp -fipa-cp-clone" } */
+
+int
+baz (void)
+{
+ return 0;
+}
+
+int make_mess;
+
+__attribute__ ((noinline))
+int bar (int x, int (*f) (void))
+{
+ return f ();
+}
+
+int
+foo (void)
+{
+ return bar (1, baz);
+}