[LLVMdev] constant pool in large functions

Lauro Ramos Venancio lauro.venancio at gmail.com
Fri Jan 5 09:15:40 PST 2007


I'm facing a problem with constant pool in large functions.

The LLVM prints constant pool at the beginning of functions.

In large functions loads can be far from constant pool. GCC resolves this
situations by spreading constants throughtout functions. A C test and the
code generated by LLVM and GCC are attached.

As you can see in the following error the ldr is too far from constant:

$ arm-linux-gnueabi-as teste-llvm.s
teste-llvm.s: Assembler messages:  teste-llvm.s:1039:
Error: bad immediate value for offset (4120)

Any ideas?


Lauro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20070105/ab5fee94/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: teste.c
Type: text/x-csrc
Size: 20551 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20070105/ab5fee94/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: teste-llvm.s
Type: application/octet-stream
Size: 20844 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20070105/ab5fee94/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: teste-gcc.s
Type: application/octet-stream
Size: 21011 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20070105/ab5fee94/attachment-0001.obj>


More information about the llvm-dev mailing list