[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc
Subject:    Re: Clustering switch cases
From:       "Paulo J. Matos" <pocmatos () gmail ! com>
Date:       2010-08-28 8:22:58
Message-ID: AANLkTim=OiepFQ+-vqw1kJ_7zr+s9Sau1fBhoazABEWy () mail ! gmail ! com
[Download RAW message or body]

On Fri, Aug 27, 2010 at 4:03 PM, Richard Guenther
<richard.guenther@gmail.com> wrote:
>
> In fact we might want to move switch optimization up to the tree level
> (just because it's way easier to deal with there).   Thus, lower switch
> to a mixture of binary tree & jump-tables (possibly using perfect
> hashing).
>

Doing the optimisation at the tree-level was exactly my initial idea.
By splitting the switches at the tree-level, before expand_case, would
then allow for expand_case to transform it either to a jump table or
binary tree depending on the situation.

I will be looking at the patch Rahul posted and will try to see if I
can improve on it.

-- 
PMatos

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic