[PATCH] [PPC64LE] Remove unnecessary swaps from lane-insensitive vector computations

Bill Schmidt wschmidt at linux.vnet.ibm.com
Fri Apr 17 05:34:41 PDT 2015


One comment I understand, the other I really don't.  Please advise. ;)


REPOSITORY
  rL LLVM

================
Comment at: lib/Target/PowerPC/PPC.td:196
@@ +195,3 @@
+// KillVSXSwapRem - Filter class used to identify instructions that kill the
+// VSX swap removal optimization.
+class KillVSXSwapRem {
----------------
hfinkel wrote:
> It would be nice to keep this as an intrinsic instruction property. Something that means that the instruction operates on all vector lanes independently. Then special cases that are handled in the code can be handled there without involving the instruction definitions.
> 
OK, but how would that be implemented?  I don't understand what you are proposing.  At some point we have to identify either the "good" ones or the "bad" ones; how do you propose to do that without involving the instruction definitions?

================
Comment at: lib/Target/PowerPC/PPCInstrAltivec.td:381
@@ -372,2 +380,3 @@
 
+let BaseName = "LVSL", SwapFlag = 1 in
 def LVSL : XForm_1<31,   6, (outs vrrc:$vD), (ins memrr:$src),
----------------
hfinkel wrote:
> Why are you setting SwapFlag to 1 only to set it to 0? You can add the flag to the base instruction class if it just needs to be defined first.
At first I didn't understand this, but I see what you're getting at -- actually I'm setting it to zero first, and then 1 here.  Yes, that could just be 1 in the base class and removed from the instruction descriptions.  Sorry, this is left over from the several iterations of trying to get this to work...

http://reviews.llvm.org/D8565

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






More information about the llvm-commits mailing list