diff options
author | Erick Ochoa <erick.ochoa@theobroma-systems.com> | 2020-06-16 16:24:26 +0200 |
---|---|---|
committer | Erick Ochoa <erick.ochoa@theobroma-systems.com> | 2020-09-08 09:05:37 +0200 |
commit | ce926e1ee3af8b3c1f38bc942abf5f2f8dccb989 (patch) | |
tree | b8eff5ef4d3002b88a44c47ec6ce012af1eddfe9 /gcc/ipa-type-escape-analysis.c | |
parent | f7b52f8f40dac4df2a81c3cc3647747b81cd4806 (diff) |
wip
Diffstat (limited to 'gcc/ipa-type-escape-analysis.c')
-rw-r--r-- | gcc/ipa-type-escape-analysis.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ipa-type-escape-analysis.c b/gcc/ipa-type-escape-analysis.c index 774a83fec52..f17dd5ded9e 100644 --- a/gcc/ipa-type-escape-analysis.c +++ b/gcc/ipa-type-escape-analysis.c @@ -29,6 +29,7 @@ #include "type-stringifier.hpp" #include "type-incomplete-equality.hpp" #include "type-reconstructor.hpp" +#include "gimple-rewriter.hpp" #include <vector> @@ -273,18 +274,18 @@ collect_types() } if (!has_fields_that_can_be_deleted) return; + TypeReconstructor reconstructor(record_field_offset_map); TypeStringifier stringifier; for (auto i = record_field_offset_map.cbegin(), e = record_field_offset_map.cend(); i != e; ++i) { const_tree record = i->first; - std::string name_from = stringifier.stringify(record); - log("record %s\n", name_from.c_str()); reconstructor.walk(record); } TypeReconstructor::reorg_record_map_t map = reconstructor.get_map(); + TypeReconstructor::reorg_field_map_t field_map = reconstructor.get_field_map(); for (auto i = map.cbegin(), e = map.cend(); i != e; ++i) { @@ -295,5 +296,11 @@ collect_types() log("%s -> %s\n", name_from.c_str(), name_to.c_str()); } + GimpleTypeRewriter rewriter(map, field_map); + rewriter.walk(); + + GimpleWalker walker; + walker.walk(); // Just for printing... + log("FINISHED\n"); } |