This is the mail archive of the
mailing list for the GCC project.
Re: [patch] sort and group case labels
- From: Joern Rennecke <joern dot rennecke at superh dot com>
- To: stevenb at suse dot de (Steven Bosscher)
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 26 May 2004 12:01:10 +0100 (BST)
- Subject: Re: [patch] sort and group case labels
> (gimplify_switch_expr): Sort case labels, and make sure the
> last label in the label vector is the default case.
That's an O(N^2) sort - that performs rather poorly when you compile
a yacc grammer or an interpreter.
We parse the case labels into an AVL tree or a splay tree, so where do
the trees loose their order? I would consider this to be a bug.