Lines Matching refs:AFI

299   AArch64FunctionInfo *AFI = MF.getInfo<AArch64FunctionInfo>();  in getArgumentStackToRestore()  local
317 ArgumentPopSize = AFI->getArgumentStackToRestore(); in getArgumentStackToRestore()
355 auto *AFI = MF.getInfo<AArch64FunctionInfo>(); in homogeneousPrologEpilog() local
356 if (AFI->hasSwiftAsyncContext() || AFI->hasStreamingModeChanges()) in homogeneousPrologEpilog()
426 const AArch64FunctionInfo *AFI, bool IsWin64, in getFixedObjectSize() argument
429 return AFI->getTailCallReservedStack(); in getFixedObjectSize()
431 if (AFI->getTailCallReservedStack() != 0 && in getFixedObjectSize()
436 const unsigned VarArgsArea = AFI->getVarArgsGPRSize(); in getFixedObjectSize()
439 return AFI->getTailCallReservedStack() + in getFixedObjectSize()
446 const AArch64FunctionInfo *AFI = MF.getInfo<AArch64FunctionInfo>(); in getSVEStackSize() local
447 return StackOffset::getScalable((int64_t)AFI->getStackSizeSVE()); in getSVEStackSize()
463 const AArch64FunctionInfo *AFI = MF.getInfo<AArch64FunctionInfo>(); in canUseRedZone() local
464 uint64_t NumBytes = AFI->getLocalStackSize(); in canUseRedZone()
593 AArch64FunctionInfo *AFI = MF.getInfo<AArch64FunctionInfo>(); in emitCalleeSavedGPRLocations() local
619 if ((LocallyStreaming && FrameIdx == AFI->getStreamingVGIdx()) || in emitCalleeSavedGPRLocations()
646 AArch64FunctionInfo &AFI = *MF.getInfo<AArch64FunctionInfo>(); in emitCalleeSavedSVELocations() local
661 StackOffset::getFixed(AFI.getCalleeSavedStackSize(MFI)); in emitCalleeSavedSVELocations()
787 AArch64FunctionInfo &AFI = *MF.getInfo<AArch64FunctionInfo>(); in allocateStackSpace() local
808 AFI.setStackRealigned(true); in allocateStackSpace()
851 int64_t ProbeSize = AFI.getStackProbeSize(); in allocateStackSpace()
867 AFI.setStackRealigned(true); in allocateStackSpace()
911 AFI.setStackRealigned(true); in allocateStackSpace()
1097 const AArch64FunctionInfo *AFI = MF->getInfo<AArch64FunctionInfo>(); in canUseAsPrologue() local
1099 if (AFI->hasSwiftAsyncContext()) { in canUseAsPrologue()
1144 AArch64FunctionInfo *AFI = MF.getInfo<AArch64FunctionInfo>(); in shouldCombineCSRLocalStackBump() local
1151 if (AFI->getLocalStackSize() == 0) in shouldCombineCSRLocalStackBump()
1162 if (needsWinCFI(MF) && AFI->getCalleeSavedStackSize() > 0 && in shouldCombineCSRLocalStackBump()
1392 AArch64FunctionInfo *AFI = MF.getInfo<AArch64FunctionInfo>(); in requiresGetVGCall() local
1393 return AFI->hasStreamingModeChanges() && in requiresGetVGCall()
1398 AArch64FunctionInfo *AFI = MF.getInfo<AArch64FunctionInfo>(); in requiresSaveVG() local
1401 if (!AFI->hasStreamingModeChanges()) in requiresSaveVG()
1696 AArch64FunctionInfo *AFI = MF.getInfo<AArch64FunctionInfo>(); in emitDefineCFAWithFP() local
1699 AFI->getCalleeSaveBaseToFrameRecordOffset() - in emitDefineCFAWithFP()
1700 AFI->getCalleeSavedStackSize(); in emitDefineCFAWithFP()
1733 AArch64FunctionInfo *AFI = MF.getInfo<AArch64FunctionInfo>(); in emitPrologue() local
1734 bool EmitCFI = AFI->needsDwarfUnwindInfo(MF); in emitPrologue()
1735 bool EmitAsyncCFI = AFI->needsAsyncDwarfUnwindInfo(MF); in emitPrologue()
1786 AFI->setHasRedZone(false); in emitPrologue()
1813 if (HasFP && AFI->hasSwiftAsyncContext()) { in emitPrologue()
1865 std::optional<int> TBPI = AFI->getTaggedBasePointerIndex(); in emitPrologue()
1867 AFI->setTaggedBasePointerOffset(-MFI.getObjectOffset(*TBPI)); in emitPrologue()
1869 AFI->setTaggedBasePointerOffset(MFI.getStackSize()); in emitPrologue()
1881 if (!AFI->hasStackFrame() && !windowsRequiresStackProbe(MF, NumBytes)) { in emitPrologue()
1886 AFI->setLocalStackSize(NumBytes); in emitPrologue()
1892 AFI->setHasRedZone(true); in emitPrologue()
1920 unsigned FixedObject = getFixedObjectSize(MF, AFI, IsWin64, IsFunclet); in emitPrologue()
1922 auto PrologueSaveSize = AFI->getCalleeSavedStackSize() + FixedObject; in emitPrologue()
1924 AFI->setLocalStackSize(NumBytes - PrologueSaveSize); in emitPrologue()
1953 fixupCalleeSaveRestoreStackOffset(*MBBI, AFI->getLocalStackSize(), in emitPrologue()
1961 int64_t FPOffset = AFI->getCalleeSaveBaseToFrameRecordOffset(); in emitPrologue()
1964 FPOffset += AFI->getLocalStackSize(); in emitPrologue()
1966 if (AFI->hasSwiftAsyncContext()) { in emitPrologue()
2146 AFI->setStackRealigned(true); in emitPrologue()
2159 if (int64_t CalleeSavedSize = AFI->getSVECalleeSavedStackSize()) { in emitPrologue()
2269 AArch64FunctionInfo *AFI = MF.getInfo<AArch64FunctionInfo>(); in emitEpilogue() local
2274 bool EmitCFI = AFI->needsAsyncDwarfUnwindInfo(MF); in emitEpilogue()
2286 if (AFI->shouldSignReturnAddress(MF)) { in emitEpilogue()
2293 if (AFI->needsShadowCallStackPrologueEpilogue(MF)) in emitEpilogue()
2324 unsigned FixedObject = getFixedObjectSize(MF, AFI, IsWin64, IsFunclet); in emitEpilogue()
2327 auto PrologueSaveSize = AFI->getCalleeSavedStackSize() + FixedObject; in emitEpilogue()
2333 AFI->setLocalStackSize(NumBytes - PrologueSaveSize); in emitEpilogue()
2345 StackOffset::getFixed(AFI->getLocalStackSize()), TII, in emitEpilogue()
2394 fixupCalleeSaveRestoreStackOffset(*LastPopI, AFI->getLocalStackSize(), in emitEpilogue()
2411 if (hasFP(MF) && AFI->hasSwiftAsyncContext()) { in emitEpilogue()
2471 if (int64_t CalleeSavedSize = AFI->getSVECalleeSavedStackSize()) { in emitEpilogue()
2491 if (AFI->isStackRealigned() || MFI.hasVarSizedObjects()) { in emitEpilogue()
2492 if (int64_t CalleeSavedSize = AFI->getSVECalleeSavedStackSize()) { in emitEpilogue()
2501 if (AFI->getSVECalleeSavedStackSize()) { in emitEpilogue()
2563 if (!IsFunclet && (MFI.hasVarSizedObjects() || AFI->isStackRealigned())) { in emitEpilogue()
2566 StackOffset::getFixed(-AFI->getCalleeSaveBaseToFrameRecordOffset()), in emitEpilogue()
2644 const auto *AFI = MF.getInfo<AArch64FunctionInfo>(); in getFrameIndexReferenceFromSP() local
2646 return StackOffset::get(-((int64_t)AFI->getCalleeSavedStackSize()), in getFrameIndexReferenceFromSP()
2652 !IsFixed && ObjectOffset >= -((int)AFI->getCalleeSavedStackSize(MFI)); in getFrameIndexReferenceFromSP()
2669 const auto *AFI = MF.getInfo<AArch64FunctionInfo>(); in getFPOffset() local
2674 getFixedObjectSize(MF, AFI, IsWin64, /*IsFunclet=*/false); in getFPOffset()
2675 int64_t CalleeSaveSize = AFI->getCalleeSavedStackSize(MF.getFrameInfo()); in getFPOffset()
2677 CalleeSaveSize - AFI->getCalleeSaveBaseToFrameRecordOffset(); in getFPOffset()
2715 const auto *AFI = MF.getInfo<AArch64FunctionInfo>(); in resolveFrameOffsetReference() local
2721 !isFixed && ObjectOffset >= -((int)AFI->getCalleeSavedStackSize(MFI)); in resolveFrameOffsetReference()
2730 if (AFI->hasStackFrame() && !isSVE) { in resolveFrameOffsetReference()
2797 StackOffset::get(-AFI->getCalleeSaveBaseToFrameRecordOffset(), ObjectOffset); in resolveFrameOffsetReference()
2800 StackOffset::get(MFI.getStackSize() - AFI->getCalleeSavedStackSize(), in resolveFrameOffsetReference()
2837 Offset -= AFI->getLocalStackSize(); in resolveFrameOffsetReference()
2953 AArch64FunctionInfo *AFI = MF.getInfo<AArch64FunctionInfo>(); in computeCalleeSaveRegisterPairs() local
2964 int ByteOffset = AFI->getCalleeSavedStackSize(); in computeCalleeSaveRegisterPairs()
2977 int ScalableByteOffset = AFI->getSVECalleeSavedStackSize(); in computeCalleeSaveRegisterPairs()
2978 bool NeedGapToAlignStack = AFI->hasCalleeSaveStackFreeSpace(); in computeCalleeSaveRegisterPairs()
3002 if (AFI->hasStackHazardSlotIndex() && in computeCalleeSaveRegisterPairs()
3009 if (unsigned(i + RegInc) < Count && !AFI->hasStackHazardSlotIndex()) { in computeCalleeSaveRegisterPairs()
3033 if (AFI->getPredicateRegForFillSpill() != 0) in computeCalleeSaveRegisterPairs()
3087 if (NeedsFrameRecord && AFI->hasSwiftAsyncContext() && in computeCalleeSaveRegisterPairs()
3114 if (NeedsFrameRecord && AFI->hasSwiftAsyncContext() && in computeCalleeSaveRegisterPairs()
3130 AFI->setCalleeSaveBaseToFrameRecordOffset(Offset); in computeCalleeSaveRegisterPairs()
3142 if (AFI->hasCalleeSaveStackFreeSpace()) in computeCalleeSaveRegisterPairs()
3155 AArch64FunctionInfo *AFI = MF.getInfo<AArch64FunctionInfo>(); in spillCalleeSavedRegisters() local
3242 AFI->getStreamingVGIdx() == std::numeric_limits<int>::max()) { in spillCalleeSavedRegisters()
3254 AFI->setStreamingVGIdx(RPI.FrameIdx); in spillCalleeSavedRegisters()
3260 AFI->setVGIdx(RPI.FrameIdx); in spillCalleeSavedRegisters()
3287 AFI->setVGIdx(RPI.FrameIdx); in spillCalleeSavedRegisters()
3312 AArch64FunctionInfo *AFI = MF.getInfo<AArch64FunctionInfo>(); in spillCalleeSavedRegisters() local
3313 unsigned PnReg = AFI->getPredicateRegForFillSpill(); in spillCalleeSavedRegisters()
3487 AArch64FunctionInfo *AFI = MF.getInfo<AArch64FunctionInfo>(); in restoreCalleeSavedRegisters() local
3491 unsigned PnReg = AFI->getPredicateRegForFillSpill(); in restoreCalleeSavedRegisters()
3634 AArch64FunctionInfo *AFI = MF.getInfo<AArch64FunctionInfo>(); in determineCalleeSaves() local
3742 if (AFI->hasStackHazardSlotIndex()) in determineCalleeSaves()
3786 AFI->setHasStackFrame(true); in determineCalleeSaves()
3835 if (hasFP(MF) && AFI->hasSwiftAsyncContext()) in determineCalleeSaves()
3843 AFI->getCalleeSavedStackSize() == AlignedCSStackSize) && in determineCalleeSaves()
3848 AFI->setCalleeSavedStackSize(AlignedCSStackSize); in determineCalleeSaves()
3849 AFI->setCalleeSaveStackHasFreeSpace(AlignedCSStackSize != CSStackSize); in determineCalleeSaves()
3850 AFI->setSVECalleeSavedStackSize(alignTo(SVECSStackSize, 16)); in determineCalleeSaves()
3872 auto *AFI = MF.getInfo<AArch64FunctionInfo>(); in assignCalleeSavedSpillSlots() local
3875 if (UsesWinAAPCS && hasFP(MF) && AFI->hasSwiftAsyncContext()) { in assignCalleeSavedSpillSlots()
3877 AFI->setSwiftAsyncContextFrameIdx(FrameIdx); in assignCalleeSavedSpillSlots()
3918 if (AFI->hasStackHazardSlotIndex() && in assignCalleeSavedSpillSlots()
3926 AFI->setStackHazardCSRSlotIndex(HazardSlotIndex); in assignCalleeSavedSpillSlots()
3944 if (hasFP(MF) && AFI->hasSwiftAsyncContext() && !UsesWinAAPCS && in assignCalleeSavedSpillSlots()
3947 AFI->setSwiftAsyncContextFrameIdx(FrameIdx); in assignCalleeSavedSpillSlots()
3957 if (AFI->hasStackHazardSlotIndex() && in assignCalleeSavedSpillSlots()
3962 AFI->setStackHazardCSRSlotIndex(HazardSlotIndex); in assignCalleeSavedSpillSlots()
3974 const AArch64FunctionInfo *AFI = MF.getInfo<AArch64FunctionInfo>(); in enableStackSlotScavenging() local
3979 if (AFI->hasStreamingModeChanges() && !hasFP(MF)) in enableStackSlotScavenging()
3983 if (AFI->hasStackHazardSlotIndex()) in enableStackSlotScavenging()
3985 return AFI->hasCalleeSaveStackFreeSpace(); in enableStackSlotScavenging()
4116 AArch64FunctionInfo *AFI = MF.getInfo<AArch64FunctionInfo>(); in processFunctionBeforeFrameFinalized() local
4117 AFI->setStackSizeSVE(alignTo(SVEStackSize, 16U)); in processFunctionBeforeFrameFinalized()
4118 AFI->setMinMaxSVECSFrameIndex(MinCSFrameIndex, MaxCSFrameIndex); in processFunctionBeforeFrameFinalized()
4135 getFixedObjectSize(MF, AFI, /*IsWin64*/ true, /*IsFunclet*/ false); in processFunctionBeforeFrameFinalized()
4583 const AArch64FunctionInfo *AFI = MF->getInfo<AArch64FunctionInfo>(); in emitVGSaveRestore() local
4589 LocallyStreaming ? AFI->getStreamingVGIdx() : AFI->getVGIdx(); in emitVGSaveRestore()
4744 const AArch64FunctionInfo &AFI = *MF.getInfo<AArch64FunctionInfo>(); in orderFrameObjects() local
4760 if (AFI.hasStackHazardSlotIndex()) { in orderFrameObjects()
4809 if (AFI.hasStackHazardSlotIndex()) { in orderFrameObjects()
4810 FrameObjects[AFI.getStackHazardSlotIndex()].Accesses = in orderFrameObjects()
4823 std::optional<int> TBPI = AFI.getTaggedBasePointerIndex(); in orderFrameObjects()
4922 AArch64FunctionInfo *AFI = MF.getInfo<AArch64FunctionInfo>(); in inlineStackProbeFixed() local
4923 bool EmitAsyncCFI = AFI->needsAsyncDwarfUnwindInfo(MF); in inlineStackProbeFixed()