[PATCH] ARMLoadStoreOpt: Merge subs/adds into LDRD/STRD; Factor out common code

Renato Golin renato.golin at linaro.org
Thu Jul 2 03:53:08 PDT 2015


Hi Matthias,

Nice work, thanks! Apart from a few nitpicks, this looks good to me.

cheers,
--renato


REPOSITORY
  rL LLVM

================
Comment at: lib/Target/ARM/ARMLoadStoreOptimizer.cpp:1123
@@ +1122,3 @@
+static MachineBasicBlock::iterator
+findIncDecAfter(MachineBasicBlock::iterator MBBI, unsigned Reg,
+                ARMCC::CondCodes Pred, unsigned PredReg, int &Offset) {
----------------
Isn't there a way to merge these two functions in one?

================
Comment at: lib/Target/ARM/ARMLoadStoreOptimizer.cpp:1772
@@ -1759,1 +1771,3 @@
   Candidates.clear();
+  for (MachineInstr *MI : MergeBaseCandidates)
+    MergeBaseUpdateLSDouble(*MI);
----------------
What if the patterns you're merging up on line 1756 are also in this list? Shouldn't MergeBaseUpdateLSDouble() remove the match from the list and then you won't need to do this? Or is this what the test on "Imm != 0 -> return" on line 1365 is doing?

http://reviews.llvm.org/D10676

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






More information about the llvm-commits mailing list