On 13-10-21 6:56 PM, Steven Bosscher wrote:

+       {
+         bitmap_clear (&need_new);
+         bitmap_clear (&reachable);
+         return;
+       }
+
+      for (df_ref use = DF_REG_USE_CHAIN (REGNO(dest));
+          use;
+          use = DF_REF_NEXT_REG (use))
You're using DF in these places. But IRA and LRA don't work with DF.
After update_equiv_regs DF caches and liveness may be incorrect. You'd
have to add a df_analyze call but I'm not sure how that will interact
with IRA/LRA's own dataflow frameworks (e.g. w.r.t.
REG_DEAD/REG_UNUSED notes).


Sorry, Martin. I think Steven is right. IRA/LRA (and reload pass) creates so many changes in RTL that DF infrastructure would slow down the compiler a lot and therefore df info is not updated during RA. Your patch mostly uses a correct DF-info because there are few changes since updating is off.

You could move your optimization a bit up before df_clear_flags (DF_NO_INSN_RESCAN); or move this call right after your optimizations (possibly some minor df calls are needed too to restore live info for RA after your RTL changes).

Reply via email to