[llvm] [AMDGPU] Localize resource info symbols (PR #185732)
Janek van Oirschot via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 9 04:59:58 PDT 2026
================
@@ -25,10 +25,9 @@
using namespace llvm;
MCSymbol *MCResourceInfo::getSymbol(StringRef FuncName, ResourceInfoKind RIK,
- MCContext &OutContext, bool IsLocal) {
- auto GOCS = [FuncName, &OutContext, IsLocal](StringRef Suffix) {
- StringRef Prefix =
- IsLocal ? OutContext.getAsmInfo()->getInternalSymbolPrefix() : "";
+ MCContext &OutContext) {
+ auto GOCS = [FuncName, &OutContext](StringRef Suffix) {
+ StringRef Prefix = OutContext.getAsmInfo()->getInternalSymbolPrefix();
----------------
JanekvO wrote:
The only one I found that fits the bill is `createBlockSymbol` which does prefix with `.L` and uses `getOrCreateSymbol` (given `AlwaysEmit = true`). However, it is meant for basic block names so it really doesn't seem suitable for this purpose.
The other potential MCContext functions I've looked at seem to suffix the symbol with a unique so they can't be re-created again with just the symbol name.
https://github.com/llvm/llvm-project/pull/185732
More information about the llvm-commits
mailing list