Patchwork Another simple dumping fix in IPA-CP

login
register
mail settings
Submitter Martin Jambor
Date Feb. 20, 2013, 2:50 p.m.
Message ID <20130220145057.GD19120@virgil.suse>
Download mbox | patch
Permalink /patch/222093/
State New
Headers show

Comments

Martin Jambor - Feb. 20, 2013, 2:50 p.m.
Hi,

when debugging a PR I noticed that dumped numbers do not correspond to
changed PARAM_IPA_CP_EVAL_THRESHOLD and defaults are hard-wired to the
fprintf.  Fixed by the patch below, which bootstraps and tests fine on
x86_64-linux.  Unless there are objections, I will commit it tomorrow
as obvious.

Thanks,

Martin


2013-02-19  Martin Jambor  <mjambor@suse.cz>

	* ipa-cp.c (good_cloning_opportunity_p): Dump the real threshold
	instead of hard-wired defaults.

Patch

Index: src/gcc/ipa-cp.c
===================================================================
--- src.orig/gcc/ipa-cp.c
+++ src/gcc/ipa-cp.c
@@ -1654,7 +1654,7 @@  good_cloning_opportunity_p (struct cgrap
 		 ") -> evaluation: " HOST_WIDEST_INT_PRINT_DEC
 		 ", threshold: %i\n",
 		 time_benefit, size_cost, (HOST_WIDE_INT) count_sum,
-		 evaluation, 500);
+		 evaluation, PARAM_VALUE (PARAM_IPA_CP_EVAL_THRESHOLD));
 
       return evaluation >= PARAM_VALUE (PARAM_IPA_CP_EVAL_THRESHOLD);
     }
@@ -1668,7 +1668,7 @@  good_cloning_opportunity_p (struct cgrap
 		 "size: %i, freq_sum: %i) -> evaluation: "
 		 HOST_WIDEST_INT_PRINT_DEC ", threshold: %i\n",
 		 time_benefit, size_cost, freq_sum, evaluation,
-		 CGRAPH_FREQ_BASE /2);
+		 PARAM_VALUE (PARAM_IPA_CP_EVAL_THRESHOLD));
 
       return evaluation >= PARAM_VALUE (PARAM_IPA_CP_EVAL_THRESHOLD);
     }