[PATCH] D110864: [llvm-profgen] Ignore branch count against outline function

Lei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 1 12:52:13 PDT 2021


wlei added inline comments.


================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.cpp:400
+// outlined function, we won't accumulate sample count againt it.
+static bool isOutlineFunction(StringRef CalleeName) {
+  // Skip unique linkage name.
----------------
hoy wrote:
> nit: isOutlinedFunction
> 
> We should still count samples for it except for the head samples.
Yeah, this is only called by `populateBoundarySamples`, so the body samples can be collected for those outlined functions.


================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.cpp:404
+    return false;
+  return CalleeName.find(".") != StringRef::npos;
+}
----------------
hoy wrote:
> Check against specific suffix here so that we don't overlook cases we are not aware of?
So I guess you mean we can't assume here it covers all the outlined function case, right? I was thinking all the non-outlined cases are all handled by `getCanonicalFnName`.


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

https://reviews.llvm.org/D110864



More information about the llvm-commits mailing list