This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/66335] a dump bug related to loop invariant in before_dom_children
- From: "zhongyunde at huawei dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 29 May 2015 07:05:49 +0000
- Subject: [Bug tree-optimization/66335] a dump bug related to loop invariant in before_dom_children
- Auto-submitted: auto-generated
- References: <bug-66335-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66335
--- Comment #1 from vfdff <zhongyunde at huawei dot com> ---
I suggest using the code following code similar to fix the issue.
for (bsi = gsi_start_phis (bb); !gsi_end_p (bsi); gsi_next (&bsi))
{
stmt = gsi_stmt (bsi);
... ...
... ...
if (lim_data->cost >= LIM_EXPENSIVE)
set_profitable_level (stmt);
else
continue;
if (dump_file && (dump_flags & TDF_DETAILS))
{
print_gimple_stmt (dump_file, stmt, 2, 0);
fprintf (dump_file, " invariant up to level %d, cost %d.\n\n",
loop_depth (lim_data->max_loop),
lim_data->cost);
}
}