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,
333 Thumb2SizeReduce::VerifyPredAndCC(MachineInstr *MI, const ReduceEntry &Entry, in VerifyPredAndCC() argument
336 if ((is2Addr && Entry.PredCC2 == 0) || in VerifyPredAndCC()
337 (!is2Addr && Entry.PredCC1 == 0)) { in VerifyPredAndCC()
356 } else if ((is2Addr && Entry.PredCC2 == 2) || in VerifyPredAndCC()
357 (!is2Addr && Entry.PredCC1 == 2)) { in VerifyPredAndCC()
406 const ReduceEntry &Entry) { in ReduceLoadStore() argument
415 unsigned Opc = Entry.NarrowOpc1; in ReduceLoadStore()
417 uint8_t ImmLimit = Entry.Imm1Limit; in ReduceLoadStore()
419 switch (Entry.WideOpc) { in ReduceLoadStore()
425 Opc = Entry.NarrowOpc2; in ReduceLoadStore()
426 ImmLimit = Entry.Imm2Limit; in ReduceLoadStore()
467 bool IsStore = Entry.WideOpc == ARM::t2STR_POST; in ReduceLoadStore()
481 auto MIB = BuildMI(MBB, MI, dl, TII->get(Entry.NarrowOpc1)) in ReduceLoadStore()
541 Opc = Entry.NarrowOpc2; // tPOP_RET in ReduceLoadStore()
553 (Entry.WideOpc == ARM::t2LDMIA_UPD || in ReduceLoadStore()
554 Entry.WideOpc == ARM::t2STMDB_UPD)) { in ReduceLoadStore()
555 Opc = Entry.NarrowOpc2; // tPOP or tPUSH in ReduceLoadStore()
558 (Entry.WideOpc != ARM::t2LDMIA_UPD && in ReduceLoadStore()
559 Entry.WideOpc != ARM::t2STMIA_UPD)) { in ReduceLoadStore()
597 if (Entry.WideOpc == ARM::t2STMIA) in ReduceLoadStore()
634 const ReduceEntry &Entry, in ReduceSpecial() argument
641 if (ReduceTo2Addr(MBB, MI, Entry, LiveCPSR, IsSelfLoop)) in ReduceSpecial()
643 return ReduceToNarrow(MBB, MI, Entry, LiveCPSR, IsSelfLoop); in ReduceSpecial()
680 if (Entry.LowRegs1 && !VerifyLowRegs(MI)) in ReduceSpecial()
684 return ReduceLoadStore(MBB, MI, Entry); in ReduceSpecial()
695 if (ReduceTo2Addr(MBB, MI, Entry, LiveCPSR, IsSelfLoop)) in ReduceSpecial()
699 return ReduceToNarrow(MBB, MI, Entry, LiveCPSR, IsSelfLoop); in ReduceSpecial()
711 return ReduceToNarrow(MBB, MI, Entry, LiveCPSR, IsSelfLoop); in ReduceSpecial()
717 return ReduceToNarrow(MBB, MI, Entry, LiveCPSR, IsSelfLoop); in ReduceSpecial()
729 return ReduceToNarrow(MBB, MI, Entry, LiveCPSR, IsSelfLoop); in ReduceSpecial()
739 return ReduceToNarrow(MBB, MI, Entry, LiveCPSR, IsSelfLoop); in ReduceSpecial()
747 const ReduceEntry &Entry, in ReduceTo2Addr() argument
752 if (!OptimizeSize && Entry.AvoidMovs && STI->avoidMOVsShifterOperand()) in ReduceTo2Addr()
788 if (Entry.LowRegs2 && !isARMLowRegister(Reg0)) in ReduceTo2Addr()
790 if (Entry.Imm2Limit) { in ReduceTo2Addr()
792 unsigned Limit = (1 << Entry.Imm2Limit) - 1; in ReduceTo2Addr()
797 if (Entry.LowRegs2 && !isARMLowRegister(Reg2)) in ReduceTo2Addr()
802 const MCInstrDesc &NewMCID = TII->get(Entry.NarrowOpc2); in ReduceTo2Addr()
823 if (!VerifyPredAndCC(MI, Entry, true, Pred, LiveCPSR, HasCC, CCDead)) in ReduceTo2Addr()
828 if (Entry.PartFlag && NewMCID.hasOptionalDef() && HasCC && in ReduceTo2Addr()
862 const ReduceEntry &Entry, in ReduceToNarrow() argument
867 if (!OptimizeSize && Entry.AvoidMovs && STI->avoidMOVsShifterOperand()) in ReduceToNarrow()
873 if (Entry.Imm1Limit) in ReduceToNarrow()
874 Limit = (1 << Entry.Imm1Limit) - 1; in ReduceToNarrow()
885 if (Entry.LowRegs1 && !isARMLowRegister(Reg)) in ReduceToNarrow()
895 const MCInstrDesc &NewMCID = TII->get(Entry.NarrowOpc1); in ReduceToNarrow()
915 if (!VerifyPredAndCC(MI, Entry, false, Pred, LiveCPSR, HasCC, CCDead)) in ReduceToNarrow()
920 if (Entry.PartFlag && NewMCID.hasOptionalDef() && HasCC && in ReduceToNarrow()
1025 const ReduceEntry &Entry = ReduceTable[OPI->second]; in ReduceMI() local
1028 if (Entry.Special) in ReduceMI()
1029 return ReduceSpecial(MBB, MI, Entry, LiveCPSR, IsSelfLoop); in ReduceMI()
1032 if (Entry.NarrowOpc2 && in ReduceMI()
1033 ReduceTo2Addr(MBB, MI, Entry, LiveCPSR, IsSelfLoop)) in ReduceMI()
1037 if (Entry.NarrowOpc1 && in ReduceMI()
1038 ReduceToNarrow(MBB, MI, Entry, LiveCPSR, IsSelfLoop)) in ReduceMI()