summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErick Ochoa <erick.ochoa@theobroma-systems.com>2020-06-08 09:55:52 +0200
committerErick Ochoa <erick.ochoa@theobroma-systems.com>2020-06-08 09:55:52 +0200
commit6beaedd06185b45231beb1433d4a401ffc4ef68c (patch)
tree89053762bd8705773fe8d1a5732a9b48619a8d22
parentbba561d39df03b6b2abd31ed15c4b17b87f11826 (diff)
logging
-rw-r--r--gcc/expr-walker.c2
-rw-r--r--gcc/gimple-walker.c2
-rw-r--r--gcc/ipa-prototype.c12
-rw-r--r--gcc/type-canonical-equality.c6
-rw-r--r--gcc/type-escaper.c2
-rw-r--r--gcc/type-escaper.hpp2
-rw-r--r--gcc/type-incomplete-equality.c2
-rw-r--r--gcc/type-structural-equality.c5
-rw-r--r--gcc/type-walker.c1
9 files changed, 10 insertions, 24 deletions
diff --git a/gcc/expr-walker.c b/gcc/expr-walker.c
index 2b6dd7230d9..6f219f02f78 100644
--- a/gcc/expr-walker.c
+++ b/gcc/expr-walker.c
@@ -108,7 +108,7 @@ ExprWalker::_walk(const_tree e)
default:
{
log("missing %s\n", get_tree_code_name(code));
- gcc_unreachable();
+ //gcc_unreachable();
}
break;
}
diff --git a/gcc/gimple-walker.c b/gcc/gimple-walker.c
index cf7742c6862..7a8d9ed2df6 100644
--- a/gcc/gimple-walker.c
+++ b/gcc/gimple-walker.c
@@ -190,7 +190,7 @@ GimpleWalker::_walk(gimple *stmt)
}
const char* name = gimple_code_name[code];
log("gimple code name %s\n", name);
- gcc_unreachable();
+ // gcc_unreachable();
}
#define GimpleWalkerFuncDef(type) \
diff --git a/gcc/ipa-prototype.c b/gcc/ipa-prototype.c
index d4b61abd39c..51f0eafea6f 100644
--- a/gcc/ipa-prototype.c
+++ b/gcc/ipa-prototype.c
@@ -204,21 +204,17 @@ fix_escaping_types_in_set(ptrset_t &types)
TypeStringifier stringifier;
std::string type_esc_name = TypeStringifier::get_type_identifier(type_esc);
std::string type_non_name = TypeStringifier::get_type_identifier(type_non);
- std::string file("FILE");
- std::string file_t("FILE_T");
- bool i_care = type_esc_name.compare(file);
- i_care |= type_esc_name.compare(file_t);
- i_care |= type_non_name.compare(file);
- i_care |= type_non_name.compare(file_t);
+ //std::string file("FILE");
+ //bool i_care = type_esc_name.compare(file) == 0;
+ //i_care &= type_non_name.compare(file) == 0;
type_esc_name = stringifier.stringify(type_esc);
type_non_name = stringifier.stringify(type_non);
- log("checking for incompleteness %s == %s\n", type_esc_name.c_str(), type_non_name.c_str());
const bool equal = structuralEquality.equal(type_esc, type_non);
if (!equal) continue;
-
+ log("recalulating %s == %s\n", type_esc_name.c_str(), type_non_name.c_str());
fixed_point_reached = false;
// Add incomplete to escaping
// delete incomplete from non_escaping
diff --git a/gcc/type-canonical-equality.c b/gcc/type-canonical-equality.c
index b3b6b4b224a..93221c0a86f 100644
--- a/gcc/type-canonical-equality.c
+++ b/gcc/type-canonical-equality.c
@@ -50,11 +50,7 @@ TypeCanonicalEquality::_equal(const_tree l, const_tree r)
const bool different = canonical_l != canonical_r;
const std::string n_l = TypeStringifier::get_type_identifier(l);
const std::string n_r = TypeStringifier::get_type_identifier(r);
- if (different) {
- log ("canonical %s %s\n", n_l.c_str(), n_r.c_str());
- return false;
- }
+ if (different) return false;
- log ("main variant %s %s\n", n_l.c_str(), n_r.c_str());
return TypeStructuralEqualityMainVariant::_equal(l, r);
}
diff --git a/gcc/type-escaper.c b/gcc/type-escaper.c
index 0acceb1c8fb..c72ee785980 100644
--- a/gcc/type-escaper.c
+++ b/gcc/type-escaper.c
@@ -109,7 +109,7 @@ TypeEscaper::_walk_UNION_TYPE_post(const_tree t)
}
void
-TypeEscaper::_walk_FUNCTION_TYPEpre(const_tree t)
+TypeEscaper::_walk_FUNCTION_TYPE_pre(const_tree t)
{
_update(t);
}
diff --git a/gcc/type-escaper.hpp b/gcc/type-escaper.hpp
index b5b883fcbcc..c35c6cc5f5f 100644
--- a/gcc/type-escaper.hpp
+++ b/gcc/type-escaper.hpp
@@ -19,7 +19,7 @@ private:
virtual void _walk_UNION_TYPE_pre(const_tree t);
virtual void _walk_UNION_TYPE_post(const_tree t);
virtual void _walk_METHOD_TYPE_pre(const_tree t);
- virtual void _walk_FUNCTION_TYPEpre(const_tree t);
+ virtual void _walk_FUNCTION_TYPE_pre(const_tree t);
virtual bool is_memoized(const_tree t);
unsigned _inside_union;
Reason _reason;
diff --git a/gcc/type-incomplete-equality.c b/gcc/type-incomplete-equality.c
index 5f2adc5f86a..ed0a27154b4 100644
--- a/gcc/type-incomplete-equality.c
+++ b/gcc/type-incomplete-equality.c
@@ -46,7 +46,7 @@ TypeIncompleteEquality::_equal(const_tree l, const_tree r)
// if any of these are incomplete, then we can only compare using identifiers...
const bool incomplete_l = is_incomplete(l);
const bool incomplete_r = is_incomplete(r);
- const bool can_compare_incompletely = incomplete_l && incomplete_r;
+ const bool can_compare_incompletely = incomplete_l || incomplete_r;
if (!can_compare_incompletely) return TypeCanonicalEquality::_equal(l, r);
const std::string n_l = TypeStringifier::get_type_identifier(l);
diff --git a/gcc/type-structural-equality.c b/gcc/type-structural-equality.c
index ca1c64c15eb..6195c259158 100644
--- a/gcc/type-structural-equality.c
+++ b/gcc/type-structural-equality.c
@@ -46,11 +46,6 @@ TypeStructuralEquality::_equal(const_tree l, const_tree r)
bool valid_inputs = l && r;
if (!valid_inputs) return l == r;
- const std::string n_l = TypeStringifier::get_type_identifier(l);
- const std::string n_r = TypeStringifier::get_type_identifier(r);
- log ("structurally %s %s\n", n_l.c_str(), n_r.c_str());
-
-
bool equal_codes = _equal_code(l, r);
if (!equal_codes) return equal_codes;
diff --git a/gcc/type-walker.c b/gcc/type-walker.c
index a1b6b421107..54d547d3fd6 100644
--- a/gcc/type-walker.c
+++ b/gcc/type-walker.c
@@ -258,7 +258,6 @@ TypeWalker::walk_args(const_tree t)
void
TypeWalker::_walk_args(const_tree t)
{
- assert_is_type(t, FUNCTION_TYPE);
for (tree arg_node = TYPE_ARG_TYPES(t); NULL_TREE != arg_node; arg_node = TREE_CHAIN(arg_node))
{
tree arg_node_type = TREE_VALUE(arg_node);