[compiler-rt] r213467 - ARM: fix division in some cases

Joerg Sonnenberger joerg at britannica.bec.de
Sun Jul 20 11:41:08 PDT 2014


On Sun, Jul 20, 2014 at 11:31:36AM -0700, Saleem Abdulrasool wrote:
> On Sun, Jul 20, 2014 at 10:06 AM, Joerg Sonnenberger <
> joerg at britannica.bec.de> wrote:
> 
> > On Sun, Jul 20, 2014 at 04:44:21AM -0000, Saleem Abdulrasool wrote:
> > > Rather than computing the target at runtime, use a jumptable instead.
> >  This
> > > trades a bit of storage for performance.  The overhead is 32-bytes for
> > each of
> > > the three routines, but avoid the calculation of the offset.
> >
> > Have you measured that it is actually faster? There is an outstanding
> > patch for fixing the computation...
> 
> 
> Using the jump table was a much easier thing for me to do when fixing the
> computation for the Thumb mode compilation.  The real motivation here was
> to use the Thumb mode instructions in the ARMv6T2-early ARMv7 chips which
> lack the udiv/sdiv instructions but do support clz.  I should be able to
> run benchmarks on the machine that I tested with (ARMv7).

Eh, the fix for the computation is trivial and what goes on is
documented. So unless you can actually show it is faster, this should be
reverted.

Joerg



More information about the llvm-commits mailing list