[llvm] Insert symbols for prefetch targets read from basic blocks section profile. (PR #168439)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 17 10:36:50 PST 2025
================
@@ -1985,7 +1985,33 @@ void AsmPrinter::emitFunctionBody() {
// Print a label for the basic block.
emitBasicBlockStart(MBB);
DenseMap<StringRef, unsigned> MnemonicCounts;
+
+ // Helper to emit a symbol for the prefetch target associated with the given
+ // callsite index in the current MBB.
+ auto EmitPrefetchTargetSymbol = [&](unsigned CallsiteIndex) {
+ MCSymbol *PrefetchTargetSymbol = OutContext.getOrCreateSymbol(
+ Twine("__llvm_prefetch_target_") + MF->getName() + Twine("_") +
+ utostr(MBB.getBBID()->BaseID) + Twine("_") +
----------------
arsenm wrote:
Twine directly supports integer -> string, don't need the utostrs
https://github.com/llvm/llvm-project/pull/168439
More information about the llvm-commits
mailing list