[llvm] [AMDGPU] Add .entry_point back into PAL metadata (PR #124925)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 29 06:47:39 PST 2025


================
@@ -232,8 +254,16 @@ void AMDGPUPALMetadata::setEntryPoint(unsigned CC, StringRef Name) {
   if (isLegacy())
     return;
   // Msgpack format.
+  // Entry point is updated to .entry_point_symbol and is set to the function
+  // name
   getHwStage(CC)[".entry_point_symbol"] =
       MsgPackDoc.getNode(Name, /*Copy=*/true);
+
+  // Set .entry_point which is defined
+  // to be _amdgpu_<stage> and _amdgpu_cs for non-shader functions
+  std::string EPName("_amdgpu_");
+  EPName += std::string(getStageName(CC) + 1);
----------------
arsenm wrote:

SmallString? also use the ostream to build the string 

https://github.com/llvm/llvm-project/pull/124925


More information about the llvm-commits mailing list