[llvm] [Xtensa] Lowering FRAMEADDR/RETURNADDR operations. (PR #107363)
Andrei Safronov via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 13 10:10:27 PDT 2024
================
@@ -722,6 +743,28 @@ SDValue XtensaTargetLowering::LowerSTACKRESTORE(SDValue Op,
Op.getOperand(1));
}
+SDValue XtensaTargetLowering::LowerFRAMEADDR(SDValue Op,
+ SelectionDAG &DAG) const {
+ // This nodes represent llvm.frameaddress on the DAG.
+ // It takes one operand, the index of the frame address to return.
+ // An index of zero corresponds to the current function's frame address.
+ // An index of one to the parent's frame address, and so on.
+ // Depths > 0 not supported yet!
+ if (Op.getConstantOperandVal(0) > 0)
+ return SDValue();
+
+ MachineFunction &MF = DAG.getMachineFunction();
+ MachineFrameInfo &MFI = DAG.getMachineFunction().getFrameInfo();
----------------
andreisfr wrote:
Fixed
https://github.com/llvm/llvm-project/pull/107363
More information about the llvm-commits
mailing list