On 11/03/2011 08:01 PM, Eric Botcazou wrote:
+  info.insert_before = insn;
+  info.first = new_insn;
+  info.fixed_regs_live = insn_info->fixed_regs_live;
+  info.failure = false;
+  for (cur = new_insn; cur; cur = NEXT_INSN (cur))
+    {
+      info.current = cur;
+      note_stores (PATTERN (cur), note_add_store,&info);
+    }

Unless I'm missing something, this is going all the way down to the end of the function, bypassing the CFG, so it is neither efficient nor correct.

For DSE you should set up backwards liveness simulation, and use that instead of note_stores and insn scanning. I don't know postreload well enough, but liveness simulation might work there too.

Paolo

Reply via email to