34 PPC::V0 , PPC::V1 ,
PPC::V2 , PPC::V3 , PPC::V4 , PPC::V5 , PPC::V6 , PPC::V7 ,
35 PPC::V8 , PPC::V9 , PPC::V10, PPC::V11, PPC::V12, PPC::V13, PPC::V14, PPC::V15,
36 PPC::V16, PPC::V17, PPC::V18, PPC::V19, PPC::V20, PPC::V21, PPC::V22, PPC::V23,
37 PPC::V24, PPC::V25, PPC::V26, PPC::V27, PPC::V28, PPC::V29, PPC::V30, PPC::V31
58 return STI.
isPPC64() ? -8U : -4U;
61 return STI.
isPPC64() ? -8U : -4U;
74 return STI.
isPPC64() ? -16U : -8U;
84 STI.getPlatformStackAlignment(), 0),
93 unsigned &NumEntries)
const {
97 static const SpillSlot darwin64Offsets = {PPC::X31, -8};
98 return &darwin64Offsets;
100 static const SpillSlot darwinOffsets = {PPC::R31, -4};
101 return &darwinOffsets;
283 assert(MBBI != Entry->
end() && MBBI->getOpcode() == PPC::MTVRSAVE);
284 MBBI->eraseFromParent();
286 bool RemovedAllMTVRSAVEs =
true;
291 if (
I->isReturnBlock()) {
292 bool FoundIt =
false;
293 for (MBBI =
I->end(); MBBI !=
I->begin(); ) {
295 if (MBBI->getOpcode() == PPC::MTVRSAVE) {
296 MBBI->eraseFromParent();
301 RemovedAllMTVRSAVEs &= FoundIt;
307 if (RemovedAllMTVRSAVEs) {
309 assert(MBBI != Entry->
begin() &&
"UPDATE_VRSAVE is first instr in block?");
311 assert(MBBI->getOpcode() == PPC::MFVRSAVE &&
"VRSAVE instrs wandered?");
312 MBBI->eraseFromParent();
328 unsigned UsedRegMask = 0;
329 for (
unsigned i = 0; i != 32; ++i)
331 UsedRegMask |= 1 << (31-i);
337 if (
VRRegNo[RegNo] == LI.first)
338 UsedRegMask &= ~(1 << (31-RegNo));
343 UsedRegMask != 0 && BI != BE; ++BI) {
350 if (!MO.
isReg() || !PPC::VRRCRegClass.contains(MO.
getReg()))
353 UsedRegMask &= ~(1 << (31-RegNo));
358 if (UsedRegMask == 0) {
367 if ((UsedRegMask & 0xFFFF) == UsedRegMask) {
368 if (DstReg != SrcReg)
376 }
else if ((UsedRegMask & 0xFFFF0000) == UsedRegMask) {
377 if (DstReg != SrcReg)
380 .
addImm(UsedRegMask >> 16);
384 .
addImm(UsedRegMask >> 16);
386 if (DstReg != SrcReg)
389 .
addImm(UsedRegMask >> 16);
393 .
addImm(UsedRegMask >> 16);
397 .
addImm(UsedRegMask & 0xFFFF);
442 bool UseEstimate)
const {
452 unsigned AlignMask =
std::max(MaxAlign, TargetAlign) - 1;
456 unsigned LR = RegInfo->getRARegister();
468 if (!DisableRedZone && CanUseRedZone && FitsInRedZone) {
480 maxCallFrameSize =
std::max(maxCallFrameSize, minCallFrameSize);
485 maxCallFrameSize = (maxCallFrameSize + AlignMask) & ~AlignMask;
492 FrameSize += maxCallFrameSize;
495 FrameSize = (FrameSize + AlignMask) & ~AlignMask;
533 unsigned FPReg = is31 ? PPC::R31 : PPC::R1;
534 unsigned FP8Reg = is31 ? PPC::X31 : PPC::X1;
539 unsigned BP8Reg = HasBP ? (
unsigned) PPC::X30 : FP8Reg;
545 for (
unsigned I = 0,
E = MBBI->getNumOperands();
I !=
E; ++
I) {
588 bool TwoUniqueRegsRequired,
590 unsigned *SR2)
const {
592 unsigned R0 = Subtarget.
isPPC64() ? PPC::X0 : PPC::R0;
593 unsigned R12 = Subtarget.
isPPC64() ? PPC::X12 : PPC::R12;
600 assert (SR1 &&
"Asking for the second scratch register but not the first?");
611 if (UseAtEnd && !MBB->
empty()) {
617 if (MBBI == MBB->
end())
618 MBBI = std::prev(MBBI);
620 if (MBBI != MBB->
begin())
643 for (
int i = 0; CSRegs[i]; ++i)
649 *SR1 = FirstScratchReg == -1 ? (
unsigned)PPC::NoRegister : FirstScratchReg;
656 int SecondScratchReg = BV.
find_next(*SR1);
657 if (SecondScratchReg != -1)
658 *SR2 = SecondScratchReg;
660 *SR2 = TwoUniqueRegsRequired ? (
unsigned)PPC::NoRegister : *SR1;
665 if (BV.
count() < (TwoUniqueRegsRequired ? 2U : 1U))
682 int NegFrameSize = -FrameSize;
683 bool IsLargeFrame = !
isInt<16>(NegFrameSize);
688 return (IsLargeFrame || !HasRedZone) && HasBP && MaxAlign > 1;
694 return findScratchRegister(TmpMBB,
false,
695 twoUniqueScratchRegsRequired(TmpMBB));
701 return findScratchRegister(TmpMBB,
true);
718 bool isPPC64 = Subtarget.
isPPC64();
723 "Currently only Darwin and SVR4 ABIs are supported for PowerPC.");
728 for (
unsigned i = 0; MBBI != MBB.
end(); ++i, ++MBBI) {
729 if (MBBI->getOpcode() == PPC::UPDATE_VRSAVE) {
740 int NegFrameSize = -FrameSize;
751 bool MustSaveCR = !MustSaveCRs.
empty();
753 bool HasFP =
hasFP(MF);
755 bool HasRedZone = isPPC64 || !isSVR4ABI;
757 unsigned SPReg = isPPC64 ? PPC::X1 : PPC::R1;
759 unsigned FPReg = isPPC64 ? PPC::X31 : PPC::R31;
760 unsigned LRReg = isPPC64 ? PPC::LR8 : PPC::LR;
761 unsigned ScratchReg = 0;
762 unsigned TempReg = isPPC64 ? PPC::X12 : PPC::R12;
764 const MCInstrDesc& MFLRInst = TII.get(isPPC64 ? PPC::MFLR8
768 const MCInstrDesc& StoreUpdtInst = TII.get(isPPC64 ? PPC::STDU
770 const MCInstrDesc& StoreUpdtIdxInst = TII.get(isPPC64 ? PPC::STDUX
772 const MCInstrDesc& LoadImmShiftedInst = TII.get(isPPC64 ? PPC::LIS8
774 const MCInstrDesc& OrImmInst = TII.get(isPPC64 ? PPC::ORI8
776 const MCInstrDesc& OrInst = TII.get(isPPC64 ? PPC::OR8
778 const MCInstrDesc& SubtractCarryingInst = TII.get(isPPC64 ? PPC::SUBFC8
780 const MCInstrDesc& SubtractImmCarryingInst = TII.get(isPPC64 ? PPC::SUBFIC8
787 assert((isPPC64 || !isSVR4ABI || !(!FrameSize && (MustSaveLR || HasFP))) &&
788 "FrameSize must be >0 to save/restore the FP or LR for 32-bit SVR4.");
791 bool SingleScratchReg =
792 findScratchRegister(&MBB,
false, twoUniqueScratchRegsRequired(&MBB),
793 &ScratchReg, &TempReg);
794 assert(SingleScratchReg &&
795 "Required number of registers not available in this block");
797 SingleScratchReg = ScratchReg == TempReg;
806 assert(FPIndex &&
"No Frame Pointer Save Slot!");
818 assert(BPIndex &&
"No Base Pointer Save Slot!");
829 assert(PBPIndex &&
"No PIC Base Pointer Save Slot!");
835 if (HasBP && MaxAlign > 1)
837 "Invalid alignment!");
841 bool isLargeFrame = !
isInt<16>(NegFrameSize);
843 assert((isPPC64 || !MustSaveCR) &&
844 "Prologue CR saving supported only in 64-bit mode");
848 if (MustSaveCR && SingleScratchReg && MustSaveLR) {
853 unsigned MfcrOpcode = PPC::MFCR8;
855 if (isELFv2ABI && MustSaveCRs.
size() == 1) {
856 MfcrOpcode = PPC::MFOCRF8;
860 BuildMI(MBB, MBBI, dl, TII.get(MfcrOpcode), TempReg);
861 for (
unsigned i = 0, e = MustSaveCRs.
size(); i != e; ++i)
862 MIB.
addReg(MustSaveCRs[i], CrState);
863 BuildMI(MBB, MBBI, dl, TII.get(PPC::STW8))
870 BuildMI(MBB, MBBI, dl, MFLRInst, ScratchReg);
873 !(SingleScratchReg && MustSaveLR)) {
878 unsigned MfcrOpcode = PPC::MFCR8;
880 if (isELFv2ABI && MustSaveCRs.
size() == 1) {
881 MfcrOpcode = PPC::MFOCRF8;
885 BuildMI(MBB, MBBI, dl, TII.get(MfcrOpcode), TempReg);
886 for (
unsigned i = 0, e = MustSaveCRs.
size(); i != e; ++i)
887 MIB.
addReg(MustSaveCRs[i], CrState);
892 BuildMI(MBB, MBBI, dl, StoreInst)
897 BuildMI(MBB, MBBI, dl, StoreInst)
902 BuildMI(MBB, MBBI, dl, StoreInst)
909 BuildMI(MBB, MBBI, dl, StoreInst)
915 !(SingleScratchReg && MustSaveLR)) {
916 assert(HasRedZone &&
"A red zone is always available on PPC64");
917 BuildMI(MBB, MBBI, dl, TII.get(PPC::STW8))
930 if (HasBP && HasRedZone) {
932 BuildMI(MBB, MBBI, dl, OrInst, BPReg)
939 bool HasSTUX =
false;
942 if (HasBP && MaxAlign > 1) {
944 BuildMI(MBB, MBBI, dl, TII.get(PPC::RLDICL), ScratchReg)
949 BuildMI(MBB, MBBI, dl, TII.get(PPC::RLWINM), ScratchReg)
955 BuildMI(MBB, MBBI, dl, SubtractImmCarryingInst, ScratchReg)
959 assert(!SingleScratchReg &&
"Only a single scratch reg available");
960 BuildMI(MBB, MBBI, dl, LoadImmShiftedInst, TempReg)
961 .
addImm(NegFrameSize >> 16);
962 BuildMI(MBB, MBBI, dl, OrImmInst, TempReg)
964 .
addImm(NegFrameSize & 0xFFFF);
965 BuildMI(MBB, MBBI, dl, SubtractCarryingInst, ScratchReg)
970 BuildMI(MBB, MBBI, dl, StoreUpdtIdxInst, SPReg)
976 }
else if (!isLargeFrame) {
977 BuildMI(MBB, MBBI, dl, StoreUpdtInst, SPReg)
983 BuildMI(MBB, MBBI, dl, LoadImmShiftedInst, ScratchReg)
984 .
addImm(NegFrameSize >> 16);
985 BuildMI(MBB, MBBI, dl, OrImmInst, ScratchReg)
987 .
addImm(NegFrameSize & 0xFFFF);
988 BuildMI(MBB, MBBI, dl, StoreUpdtIdxInst, SPReg)
996 assert(!isPPC64 &&
"A red zone is always available on PPC64");
1008 BuildMI(MBB, MBBI, dl, TII.get(PPC::SUBF), ScratchReg)
1012 if (ScratchReg == PPC::R0) {
1019 BuildMI(MBB, MBBI, dl, TII.get(PPC::ADDIC), ScratchReg)
1021 .
addImm(FPOffset-LastOffset);
1022 LastOffset = FPOffset;
1024 BuildMI(MBB, MBBI, dl, TII.get(PPC::STWX))
1031 BuildMI(MBB, MBBI, dl, TII.get(PPC::ADDIC), ScratchReg)
1033 .
addImm(PBPOffset-LastOffset);
1034 LastOffset = PBPOffset;
1035 BuildMI(MBB, MBBI, dl, TII.get(PPC::STWX))
1042 BuildMI(MBB, MBBI, dl, TII.get(PPC::ADDIC), ScratchReg)
1044 .
addImm(BPOffset-LastOffset);
1045 LastOffset = BPOffset;
1046 BuildMI(MBB, MBBI, dl, TII.get(PPC::STWX))
1051 BuildMI(MBB, MBBI, dl, TII.get(PPC::ADDIC), BPReg)
1062 BuildMI(MBB, MBBI, dl, StoreInst)
1067 BuildMI(MBB, MBBI, dl, StoreInst)
1072 BuildMI(MBB, MBBI, dl, StoreInst)
1076 BuildMI(MBB, MBBI, dl, OrInst, BPReg)
1087 BuildMI(MBB, MBBI, dl, StoreInst)
1089 .
addImm(FrameSize + FPOffset)
1092 BuildMI(MBB, MBBI, dl, StoreInst)
1094 .
addImm(FrameSize + PBPOffset)
1097 BuildMI(MBB, MBBI, dl, StoreInst)
1099 .
addImm(FrameSize + BPOffset)
1101 BuildMI(MBB, MBBI, dl, TII.get(PPC::ADDI), BPReg)
1125 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION))
1126 .addCFIIndex(CFIIndex);
1133 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION))
1134 .addCFIIndex(CFIIndex);
1142 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION))
1143 .addCFIIndex(CFIIndex);
1151 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION))
1152 .addCFIIndex(CFIIndex);
1160 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION))
1161 .addCFIIndex(CFIIndex);
1167 BuildMI(MBB, MBBI, dl, OrInst, FPReg)
1171 if (!HasBP && needsCFI) {
1178 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION))
1179 .addCFIIndex(CFIIndex);
1187 for (
unsigned I = 0,
E = CSI.size();
I !=
E; ++
I) {
1188 unsigned Reg = CSI[
I].getReg();
1189 if (Reg == PPC::LR || Reg == PPC::LR8 || Reg ==
PPC::RM)
continue;
1193 if (PPC::CRBITRCRegClass.
contains(Reg))
1198 if (isSVR4ABI && (PPC::CR2 <= Reg && Reg <= PPC::CR4)
1204 if (isSVR4ABI && isPPC64 && (PPC::CR2 <= Reg && Reg <= PPC::CR4)) {
1208 unsigned CRReg = isELFv2ABI?
Reg : (
unsigned) PPC::CR2;
1211 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION))
1212 .addCFIIndex(CFIIndex);
1219 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION))
1220 .addCFIIndex(CFIIndex);
1230 if (MBBI != MBB.
end())
1231 dl = MBBI->getDebugLoc();
1243 bool isPPC64 = Subtarget.
isPPC64();
1251 bool MustSaveCR = !MustSaveCRs.
empty();
1253 bool HasFP =
hasFP(MF);
1257 unsigned SPReg = isPPC64 ? PPC::X1 : PPC::R1;
1259 unsigned FPReg = isPPC64 ? PPC::X31 : PPC::R31;
1260 unsigned ScratchReg = 0;
1261 unsigned TempReg = isPPC64 ? PPC::X12 : PPC::R12;
1262 const MCInstrDesc& MTLRInst = TII.get( isPPC64 ? PPC::MTLR8
1266 const MCInstrDesc& LoadImmShiftedInst = TII.get( isPPC64 ? PPC::LIS8
1268 const MCInstrDesc& OrInst = TII.get(isPPC64 ? PPC::OR8
1270 const MCInstrDesc& OrImmInst = TII.get( isPPC64 ? PPC::ORI8
1272 const MCInstrDesc& AddImmInst = TII.get( isPPC64 ? PPC::ADDI8
1274 const MCInstrDesc& AddInst = TII.get( isPPC64 ? PPC::ADD8
1282 bool SingleScratchReg = findScratchRegister(&MBB,
true,
false, &ScratchReg,
1284 assert(SingleScratchReg &&
1285 "Could not find an available scratch register");
1287 SingleScratchReg = ScratchReg == TempReg;
1292 assert(FPIndex &&
"No Frame Pointer Save Slot!");
1303 assert(BPIndex &&
"No Base Pointer Save Slot!");
1313 assert(PBPIndex &&
"No PIC Base Pointer Save Slot!");
1317 bool IsReturnBlock = (MBBI != MBB.
end() && MBBI->isReturn());
1319 if (IsReturnBlock) {
1320 unsigned RetOpcode = MBBI->getOpcode();
1321 bool UsesTCRet = RetOpcode == PPC::TCRETURNri ||
1322 RetOpcode == PPC::TCRETURNdi ||
1323 RetOpcode == PPC::TCRETURNai ||
1324 RetOpcode == PPC::TCRETURNri8 ||
1325 RetOpcode == PPC::TCRETURNdi8 ||
1326 RetOpcode == PPC::TCRETURNai8;
1331 assert(StackAdjust.
isImm() &&
"Expecting immediate value.");
1333 int StackAdj = StackAdjust.
getImm();
1334 int Delta = StackAdj - MaxTCRetDelta;
1335 assert((Delta >= 0) &&
"Delta must be positive");
1336 if (MaxTCRetDelta>0)
1337 FrameSize += (StackAdj +Delta);
1339 FrameSize += StackAdj;
1345 bool isLargeFrame = !
isInt<16>(FrameSize);
1359 unsigned RBReg = SPReg;
1372 assert(HasFP &&
"Expecting a valid frame pointer.");
1375 if (!isLargeFrame) {
1376 BuildMI(MBB, MBBI, dl, AddImmInst, RBReg)
1379 BuildMI(MBB, MBBI, dl, LoadImmShiftedInst, ScratchReg)
1380 .
addImm(FrameSize >> 16);
1381 BuildMI(MBB, MBBI, dl, OrImmInst, ScratchReg)
1383 .
addImm(FrameSize & 0xFFFF);
1384 BuildMI(MBB, MBBI, dl, AddInst)
1391 BuildMI(MBB, MBBI, dl, AddImmInst, SPReg)
1397 assert(FPOffset <= 0 && BPOffset <= 0 && PBPOffset <= 0 &&
1398 "Local offsets should be negative");
1400 FPOffset += FrameSize;
1401 BPOffset += FrameSize;
1402 PBPOffset += FrameSize;
1410 BuildMI(MBB, MBBI, dl, OrInst, ScratchReg)
1415 BuildMI(MBB, MBBI, dl, LoadInst, RBReg)
1420 assert(RBReg != ScratchReg &&
"Should have avoided ScratchReg");
1425 assert((isPPC64 || !MustSaveCR) &&
1426 "Epilogue CR restoring supported only in 64-bit mode");
1430 if (MustSaveCR && SingleScratchReg && MustSaveLR) {
1433 assert(HasRedZone &&
"Expecting red zone");
1434 BuildMI(MBB, MBBI, dl, TII.get(PPC::LWZ8), TempReg)
1437 for (
unsigned i = 0, e = MustSaveCRs.
size(); i != e; ++i)
1438 BuildMI(MBB, MBBI, dl, TII.get(PPC::MTOCRF8), MustSaveCRs[i])
1446 bool LoadedLR =
false;
1447 if (MustSaveLR && RBReg == SPReg &&
isInt<16>(LROffset+SPAdd)) {
1448 BuildMI(MBB, MBBI, dl, LoadInst, ScratchReg)
1454 if (MustSaveCR && !(SingleScratchReg && MustSaveLR)) {
1456 assert(isPPC64 &&
"Expecting 64-bit mode");
1457 assert(RBReg == SPReg &&
"Should be using SP as a base register");
1458 BuildMI(MBB, MBBI, dl, TII.get(PPC::LWZ8), TempReg)
1466 if (HasRedZone || RBReg == SPReg)
1467 BuildMI(MBB, MBBI, dl, LoadInst, FPReg)
1471 BuildMI(MBB, MBBI, dl, LoadInst, ScratchReg)
1477 BuildMI(MBB, MBBI, dl, LoadInst, PPC::R30)
1482 BuildMI(MBB, MBBI, dl, LoadInst, BPReg)
1488 if (RBReg != SPReg || SPAdd != 0) {
1489 assert(!HasRedZone &&
"This should not happen with red zone");
1492 BuildMI(MBB, MBBI, dl, OrInst, SPReg)
1496 BuildMI(MBB, MBBI, dl, AddImmInst, SPReg)
1500 assert(RBReg != ScratchReg &&
"Should be using FP or SP as base register");
1502 BuildMI(MBB, MBBI, dl, OrInst, FPReg)
1507 if (MustSaveLR && !LoadedLR)
1508 BuildMI(MBB, MBBI, dl, LoadInst, ScratchReg)
1514 !(SingleScratchReg && MustSaveLR))
1515 for (
unsigned i = 0, e = MustSaveCRs.
size(); i != e; ++i)
1516 BuildMI(MBB, MBBI, dl, TII.get(PPC::MTOCRF8), MustSaveCRs[i])
1524 if (IsReturnBlock) {
1525 unsigned RetOpcode = MBBI->getOpcode();
1527 (RetOpcode == PPC::BLR || RetOpcode == PPC::BLR8) &&
1532 if (CallerAllocatedAmt &&
isInt<16>(CallerAllocatedAmt)) {
1533 BuildMI(MBB, MBBI, dl, AddImmInst, SPReg)
1536 BuildMI(MBB, MBBI, dl, LoadImmShiftedInst, ScratchReg)
1537 .
addImm(CallerAllocatedAmt >> 16);
1538 BuildMI(MBB, MBBI, dl, OrImmInst, ScratchReg)
1540 .
addImm(CallerAllocatedAmt & 0xFFFF);
1541 BuildMI(MBB, MBBI, dl, AddInst)
1547 createTailCallBranchInstr(MBB);
1552 void PPCFrameLowering::createTailCallBranchInstr(
MachineBasicBlock &MBB)
const {
1556 assert(MBBI != MBB.
end() &&
"Failed to find the first terminator.");
1562 unsigned RetOpcode = MBBI->getOpcode();
1563 if (RetOpcode == PPC::TCRETURNdi) {
1566 BuildMI(MBB, MBBI, dl, TII.get(PPC::TAILB)).
1568 }
else if (RetOpcode == PPC::TCRETURNri) {
1570 assert(MBBI->getOperand(0).isReg() &&
"Expecting register operand.");
1571 BuildMI(MBB, MBBI, dl, TII.get(PPC::TAILBCTR));
1572 }
else if (RetOpcode == PPC::TCRETURNai) {
1575 BuildMI(MBB, MBBI, dl, TII.get(PPC::TAILBA)).addImm(JumpTarget.
getImm());
1576 }
else if (RetOpcode == PPC::TCRETURNdi8) {
1579 BuildMI(MBB, MBBI, dl, TII.get(PPC::TAILB8)).
1581 }
else if (RetOpcode == PPC::TCRETURNri8) {
1583 assert(MBBI->getOperand(0).isReg() &&
"Expecting register operand.");
1584 BuildMI(MBB, MBBI, dl, TII.get(PPC::TAILBCTR8));
1585 }
else if (RetOpcode == PPC::TCRETURNai8) {
1588 BuildMI(MBB, MBBI, dl, TII.get(PPC::TAILBA8)).addImm(JumpTarget.
getImm());
1601 unsigned LR = RegInfo->getRARegister();
1603 SavedRegs.
reset(LR);
1607 bool isPPC64 = Subtarget.
isPPC64();
1642 SavedRegs.
reset(isPPC64 ? PPC::X31 : PPC::R31);
1646 SavedRegs.
reset(PPC::R30);
1657 if (!isPPC64 && !isDarwinABI &&
1658 (SavedRegs.
test(PPC::CR2) ||
1659 SavedRegs.
test(PPC::CR3) ||
1660 SavedRegs.
test(PPC::CR4))) {
1686 createTailCallBranchInstr(MBB);
1691 if (CSI.empty() && !
needsFP(MF)) {
1696 unsigned MinGPR = PPC::R31;
1697 unsigned MinG8R = PPC::X31;
1698 unsigned MinFPR = PPC::F31;
1699 unsigned MinVR = Subtarget.
hasSPE() ? PPC::S31 : PPC::V31;
1701 bool HasGPSaveArea =
false;
1702 bool HasG8SaveArea =
false;
1703 bool HasFPSaveArea =
false;
1704 bool HasVRSAVESaveArea =
false;
1705 bool HasVRSaveArea =
false;
1712 for (
unsigned i = 0, e = CSI.size(); i != e; ++i) {
1713 unsigned Reg = CSI[i].getReg();
1714 if (PPC::GPRCRegClass.
contains(Reg) ||
1715 PPC::SPE4RCRegClass.
contains(Reg)) {
1716 HasGPSaveArea =
true;
1723 }
else if (PPC::G8RCRegClass.
contains(Reg)) {
1724 HasG8SaveArea =
true;
1731 }
else if (PPC::F8RCRegClass.
contains(Reg)) {
1732 HasFPSaveArea =
true;
1739 }
else if (PPC::CRBITRCRegClass.
contains(Reg) ||
1742 }
else if (PPC::VRSAVERCRegClass.
contains(Reg)) {
1743 HasVRSAVESaveArea =
true;
1744 }
else if (PPC::VRRCRegClass.
contains(Reg) ||
1745 PPC::SPERCRegClass.
contains(Reg)) {
1748 HasVRSaveArea =
true;
1763 int64_t LowerBound = 0;
1769 LowerBound = TCSPDelta;
1774 if (HasFPSaveArea) {
1775 for (
unsigned i = 0, e = FPRegs.
size(); i != e; ++i) {
1776 int FI = FPRegs[i].getFrameIdx();
1781 LowerBound -= (31 - TRI->getEncodingValue(MinFPR) + 1) * 8;
1788 assert(FI &&
"No Frame Pointer Save Slot!");
1791 HasGPSaveArea =
true;
1796 assert(FI &&
"No PIC Base Pointer Save Slot!");
1799 MinGPR = std::min<unsigned>(MinGPR, PPC::R30);
1800 HasGPSaveArea =
true;
1806 assert(FI &&
"No Base Pointer Save Slot!");
1810 if (PPC::G8RCRegClass.
contains(BP)) {
1811 MinG8R = std::min<unsigned>(MinG8R, BP);
1812 HasG8SaveArea =
true;
1813 }
else if (PPC::GPRCRegClass.
contains(BP)) {
1814 MinGPR = std::min<unsigned>(MinGPR, BP);
1815 HasGPSaveArea =
true;
1821 if (HasGPSaveArea || HasG8SaveArea) {
1824 for (
unsigned i = 0, e = GPRegs.
size(); i != e; ++i) {
1825 int FI = GPRegs[i].getFrameIdx();
1832 for (
unsigned i = 0, e = G8Regs.
size(); i != e; ++i) {
1833 int FI = G8Regs[i].getFrameIdx();
1839 std::min<unsigned>(TRI->getEncodingValue(MinGPR),
1840 TRI->getEncodingValue(MinG8R));
1843 LowerBound -= (31 - MinReg + 1) * 8;
1845 LowerBound -= (31 - MinReg + 1) * 4;
1856 for (
unsigned i = 0, e = CSI.size(); i != e; ++i) {
1857 unsigned Reg = CSI[i].getReg();
1859 if ((Subtarget.
isSVR4ABI() && Reg == PPC::CR2)
1862 (PPC::CRBITRCRegClass.contains(Reg) ||
1863 PPC::CRRCRegClass.contains(Reg)))) {
1864 int FI = CSI[i].getFrameIdx();
1873 if (HasVRSAVESaveArea) {
1877 for (
unsigned i = 0, e = CSI.size(); i != e; ++i) {
1878 unsigned Reg = CSI[i].getReg();
1880 if (PPC::VRSAVERCRegClass.
contains(Reg)) {
1881 int FI = CSI[i].getFrameIdx();
1892 if (HasVRSaveArea) {
1898 assert(LowerBound <= 0 &&
"Expect LowerBound have a non-positive value!");
1899 LowerBound &= ~(15);
1901 for (
unsigned i = 0, e = VRegs.
size(); i != e; ++i) {
1902 int FI = VRegs[i].getFrameIdx();
1953 const std::vector<CalleeSavedInfo> &CSI,
1964 bool CRSpilled =
false;
1967 for (
unsigned i = 0, e = CSI.size(); i != e; ++i) {
1968 unsigned Reg = CSI[i].getReg();
1972 if (Reg == PPC::VRSAVE && !Subtarget.
isDarwinABI())
1976 bool IsCRField = PPC::CR2 <= Reg && Reg <= PPC::CR4;
1988 if (CRSpilled && IsCRField) {
2005 CRMIB =
BuildMI(*MF, DL, TII.get(PPC::MFCR), PPC::R12)
2012 CSI[i].getFrameIdx()));
2020 CSI[i].getFrameIdx(), RC, TRI);
2028 bool CR2Spilled,
bool CR3Spilled,
bool CR4Spilled,
2030 const std::vector<CalleeSavedInfo> &CSI,
unsigned CSIIndex) {
2044 CSI[CSIIndex].getFrameIdx()));
2045 RestoreOp = PPC::MTOCRF;
2050 MBB.
insert(MI,
BuildMI(*MF, DL, TII.get(RestoreOp), PPC::CR2)
2054 MBB.
insert(MI,
BuildMI(*MF, DL, TII.get(RestoreOp), PPC::CR3)
2058 MBB.
insert(MI,
BuildMI(*MF, DL, TII.get(RestoreOp), PPC::CR4)
2067 I->getOpcode() == PPC::ADJCALLSTACKUP) {
2069 if (
int CalleeAmt = I->getOperand(1).getImm()) {
2072 unsigned StackReg = is64Bit ? PPC::X1 : PPC::R1;
2073 unsigned TmpReg = is64Bit ? PPC::X0 : PPC::R0;
2074 unsigned ADDIInstr = is64Bit ? PPC::ADDI8 : PPC::ADDI;
2075 unsigned ADDInstr = is64Bit ? PPC::ADD8 : PPC::ADD4;
2076 unsigned LISInstr = is64Bit ? PPC::LIS8 : PPC::LIS;
2077 unsigned ORIInstr = is64Bit ? PPC::ORI8 : PPC::ORI;
2078 const DebugLoc &dl = I->getDebugLoc();
2081 BuildMI(MBB, I, dl, TII.
get(ADDIInstr), StackReg)
2086 BuildMI(MBB, MBBI, dl, TII.
get(LISInstr), TmpReg)
2087 .addImm(CalleeAmt >> 16);
2088 BuildMI(MBB, MBBI, dl, TII.
get(ORIInstr), TmpReg)
2090 .
addImm(CalleeAmt & 0xFFFF);
2091 BuildMI(MBB, MBBI, dl, TII.
get(ADDInstr), StackReg)
2098 return MBB.
erase(I);
2104 std::vector<CalleeSavedInfo> &CSI,
2114 bool CR2Spilled =
false;
2115 bool CR3Spilled =
false;
2116 bool CR4Spilled =
false;
2117 unsigned CSIIndex = 0;
2122 bool AtStart = I == MBB.
begin();
2127 for (
unsigned i = 0, e = CSI.size(); i != e; ++i) {
2128 unsigned Reg = CSI[i].getReg();
2133 if (Reg == PPC::VRSAVE && !Subtarget.
isDarwinABI())
2136 if (Reg == PPC::CR2) {
2142 }
else if (Reg == PPC::CR3) {
2145 }
else if (Reg == PPC::CR4) {
2151 if ((CR2Spilled || CR3Spilled || CR4Spilled)
2152 && !(PPC::CR2 <= Reg && Reg <= PPC::CR4)) {
2155 CR2Spilled, CR3Spilled, CR4Spilled,
2156 MBB,
I, CSI, CSIIndex);
2157 CR2Spilled = CR3Spilled = CR4Spilled =
false;
2165 "loadRegFromStackSlot didn't insert any code!");
2178 if (CR2Spilled || CR3Spilled || CR4Spilled) {
2181 MBB,
I, CSI, CSIIndex);
void push_back(const T &Elt)
constexpr char Align[]
Key for Kernel::Arg::Metadata::mAlign.
bool hasStackMap() const
This method may be called any time after instruction selection is complete to determine if there is a...
bool spillCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const std::vector< CalleeSavedInfo > &CSI, const TargetRegisterInfo *TRI) const override
spillCalleeSavedRegisters - Issues instruction(s) to spill all callee saved registers and returns tru...
const SpillSlot * getCalleeSavedSpillSlots(unsigned &NumEntries) const override
getCalleeSavedSpillSlots - This method returns a pointer to an array of pairs, that contains an entry...
void storeRegToStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, unsigned SrcReg, bool isKill, int FrameIndex, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI) const override
bool isVRSAVESpilled() const
GCNRegPressure max(const GCNRegPressure &P1, const GCNRegPressure &P2)
static const unsigned GPRegs[]
bool hasDebugInfo() const
Returns true if valid debug info is present.
bool isRegUsed(unsigned Reg, bool includeReserved=true) const
Return if a specific register is currently used.
int getFramePointerSaveIndex() const
Compute iterated dominance frontiers using a linear time algorithm.
bool isPPC64() const
isPPC64 - Return true if we are generating code for 64-bit pointer mode.
virtual const TargetRegisterInfo * getRegisterInfo() const
getRegisterInfo - If register information is available, return it.
void addMustSaveCR(unsigned Reg)
bool isPhysRegModified(unsigned PhysReg, bool SkipNoReturnDef=false) const
Return true if the specified register is modified in this function.
const DebugLoc & getDebugLoc() const
Returns the debug location id of this MachineInstr.
iterator getFirstTerminator()
Returns an iterator to the first terminator instruction of this basic block.
Describe properties that are true of each instruction in the target description file.
unsigned getReg() const
getReg - Returns the register number.
static MCCFIInstruction createOffset(MCSymbol *L, unsigned Register, int Offset)
.cfi_offset Previous value of Register is saved at offset Offset from CFA.
MachineBasicBlock::iterator eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator I) const override
This method is called during prolog/epilog code insertion to eliminate call frame setup and destroy p...
bool test(unsigned Idx) const
void setFramePointerSaveIndex(int Idx)
static unsigned computeTOCSaveOffset(const PPCSubtarget &STI)
static const MCPhysReg VRegs[32]
bool hasFnAttribute(Attribute::AttrKind Kind) const
Return true if the function has the attribute.
constexpr bool isInt< 16 >(int64_t x)
unsigned const TargetRegisterInfo * TRI
bool adjustsStack() const
Return true if this function adjusts the stack – e.g., when calling another function.
MachineModuleInfo & getMMI() const
An instruction for reading from memory.
static MCCFIInstruction createDefCfaOffset(MCSymbol *L, int Offset)
.cfi_def_cfa_offset modifies a rule for computing CFA.
bool isImm() const
isImm - Tests if this is a MO_Immediate operand.
int CreateStackObject(uint64_t Size, unsigned Alignment, bool isSpillSlot, const AllocaInst *Alloca=nullptr, uint8_t ID=0)
Create a new statically sized stack object, returning a nonnegative identifier to represent it...
unsigned getSpillSize(const TargetRegisterClass &RC) const
Return the size in bytes of the stack slot allocated to hold a spilled copy of a register from class ...
return AArch64::GPR64RegClass contains(Reg)
virtual void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs, RegScavenger *RS=nullptr) const
This method determines which of the registers reported by TargetRegisterInfo::getCalleeSavedRegs() sh...
static void restoreCRs(bool isPPC64, bool is31, bool CR2Spilled, bool CR3Spilled, bool CR4Spilled, MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const std::vector< CalleeSavedInfo > &CSI, unsigned CSIIndex)
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override
unsigned getSpillAlignment(const TargetRegisterClass &RC) const
Return the minimum required alignment in bytes for a spill slot for a register of this class...
bool isFrameAddressTaken() const
This method may be called any time after instruction selection is complete to determine if there is a...
bool isReturnBlock() const
Convenience function that returns true if the block ends in a return instruction. ...
instr_iterator erase(instr_iterator I)
Remove an instruction from the instruction list and delete it.
PPCFunctionInfo - This class is derived from MachineFunction private PowerPC target-specific informat...
const HexagonInstrInfo * TII
unsigned getNumOperands() const
Access to explicit operands of the instruction.
MachineBasicBlock * getRestorePoint() const
int find_first() const
find_first - Returns the index of the first set bit, -1 if none of the bits are set.
const TargetMachine & getTarget() const
getTarget - Return the target machine this machine code is compiled with
void eraseFromParent()
Unlink 'this' from the containing basic block and delete it.
int64_t getObjectOffset(int ObjectIdx) const
Return the assigned stack offset of the specified object from the incoming stack pointer.
void processFunctionBeforeFrameFinalized(MachineFunction &MF, RegScavenger *RS=nullptr) const override
processFunctionBeforeFrameFinalized - This method is called immediately before the specified function...
int find_next(unsigned Prev) const
find_next - Returns the index of the next set bit following the "Prev" bit.
void addScavengingSpillSlot(MachineFunction &MF, RegScavenger *RS) const
The MachineFrameInfo class represents an abstract stack frame until prolog/epilog code is inserted...
bool hasVarSizedObjects() const
This method may be called any time after instruction selection is complete to determine if the stack ...
int getDwarfRegNum(unsigned RegNum, bool isEH) const
Map a target register to an equivalent dwarf register number.
def_iterator def_begin(unsigned RegNo) const
LLVM_NODISCARD unsigned addFrameInst(const MCCFIInstruction &Inst)
bool hasFP(const MachineFunction &MF) const override
hasFP - Return true if the specified function should have a dedicated frame pointer register...
static bool hasNonRISpills(const MachineFunction &MF)
void forward()
Move the internal MBB iterator and update register states.
const SmallVectorImpl< unsigned > & getMustSaveCRs() const
bool canUseAsEpilogue(const MachineBasicBlock &MBB) const override
Check whether or not the given MBB can be used as a epilogue for the target.
void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs, RegScavenger *RS=nullptr) const override
This method determines which of the registers reported by TargetRegisterInfo::getCalleeSavedRegs() sh...
BitVector getRegsAvailable(const TargetRegisterClass *RC)
Return all available registers in the register class in Mask.
bool DisableFramePointerElim(const MachineFunction &MF) const
DisableFramePointerElim - This returns true if frame pointer elimination optimization should be disab...
const MCContext & getContext() const
void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override
emitProlog/emitEpilog - These methods insert prolog and epilog code into the function.
bool hasNonRISpills() const
const PPCTargetMachine & getTargetMachine() const
iterator getLastNonDebugInstr()
Returns an iterator to the last non-debug instruction in the basic block, or end().
An instruction for storing to memory.
bool hasBasePointer(const MachineFunction &MF) const
instr_iterator insert(instr_iterator I, MachineInstr *M)
Insert MI into the instruction list before I, possibly inside a bundle.
unsigned getKillRegState(bool B)
uint16_t MCPhysReg
An unsigned integer type large enough to represent all physical registers, but not necessarily virtua...
unsigned getBasePointerSaveOffset() const
getBasePointerSaveOffset - Return the previous frame offset to save the base pointer.
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
TargetInstrInfo - Interface to description of machine instruction set.
const MCPhysReg * getCalleeSavedRegs(const MachineFunction *MF) const override
Code Generation virtual methods...
int getBasePointerSaveIndex() const
MachineInstrBuilder BuildMI(MachineFunction &MF, const DebugLoc &DL, const MCInstrDesc &MCID)
Builder interface. Specify how to create the initial instruction itself.
unsigned getBaseRegister(const MachineFunction &MF) const
void addLiveIn(MCPhysReg PhysReg, LaneBitmask LaneMask=LaneBitmask::getAll())
Adds the specified register as a live in.
This file declares the machine register scavenger class.
static const unsigned G8Regs[]
unsigned const MachineRegisterInfo * MRI
constexpr bool isPowerOf2_32(uint32_t Value)
Return true if the argument is a power of two > 0.
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
static MCCFIInstruction createDefCfaRegister(MCSymbol *L, unsigned Register)
.cfi_def_cfa_register modifies a rule for computing CFA.
MachineFrameInfo & getFrameInfo()
getFrameInfo - Return the frame info object for the current function.
bool canUseAsPrologue(const MachineBasicBlock &MBB) const override
Methods used by shrink wrapping to determine if MBB can be used for the function prologue/epilogue.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
void setStackSize(uint64_t Size)
Set the size of the stack.
static bool is64Bit(const char *name)
const GlobalValue * getGlobal() const
static ManagedStatic< OptionRegistry > OR
bool enableShrinkWrapping(const MachineFunction &MF) const override
Returns true if the target will correctly handle shrink wrapping.
unsigned getMaxAlignment() const
Return the alignment in bytes that this function must be aligned to, which is greater than the defaul...
int getTailCallSPDelta() const
Ty * getInfo()
getInfo - Keep track of various per-function pieces of information for backends that would like to do...
static unsigned computeReturnSaveOffset(const PPCSubtarget &STI)
void setBasePointerSaveIndex(int Idx)
unsigned GuaranteedTailCallOpt
GuaranteedTailCallOpt - This flag is enabled when -tailcallopt is specified on the commandline...
bool shrinkWrapDisabled() const
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
const MachineBasicBlock & front() const
Fast - This calling convention attempts to make calls as fast as possible (e.g.
unsigned getStackAlignment() const
getStackAlignment - This method returns the number of bytes to which the stack pointer must be aligne...
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
static unsigned computeBasePointerSaveOffset(const PPCSubtarget &STI)
static const MachineInstrBuilder & addFrameReference(const MachineInstrBuilder &MIB, int FI, int Offset=0, bool mem=true)
addFrameReference - This function is used to add a reference to the base of an abstract object on the...
void setCRSpillFrameIndex(int idx)
bool restoreCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, std::vector< CalleeSavedInfo > &CSI, const TargetRegisterInfo *TRI) const override
restoreCalleeSavedRegisters - Issues instruction(s) to restore all callee saved registers and returns...
const PPCRegisterInfo * getRegisterInfo() const override
Iterator for intrusive lists based on ilist_node.
constexpr bool isInt< 32 >(int64_t x)
size_type count() const
count - Returns the number of bits which are set.
unsigned getMaxCallFrameSize() const
Return the maximum size of a call frame that must be allocated for an outgoing function call...
CallingConv::ID getCallingConv() const
getCallingConv()/setCallingConv(CC) - These method get and set the calling convention of this functio...
const PPCInstrInfo * getInstrInfo() const override
void addScavengingFrameIndex(int FI)
Add a scavenging frame index.
MachineOperand class - Representation of each machine instruction operand.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
unsigned estimateStackSize(const MachineFunction &MF) const
Estimate and return the size of the stack frame.
constexpr size_t array_lengthof(T(&)[N])
Find the length of an array.
Information about stack frame layout on the target.
int CreateFixedObject(uint64_t Size, int64_t SPOffset, bool IsImmutable, bool isAliased=false)
Create a new object at a fixed location on the stack.
static bool spillsVRSAVE(const MachineFunction &MF)
static bool hasSpills(const MachineFunction &MF)
const Function & getFunction() const
Return the LLVM function that this machine code represents.
unsigned getMinReservedArea() const
bool needsUnwindTableEntry() const
True if this function needs an unwind table.
unsigned Log2_32(uint32_t Value)
Return the floor log base 2 of the specified value, -1 if the value is zero.
static bool spillsCR(const MachineFunction &MF)
unsigned getRedZoneSize() const
ArrayRef< std::pair< unsigned, unsigned > > liveins() const
int getPICBasePointerSaveIndex() const
static bool MustSaveLR(const MachineFunction &MF, unsigned LR)
MustSaveLR - Return true if this function requires that we save the LR register onto the stack in the...
const MachineBasicBlock * getParent() const
MachineRegisterInfo - Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc.
void setPICBasePointerSaveIndex(int Idx)
bool isLiveIn(unsigned Reg) const
Representation of each machine instruction.
const MachineFunction * getParent() const
Return the MachineFunction containing this basic block.
uint16_t getEncodingValue(unsigned RegNo) const
Returns the encoding for RegNo.
const MachineInstrBuilder & addImm(int64_t Val) const
Add a new immediate operand.
void enterBasicBlock(MachineBasicBlock &MBB)
Start tracking liveness from the begin of basic block MBB.
MachineRegisterInfo & getRegInfo()
getRegInfo - Return information about the registers currently in use.
LLVM_NODISCARD bool empty() const
const std::vector< CalleeSavedInfo > & getCalleeSavedInfo() const
Returns a reference to call saved info vector for the current function.
bool isPositionIndependent() const
static void HandleVRSaveUpdate(MachineInstr &MI, const TargetInstrInfo &TII)
PPCFrameLowering(const PPCSubtarget &STI)
const MCInstrDesc & get(unsigned Opcode) const
Return the machine instruction descriptor that corresponds to the specified instruction opcode...
int64_t getOffset() const
Return the offset from the symbol in this operand.
void setReg(unsigned Reg)
Change the register this operand corresponds to.
void setMaxCallFrameSize(unsigned S)
unsigned getFramePointerSaveOffset() const
getFramePointerSaveOffset - Return the previous frame offset to save the frame pointer.
bool needsFP(const MachineFunction &MF) const
unsigned getReturnSaveOffset() const
getReturnSaveOffset - Return the previous frame offset to save the return address.
bool isLRStoreRequired() const
const MachineInstrBuilder & addReg(unsigned RegNo, unsigned flags=0, unsigned SubReg=0) const
Add a new virtual register operand.
static unsigned computeFramePointerSaveOffset(const PPCSubtarget &STI)
const TargetRegisterClass * getMinimalPhysRegClass(unsigned Reg, MVT VT=MVT::Other) const
Returns the Register Class of a physical register of the given type, picking the most sub register cl...
bool isReg() const
isReg - Tests if this is a MO_Register operand.
static void RemoveVRSaveCode(MachineInstr &MI)
RemoveVRSaveCode - We have found that this function does not need any code to manipulate the VRSAVE r...
unsigned getLinkageSize() const
getLinkageSize - Return the size of the PowerPC ABI linkage area.
MachineBasicBlock * getSavePoint() const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
static def_iterator def_end()
const MCRegisterInfo * getRegisterInfo() const
constexpr char Size[]
Key for Kernel::Arg::Metadata::mSize.
unsigned determineFrameLayout(MachineFunction &MF, bool UpdateMF=true, bool UseEstimate=false) const
determineFrameLayout - Determine the size of the frame and maximum call frame size.
void setObjectOffset(int ObjectIdx, int64_t SPOffset)
Set the stack frame offset of the specified object.
bool hasPatchPoint() const
This method may be called any time after instruction selection is complete to determine if there is a...
void loadRegFromStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, unsigned DestReg, int FrameIndex, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI) const override
const MachineOperand & getOperand(unsigned i) const
static const MCPhysReg VRRegNo[]
VRRegNo - Map from a numbered VR register to its enum value.
reg_begin/reg_end - Provide iteration support to walk over all definitions and uses of a register wit...
bool hasTailCall() const
Returns true if the function contains a tail call.
uint64_t getStackSize() const
Return the number of bytes that must be allocated to hold all of the fixed size frame objects...
static unsigned computeLinkageSize(const PPCSubtarget &STI)
void setMustSaveLR(bool U)
MustSaveLR - This is set when the prolog/epilog inserter does its initial scan of the function...
void replaceFPWithRealFP(MachineFunction &MF) const
This class contains meta information specific to a module.