[PATCH] D150816: [llvm-mca][RISCV] Fix llvm-mca RISCVInstrument memory leak

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 17 14:01:05 PDT 2023


craig.topper added inline comments.


================
Comment at: llvm/include/llvm/MCA/InstrBuilder.h:88
   createInstrDescImpl(const MCInst &MCI,
-                      const SmallVector<SharedInstrument> &IVec);
+                      const SmallVector<UniqueInstrument *> &IVec);
   Expected<const InstrDesc &>
----------------
These probably don't need to be pointers to the unique_ptr. They can be raw pointers. The consumer doesn't need to know how their ownership works.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150816/new/

https://reviews.llvm.org/D150816



More information about the llvm-commits mailing list