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

Re: CASESI: GCC is optimising away my cases



  In message <199912141720.RAA11121@rocoto>you write:
  > 
  > I've created a `casesi' pattern which outputs code for jumping via the
  > table.  This produces the expected code. However, when I run the compiler
  > with any optimisation enabled, it removes the blocks of code referred to
  > in the dispatch table.
  > 
  > What it looks like is happening is that the jump optimisation cannot find a
  > jump which refers to the routines (as they are done indirectly via the
  > dispatch table),
This is your problem.  You need to show at the RTL level that each label
is used.

Your casesi pattern should be followed by an ADDR_VEC or ADDR_DIFF_VEC insn
which should contain a reference to each target label.  Why is that not
happening?

jeff


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