summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErick Ochoa <erick.ochoa@theobroma-systems.com>2020-05-05 10:26:51 +0200
committerErick Ochoa <erick.ochoa@theobroma-systems.com>2020-05-14 14:45:55 +0200
commite48d392439f747d6eb56fe92ef8df896002f6883 (patch)
tree3b125c484f8a47006fad460f13adf7287b8bf569
parent7330dfc5506bd2a6848889436711f207de036ccc (diff)
reduce logging
-rw-r--r--gcc/ipa-hello-world.c6
-rw-r--r--gcc/ipa-hello-world.h1
-rw-r--r--gcc/ipa-str-reorg-dead-field-eliminate.c19
-rw-r--r--gcc/ipa-str-reorg-utils.h13
4 files changed, 27 insertions, 12 deletions
diff --git a/gcc/ipa-hello-world.c b/gcc/ipa-hello-world.c
index 20c122f3a16..bf11df45a0d 100644
--- a/gcc/ipa-hello-world.c
+++ b/gcc/ipa-hello-world.c
@@ -512,17 +512,17 @@ get_fields_to_reorg()
return records_and_fields_to_reorg;
}
-static void
+void
print_record_field_set(const record_field_set &to_reorg)
{
- log("I am about to print\n");
+ log_2("I am about to print\n");
for (auto it = to_reorg.cbegin(); it != to_reorg.cend(); ++it)
{
fields record_field_pair = *it;
const_tree record = record_field_pair.first;
const_tree field = record_field_pair.second;
// TODO: Some fields / records might be anonymous
- log("will eliminate %s.%s\n", get_type_name(record), get_field_name(field));
+ log_2("will eliminate %s.%s\n", get_type_name(record), get_field_name(field));
}
}
diff --git a/gcc/ipa-hello-world.h b/gcc/ipa-hello-world.h
index e001ac17041..aec99da3260 100644
--- a/gcc/ipa-hello-world.h
+++ b/gcc/ipa-hello-world.h
@@ -14,5 +14,6 @@
typedef std::pair<const_tree /* record */, const_tree /* field */> fields;
typedef std::set<fields> record_field_set;
record_field_set get_fields_to_reorg();
+void print_record_field_set(const record_field_set &to_reorg);
#endif
diff --git a/gcc/ipa-str-reorg-dead-field-eliminate.c b/gcc/ipa-str-reorg-dead-field-eliminate.c
index 727033bc6c0..f86ed1f866a 100644
--- a/gcc/ipa-str-reorg-dead-field-eliminate.c
+++ b/gcc/ipa-str-reorg-dead-field-eliminate.c
@@ -2704,15 +2704,16 @@ iphw_execute_escape_analysis()
{
gcc_assert(!flag_ipa_typelist_struct && !flag_ipa_typelist_field);
const record_field_set to_reorg = get_fields_to_reorg();
- separate_set_of_pairs_into_pair_of_sets(to_reorg, interesting_records, interesting_fields);
-
- hash_set<const_tree> orig_type_map;
- collect_orig_structs (orig_type_map);
- t_map mod_type_map;
- compute_modified_structs (orig_type_map, mod_type_map);
- t_map inverse_type_map;
- compute_inverse_type_map (mod_type_map, inverse_type_map);
- rewrite_references_to_modified_structs (mod_type_map, inverse_type_map);
+ print_record_field_set(to_reorg);
+ //separate_set_of_pairs_into_pair_of_sets(to_reorg, interesting_records, interesting_fields);
+
+ //hash_set<const_tree> orig_type_map;
+ //collect_orig_structs (orig_type_map);
+ //t_map mod_type_map;
+ //compute_modified_structs (orig_type_map, mod_type_map);
+ //t_map inverse_type_map;
+ //compute_inverse_type_map (mod_type_map, inverse_type_map);
+ //rewrite_references_to_modified_structs (mod_type_map, inverse_type_map);
}
static void
diff --git a/gcc/ipa-str-reorg-utils.h b/gcc/ipa-str-reorg-utils.h
index 1465db03d31..ee630402ac7 100644
--- a/gcc/ipa-str-reorg-utils.h
+++ b/gcc/ipa-str-reorg-utils.h
@@ -36,6 +36,19 @@ const char* get_field_name (const_tree type);
inline void
log (const char * const format, ...)
{
+ /*
+ if (!dump_file) return;
+
+ va_list args;
+ va_start(args, format);
+ vfprintf(dump_file, format, args);
+ va_end(args);
+ */
+}
+
+inline void
+log_2 ( const char * const format, ...)
+{
if (!dump_file) return;
va_list args;