[llvm-commits] [llvm] r58623 - in /llvm/trunk: include/llvm/CodeGen/ValueTypes.h lib/VMCore/ValueTypes.cpp test/CodeGen/X86/i2k.ll utils/TableGen/CMakeLists.txt utils/TableGen/TGValueTypes.cpp

Chris Lattner clattner at apple.com
Tue Nov 4 02:58:23 PST 2008


On Nov 4, 2008, at 1:38 AM, Duncan Sands wrote:
> Hi Dan,
>> Change how extended types are represented in MVTs. Instead of  
>> fiddling
>> bits, use a union of a SimpleValueType enum and a regular Type*.
>
> this is a wonderful improvement!

I agree!

>> there are no libcalls defined for very large integers so operations
>> like multiply and divide aren't supported.
>
> Here's a crazy idea.  I hear that people are working on "libllvm",
> a reimplementation of libgcc.  Maybe instead the code generator
> could be taught to generate library functions on the fly.  For
> example, suppose a call to __udivsi3 is needed.  Then the code
> generator creates the function __udivsi3 in the assembler, with
> weak linkage.  Thanks to weak linkage there will be only one
> copy no matter how many object files it turns up in, and there
> is no need to link with libllvm.  Now imagine that you need a
> similar library function to __udivsi3, but for i1024.  Then you
> can have the code generators squirt out __udivsiXYZ!

I think it would be better to make an arbitrary precision version of  
udiv that takes a pointer to the integer in memory, and the size in  
bits as an argument.

-Chris



More information about the llvm-commits mailing list