================ @@ -1552,6 +1553,57 @@ bool AArch64ExpandPseudo::expandMI(MachineBasicBlock &MBB, case AArch64::COALESCER_BARRIER_FPR128: MI.eraseFromParent(); return true; + case AArch64::VGSavePseudo: + case AArch64::VGRestorePseudo: { + MachineFunction &MF = *MBB.getParent(); + SMEAttrs FuncAttrs(MF.getFunction()); + bool LocallyStreaming = + FuncAttrs.hasStreamingBody() && !FuncAttrs.hasStreamingInterface(); + const AArch64FunctionInfo *AFI = MF.getInfo<AArch64FunctionInfo>(); + + if (!AFI->requiresVGSpill(MF)) + return false; + + int64_t VGFrameIdx = + LocallyStreaming ? AFI->getStreamingVGIdx() : AFI->getVGIdx(); ---------------- sdesmalen-arm wrote:
It would be nice if we could keep all this knowledge within the FrameLowering without having information that we implicitly pass (through AFI) between different passes (in this case, PEI and PseudoExpansion). PEI has a callback named `processFunctionBeforeFrameIndicesReplaced`. You could update the `VGSave/RestorePseudo` nodes to add the offset, so that the code here simply has to replace the pseudo by a CFI_INSTRUCTION. Or you could replace the pseudo in that callback itself. https://github.com/llvm/llvm-project/pull/83301 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits