diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-02-06 07:39:24 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-02-06 07:39:24 +0000 |
commit | 74d6d0721e7b43a1756df6856c76dd692bc82bfc (patch) | |
tree | 2a6213d1768395162d549755d0b642ed0b849621 /gcc/ipa-inline-analysis.c | |
parent | e69971c051f58392e6f09fe7df1eac6ccd1a14c1 (diff) | |
download | gcc-74d6d0721e7b43a1756df6856c76dd692bc82bfc.tar.gz |
PR middle-end/60013
* ipa-inline-analysis.c (compute_bb_predicates): Ensure monotonicity
of the dataflow.
* gcc.dg/pr60013.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207529 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-inline-analysis.c')
-rw-r--r-- | gcc/ipa-inline-analysis.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c index ffb8264a459..6cd5dc1c2e5 100644 --- a/gcc/ipa-inline-analysis.c +++ b/gcc/ipa-inline-analysis.c @@ -310,7 +310,7 @@ add_clause (conditions conditions, struct predicate *p, clause_t clause) if (false_predicate_p (p)) return; - /* No one should be sily enough to add false into nontrivial clauses. */ + /* No one should be silly enough to add false into nontrivial clauses. */ gcc_checking_assert (!(clause & (1 << predicate_false_condition))); /* Look where to insert the clause. At the same time prune out @@ -1035,7 +1035,7 @@ inline_node_removal_hook (struct cgraph_node *node, memset (info, 0, sizeof (inline_summary_t)); } -/* Remap predicate P of former function to be predicate of duplicated functoin. +/* Remap predicate P of former function to be predicate of duplicated function. POSSIBLE_TRUTHS is clause of possible truths in the duplicated node, INFO is inline summary of the duplicated node. */ @@ -1887,8 +1887,15 @@ compute_bb_predicates (struct cgraph_node *node, } else if (!predicates_equal_p (&p, (struct predicate *) bb->aux)) { - done = false; - *((struct predicate *) bb->aux) = p; + /* This OR operation is needed to ensure monotonous data flow + in the case we hit the limit on number of clauses and the + and/or operations above give approximate answers. */ + p = or_predicates (summary->conds, &p, (struct predicate *)bb->aux); + if (!predicates_equal_p (&p, (struct predicate *) bb->aux)) + { + done = false; + *((struct predicate *) bb->aux) = p; + } } } } |