[llvm] [AsmPrinter][ELF] Support profile-guided section prefix for jump tables' (read-only) data sections (PR #122215)
Mingming Liu via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 28 13:04:01 PST 2025
================
@@ -2885,7 +2901,13 @@ void AsmPrinter::emitJumpTableImpl(const MachineJumpTableInfo &MJTI,
const TargetLoweringObjectFile &TLOF = getObjFileLowering();
const Function &F = MF->getFunction();
const std::vector<MachineJumpTableEntry> &JT = MJTI.getJumpTables();
- MCSection *JumpTableSection = TLOF.getSectionForJumpTable(F, TM);
+ MCSection *JumpTableSection = nullptr;
+ if (TM.Options.EnableStaticDataPartitioning) {
+ JumpTableSection =
+ TLOF.getSectionForJumpTable(F, TM, &JT[*JumpTableIndices.begin()]);
----------------
mingmingl-llvm wrote:
done.
https://github.com/llvm/llvm-project/pull/122215
More information about the llvm-commits
mailing list