summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2014-11-07 10:36:28 -0500
committerDavid Malcolm <dmalcolm@redhat.com>2014-11-07 10:36:28 -0500
commitabcbb997b20f93ff7cc744abbf0f0f17007493ea (patch)
tree91f8f2d65034456a10ba4fa339aab1b6ca9eb43c
parent633a839db4391a48b0e748588cba4da8a18bc655 (diff)
downloadgcc-abcbb997b20f93ff7cc744abbf0f0f17007493ea.tar.gz
value-prof.c: Use gassign
gcc/ChangeLog.gimple-classes: * value-prof.c (gimple_divmod_values_to_profile): Rename gimple param "stmt" to "gs", reintroducing "stmt" as a local gassign * by replacing a check against GIMPLE_ASSIGN with a dyn_cast.
-rw-r--r--gcc/ChangeLog.gimple-classes6
-rw-r--r--gcc/value-prof.c7
2 files changed, 10 insertions, 3 deletions
diff --git a/gcc/ChangeLog.gimple-classes b/gcc/ChangeLog.gimple-classes
index c85c1382207..fc81c2d49f2 100644
--- a/gcc/ChangeLog.gimple-classes
+++ b/gcc/ChangeLog.gimple-classes
@@ -1,3 +1,9 @@
+2014-11-07 David Malcolm <dmalcolm@redhat.com>
+
+ * value-prof.c (gimple_divmod_values_to_profile): Rename gimple
+ param "stmt" to "gs", reintroducing "stmt" as a local gassign * by
+ replacing a check against GIMPLE_ASSIGN with a dyn_cast.
+
2014-11-06 David Malcolm <dmalcolm@redhat.com>
* tree-ssa-threadedge.c (lhs_of_dominating_assert): Capture result
diff --git a/gcc/value-prof.c b/gcc/value-prof.c
index b35c437daed..613a45c9d4a 100644
--- a/gcc/value-prof.c
+++ b/gcc/value-prof.c
@@ -1887,15 +1887,16 @@ stringop_block_profile (gimple stmt, unsigned int *expected_align,
}
-/* Find values inside STMT for that we want to measure histograms for
+/* Find values inside GS for that we want to measure histograms for
division/modulo optimization. */
static void
-gimple_divmod_values_to_profile (gimple stmt, histogram_values *values)
+gimple_divmod_values_to_profile (gimple gs, histogram_values *values)
{
tree lhs, divisor, op0, type;
histogram_value hist;
- if (gimple_code (stmt) != GIMPLE_ASSIGN)
+ gassign *stmt = dyn_cast <gassign *> (gs);
+ if (!stmt)
return;
lhs = gimple_assign_lhs (stmt);