DEBUG_COUNTER (if_conversion)
DEBUG_COUNTER (if_conversion_tree)
DEBUG_COUNTER (if_to_switch)
+DEBUG_COUNTER (ipa_attr)
DEBUG_COUNTER (ipa_cp_bits)
DEBUG_COUNTER (ipa_cp_values)
DEBUG_COUNTER (ipa_cp_vr)
#include "ipa-prop.h"
#include "ipa-fnsummary.h"
#include "symtab-thunks.h"
+#include "dbgcnt.h"
/* Lattice values for const and pure functions. Everything starts out
being const, then may drop to pure and then neither depending on
fprintf (dump_file, "Function found to be %sconst: %s\n",
looping ? "looping " : "",
node->dump_name ());
- if (!local)
+ if (!local && !looping)
cdtor = node->call_for_symbol_and_aliases (cdtor_p, NULL, true);
+ if (!dbg_cnt (ipa_attr))
+ return false;
if (node->set_const_flag (true, looping))
{
if (dump_file)
fprintf (dump_file, "Function found to be %spure: %s\n",
looping ? "looping " : "",
node->dump_name ());
- if (!local)
+ if (!local && !looping)
cdtor = node->call_for_symbol_and_aliases (cdtor_p, NULL, true);
+ if (!dbg_cnt (ipa_attr))
+ return false;
if (node->set_pure_flag (true, looping))
{
if (dump_file)
switch (this_state)
{
case IPA_CONST:
- remove_p |= ipa_make_function_const (node, this_looping, false);
+ remove_p |= ipa_make_function_const (w, this_looping, false);
break;
case IPA_PURE:
- remove_p |= ipa_make_function_pure (node, this_looping, false);
+ remove_p |= ipa_make_function_pure (w, this_looping, false);
break;
default: