hans added a comment.

Can you share the motivation for this? There's already an attribute to exclude 
functions from this instrumentation.



================
Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:524
 /// instrumented with __cyg_profile_func_* calls
-bool CodeGenFunction::ShouldInstrumentFunction() {
+bool CodeGenFunction::ShouldInstrumentFunction(llvm::Function *F) {
   if (!CGM.getCodeGenOpts().InstrumentFunctions &&
----------------
Why do we need the new F parameter? Doesn't CurFuncDecl work?


================
Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:554
+       ExcludedFunction != Sentinel; ++ExcludedFunction) {
+    if (FName.find(*ExcludedFunction) != std::string::npos)
+      return false;
----------------
This seems a rather imprecise match. What is ExcludedFunction is "foo" and we 
have a function "football", should it be excluded?

Also the description says the demangled name is used (which seemed odd) but I 
don't see any demangling taking place?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130161

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to