[PATCH] D128142: [MemProf] Memprof profile matching and annotation

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 22 14:45:45 PDT 2022


tejohnson added inline comments.


================
Comment at: clang/test/CodeGen/memprof.cpp:15
+// # Collect memory profile:
+// $ clang++ -fuse-ld=lld -Wl,-no-pie -Wl,--no-rosegment -gmlt \
+//      -fdebug-info-for-profiling -mno-omit-leaf-frame-pointer \
----------------
snehasish wrote:
> Just `-no-pie` is better (details: https://reviews.llvm.org/rG103b28902fd6)
Fixed, here and elsewhere


================
Comment at: llvm/include/llvm/ProfileData/InstrProfReader.h:333
 
+  bool hasMemoryProfile() const override {
+    return (Version & VARIANT_MASK_MEMPROF) != 0;
----------------
snehasish wrote:
> The RawInstrProfReader shouldn't have the memprof mask set. We have a separate  raw binary format which is independent. So this should always return false. Also maybe add a comment to document the fact?
Also added an assert.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128142



More information about the llvm-commits mailing list