public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/pheeck/heads/sccp)] added phi debug function
@ 2022-09-05 16:54 Filip Kastl
0 siblings, 0 replies; 2+ messages in thread
From: Filip Kastl @ 2022-09-05 16:54 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:a4bde9752ad292dd7cf54a8edb8fe0b324e98bbc
commit a4bde9752ad292dd7cf54a8edb8fe0b324e98bbc
Author: Filip Kastl <filip.kastl@gmail.com>
Date: Mon Sep 5 18:54:23 2022 +0200
added phi debug function
Diff:
---
gcc/sccp.cc | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/gcc/sccp.cc b/gcc/sccp.cc
index bcb3b313782..e29754fb37d 100644
--- a/gcc/sccp.cc
+++ b/gcc/sccp.cc
@@ -126,6 +126,23 @@ finalize_sccp (void)
{
}
+static void
+debug_phis (void) // DEBUG
+{
+ std::cerr << "List of PHIs" << std::endl;
+ basic_block bb;
+ FOR_EACH_BB_FN (bb, cfun)
+ {
+ gphi_iterator pi;
+ for (pi = gsi_start_phis (bb); !gsi_end_p (pi); gsi_next (&pi))
+ {
+ gphi *phi = pi.phi ();
+ debug_gimple_stmt (phi);
+ }
+ }
+ std::cerr << std::endl;
+}
+
/* Return vector of all PHI functions from all basic blocks. */
static vec<gphi *>
@@ -474,10 +491,18 @@ public:
unsigned
pass_sccp::execute (function *)
{
+ //debug_phis (); // DEBUG
+
init_sccp ();
remove_redundant_phis (get_all_phis ());
finalize_sccp ();
+ /*
+ // DEBUG
+ std::cerr << std::endl;
+ debug_phis ();
+ */
+
return 0;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* [gcc(refs/users/pheeck/heads/sccp)] added phi debug function
@ 2023-02-15 10:14 Filip Kastl
0 siblings, 0 replies; 2+ messages in thread
From: Filip Kastl @ 2023-02-15 10:14 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:3422e261d75a317e9ae70ca4264dd2f181205536
commit 3422e261d75a317e9ae70ca4264dd2f181205536
Author: Filip Kastl <filip.kastl@gmail.com>
Date: Mon Sep 5 18:54:23 2022 +0200
added phi debug function
Diff:
---
gcc/sccp.cc | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/gcc/sccp.cc b/gcc/sccp.cc
index bcb3b313782..e29754fb37d 100644
--- a/gcc/sccp.cc
+++ b/gcc/sccp.cc
@@ -126,6 +126,23 @@ finalize_sccp (void)
{
}
+static void
+debug_phis (void) // DEBUG
+{
+ std::cerr << "List of PHIs" << std::endl;
+ basic_block bb;
+ FOR_EACH_BB_FN (bb, cfun)
+ {
+ gphi_iterator pi;
+ for (pi = gsi_start_phis (bb); !gsi_end_p (pi); gsi_next (&pi))
+ {
+ gphi *phi = pi.phi ();
+ debug_gimple_stmt (phi);
+ }
+ }
+ std::cerr << std::endl;
+}
+
/* Return vector of all PHI functions from all basic blocks. */
static vec<gphi *>
@@ -474,10 +491,18 @@ public:
unsigned
pass_sccp::execute (function *)
{
+ //debug_phis (); // DEBUG
+
init_sccp ();
remove_redundant_phis (get_all_phis ());
finalize_sccp ();
+ /*
+ // DEBUG
+ std::cerr << std::endl;
+ debug_phis ();
+ */
+
return 0;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-02-15 10:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-05 16:54 [gcc(refs/users/pheeck/heads/sccp)] added phi debug function Filip Kastl
2023-02-15 10:14 Filip Kastl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).