ipa-inline-analysis.c: Include gimplify.h (set_cond_stmt_execution_predicate...

* ipa-inline-analysis.c: Include gimplify.h
	(set_cond_stmt_execution_predicate,
	set_switch_stmt_execution_predicate): Be sure to not leak locations
	to function body.

From-SVN: r230857
This commit is contained in:
Jan Hubicka 2015-11-25 10:08:20 +01:00 committed by Jan Hubicka
parent 6837d899c8
commit 80d39568c5
2 changed files with 17 additions and 6 deletions

View File

@ -1,3 +1,10 @@
2015-11-24 Jan Hubicka <hubicka@ucw.cz>
* ipa-inline-analysis.c: Include gimplify.h
(set_cond_stmt_execution_predicate,
set_switch_stmt_execution_predicate): Be sure to not leak locations
to function body.
2015-11-25 Jakub Jelinek <jakub@redhat.com> 2015-11-25 Jakub Jelinek <jakub@redhat.com>
PR target/67089 PR target/67089

View File

@ -94,6 +94,7 @@ along with GCC; see the file COPYING3. If not see
#include "ipa-utils.h" #include "ipa-utils.h"
#include "cilk.h" #include "cilk.h"
#include "cfgexpand.h" #include "cfgexpand.h"
#include "gimplify.h"
/* Estimate runtime of function can easilly run into huge numbers with many /* Estimate runtime of function can easilly run into huge numbers with many
nested loops. Be sure we can compute time * INLINE_SIZE_SCALE * 2 in an nested loops. Be sure we can compute time * INLINE_SIZE_SCALE * 2 in an
@ -1773,9 +1774,9 @@ set_cond_stmt_execution_predicate (struct ipa_func_body_info *fbi,
unordered one. Be sure it is not confused with NON_CONSTANT. */ unordered one. Be sure it is not confused with NON_CONSTANT. */
if (this_code != ERROR_MARK) if (this_code != ERROR_MARK)
{ {
struct predicate p = add_condition (summary, index, &aggpos, struct predicate p = add_condition
this_code, (summary, index, &aggpos, this_code,
gimple_cond_rhs (last)); unshare_expr_without_location (gimple_cond_rhs (last)));
e->aux = edge_predicate_pool.allocate (); e->aux = edge_predicate_pool.allocate ();
*(struct predicate *) e->aux = p; *(struct predicate *) e->aux = p;
} }
@ -1861,12 +1862,15 @@ set_switch_stmt_execution_predicate (struct ipa_func_body_info *fbi,
if (!min && !max) if (!min && !max)
p = true_predicate (); p = true_predicate ();
else if (!max) else if (!max)
p = add_condition (summary, index, &aggpos, EQ_EXPR, min); p = add_condition (summary, index, &aggpos, EQ_EXPR,
unshare_expr_without_location (min));
else else
{ {
struct predicate p1, p2; struct predicate p1, p2;
p1 = add_condition (summary, index, &aggpos, GE_EXPR, min); p1 = add_condition (summary, index, &aggpos, GE_EXPR,
p2 = add_condition (summary, index, &aggpos, LE_EXPR, max); unshare_expr_without_location (min));
p2 = add_condition (summary, index, &aggpos, LE_EXPR,
unshare_expr_without_location (max));
p = and_predicates (summary->conds, &p1, &p2); p = and_predicates (summary->conds, &p1, &p2);
} }
*(struct predicate *) e->aux *(struct predicate *) e->aux