[llvm] [memprof] std::move matchings (NFC) (PR #128933)

Snehasish Kumar via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 26 11:12:42 PST 2025


================
@@ -929,7 +929,8 @@ memprof::computeUndriftMap(Module &M, IndexedInstrProfReader *MemProfReader,
     longestCommonSequence<LineLocation, GlobalValue::GUID>(
         ProfileAnchors, IRAnchors, std::equal_to<GlobalValue::GUID>(),
         [&](LineLocation A, LineLocation B) { Matchings.try_emplace(A, B); });
-    bool Inserted = UndriftMaps.try_emplace(CallerGUID, Matchings).second;
+    bool Inserted =
----------------
snehasish wrote:

Since you are touching this line consider the following change -- Applying the `[[maybe_unused]]` attribute to the returned value will allow you to drop the `(void)Inserted` statement on L937.

https://github.com/llvm/llvm-project/pull/128933


More information about the llvm-commits mailing list