This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH 2/6] Don't run instrumented value profiler changes with afdo
- From: Andi Kleen <andi at firstfloor dot org>
- To: gcc-patches at gcc dot gnu dot org
- Cc: hubicka at ucw dot cz, law at redhat dot com, Andi Kleen <ak at linux dot intel dot com>
- Date: Sun, 26 Jun 2016 18:50:20 -0700
- Subject: [PATCH 2/6] Don't run instrumented value profiler changes with afdo
- Authentication-results: sourceware.org; auth=none
- References: <20160627015024 dot 23444-1-andi at firstfloor dot org> <20160627015024 dot 23444-2-andi at firstfloor dot org>
From: Andi Kleen <ak@linux.intel.com>
The pass to transform gimple based on value profiling runs with autofdo
on, but currently every transformation fails. For indirect calls autofdo
does it on its own, and it doesn't suppport other value profiling. So don't
run this pass when autofdo is active. This also avoids bogus
dump file entries.
gcc/:
* 2016-06-26 Andi Kleen <ak@linux.intel.com>
* value-prof.c (gimple_value_profile_transformations): Don't run
when auto_profile is on.
---
gcc/value-prof.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/gcc/value-prof.c b/gcc/value-prof.c
index f9574b6..52068eb 100644
--- a/gcc/value-prof.c
+++ b/gcc/value-prof.c
@@ -645,6 +645,11 @@ gimple_value_profile_transformations (void)
basic_block bb;
gimple_stmt_iterator gsi;
bool changed = false;
+
+ /* Autofdo does all transformations it supports elsewhere. */
+ if (flag_auto_profile)
+ return false;
+
FOR_EACH_BB_FN (bb, cfun)
{
for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
--
2.8.4