Seems like a good idea. The llvm_unreachable should probably be in a default 
case, though, to pacify -Wswitch-whatever. Radices are not enums. :-)

Jordan


On Sep 25, 2012, at 11:28 , Dmitri Gribenko <[email protected]> wrote:

> Hello,
> 
> NumericLiteralParser::GetIntegerValue() does a conservative estimate
> on the size of numbers that can fit into uint64_t.  This bound can be
> improved.  See the attached patch.
> 
> I see a 0.240s -> 0.160s reduction on -fsyntax-only time in a Release
> clang build on a source file generated by the following python script:
> 
> for i in xrange(0, 2000):
>    print "void func{0}() {{".format(i)
>    for j in xrange(0, 100):
>      print "123456789012345678;"
>    print "}"
> 
> Please review.  I know that this patch sort-of falls into the
> "obvious" bucket, but I wanted to make sure that this patch is
> appropriate.
> 
> Dmitri
> 
> -- 
> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <[email protected]>*/
> <optimize-NumericLiteralParser-GetIntegerValue-v1.patch>_______________________________________________
> cfe-commits mailing list
> [email protected]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to