[PATCH] D134098: [BOLT] Add pass to fix ambiguous memory references
Maksim Panchenko via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 12 12:07:17 PDT 2022
maksfb accepted this revision.
maksfb added a comment.
This revision is now accepted and ready to land.
One nit and one comment. Otherwise, LGTM.
================
Comment at: bolt/lib/Core/BinaryEmitter.cpp:818
}
- Streamer.emitLabel(LI->second);
+ // Emit all labels registered at this address - sync with global sym table
+ if (BinaryData *BD = BC.getBinaryDataByName(LI->second->getName())) {
----------------
Could you please add a comment under which conditions we can have more than one label?
================
Comment at: bolt/lib/Passes/ValidateMemRefs.cpp:49
+ BC.MIB->setOperandToSymbolRef(Inst, OperandNum, NewSym, 1, &*BC.Ctx, 0);
+ LLVM_DEBUG(dbgs() << "Replaced reference @" << BF.getPrintName() << " from "
+ << BD->getName() << " to " << NewSym->getName()
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134098/new/
https://reviews.llvm.org/D134098
More information about the llvm-commits
mailing list