diff options
author | Martin Liska <mliska@suse.cz> | 2020-08-11 09:02:44 +0200 |
---|---|---|
committer | Giuliano Belinassi <giuliano.belinassi@usp.br> | 2020-08-17 15:07:57 -0300 |
commit | bf324ecdc31073cd1a96a69ae26f8b7666a747f4 (patch) | |
tree | e82ecbc0a8c9bfc0a78ae7f94fe227f228cd4156 | |
parent | 2a5b94835213496c1375d6d9ea6e33044e3ed4ff (diff) | |
download | gcc-bf324ecdc31073cd1a96a69ae26f8b7666a747f4.zip gcc-bf324ecdc31073cd1a96a69ae26f8b7666a747f4.tar.gz gcc-bf324ecdc31073cd1a96a69ae26f8b7666a747f4.tar.bz2 |
Add debug counter for IPA bits CP.
gcc/ChangeLog:
* dbgcnt.def (DEBUG_COUNTER): Add ipa_cp_bits.
* ipa-cp.c (ipcp_store_bits_results): Use it when we store known
bits for parameters.
-rw-r--r-- | gcc/dbgcnt.def | 1 | ||||
-rw-r--r-- | gcc/ipa-cp.c | 11 |
2 files changed, 9 insertions, 3 deletions
diff --git a/gcc/dbgcnt.def b/gcc/dbgcnt.def index 3998c96..cf8775b 100644 --- a/gcc/dbgcnt.def +++ b/gcc/dbgcnt.def @@ -170,6 +170,7 @@ DEBUG_COUNTER (if_after_combine) DEBUG_COUNTER (if_after_reload) DEBUG_COUNTER (if_conversion) DEBUG_COUNTER (if_conversion_tree) +DEBUG_COUNTER (ipa_cp_bits) DEBUG_COUNTER (ipa_sra_params) DEBUG_COUNTER (ipa_sra_retvalues) DEBUG_COUNTER (ira_move) diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c index 10cc595..945a699 100644 --- a/gcc/ipa-cp.c +++ b/gcc/ipa-cp.c @@ -123,6 +123,7 @@ along with GCC; see the file COPYING3. If not see #include "tree-ssa-ccp.h" #include "stringpool.h" #include "attribs.h" +#include "dbgcnt.h" template <typename valtype> class ipcp_value; @@ -5788,9 +5789,13 @@ ipcp_store_bits_results (void) ipa_bits *jfbits; if (plats->bits_lattice.constant_p ()) - jfbits - = ipa_get_ipa_bits_for_value (plats->bits_lattice.get_value (), - plats->bits_lattice.get_mask ()); + { + jfbits + = ipa_get_ipa_bits_for_value (plats->bits_lattice.get_value (), + plats->bits_lattice.get_mask ()); + if (!dbg_cnt (ipa_cp_bits)) + jfbits = NULL; + } else jfbits = NULL; |