This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/66335] a dump bug related to loop invariant in before_dom_children


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);
          }

}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]