This patch adds the tree-ssa-ifcombine.h header file, with the function
declarations for `recognize_if_then_else` and `tree_ssa_ifcombine_bb` and
removes 'static' from the definitions in tree-ssa-ifcombine.cc, so that they
can be used in other passes.
gcc/ChangeLog:
* tree-ssa-ifcombine.cc (recognize_if_then_else): Removed 'static'.
(tree_ssa_ifcombine_bb): Removed 'static'.
* tree-ssa-ifcombine.h: New file.
Signed-off-by: Konstantinos Eleftheriou <[email protected]>
---
(no changes since v1)
gcc/tree-ssa-ifcombine.cc | 4 ++--
gcc/tree-ssa-ifcombine.h | 29 +++++++++++++++++++++++++++++
2 files changed, 31 insertions(+), 2 deletions(-)
create mode 100644 gcc/tree-ssa-ifcombine.h
diff --git a/gcc/tree-ssa-ifcombine.cc b/gcc/tree-ssa-ifcombine.cc
index a60e6914e68c..79b60c963a75 100644
--- a/gcc/tree-ssa-ifcombine.cc
+++ b/gcc/tree-ssa-ifcombine.cc
@@ -95,7 +95,7 @@ known_succ_p (basic_block cond_bb)
basic-blocks to make the pattern match. If SUCCS_ANY, *THEN_BB and *ELSE_BB
will not be filled in, and they will be found to match even if reversed. */
-static bool
+bool
recognize_if_then_else (basic_block cond_bb,
basic_block *then_bb, basic_block *else_bb,
bool succs_any = false)
@@ -1142,7 +1142,7 @@ tree_ssa_ifcombine_bb_1 (basic_block inner_cond_bb,
basic_block outer_cond_bb,
if-conversion helper. We start with BB as the innermost
worker basic-block. Returns true if a transformation was done. */
-static bool
+bool
tree_ssa_ifcombine_bb (basic_block inner_cond_bb)
{
bool ret = false;
diff --git a/gcc/tree-ssa-ifcombine.h b/gcc/tree-ssa-ifcombine.h
new file mode 100644
index 000000000000..fc1e3a100cd1
--- /dev/null
+++ b/gcc/tree-ssa-ifcombine.h
@@ -0,0 +1,29 @@
+/* Copyright (C) 2016-2025 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3, or (at your option) any
+later version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+#ifndef GCC_TREE_SSA_IFCOMBINE_H
+#define GCC_TREE_SSA_IFCOMBINE_H
+
+bool recognize_if_then_else (basic_block, basic_block *, basic_block *,
+ bool succs_any = false);
+
+bool tree_ssa_ifcombine_bb (basic_block);
+
+#endif
+
+
--
2.52.0