Lines Matching refs:MBBI

58   bool expandMI(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
61 MachineBasicBlock::iterator MBBI,
66 MachineBasicBlock::iterator MBBI,
69 MachineBasicBlock::iterator MBBI,
72 MachineBasicBlock::iterator MBBI,
75 MachineBasicBlock::iterator MBBI,
78 MachineBasicBlock::iterator MBBI,
81 MachineBasicBlock::iterator MBBI,
84 MachineBasicBlock::iterator MBBI,
102 MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end(); in expandMBB() local
103 while (MBBI != E) { in expandMBB()
104 MachineBasicBlock::iterator NMBBI = std::next(MBBI); in expandMBB()
105 Modified |= expandMI(MBB, MBBI, NMBBI); in expandMBB()
106 MBBI = NMBBI; in expandMBB()
113 MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, in expandMI() argument
115 switch (MBBI->getOpcode()) { in expandMI()
117 return expandLoadAddressPcrel(MBB, MBBI, NextMBBI); in expandMI()
119 return expandLoadAddressGot(MBB, MBBI, NextMBBI); in expandMI()
121 return expandLoadAddressTLSLE(MBB, MBBI, NextMBBI); in expandMI()
123 return expandLoadAddressTLSIE(MBB, MBBI, NextMBBI); in expandMI()
125 return expandLoadAddressTLSLD(MBB, MBBI, NextMBBI); in expandMI()
127 return expandLoadAddressTLSGD(MBB, MBBI, NextMBBI); in expandMI()
129 return expandLoadAddressTLSDesc(MBB, MBBI, NextMBBI); in expandMI()
135 MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, in expandPcalau12iInstPair() argument
139 MachineInstr &MI = *MBBI; in expandPcalau12iInstPair()
147 BuildMI(MBB, MBBI, DL, TII->get(LoongArch::PCALAU12I), ScratchReg) in expandPcalau12iInstPair()
151 BuildMI(MBB, MBBI, DL, TII->get(SecondOpcode), DestReg) in expandPcalau12iInstPair()
163 MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, in expandLoadAddressPcrel() argument
171 return expandPcalau12iInstPair(MBB, MBBI, NextMBBI, LoongArchII::MO_PCREL_HI, in expandLoadAddressPcrel()
176 MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, in expandLoadAddressGot() argument
184 return expandPcalau12iInstPair(MBB, MBBI, NextMBBI, LoongArchII::MO_GOT_PC_HI, in expandLoadAddressGot()
189 MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, in expandLoadAddressTLSLE() argument
200 MachineInstr &MI = *MBBI; in expandLoadAddressTLSLE()
212 BuildMI(MBB, MBBI, DL, TII->get(LoongArch::LU12I_W), Part1) in expandLoadAddressTLSLE()
215 BuildMI(MBB, MBBI, DL, TII->get(LoongArch::ORI), Parts01) in expandLoadAddressTLSLE()
223 BuildMI(MBB, MBBI, DL, TII->get(LoongArch::LU32I_D), Parts012) in expandLoadAddressTLSLE()
227 BuildMI(MBB, MBBI, DL, TII->get(LoongArch::LU52I_D), DestReg) in expandLoadAddressTLSLE()
237 MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, in expandLoadAddressTLSIE() argument
245 return expandPcalau12iInstPair(MBB, MBBI, NextMBBI, LoongArchII::MO_IE_PC_HI, in expandLoadAddressTLSIE()
250 MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, in expandLoadAddressTLSLD() argument
258 return expandPcalau12iInstPair(MBB, MBBI, NextMBBI, LoongArchII::MO_LD_PC_HI, in expandLoadAddressTLSLD()
263 MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, in expandLoadAddressTLSGD() argument
271 return expandPcalau12iInstPair(MBB, MBBI, NextMBBI, LoongArchII::MO_GD_PC_HI, in expandLoadAddressTLSGD()
276 MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, in expandLoadAddressTLSDesc() argument
285 MachineInstr &MI = *MBBI; in expandLoadAddressTLSDesc()
298 BuildMI(MBB, MBBI, DL, TII->get(LoongArch::PCALAU12I), ScratchReg) in expandLoadAddressTLSDesc()
301 BuildMI(MBB, MBBI, DL, TII->get(ADDI), LoongArch::R4) in expandLoadAddressTLSDesc()
305 BuildMI(MBB, MBBI, DL, TII->get(LD), LoongArch::R1) in expandLoadAddressTLSDesc()
309 BuildMI(MBB, MBBI, DL, TII->get(LoongArch::PseudoDESC_CALL), LoongArch::R1) in expandLoadAddressTLSDesc()
313 BuildMI(MBB, MBBI, DL, TII->get(ADD), DestReg) in expandLoadAddressTLSDesc()
338 bool expandMI(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
340 bool expandCopyCFR(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
343 MachineBasicBlock::iterator MBBI,
347 MachineBasicBlock::iterator MBBI,
353 MachineBasicBlock::iterator MBBI,
356 MachineBasicBlock::iterator MBBI,
359 MachineBasicBlock::iterator MBBI,
362 MachineBasicBlock::iterator MBBI,
365 MachineBasicBlock::iterator MBBI,
368 MachineBasicBlock::iterator MBBI,
371 MachineBasicBlock::iterator MBBI,
392 MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end(); in expandMBB() local
393 while (MBBI != E) { in expandMBB()
394 MachineBasicBlock::iterator NMBBI = std::next(MBBI); in expandMBB()
395 Modified |= expandMI(MBB, MBBI, NMBBI); in expandMBB()
396 MBBI = NMBBI; in expandMBB()
403 MachineBasicBlock::iterator MBBI, in expandMI() argument
405 switch (MBBI->getOpcode()) { in expandMI()
407 return expandCopyCFR(MBB, MBBI, NextMBBI); in expandMI()
409 return expandLoadAddressPcrelLarge(MBB, MBBI, NextMBBI); in expandMI()
411 return expandLoadAddressGotLarge(MBB, MBBI, NextMBBI); in expandMI()
413 return expandLoadAddressTLSIELarge(MBB, MBBI, NextMBBI); in expandMI()
415 return expandLoadAddressTLSLDLarge(MBB, MBBI, NextMBBI); in expandMI()
417 return expandLoadAddressTLSGDLarge(MBB, MBBI, NextMBBI); in expandMI()
419 return expandLoadAddressTLSDescPcLarge(MBB, MBBI, NextMBBI); in expandMI()
423 return expandFunctionCALL(MBB, MBBI, NextMBBI, /*IsTailCall=*/false); in expandMI()
427 return expandFunctionCALL(MBB, MBBI, NextMBBI, /*IsTailCall=*/true); in expandMI()
434 MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, in expandCopyCFR() argument
437 MachineInstr &MI = *MBBI; in expandCopyCFR()
459 BuildMI(MBB, MBBI, DL, TII->get(LoongArch::SET_CFR_FALSE), DestReg); in expandCopyCFR()
461 BuildMI(MBB, MBBI, DL, TII->get(LoongArch::BCEQZ)) in expandCopyCFR()
487 MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, in expandLargeAddressLoad() argument
490 MachineInstr &MI = *MBBI; in expandLargeAddressLoad()
491 return expandLargeAddressLoad(MBB, MBBI, NextMBBI, LastOpcode, IdentifyingMO, in expandLargeAddressLoad()
497 MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, in expandLargeAddressLoad() argument
536 MachineInstr &MI = *MBBI; in expandLargeAddressLoad()
543 auto Part1 = BuildMI(MBB, MBBI, DL, TII->get(LoongArch::PCALAU12I), DestReg); in expandLargeAddressLoad()
544 auto Part0 = BuildMI(MBB, MBBI, DL, TII->get(LoongArch::ADDI_D), ScratchReg) in expandLargeAddressLoad()
546 auto Part2 = BuildMI(MBB, MBBI, DL, TII->get(LoongArch::LU32I_D), ScratchReg) in expandLargeAddressLoad()
549 auto Part3 = BuildMI(MBB, MBBI, DL, TII->get(LoongArch::LU52I_D), ScratchReg) in expandLargeAddressLoad()
551 BuildMI(MBB, MBBI, DL, TII->get(LastOpcode), DestReg) in expandLargeAddressLoad()
575 MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, in expandLoadAddressPcrelLarge() argument
579 return expandLargeAddressLoad(MBB, MBBI, NextMBBI, LoongArch::ADD_D, in expandLoadAddressPcrelLarge()
584 MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, in expandLoadAddressGotLarge() argument
588 return expandLargeAddressLoad(MBB, MBBI, NextMBBI, LoongArch::LDX_D, in expandLoadAddressGotLarge()
593 MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, in expandLoadAddressTLSIELarge() argument
597 return expandLargeAddressLoad(MBB, MBBI, NextMBBI, LoongArch::LDX_D, in expandLoadAddressTLSIELarge()
602 MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, in expandLoadAddressTLSLDLarge() argument
606 return expandLargeAddressLoad(MBB, MBBI, NextMBBI, LoongArch::ADD_D, in expandLoadAddressTLSLDLarge()
611 MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, in expandLoadAddressTLSGDLarge() argument
615 return expandLargeAddressLoad(MBB, MBBI, NextMBBI, LoongArch::ADD_D, in expandLoadAddressTLSGDLarge()
620 MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, in expandLoadAddressTLSDescPcLarge() argument
633 MachineInstr &MI = *MBBI; in expandLoadAddressTLSDescPcLarge()
642 BuildMI(MBB, MBBI, DL, TII->get(LoongArch::PCALAU12I), LoongArch::R4) in expandLoadAddressTLSDescPcLarge()
644 BuildMI(MBB, MBBI, DL, TII->get(LoongArch::ADDI_D), ScratchReg) in expandLoadAddressTLSDescPcLarge()
647 BuildMI(MBB, MBBI, DL, TII->get(LoongArch::LU32I_D), ScratchReg) in expandLoadAddressTLSDescPcLarge()
650 BuildMI(MBB, MBBI, DL, TII->get(LoongArch::LU52I_D), ScratchReg) in expandLoadAddressTLSDescPcLarge()
653 BuildMI(MBB, MBBI, DL, TII->get(LoongArch::ADD_D), LoongArch::R4) in expandLoadAddressTLSDescPcLarge()
656 BuildMI(MBB, MBBI, DL, TII->get(LoongArch::LD_D), LoongArch::R1) in expandLoadAddressTLSDescPcLarge()
659 BuildMI(MBB, MBBI, DL, TII->get(LoongArch::PseudoDESC_CALL), LoongArch::R1) in expandLoadAddressTLSDescPcLarge()
662 BuildMI(MBB, MBBI, DL, TII->get(LoongArch::ADD_D), DestReg) in expandLoadAddressTLSDescPcLarge()
672 MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, in expandFunctionCALL() argument
675 MachineInstr &MI = *MBBI; in expandFunctionCALL()
691 CALL = BuildMI(MBB, MBBI, DL, TII->get(Opcode)).add(Func); in expandFunctionCALL()
705 BuildMI(MBB, MBBI, DL, TII->get(LoongArch::PCADDU18I), ScratchReg); in expandFunctionCALL()
708 BuildMI(MBB, MBBI, DL, TII->get(Opcode)).addReg(ScratchReg).addImm(0); in expandFunctionCALL()
727 expandLargeAddressLoad(MBB, MBBI, NextMBBI, LAOpcode, MO, Func, AddrReg, in expandFunctionCALL()
729 CALL = BuildMI(MBB, MBBI, DL, TII->get(Opcode)).addReg(AddrReg).addImm(0); in expandFunctionCALL()