[PATCH] D146770: [Propeller] Match debug info filenames from profiles to distinguish internal linkage functions with the same names.

Rahman Lavaee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 23 13:20:32 PDT 2023


rahmanl added inline comments.


================
Comment at: llvm/lib/CodeGen/BasicBlockSectionsProfileReader.cpp:160-161
+      if (!R.second)
+        return invalidProfileError("Duplicate profile for function: '" +
+                                   Aliases.front() + "'.");
+      FI = R.first;
----------------
shenhan wrote:
> Do you think we shall make this more tolerant? Instead of returning a invalidProfileError, just drop the profile for this specific function?
I suggest we have a hard failure in such cases. Silently dropping such cases may lead to uncaught performance drops. However, avoiding duplicates is something that the profile processing tool can easily do.


================
Comment at: llvm/lib/CodeGen/BasicBlockSectionsProfileReader.cpp:189-190
+  }
+  if (FunctionNameToDIFilename.empty())
+    errs() << "IT IS EMPTY\n";
+  if (auto Err = ReadProfile())
----------------
shenhan wrote:
> This mean there are no function definitions in the module? Is it an error? 
> (If it is a real error, we can make it more meaningful, like "module does not contain function defintions, etc...")
Removed. It was debug printing.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146770



More information about the llvm-commits mailing list