[llvm] [SystemZ] Add proper mcount handling (PR #135767)
Ulrich Weigand via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 25 06:27:37 PDT 2025
================
@@ -558,6 +559,32 @@ void SystemZELFFrameLowering::emitPrologue(MachineFunction &MF,
// to determine the end of the prologue.
DebugLoc DL;
+ // Add mcount instrumentation if necessary.
+ if (MF.getFunction().getFnAttribute("systemz-backend").getValueAsString() ==
+ "insert-mcount") {
----------------
uweigand wrote:
I'd prefer a more specific attribute name, like "systemz-instrument-function-entry", where the value is the actual mcount function name - similar to the common attribute.
https://github.com/llvm/llvm-project/pull/135767
More information about the llvm-commits
mailing list