public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-4904] Avoid repeating calculations in threader.
@ 2021-11-04 14:40 Aldy Hernandez
0 siblings, 0 replies; only message in thread
From: Aldy Hernandez @ 2021-11-04 14:40 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:e4411622690654cdc530c6262c7115a9e15dc359
commit r12-4904-ge4411622690654cdc530c6262c7115a9e15dc359
Author: Aldy Hernandez <aldyh@redhat.com>
Date: Thu Nov 4 11:34:55 2021 +0100
Avoid repeating calculations in threader.
We already attempt to resolve the current path on entry to
find_paths_to_name(), so there's no need to do so again for each
exported range since nothing has changed.
Removing this redundant calculation avoids 22% of calls into the path
solver.
Tested on x86-64 and ppc64le Linux with the usual regstrap. I also
verified that the before and after number of threads was the same
in a suite of .ii files from a bootstrap.
gcc/ChangeLog:
PR tree-optimization/102943
* tree-ssa-threadbackward.c (back_threader::find_paths_to_names):
Avoid duplicate calculation of paths.
Diff:
---
gcc/tree-ssa-threadbackward.c | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/gcc/tree-ssa-threadbackward.c b/gcc/tree-ssa-threadbackward.c
index 29e9d6a3f90..b7eaff94567 100644
--- a/gcc/tree-ssa-threadbackward.c
+++ b/gcc/tree-ssa-threadbackward.c
@@ -443,18 +443,6 @@ back_threader::find_paths_to_names (basic_block bb, bitmap interesting)
goto leave_bb;
}
}
- // Examine blocks that define or export an interesting SSA,
- // since they may compute a range which resolve this path.
- if ((def_bb == bb
- || bitmap_bit_p (m_ranger->gori ().exports (bb), i))
- && m_path.length () > 1)
- {
- if (maybe_register_path ())
- {
- done = true;
- goto leave_bb;
- }
- }
}
// If there are interesting names not yet processed, keep looking.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-04 14:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-04 14:40 [gcc r12-4904] Avoid repeating calculations in threader 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).