[PATCH] [AArch64][ARM] Match interleaved memory accesses into ldN/stN/vldN/vstN intrinsics.
Hao Liu
Hao.Liu at arm.com
Tue Jun 23 00:09:45 PDT 2015
Updated a patch according to Renato's comments.
Review please.
Thanks,
-Hao
================
Comment at: lib/CodeGen/InterleavedAccessPass.cpp:113
@@ +112,3 @@
+ for (; i < Mask.size(); i++)
+ if (Mask[i] >= 0 && static_cast<unsigned>(Mask[i]) != Index + i * Factor)
+ break;
----------------
rengolin wrote:
> If the mask index can't be negative, why use ArrayRef<int>?
It could be negative. When a mask is undef, it is -1.
Here we only compare non-negative masks and ignore undef masks.
================
Comment at: lib/CodeGen/InterleavedAccessPass.cpp:134
@@ +133,3 @@
+ // Check potential Factors.
+ for (Factor = MIN_FACTOR; Factor <= MAX_FACTOR; Factor++)
+ if (isDeInterleaveMaskOfFactor(Mask, Factor, Index))
----------------
rengolin wrote:
> Checking for all factors "up to" in isDeInterleaveMaskOfFactor() is redundant with this line.
>
> Though, I see that you're using it in other functions that may need that functionality.
>
> Not sure how to split this, but it looks inefficient...
I merged isDeInterleaveMask() and isDeInterleaveMaskOfFactor() into one function isDeInterleaveMask().
================
Comment at: lib/CodeGen/InterleavedAccessPass.cpp:222
@@ +221,3 @@
+
+ DEBUG(dbgs() << "CGP: Found an interleaved load: " << *LI << "\n");
+
----------------
rengolin wrote:
> CGP?
Fixed.
http://reviews.llvm.org/D10533
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list