This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Preserve pointer types in ivopts
On 03/16/2012 02:46 PM, Richard Guenther wrote:
> We do have three pointer offsetting operations at the moment,
> POINTER_PLUS_EXPR, &MEM_REF and &TARGET_MEM_REF.
> All of which expect C pointer semantics (if they can see the base
> pointer, which is why I suggested to create a TARGET_MEM_REF
> with a NULL pointer TMR_BASE and shove the base pointer to
> TMR_INDEX2 (which incidentially needs to be an integer type ...).
Oh; looks like misunderstood your suggestion about TARGET_MEM_REF. Maybe
I'll just have to bite the bullet and make a new tree code.
> Btw, how do you handle pointer differences? The frontend already
> lowers them to (intptr_t)ptr1 - (intptr_t)ptr2.
More new stuff: targetm.pointer_mode_real_precision. Also, modifications
in tree-ssa-loop-niter to use the new baseptr capability in tree-affine
and subtract just the offsets in sizetype if possible.
Bernd