Hi All, It seems that after my IVopts patches the function contain_complex_addr_expr became unused and clang is rightfully complaining about it.
This removes the unused internal function. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Ok for master? Thanks, Tamar gcc/ChangeLog: PR tree-optimization/19202 * tree-ssa-loop-ivopts.cc (contain_complex_addr_expr): Remove. --- diff --git a/gcc/tree-ssa-loop-ivopts.cc b/gcc/tree-ssa-loop-ivopts.cc index 989321137df93349f8395a9f746f73eda52fd74f..e37b24062f730e490ae86bd9248e61102ad1a0f0 100644 --- a/gcc/tree-ssa-loop-ivopts.cc +++ b/gcc/tree-ssa-loop-ivopts.cc @@ -1149,34 +1149,6 @@ determine_base_object (struct ivopts_data *data, tree expr) return obj; } -/* Return true if address expression with non-DECL_P operand appears - in EXPR. */ - -static bool -contain_complex_addr_expr (tree expr) -{ - bool res = false; - - STRIP_NOPS (expr); - switch (TREE_CODE (expr)) - { - case POINTER_PLUS_EXPR: - case PLUS_EXPR: - case MINUS_EXPR: - res |= contain_complex_addr_expr (TREE_OPERAND (expr, 0)); - res |= contain_complex_addr_expr (TREE_OPERAND (expr, 1)); - break; - - case ADDR_EXPR: - return (!DECL_P (TREE_OPERAND (expr, 0))); - - default: - return false; - } - - return res; -} - /* Allocates an induction variable with given initial value BASE and step STEP for loop LOOP. NO_OVERFLOW implies the iv doesn't overflow. */ --
diff --git a/gcc/tree-ssa-loop-ivopts.cc b/gcc/tree-ssa-loop-ivopts.cc index 989321137df93349f8395a9f746f73eda52fd74f..e37b24062f730e490ae86bd9248e61102ad1a0f0 100644 --- a/gcc/tree-ssa-loop-ivopts.cc +++ b/gcc/tree-ssa-loop-ivopts.cc @@ -1149,34 +1149,6 @@ determine_base_object (struct ivopts_data *data, tree expr) return obj; } -/* Return true if address expression with non-DECL_P operand appears - in EXPR. */ - -static bool -contain_complex_addr_expr (tree expr) -{ - bool res = false; - - STRIP_NOPS (expr); - switch (TREE_CODE (expr)) - { - case POINTER_PLUS_EXPR: - case PLUS_EXPR: - case MINUS_EXPR: - res |= contain_complex_addr_expr (TREE_OPERAND (expr, 0)); - res |= contain_complex_addr_expr (TREE_OPERAND (expr, 1)); - break; - - case ADDR_EXPR: - return (!DECL_P (TREE_OPERAND (expr, 0))); - - default: - return false; - } - - return res; -} - /* Allocates an induction variable with given initial value BASE and step STEP for loop LOOP. NO_OVERFLOW implies the iv doesn't overflow. */