* Fix PR/56490
@ 2013-03-01 23:12 Xinliang David Li
2013-03-01 23:48 ` Jeff Law
0 siblings, 1 reply; 2+ messages in thread
From: Xinliang David Li @ 2013-03-01 23:12 UTC (permalink / raw)
To: GCC Patches
The following patch limit the depth for post-dom walk in the analysis
-- in the presence of complicated control flow, the analysis should
bail out sooner.
Bootstrapped on x86-64/linux. No regressions found. OK for trunk?
thanks,
David
2013-03-01 Xinliang David Li <davidxl@google.com>
* tree-ssa-uninit.c (compute_control_dep_chain): Limit post-dom
walk length.
#define MAX_NUM_CHAINS 8
#define MAX_CHAIN_LEN 5
+#define MAX_POSTDOM_CHECK 8
/* Computes the control dependence chains (paths of edges)
for DEP_BB up to the dominating basic block BB (the head node of a
@@ -269,6 +270,7 @@ compute_control_dep_chain (basic_block b
FOR_EACH_EDGE (e, ei, bb->succs)
{
basic_block cd_bb;
+ int post_dom_check = 0;
if (e->flags & (EDGE_FAKE | EDGE_ABNORMAL))
continue;
@@ -298,7 +300,8 @@ compute_control_dep_chain (basic_block b
}
cd_bb = find_pdom (cd_bb);
- if (cd_bb == EXIT_BLOCK_PTR)
+ post_dom_check++;
+ if (cd_bb == EXIT_BLOCK_PTR || post_dom_check > MAX_POSTDOM_CHECK)
break;
}
cur_cd_chain->pop ();
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Fix PR/56490
2013-03-01 23:12 Fix PR/56490 Xinliang David Li
@ 2013-03-01 23:48 ` Jeff Law
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2013-03-01 23:48 UTC (permalink / raw)
To: Xinliang David Li; +Cc: GCC Patches
On 03/01/2013 04:12 PM, Xinliang David Li wrote:
> The following patch limit the depth for post-dom walk in the analysis
> -- in the presence of complicated control flow, the analysis should
> bail out sooner.
>
> Bootstrapped on x86-64/linux. No regressions found. OK for trunk?
>
> thanks,
>
> David
>
>
>
> 2013-03-01 Xinliang David Li <davidxl@google.com>
>
> * tree-ssa-uninit.c (compute_control_dep_chain): Limit post-dom
> walk length.
>
>
> #define MAX_NUM_CHAINS 8
> #define MAX_CHAIN_LEN 5
> +#define MAX_POSTDOM_CHECK 8
I don't like the magic constants, but I dislike knobs that users won't
understand even more.
OK.
Jeff
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-03-01 23:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-01 23:12 Fix PR/56490 Xinliang David Li
2013-03-01 23:48 ` Jeff Law
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).