[PATCH] D18890: [AArch64] add SSA Load Store optimization pass

James Molloy via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 25 05:45:13 PDT 2016


jmolloy requested changes to this revision.
jmolloy added a comment.
This revision now requires changes to proceed.

Hi,

I'm confused about why you're doing this optimization here instead of much earlier in the compiler. This is basically memcpy idiom recognition - taking multiple 32-bit loads/stores and converting them into a llvm.memcpy intrinsic for perfect lowering should do the same job, and would work for all backends.

Have you investigated doing this much earlier (IR, pre-ISel?)

James


================
Comment at: lib/Target/AArch64/AArch64SSALoadStoreOptimizer.cpp:1
@@ +1,2 @@
+//===--- AArch64SSALoadStoreOptimizer.cpp --- AArch64 load/store opt. pass in
+// SSA form ---===//
----------------
This comment is mangled and has gone onto a new line. Please truncate it like all other header comments.

================
Comment at: lib/Target/AArch64/AArch64SSALoadStoreOptimizer.cpp:32
@@ +31,3 @@
+
+#define MAX_UNSCALED_OFFSET 255
+#define MIN_UNSCALED_OFFSET -256
----------------
We use integer constants, not #defines.


http://reviews.llvm.org/D18890





More information about the llvm-commits mailing list