[PATCH] D80987: [Instruction] Remove setProfWeight()

Hiroshi Yamauchi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 3 09:18:52 PDT 2020


yamauchi added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:4958-4959
 
   // Preserve the weight metadata for the new call instruction. The metadata
   // is used by SamplePGO to check callsite's hotness.
+  NewCall->copyMetadata(*Caller, {LLVMContext::MD_prof});
----------------
This refers to SamplePGO preserving the call count in the metadata (which originates in D31344), but it seems more general as it could also apply to calls under PGO (eg the VP metadata).


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

https://reviews.llvm.org/D80987





More information about the llvm-commits mailing list