public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-3969] Avoid CFG updates in VRP threader if nothing changed.
@ 2021-09-29 18:28 Aldy Hernandez
0 siblings, 0 replies; only message in thread
From: Aldy Hernandez @ 2021-09-29 18:28 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:77731cb8f3cfd2cc94219e03e7521822d679c6a4
commit r12-3969-g77731cb8f3cfd2cc94219e03e7521822d679c6a4
Author: Aldy Hernandez <aldyh@redhat.com>
Date: Wed Sep 29 10:02:12 2021 +0200
Avoid CFG updates in VRP threader if nothing changed.
There is no need to update the CFG or SSAs if nothing has changed in VRP
threading.
gcc/ChangeLog:
* tree-vrp.c (thread_through_all_blocks): Return bool.
(execute_vrp_threader): Return TODO_* flags.
(pass_data_vrp_threader): Set todo_flags_finish to 0.
Diff:
---
gcc/tree-vrp.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index db9f3cd0a2f..69a3ab0ea9d 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -4372,9 +4372,9 @@ public:
{
walk (fun->cfg->x_entry_block_ptr);
}
- void thread_through_all_blocks ()
+ bool thread_through_all_blocks ()
{
- m_threader->thread_through_all_blocks (false);
+ return m_threader->thread_through_all_blocks (false);
}
private:
@@ -4438,7 +4438,8 @@ execute_vrp_threader (function *fun)
{
hybrid_threader threader;
threader.thread_jumps (fun);
- threader.thread_through_all_blocks ();
+ if (threader.thread_through_all_blocks ())
+ return (TODO_cleanup_cfg | TODO_update_ssa);
return 0;
}
@@ -4454,7 +4455,7 @@ const pass_data pass_data_vrp_threader =
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
- ( TODO_cleanup_cfg | TODO_update_ssa ), /* todo_flags_finish */
+ 0 /* todo_flags_finish */
};
class pass_vrp_threader : public gimple_opt_pass
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-09-29 18:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-29 18:28 [gcc r12-3969] Avoid CFG updates in VRP threader if nothing changed Aldy Hernandez
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).