[llvm-commits] [llvm] r52638 - in /llvm/trunk: include/llvm/ADT/APInt.h lib/Support/APInt.cpp

Chris Lattner clattner at apple.com
Mon Jun 23 22:28:15 PDT 2008


On Jun 23, 2008, at 12:53 PM, Wojciech Matyjewicz wrote:
>> Author: wmat
>> Date: Mon Jun 23 14:39:50 2008
>> New Revision: 52638
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=52638&view=rev
>> Log:
>> First step to fix PR2088. Implement routine to compute the
>> multiplicative inverse of a given number. Modify udivrem to allow  
>> input and
>> output pairs of arguments to overlap. Patch is based on the work by  
>> Chandler
>> Carruth.
>
> The next step is to implement the solver of linear modulo equations.  
> Two
> questions.
>
> a*x = b (mod n)
>
> Do we need a general solver (arbitrary n) or only a special one that
> solves "linear equations with overflow" (n = 2^BitWidth)? The second
> version should be simpler. Also, I cannot think of any use for the  
> first
> one...
>
> Where to put it? APInt.cpp? ScalarEvolution.cpp?

I'd put it in ScalarEvolution.cpp to start with - we can move it  
somewhere common when the second client wants it.

-Chris



More information about the llvm-commits mailing list