[llvm] [BOLT] Add support for safe-icf (PR #116275)
Maksim Panchenko via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 4 19:09:32 PST 2024
================
@@ -1945,6 +2017,28 @@ static void printDebugInfo(raw_ostream &OS, const MCInst &Instruction,
OS << " discriminator:" << Row.Discriminator;
}
+/// Skip instructions that are not interesting for safe ICF.
+static bool skipInstruction(const MCInst &Inst, const BinaryContext &BC) {
----------------
maksfb wrote:
I suggest we add a general `HasAddressTaken` flag to a `BinaryFunction`. It can be populated directly from `scanExternalRefs()` regardless of ICF.
https://github.com/llvm/llvm-project/pull/116275
More information about the llvm-commits
mailing list