[llvm] r216436 - AArch64: use std::fill instead of memset

Dylan Noblesmith nobled at dreamwidth.org
Mon Aug 25 20:33:27 PDT 2014


Author: nobled
Date: Mon Aug 25 22:33:26 2014
New Revision: 216436

URL: http://llvm.org/viewvc/llvm-project?rev=216436&view=rev
Log:
AArch64: use std::fill instead of memset

Followup based on review.

Modified:
    llvm/trunk/lib/Target/AArch64/AArch64CollectLOH.cpp

Modified: llvm/trunk/lib/Target/AArch64/AArch64CollectLOH.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64CollectLOH.cpp?rev=216436&r1=216435&r2=216436&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64CollectLOH.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64CollectLOH.cpp Mon Aug 25 22:33:26 2014
@@ -293,7 +293,7 @@ static void initReachingDef(MachineFunct
   for (MachineBasicBlock &MBB : MF) {
     auto &BBGen = Gen[&MBB];
     BBGen = make_unique<const MachineInstr *[]>(NbReg);
-    memset(BBGen.get(), 0, sizeof(const MachineInstr *) * NbReg);
+    std::fill(BBGen.get(), BBGen.get() + NbReg, nullptr);
 
     BitVector &BBKillSet = Kill[&MBB];
     BBKillSet.resize(NbReg);





More information about the llvm-commits mailing list