public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/aoliva/heads/testme)] set hardcfr eh probs
@ 2023-10-20  3:48 Alexandre Oliva
  0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Oliva @ 2023-10-20  3:48 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:3537621375e746a5eb46847bd832362ec484cfe2

commit 3537621375e746a5eb46847bd832362ec484cfe2
Author: Alexandre Oliva <oliva@gnu.org>
Date:   Thu Oct 19 02:53:10 2023 -0300

    set hardcfr eh probs

Diff:
---
 gcc/gimple-harden-control-flow.cc | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/gcc/gimple-harden-control-flow.cc b/gcc/gimple-harden-control-flow.cc
index 546837a450b8..05878c978433 100644
--- a/gcc/gimple-harden-control-flow.cc
+++ b/gcc/gimple-harden-control-flow.cc
@@ -913,6 +913,9 @@ public:
 	  = profile_probability::always ();
 	edge e = make_edge (gsi_bb (gsi), trp, EDGE_TRUE_VALUE);
 	e->probability = profile_probability::never ();
+	gcc_checking_assert (e->dest == trp);
+	gcc_checking_assert (!e->dest->count.initialized_p ());
+	e->dest->count = e->count ();
 
 	/* Set the trap's dominator after splitting.  */
 	if (dom_info_available_p (CDI_DOMINATORS))
@@ -1276,7 +1279,13 @@ pass_harden_control_flow_redundancy::execute (function *fun)
 
 	      add_stmt_to_eh_lp (stmt, lp_eh_cleanup);
 	      /* Finally, wire the EH cleanup block into the CFG.  */
-	      make_eh_edges (stmt);
+	      edge neeh = make_eh_edges (stmt);
+	      neeh->probability = profile_probability::never ();
+	      gcc_checking_assert (neeh->dest == bb_eh_cleanup);
+	      if (neeh->dest->count.initialized_p ())
+		neeh->dest->count += neeh->count ();
+	      else
+		neeh->dest->count = neeh->count ();
 	    }
 	}

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [gcc(refs/users/aoliva/heads/testme)] set hardcfr eh probs
@ 2023-09-30  4:15 Alexandre Oliva
  0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Oliva @ 2023-09-30  4:15 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:1d4e505ea6a19c86cff497e03ad5e9a100a2a404

commit 1d4e505ea6a19c86cff497e03ad5e9a100a2a404
Author: Alexandre Oliva <oliva@gnu.org>
Date:   Fri Sep 29 22:36:30 2023 -0300

    set hardcfr eh probs

Diff:
---
 gcc/gimple-harden-control-flow.cc | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/gcc/gimple-harden-control-flow.cc b/gcc/gimple-harden-control-flow.cc
index 546837a450b..05878c97843 100644
--- a/gcc/gimple-harden-control-flow.cc
+++ b/gcc/gimple-harden-control-flow.cc
@@ -913,6 +913,9 @@ public:
 	  = profile_probability::always ();
 	edge e = make_edge (gsi_bb (gsi), trp, EDGE_TRUE_VALUE);
 	e->probability = profile_probability::never ();
+	gcc_checking_assert (e->dest == trp);
+	gcc_checking_assert (!e->dest->count.initialized_p ());
+	e->dest->count = e->count ();
 
 	/* Set the trap's dominator after splitting.  */
 	if (dom_info_available_p (CDI_DOMINATORS))
@@ -1276,7 +1279,13 @@ pass_harden_control_flow_redundancy::execute (function *fun)
 
 	      add_stmt_to_eh_lp (stmt, lp_eh_cleanup);
 	      /* Finally, wire the EH cleanup block into the CFG.  */
-	      make_eh_edges (stmt);
+	      edge neeh = make_eh_edges (stmt);
+	      neeh->probability = profile_probability::never ();
+	      gcc_checking_assert (neeh->dest == bb_eh_cleanup);
+	      if (neeh->dest->count.initialized_p ())
+		neeh->dest->count += neeh->count ();
+	      else
+		neeh->dest->count = neeh->count ();
 	    }
 	}

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [gcc(refs/users/aoliva/heads/testme)] set hardcfr eh probs
@ 2023-09-30  2:30 Alexandre Oliva
  0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Oliva @ 2023-09-30  2:30 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:55a5601fc690019bd34f2dc6ce2c66edd1024740

