------- Comment #21 from jakub at gcc dot gnu dot org 2008-10-24 20:04 ------- Indeed, changing that line didn't cure anything (but that still doesn't mean that this hunk shouldn't be either fixed if needed, or killed).
Adding all EH_USES regs as explicit uses for all insns that may throw would IMHO just waste a lot of memory (and, for non-calls that don't have CALL_INSN_FUNCTION_USAGE it would need to be separate USE insns?). This is from IRC tonight: <jakub> iant_work: dataflow only sees EH_USES registers used by the epilogue (which isn't reachable from noreturn calls) and at the beginning of basic blocks reachable through EH edges <jakub> iant_work: I'm arguing that even all basic blocks that contain insns that throw must be considered as EH_USES users <iant_work> The EH_USES registers should certainly be live on any exception edge <iant_work> so, I think you are correct <jakub> iant_work: well, the testcase doesn't have any EH edges, all it has is a throw (noreturn call) <jakub> iant_work: which is caught by some other routine <iant_work> I think you are still right, we may not have an EH edge in the IR, but an insn which throws conceptually has an EH edge, at least in my mental model <jakub> iant_work: and in theory it wouldn't even have to have a throw directly, even a call that may throw inside of it and not catch the exception, or with -fnon-call-exceptions division or trapping memory reference <iant_work> right -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37378