[PATCH] Extending Vector GetElementPtr - please review

Demikhovsky, Elena elena.demikhovsky at intel.com
Wed Jul 1 01:32:38 PDT 2015


I really need this change to optimize masked gather and scatter code. I have a mail thread in LLVM dev, where I justify this change and people agreed with me.

Please see the start of discussion: http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-March/082921.html
And the end agreement: http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-March/082989.html

> I'd have thought that it should be pretty simple for any front-end or back-end to do the splat on their own.
The front-end can do the splat, but I want to allow front-end to leave a scalar value and let the backend to splat.
When the frontend splats the scalar, it generates a broadcast instruction before GEP. While looking at the GEP in backend, I can't find this broadcast (but I need it!), it is moved up to another basic block.

> To justify such change, I'm looking for some kind of transformation / optimisation / selection that cannot be done unless the base pointer is a scalar.
Initially I added an optimization for masked gather/scatter  to this patch, but Hal asked me to remove it and submit separately.

I plan to add masked gather and scatter to the loop vectorizer. I want to use the updated form of Vector GEP there.

-  Elena


-----Original Message-----
From: Renato Golin [mailto:renato.golin at linaro.org] 
Sent: Wednesday, July 01, 2015 11:13
To: Demikhovsky, Elena; nrotem at apple.com; aschwaighofer at apple.com; mzolotukhin at apple.com; dblaikie at gmail.com; hfinkel at anl.gov
Cc: llvm-commits at cs.uiuc.edu
Subject: Re: [PATCH] Extending Vector GetElementPtr - please review

Hi Elena,

Maybe I'm missing something, but can you give an example on where this will be clearly beneficial? From what I see, you're just moving the time when you go from i8* to <N x i8*>, a bit further down the pipeline, and complicating the IR in the process. I'd have thought that it should be pretty simple for any front-end or back-end to do the splat on their own.

To justify such change, I'm looking for some kind of transformation / optimisation / selection that cannot be done unless the base pointer is a scalar.

cheers,
--renato


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D10496

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/


---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.




More information about the llvm-commits mailing list