[PATCH] Improving LowerSwitch behavior for contiguous ranges

Marcello Maggioni hayarms at gmail.com
Wed Jun 11 12:34:34 PDT 2014


Joerg,

I addressed your suggestion in this patch.
It was quite easy to add and can be useful in general, so thanks!

I also added a test that tests this kind of optimization being applied.

Marcello


2014-06-11 18:37 GMT+01:00 Joerg Sonnenberger <joerg at britannica.bec.de>:

> On Wed, Jun 11, 2014 at 05:28:05PM +0100, Marcello Maggioni wrote:
> > Yeah, it is suboptimal, it doesn't take into consideration the fact that
> > the default is unreachable.
> >
> > I'll a look at it later to see if it is easy to also take into
> > consideration this case and add it to the patch + test for the condition.
>
> Thanks. Please don't take this as hold up for pushing the original
> patch, it can just as well be a follow-up commit.
>
> Joerg
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140611/b153ccb1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: optimized_lower_switch_v4.patch
Type: application/octet-stream
Size: 16394 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140611/b153ccb1/attachment.obj>


More information about the llvm-commits mailing list