[clang] [llvm] [PowerPC] Support -fpatchable-function-entry (PR #92997)
Nick Desaulniers via cfe-commits
cfe-commits at lists.llvm.org
Wed May 22 10:03:58 PDT 2024
================
@@ -909,6 +909,24 @@ void PPCAsmPrinter::emitInstruction(const MachineInstr *MI) {
// Lower multi-instruction pseudo operations.
switch (MI->getOpcode()) {
default: break;
+ case TargetOpcode::PATCHABLE_FUNCTION_ENTER: {
+ assert(!Subtarget->isAIXABI() &&
+ "AIX does not support patchable function entry!");
+ // PATCHABLE_FUNCTION_ENTER on little endian is for XRAY support which is
+ // handled in PPCLinuxAsmPrinter.
+ if (MAI->isLittleEndian())
+ return;
+ const Function &F = MI->getParent()->getParent()->getFunction();
----------------
nickdesaulniers wrote:
```suggestion
const Function &F = MF->getFunction();
```
https://github.com/llvm/llvm-project/pull/92997
More information about the cfe-commits
mailing list