This is the mail archive of the gcc@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]

Re: Question about CASE_DROPS_THROUGH


Roger Sayle <roger@eyesopen.com> 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.

zw


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