/* Interprocedural semantic function equality pass
- Copyright (C) 2014 Free Software Foundation, Inc.
+ Copyright (C) 2014-2019 Free Software Foundation, Inc.
Contributed by Jan Hubicka <hubicka@ucw.cz> and Martin Liska <mliska@suse.cz>
return_with_result (bool result, const char *func, unsigned int line)
{
if (!result && dump_file && (dump_flags & TDF_DETAILS))
- fprintf (dump_file, " false returned (%s:%u)\n", func, line);
+ fprintf (dump_file, " false returned: (%s:%u)\n", func, line);
return result;
}
FUNC is name of function and LINE is location in the source file. */
static inline bool
-return_different_stmts_1 (gimple s1, gimple s2, const char *code,
+return_different_stmts_1 (gimple *s1, gimple *s2, const char *code,
const char *func, unsigned int line)
{
if (dump_file && (dump_flags & TDF_DETAILS))
/* Verifies for given GIMPLEs S1 and S2 that
assignment statements are semantically equivalent. */
- bool compare_gimple_assign (gimple s1, gimple s2);
+ bool compare_gimple_assign (gimple *s1, gimple *s2);
/* Verifies for given GIMPLEs S1 and S2 that
condition statements are semantically equivalent. */
- bool compare_gimple_cond (gimple s1, gimple s2);
+ bool compare_gimple_cond (gimple *s1, gimple *s2);
/* Verifies for given GIMPLE_LABEL stmts S1 and S2 that
label statements are semantically equivalent. */
/* Verifies for given GIMPLEs S1 and S2 that
goto statements are semantically equivalent. */
- bool compare_gimple_goto (gimple s1, gimple s2);
+ bool compare_gimple_goto (gimple *s1, gimple *s2);
/* Verifies for given GIMPLE_RESX stmts S1 and S2 that
resx statements are semantically equivalent. */
/* Verifies that tree labels T1 and T2 correspond. */
bool compare_tree_ssa_label (tree t1, tree t2);
- /* Function responsible for comparison of handled components T1 and T2.
+ /* Function compare for equality given memory operands T1 and T2. */
+ bool compare_memory_operand (tree t1, tree t2);
+
+ /* Function compare for equality given trees T1 and T2 which
+ can be either a constant or a declaration type. */
+ bool compare_cst_or_decl (tree t1, tree t2);
+
+ /* Function responsible for comparison of various operands T1 and T2.
If these components, from functions FUNC1 and FUNC2, are equal, true
is returned. */
bool compare_operand (tree t1, tree t2);
- /* Compares two tree list operands T1 and T2 and returns true if these
- two trees are semantically equivalent. */
- bool compare_tree_list_operand (tree t1, tree t2);
+ /* Compares GIMPLE ASM inputs (or outputs) where we iterate tree chain
+ and compare both TREE_PURPOSEs and TREE_VALUEs. */
+ bool compare_asm_inputs_outputs (tree t1, tree t2);
/* Verifies that trees T1 and T2, representing function declarations
are equivalent from perspective of ICF. */
/* Verifies that trees T1 and T2 do correspond. */
bool compare_variable_decl (tree t1, tree t2);
+ /* Return true if types are compatible for polymorphic call analysis.
+ COMPARE_PTR indicates if polymorphic type comparsion should be
+ done for pointers, too. */
+ static bool compatible_polymorphic_types_p (tree t1, tree t2,
+ bool compare_ptr);
+
/* Return true if types are compatible from perspective of ICF.
FIRST_ARGUMENT indicates if the comparison is called for
first parameter of a function. */
- static bool compatible_types_p (tree t1, tree t2,
- bool compare_polymorphic = true,
- bool first_argument = false);
+ static bool compatible_types_p (tree t1, tree t2);
private: