[PATCH] D13239: [ARM] Modify codegen for memcpy intrinsic to prefer LDM/STM.

scott douglass via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 5 07:45:01 PDT 2015


scott-0 marked 2 inline comments as done.
scott-0 added a comment.

Thanks for the review; I will do those final edits and commit.


================
Comment at: lib/Target/ARM/ARMBaseInstrInfo.cpp:1259-1263
@@ +1258,7 @@
+  llvm::SmallVector<unsigned, 6> ScratchRegs(NumScratch);
+  std::transform(MI->operands_begin() + 5, MI->operands_end(),
+                 ScratchRegs.begin(),
+                 [] (const MachineOperand &Op) {
+                   return Op.getReg();
+                 });
+  std::sort(ScratchRegs.begin(), ScratchRegs.end(),
----------------
t.p.northover wrote:
> I'm not entirely convinced this is clearer than
> 
>     for(unsigned I = 5; I < MI->getNumOperands(); ++I)
>       ScratchRegs.push_back(MI->getOperand(I).getReg());
> 
> but that's just bike-shedding and probably personal biases, feel free to leave it if you disagree.
I agree; I was just a bit lambda-happy.


http://reviews.llvm.org/D13239





More information about the llvm-commits mailing list