[llvm-commits] [llvm] r164173 - in /llvm/trunk: include/llvm/Transforms/Utils/IntegerDivision.h lib/Transforms/Utils/CMakeLists.txt lib/Transforms/Utils/IntegerDivision.cpp

Evan Cheng evan.cheng at apple.com
Tue Sep 18 17:42:27 PDT 2012


On Sep 18, 2012, at 3:35 PM, Eli Friedman <eli.friedman at gmail.com> wrote:

> On Tue, Sep 18, 2012 at 3:02 PM, Michael Ilseman <milseman at apple.com> wrote:
>> Author: milseman
>> Date: Tue Sep 18 17:02:40 2012
>> New Revision: 164173
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=164173&view=rev
>> Log:
>> New utility for expanding integer division for targets that don't support it.
>> 
>> Implementation derived from compiler-rt's implementation of signed and unsigned integer division.
> 
> This commit needs more explanation, given that you haven't added any
> uses of expandDivision; how do you expect this to be used?

Unfortunately we can't provide a usage case at this point. It's used by an out-of-tree project. But this is generic expansion code that other projects can benefit so we want it in llvm trunk.

> 
> Why is this specialized for 32-bit division?

No reason other than that's needed now.

> 
> There are a lot of missed optimization opportunities here, e.g.
> dividing by a constant; have you considered anything in this area?

Instcombine etc. should have optimized a lot of cases. This is intended to expand the cases that survived optimization.

Evan

> 
> -Eli
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list