[PATCH] [AArch64] Improve and enable the SeparateConstOffsetFromGEP for AArch64 backend.

Hao Liu Hao.Liu at arm.com
Fri Oct 24 01:25:14 PDT 2014


Hi Hal,

A new patch has been attached according to your comments. 
BTW. For the inbounds issue, the CGP just ignores it when creating new GEP/MUL/ADD, so I think maybe it is a minor problem in CGP. 

>>! In D5864#17, @hfinkel wrote:
> This generally looks good to me. It would be good to have someone expert in this pass to also look it over.
> 
>> the performance test has not finished yet. But the assembly code looks similar to the old patch for cortex-a57. If the result is better than the old patch, I'll remove the logic about transformation to ptrtoint/inttoptr. 
> 
> I am curious how this turns out; please let us know.
I think this is because ptrtoint/inttoptr is similar to GEP. According to http://llvm.org/docs/GetElementPtr.html#how-is-gep-different-from-ptrtoint-arithmetic-and-inttoptr, the most difference is that GEP carries additional pointer aliasing rules. Also as the AA used in CodeGen doesn't change to much thing, so the assembly code is similar. It's just my guess. Two version still has much difference in instruction order.

Thanks,
-Hao

http://reviews.llvm.org/D5864






More information about the llvm-commits mailing list