[LLVMdev] Proposal: intp type

Kenneth Uildriks kennethuil at gmail.com
Tue Nov 10 05:59:45 PST 2009


On Tue, Nov 10, 2009 at 12:35 AM, Talin <viridia at gmail.com> wrote:
> A workaround that I have considered, but haven't had time to explore yet, is
> to actually store such integers as pointers, and then bitcast to int64 to do
> actual math operations and GEPs. While this might sound inefficient on
> 32-bit platforms, I believe that LLVM's optimizers can take notice of the
> fact that you aren't using the upper bits and therefore degrade to the less
> expensive 32-bit operations.

The trouble with that is that the alignment of pointers is not
necessarily the same as the alignment of pointer-sized integers.



More information about the llvm-dev mailing list