This is the mail archive of the
mailing list for the GCC project.
Re: Question about CASE_DROPS_THROUGH
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: Steven Bosscher <stevenb at suse dot de>, <gcc at gcc dot gnu dot org>
- Date: Sun, 20 Jun 2004 22:32:29 -0700
- Subject: Re: Question about CASE_DROPS_THROUGH
- References: <Pine.LNX.email@example.com>
Roger Sayle <firstname.lastname@example.org> writes:
> I'll admit that this looks like a major improvement over what we
> have now, and is closer to the semantics of our new SWITCH_EXPR.
> The only difficulty I see is that the addr_vec is not easily
> accessible for the the jump_insn, so building an accurate CFG is
> made harder. For example, there's nothing to prevent insn 13
> above being hoisted out of a loop, or even CSE'd such that
> two switches/indirect jumps share the same jump table [both of
> which I consider to be good things]. And not just CFG building,
> redirect_edge and friends would need to locate the addr_vec.
> One way to keep the association between between the actual control
> flow instruction (jump_insn) and the addr_vec-containing instruction
> is to perhaps attach a NOTE to the jump_insn referencing the "load".
> The VAX that keeps the addr_vec and the jump_insn together doesn't
> need such a note. Or perhaps some form of RTL sharing.
Good point. The NOTE is definitely what I would try first.