[llvm-commits] Please review the patch for IntegersSubsetMapping

Stepan Dyatkovskiy stpworld at narod.ru
Tue Jul 10 09:10:37 PDT 2012


Hi all.
I also fixed code-style issues. Fixed patch is attached.
-Stepan.

Stepan Dyatkovskiy wrote:
> Stepan Dyatkovskiy wrote:
>> SimplifyCFG pass will optimize two these folded switches to the single one:
>>
>> switch (c) {
>>      case '0'..'1': // BITS_SPECIFIC_SUBSET
>>        tryProcessBit(c);
>>        break;
>>      case '2'..'9': // DECS_SPECIFIC_SUBSET
>>        tryProcessDecs(c);
>>        break;
>>      case 'A'..'F': // HEXS_SPECIFIC_SUBSET
>>        tryProcessHexs(c);
>>        break;
>>      default:
>>        processSomethingElse();
>> }
>
> Forgot about '\\' character. Fixed simplified switch is below:
>
> switch (c) {
>      case '0'..'1': // BITS_SPECIFIC_SUBSET
>        tryProcessBit(c);
>        break;
>      case '2'..'9': // DECS_SPECIFIC_SUBSET
>        tryProcessDecs(c);
>        break;
>      case 'A'..'F': // HEXS_SPECIFIC_SUBSET
>        tryProcessHexs(c);
>        break;
>      case '\\":
>        processEscape();
>        break;
>      default:
>        processSomethingElse();
> }
>
> -Stepan.
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: cr-stage-5-diff.patch
Type: text/x-patch
Size: 4489 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120710/0c2aea52/attachment.bin>


More information about the llvm-commits mailing list