[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 13:59:26 PDT 2023
craig.topper added inline comments.
================
Comment at: llvm/tools/llvm-mca/CodeRegion.cpp:167
InstrumentRegion *IR = static_cast<InstrumentRegion *>(R.get());
- AI.emplace_back(IR->getInstrument());
+ AI.emplace_back(&IR->getInstrument());
}
----------------
emplace_back seems unnecessary here. push_back should be fine.
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