Lines Matching refs:Entry
186 bool VerifyPredAndCC(MachineInstr *MI, const ReduceEntry &Entry,
191 const ReduceEntry &Entry);
194 const ReduceEntry &Entry, bool LiveCPSR, bool IsSelfLoop);
199 const ReduceEntry &Entry, bool LiveCPSR,
205 const ReduceEntry &Entry, bool LiveCPSR,
330 Thumb2SizeReduce::VerifyPredAndCC(MachineInstr *MI, const ReduceEntry &Entry, in VerifyPredAndCC() argument
333 if ((is2Addr && Entry.PredCC2 == 0) || in VerifyPredAndCC()
334 (!is2Addr && Entry.PredCC1 == 0)) { in VerifyPredAndCC()
353 } else if ((is2Addr && Entry.PredCC2 == 2) || in VerifyPredAndCC()
354 (!is2Addr && Entry.PredCC1 == 2)) { in VerifyPredAndCC()
403 const ReduceEntry &Entry) { in ReduceLoadStore() argument
412 unsigned Opc = Entry.NarrowOpc1; in ReduceLoadStore()
414 uint8_t ImmLimit = Entry.Imm1Limit; in ReduceLoadStore()
416 switch (Entry.WideOpc) { in ReduceLoadStore()
422 Opc = Entry.NarrowOpc2; in ReduceLoadStore()
423 ImmLimit = Entry.Imm2Limit; in ReduceLoadStore()
464 bool IsStore = Entry.WideOpc == ARM::t2STR_POST; in ReduceLoadStore()
478 auto MIB = BuildMI(MBB, MI, dl, TII->get(Entry.NarrowOpc1)) in ReduceLoadStore()
538 Opc = Entry.NarrowOpc2; // tPOP_RET in ReduceLoadStore()
550 (Entry.WideOpc == ARM::t2LDMIA_UPD || in ReduceLoadStore()
551 Entry.WideOpc == ARM::t2STMDB_UPD)) { in ReduceLoadStore()
552 Opc = Entry.NarrowOpc2; // tPOP or tPUSH in ReduceLoadStore()
555 (Entry.WideOpc != ARM::t2LDMIA_UPD && in ReduceLoadStore()
556 Entry.WideOpc != ARM::t2STMIA_UPD)) { in ReduceLoadStore()
594 if (Entry.WideOpc == ARM::t2STMIA) in ReduceLoadStore()
631 const ReduceEntry &Entry, in ReduceSpecial() argument
638 if (ReduceTo2Addr(MBB, MI, Entry, LiveCPSR, IsSelfLoop)) in ReduceSpecial()
640 return ReduceToNarrow(MBB, MI, Entry, LiveCPSR, IsSelfLoop); in ReduceSpecial()
677 if (Entry.LowRegs1 && !VerifyLowRegs(MI)) in ReduceSpecial()
681 return ReduceLoadStore(MBB, MI, Entry); in ReduceSpecial()
692 if (ReduceTo2Addr(MBB, MI, Entry, LiveCPSR, IsSelfLoop)) in ReduceSpecial()
696 return ReduceToNarrow(MBB, MI, Entry, LiveCPSR, IsSelfLoop); in ReduceSpecial()
708 return ReduceToNarrow(MBB, MI, Entry, LiveCPSR, IsSelfLoop); in ReduceSpecial()
714 return ReduceToNarrow(MBB, MI, Entry, LiveCPSR, IsSelfLoop); in ReduceSpecial()
726 return ReduceToNarrow(MBB, MI, Entry, LiveCPSR, IsSelfLoop); in ReduceSpecial()
736 return ReduceToNarrow(MBB, MI, Entry, LiveCPSR, IsSelfLoop); in ReduceSpecial()
744 const ReduceEntry &Entry, in ReduceTo2Addr() argument
749 if (!OptimizeSize && Entry.AvoidMovs && STI->avoidMOVsShifterOperand()) in ReduceTo2Addr()
785 if (Entry.LowRegs2 && !isARMLowRegister(Reg0)) in ReduceTo2Addr()
787 if (Entry.Imm2Limit) { in ReduceTo2Addr()
789 unsigned Limit = (1 << Entry.Imm2Limit) - 1; in ReduceTo2Addr()
794 if (Entry.LowRegs2 && !isARMLowRegister(Reg2)) in ReduceTo2Addr()
799 const MCInstrDesc &NewMCID = TII->get(Entry.NarrowOpc2); in ReduceTo2Addr()
820 if (!VerifyPredAndCC(MI, Entry, true, Pred, LiveCPSR, HasCC, CCDead)) in ReduceTo2Addr()
825 if (Entry.PartFlag && NewMCID.hasOptionalDef() && HasCC && in ReduceTo2Addr()
859 const ReduceEntry &Entry, in ReduceToNarrow() argument
864 if (!OptimizeSize && Entry.AvoidMovs && STI->avoidMOVsShifterOperand()) in ReduceToNarrow()
870 if (Entry.Imm1Limit) in ReduceToNarrow()
871 Limit = (1 << Entry.Imm1Limit) - 1; in ReduceToNarrow()
882 if (Entry.LowRegs1 && !isARMLowRegister(Reg)) in ReduceToNarrow()
891 const MCInstrDesc &NewMCID = TII->get(Entry.NarrowOpc1); in ReduceToNarrow()
911 if (!VerifyPredAndCC(MI, Entry, false, Pred, LiveCPSR, HasCC, CCDead)) in ReduceToNarrow()
916 if (Entry.PartFlag && NewMCID.hasOptionalDef() && HasCC && in ReduceToNarrow()
1021 const ReduceEntry &Entry = ReduceTable[OPI->second]; in ReduceMI() local
1024 if (Entry.Special) in ReduceMI()
1025 return ReduceSpecial(MBB, MI, Entry, LiveCPSR, IsSelfLoop); in ReduceMI()
1028 if (Entry.NarrowOpc2 && in ReduceMI()
1029 ReduceTo2Addr(MBB, MI, Entry, LiveCPSR, IsSelfLoop)) in ReduceMI()
1033 if (Entry.NarrowOpc1 && in ReduceMI()
1034 ReduceToNarrow(MBB, MI, Entry, LiveCPSR, IsSelfLoop)) in ReduceMI()