public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/kubaneko/heads/histogram)] Add -fuse-histogram-in-peeling
@ 2023-04-22 10:50 Jan Hubicka
  0 siblings, 0 replies; only message in thread
From: Jan Hubicka @ 2023-04-22 10:50 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:54eac3378042a6543e03a2dd75673b6e1d67f5da

commit 54eac3378042a6543e03a2dd75673b6e1d67f5da
Author: Honza <jh@ryzen3.suse.cz>
Date:   Sat Apr 22 12:49:51 2023 +0200

    Add -fuse-histogram-in-peeling

Diff:
---
 gcc/common.opt               | 4 ++++
 gcc/tree-ssa-loop-ivcanon.cc | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/gcc/common.opt b/gcc/common.opt
index 50bcc523fd2..e4ef0685484 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -2291,6 +2291,10 @@ fpeel-loops
 Common Var(flag_peel_loops) Optimization
 Perform loop peeling.
 
+fuse-histograms-in-peeling
+Common Var(flag_use_histogram_in_peeling) Init(1) Optimization
+Use histograms in loop peelings.
+
 fpeephole
 Common Var(flag_no_peephole,0) Optimization
 Enable machine specific peephole optimizations.
diff --git a/gcc/tree-ssa-loop-ivcanon.cc b/gcc/tree-ssa-loop-ivcanon.cc
index 6a9ed49bb25..d5a10bb5aff 100644
--- a/gcc/tree-ssa-loop-ivcanon.cc
+++ b/gcc/tree-ssa-loop-ivcanon.cc
@@ -1102,7 +1102,7 @@ try_peel_loop (class loop *loop,
   auto_vec<int> good_peels;
   auto_vec<int> prcnt;
   prcnt.safe_push (0);
-  bool histogram_peeling = loop->counters != NULL;
+  bool histogram_peeling = flag_use_histogram_in_peeling && (loop->counters != NULL);
   if (!loop->counters && loop->header->count.reliable_p ()
       && loop->header->count.nonzero_p ()
       && dump_enabled_p ())

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-04-22 10:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-22 10:50 [gcc(refs/users/kubaneko/heads/histogram)] Add -fuse-histogram-in-peeling Jan Hubicka

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