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

Crossjumping of tablejumps


Hi Josef,

I was trying your patch which improves cfg cleanup and was ok'ed for
mainline.

http://gcc.gnu.org/ml/gcc-patches/2003-03/msg01469.html

I have a question regarding the code in "outgoing_edges_match",  when
comparing two basic blocks which end with table jump branches,


-----
 else if (GET_CODE (p1) == ADDR_DIFF_VEC
     && (XVECLEN (p1, 1) == XVECLEN (p2, 1))
     && rtx_equal_p (XEXP (p1, 2), XEXP (p2, 2))
     && rtx_equal_p (XEXP (p1, 3), XEXP (p2, 3)))
  {
    int i;
    identical = true;
    for (i = XVECLEN (p1, 1) - 1; i >= 0 && identical; i--)
       if (!rtx_equal_p (XVECEXP (p1, 1, i), XVECEXP (p2, 1, i)))
      identical = false;
  }
----

When falling to the above case you make sure that the jump table header
labels do not match, and there
is an explicit comment there mentioning that if the header labels are
the same then the jumptables are also the same.

Doesn't the same comment apply to all the individual jump table entry
lebels too?

The above code seems to remove duplicate jump tables only if all the
individual jump table label entries match.

Thanks a Lot.

Best Regards,
Kiran.


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