[PATCH] D159285: [BOLT][RISCV] Prevent adding secondary entry points for BB labels

Maksim Panchenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 11 14:48:22 PDT 2023


maksfb accepted this revision.
maksfb added inline comments.
This revision is now accepted and ready to land.


================
Comment at: bolt/lib/Rewrite/RewriteInstance.cpp:1592-1593
+      // symbol. We don't want to add such symbols as entry points.
+      if (cantFail(Symbol.getName())
+              .starts_with(BC->AsmInfo->getPrivateLabelPrefix())) {
+        ++NextSymRefI;
----------------
It makes sense to run this check for other platforms as well, like it's written. In that case, remove "[RISCV]" from the title. Just to be safe, add a check that the prefix is not empty.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D159285



More information about the llvm-commits mailing list