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

Wojciech Matyjewicz wmatyjewicz at fastmail.fm
Mon Jun 23 12:53:16 PDT 2008


> 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?

-Wojtek



More information about the llvm-commits mailing list