commit 55a5601fc690019bd34f2dc6ce2c66edd1024740
Author: Alexandre Oliva <oliva@gnu.org>
Date:   Fri Sep 29 22:36:30 2023 -0300

    set hardcfr eh probs

Diff:
---
 gcc/gimple-harden-control-flow.cc | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/gcc/gimple-harden-control-flow.cc b/gcc/gimple-harden-control-flow.cc
index 546837a450b..05878c97843 100644
--- a/gcc/gimple-harden-control-flow.cc
+++ b/gcc/gimple-harden-control-flow.cc
@@ -913,6 +913,9 @@ public:
 	  = profile_probability::always ();
 	edge e = make_edge (gsi_bb (gsi), trp, EDGE_TRUE_VALUE);
 	e->probability = profile_probability::never ();
+	gcc_checking_assert (e->dest == trp);
+	gcc_checking_assert (!e->dest->count.initialized_p ());
+	e->dest->count = e->count ();
 
 	/* Set the trap's dominator after splitting.  */
 	if (dom_info_available_p (CDI_DOMINATORS))
@@ -1276,7 +1279,13 @@ pass_harden_control_flow_redundancy::execute (function *fun)
 
 	      add_stmt_to_eh_lp (stmt, lp_eh_cleanup);
 	      /* Finally, wire the EH cleanup block into the CFG.  */
-	      make_eh_edges (stmt);
+	      edge neeh = make_eh_edges (stmt);
+	      neeh->probability = profile_probability::never ();
+	      gcc_checking_assert (neeh->dest == bb_eh_cleanup);
+	      if (neeh->dest->count.initialized_p ())
+		neeh->dest->count += neeh->count ();
+	      else
+		neeh->dest->count = neeh->count ();
 	    }
 	}

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [gcc(refs/users/aoliva/heads/testme)] set hardcfr eh probs
@ 2023-09-30  1:37 Alexandre Oliva
  0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Oliva @ 2023-09-30  1:37 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:8ee4d156a275763c42b1cfd1fcceff9871d8511e

commit 8ee4d156a275763c42b1cfd1fcceff9871d8511e
Author: Alexandre Oliva <oliva@gnu.org>
Date:   Fri Sep 29 22:36:30 2023 -0300

    set hardcfr eh probs

Diff:
---
 gcc/gimple-harden-control-flow.cc | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/gcc/gimple-harden-control-flow.cc b/gcc/gimple-harden-control-flow.cc
index 546837a450b..d1d7bd25088 100644
--- a/gcc/gimple-harden-control-flow.cc
+++ b/gcc/gimple-harden-control-flow.cc
@@ -1276,7 +1276,13 @@ pass_harden_control_flow_redundancy::execute (function *fun)
 
 	      add_stmt_to_eh_lp (stmt, lp_eh_cleanup);
 	      /* Finally, wire the EH cleanup block into the CFG.  */
-	      make_eh_edges (stmt);
+	      edge neeh = make_eh_edges (stmt);
+	      neeh->probability = profile_probability::never ();
+	      gcc_checking_assert (neeh->dest == bb_eh_cleanup);
+	      if (neeh->dest->count.initialized_p ())
+		neeh->dest->count += neeh->count ();
+	      else
+		neeh->dest->count = neeh->count ();
 	    }
 	}

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-10-20  3:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-20  3:48 [gcc(refs/users/aoliva/heads/testme)] set hardcfr eh probs Alexandre Oliva
  -- strict thread matches above, loose matches on Subject: below --
2023-09-30  4:15 Alexandre Oliva
2023-09-30  2:30 Alexandre Oliva
2023-09-30  1:37 Alexandre Oliva

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).