[PATCH] Improving LowerSwitch behavior for contiguous ranges

Marcello Maggioni hayarms at gmail.com
Wed Jun 11 16:22:14 PDT 2014


I'm updating the patch to also remove the default basic block if it ends up
being dead after switch lowering (no predecessors)

Marcello

2014-06-11 20:34 GMT+01:00 Marcello Maggioni <hayarms at gmail.com>:

> 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/20140612/a80158df/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: optimized_lower_switch_v5.patch
Type: application/octet-stream
Size: 17177 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140612/a80158df/attachment.obj>


More information about the llvm-commits mailing list