[LLVMdev] A. Pool Allocation under PowerPC (Mac)
Vikram S. Adve
vadve at cs.uiuc.edu
Fri May 27 15:44:26 PDT 2005
On May 27, 2005, at 4:51 PM, Ricardo wrote:
> John,
>
> Thanks for the information. That comment in the source code
> confused me and I wanted to be sure
> that the installation of all the LLVM framework in the macintosh
> for testing the pool allocation
> was not going to be done in vain.
That hacked function (Want8ByteAlignment) is effectively disabled if
you use the -poolalloc-disable-alignopt option. This will force all
poolalloc allocations to be 8-byte aligned.
I believe malloc() on MacOS actually uses 16-byte alignment but I
think that is to ensure that data used by AltiVec code is aligned
propertly. If you need 16-byte alignment for any reason, you should
be able to fix that in the function getRecommendedAlignment() in llvm-
poolalloc/lib/PoolAllocate/Heuristics.cpp.
> "Code generation is supported for 32-bit ABI only"
>
> If that is the case then, isn't the code generated for Power PC
> going to use 64 bit pointers? If
> so, I suppose that the Mac platform is not going to benefit too
> much from the Automatic Pointer
> Compression. Am I correct?
Pointer compression only compresses 64 to 32-bit pointers. I should
also warn that (based on very recent experience) this transform is
very limited at the moment and will silently break a lot of programs,
example, most codes that use function pointers.
Pool allocation, however, is much more stable and works on both 32
and 64-bit targets.
--Vikram
More information about the llvm-dev
mailing list