[PATCH] [Thumb] Make the load/store optimizer less conservative

Renato Golin renato.golin at linaro.org
Wed Sep 24 05:19:02 PDT 2014


Hi Moritz,

Thanks for running this over again. Apart from the nit pick (that was already there, so not a big deal), looks good.

cheers,
--renato

================
Comment at: lib/Target/ARM/ARMLoadStoreOptimizer.cpp:178
@@ +177,3 @@
+    : ARM_AM::getAM5Offset(OffField) * 4;
+  if (isAM3) {
+    if (ARM_AM::getAM3Op(OffField) == ARM_AM::sub)
----------------
nit pick, but getAM{3,5}Op() could be merged into a variable like the one above (or maybe conditionalise on isAM3 for both above) and just have OP == sub down below.

http://reviews.llvm.org/D5439






More information about the llvm-commits mailing list