Re: Making GNU GCC choose_multiplier in expmed.c significantly faster

2018-07-19 Thread colinb2 .
On 7/19/18, Jeff Law wrote: > On 07/10/2018 05:09 AM, colinb2 . wrote: > Improvements to compile time behavior are always worth considering. The points you make below about wide_int might address this, albeit in a somewhat different way from the way I am proposing. > So a key issue with GCC is t

Re: Making GNU GCC choose_multiplier in expmed.c significantly faster

2018-07-19 Thread Jeff Law
On 07/10/2018 05:09 AM, colinb2 . wrote: > Feel free to copy this email and attachment to anyone who might be interested. > I'm very happy to answer any questions anyone has. > The program can be compiled and run like this on Linux with GNU GCC: > gcc -O2 -o expmed2.exe expmed2.c > ./expmed2.exe >

Making GNU GCC choose_multiplier in expmed.c significantly faster

2018-07-11 Thread colinb2 .
Clarification: this and my first post assume familiarity with choose_multiplier. lgup=ceiling(log2(divisor)) Currently choose_multiplier initializes mlow, mhigh at post_shift=lgup; initially 2^n<=mlow=mhigh then we need post_shift=lgup and we need to use an extra bit for the multiplier, signified

Making GNU GCC choose_multiplier in expmed.c significantly faster

2018-07-10 Thread colinb2 .
n s let M=floor(2^s/d)+1; delta=M*d-2^s. For GCC choose_multiplier: * equivalent necessary & sufficient conditions: (1) 0 #include #include #define HOST_WIDE_INT int #define HOST_BITS_PER_WIDE_INT 32 #define HOST_BITS_PER_DOUBLE_INT (2 * HOST_BITS_PER_WIDE_INT) /* Making GNU GCC choos