* [PATCH] Fix PR70614
@ 2016-04-14 11:19 Richard Biener
0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2016-04-14 11:19 UTC (permalink / raw)
To: gcc-patches
The following patch (the 2nd hunk actually) brings down compile-time
for the testcase in the PR from <unknown, not terminated after
several minutes> to 0.5s.
Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.
Richard.
2016-04-14 Richard Biener <rguenther@suse.de>
PR tree-optimization/70614
* tree-scalar-evolution.c (analyze_evolution_in_loop): Terminate
loop if the evolution dropped to chrec_dont_know.
(interpret_condition_phi): Likewise.
Index: gcc/tree-scalar-evolution.c
===================================================================
*** gcc/tree-scalar-evolution.c (revision 234970)
--- gcc/tree-scalar-evolution.c (working copy)
*************** analyze_evolution_in_loop (gphi *loop_ph
*** 1510,1515 ****
--- 1510,1518 ----
/* When there are multiple back edges of the loop (which in fact never
happens currently, but nevertheless), merge their evolutions. */
evolution_function = chrec_merge (evolution_function, ev_fn);
+
+ if (evolution_function == chrec_dont_know)
+ break;
}
if (dump_file && (dump_flags & TDF_SCEV))
*************** interpret_condition_phi (struct loop *lo
*** 1687,1692 ****
--- 1690,1697 ----
(loop, PHI_ARG_DEF (condition_phi, i));
res = chrec_merge (res, branch_chrec);
+ if (res == chrec_dont_know)
+ break;
}
return res;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-04-14 11:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-14 11:19 [PATCH] Fix PR70614 Richard Biener
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).