xref: /aosp_15_r20/external/llvm/lib/Target/PowerPC/PPCInstrInfo.h (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker //===-- PPCInstrInfo.h - PowerPC Instruction Information --------*- C++ -*-===//
2*9880d681SAndroid Build Coastguard Worker //
3*9880d681SAndroid Build Coastguard Worker //                     The LLVM Compiler Infrastructure
4*9880d681SAndroid Build Coastguard Worker //
5*9880d681SAndroid Build Coastguard Worker // This file is distributed under the University of Illinois Open Source
6*9880d681SAndroid Build Coastguard Worker // License. See LICENSE.TXT for details.
7*9880d681SAndroid Build Coastguard Worker //
8*9880d681SAndroid Build Coastguard Worker //===----------------------------------------------------------------------===//
9*9880d681SAndroid Build Coastguard Worker //
10*9880d681SAndroid Build Coastguard Worker // This file contains the PowerPC implementation of the TargetInstrInfo class.
11*9880d681SAndroid Build Coastguard Worker //
12*9880d681SAndroid Build Coastguard Worker //===----------------------------------------------------------------------===//
13*9880d681SAndroid Build Coastguard Worker 
14*9880d681SAndroid Build Coastguard Worker #ifndef LLVM_LIB_TARGET_POWERPC_PPCINSTRINFO_H
15*9880d681SAndroid Build Coastguard Worker #define LLVM_LIB_TARGET_POWERPC_PPCINSTRINFO_H
16*9880d681SAndroid Build Coastguard Worker 
17*9880d681SAndroid Build Coastguard Worker #include "PPC.h"
18*9880d681SAndroid Build Coastguard Worker #include "PPCRegisterInfo.h"
19*9880d681SAndroid Build Coastguard Worker #include "llvm/Target/TargetInstrInfo.h"
20*9880d681SAndroid Build Coastguard Worker 
21*9880d681SAndroid Build Coastguard Worker #define GET_INSTRINFO_HEADER
22*9880d681SAndroid Build Coastguard Worker #include "PPCGenInstrInfo.inc"
23*9880d681SAndroid Build Coastguard Worker 
24*9880d681SAndroid Build Coastguard Worker namespace llvm {
25*9880d681SAndroid Build Coastguard Worker 
26*9880d681SAndroid Build Coastguard Worker /// PPCII - This namespace holds all of the PowerPC target-specific
27*9880d681SAndroid Build Coastguard Worker /// per-instruction flags.  These must match the corresponding definitions in
28*9880d681SAndroid Build Coastguard Worker /// PPC.td and PPCInstrFormats.td.
29*9880d681SAndroid Build Coastguard Worker namespace PPCII {
30*9880d681SAndroid Build Coastguard Worker enum {
31*9880d681SAndroid Build Coastguard Worker   // PPC970 Instruction Flags.  These flags describe the characteristics of the
32*9880d681SAndroid Build Coastguard Worker   // PowerPC 970 (aka G5) dispatch groups and how they are formed out of
33*9880d681SAndroid Build Coastguard Worker   // raw machine instructions.
34*9880d681SAndroid Build Coastguard Worker 
35*9880d681SAndroid Build Coastguard Worker   /// PPC970_First - This instruction starts a new dispatch group, so it will
36*9880d681SAndroid Build Coastguard Worker   /// always be the first one in the group.
37*9880d681SAndroid Build Coastguard Worker   PPC970_First = 0x1,
38*9880d681SAndroid Build Coastguard Worker 
39*9880d681SAndroid Build Coastguard Worker   /// PPC970_Single - This instruction starts a new dispatch group and
40*9880d681SAndroid Build Coastguard Worker   /// terminates it, so it will be the sole instruction in the group.
41*9880d681SAndroid Build Coastguard Worker   PPC970_Single = 0x2,
42*9880d681SAndroid Build Coastguard Worker 
43*9880d681SAndroid Build Coastguard Worker   /// PPC970_Cracked - This instruction is cracked into two pieces, requiring
44*9880d681SAndroid Build Coastguard Worker   /// two dispatch pipes to be available to issue.
45*9880d681SAndroid Build Coastguard Worker   PPC970_Cracked = 0x4,
46*9880d681SAndroid Build Coastguard Worker 
47*9880d681SAndroid Build Coastguard Worker   /// PPC970_Mask/Shift - This is a bitmask that selects the pipeline type that
48*9880d681SAndroid Build Coastguard Worker   /// an instruction is issued to.
49*9880d681SAndroid Build Coastguard Worker   PPC970_Shift = 3,
50*9880d681SAndroid Build Coastguard Worker   PPC970_Mask = 0x07 << PPC970_Shift
51*9880d681SAndroid Build Coastguard Worker };
52*9880d681SAndroid Build Coastguard Worker enum PPC970_Unit {
53*9880d681SAndroid Build Coastguard Worker   /// These are the various PPC970 execution unit pipelines.  Each instruction
54*9880d681SAndroid Build Coastguard Worker   /// is one of these.
55*9880d681SAndroid Build Coastguard Worker   PPC970_Pseudo = 0 << PPC970_Shift,   // Pseudo instruction
56*9880d681SAndroid Build Coastguard Worker   PPC970_FXU    = 1 << PPC970_Shift,   // Fixed Point (aka Integer/ALU) Unit
57*9880d681SAndroid Build Coastguard Worker   PPC970_LSU    = 2 << PPC970_Shift,   // Load Store Unit
58*9880d681SAndroid Build Coastguard Worker   PPC970_FPU    = 3 << PPC970_Shift,   // Floating Point Unit
59*9880d681SAndroid Build Coastguard Worker   PPC970_CRU    = 4 << PPC970_Shift,   // Control Register Unit
60*9880d681SAndroid Build Coastguard Worker   PPC970_VALU   = 5 << PPC970_Shift,   // Vector ALU
61*9880d681SAndroid Build Coastguard Worker   PPC970_VPERM  = 6 << PPC970_Shift,   // Vector Permute Unit
62*9880d681SAndroid Build Coastguard Worker   PPC970_BRU    = 7 << PPC970_Shift    // Branch Unit
63*9880d681SAndroid Build Coastguard Worker };
64*9880d681SAndroid Build Coastguard Worker } // end namespace PPCII
65*9880d681SAndroid Build Coastguard Worker 
66*9880d681SAndroid Build Coastguard Worker class PPCSubtarget;
67*9880d681SAndroid Build Coastguard Worker class PPCInstrInfo : public PPCGenInstrInfo {
68*9880d681SAndroid Build Coastguard Worker   PPCSubtarget &Subtarget;
69*9880d681SAndroid Build Coastguard Worker   const PPCRegisterInfo RI;
70*9880d681SAndroid Build Coastguard Worker 
71*9880d681SAndroid Build Coastguard Worker   bool StoreRegToStackSlot(MachineFunction &MF,
72*9880d681SAndroid Build Coastguard Worker                            unsigned SrcReg, bool isKill, int FrameIdx,
73*9880d681SAndroid Build Coastguard Worker                            const TargetRegisterClass *RC,
74*9880d681SAndroid Build Coastguard Worker                            SmallVectorImpl<MachineInstr*> &NewMIs,
75*9880d681SAndroid Build Coastguard Worker                            bool &NonRI, bool &SpillsVRS) const;
76*9880d681SAndroid Build Coastguard Worker   bool LoadRegFromStackSlot(MachineFunction &MF, const DebugLoc &DL,
77*9880d681SAndroid Build Coastguard Worker                             unsigned DestReg, int FrameIdx,
78*9880d681SAndroid Build Coastguard Worker                             const TargetRegisterClass *RC,
79*9880d681SAndroid Build Coastguard Worker                             SmallVectorImpl<MachineInstr *> &NewMIs,
80*9880d681SAndroid Build Coastguard Worker                             bool &NonRI, bool &SpillsVRS) const;
81*9880d681SAndroid Build Coastguard Worker   virtual void anchor();
82*9880d681SAndroid Build Coastguard Worker 
83*9880d681SAndroid Build Coastguard Worker protected:
84*9880d681SAndroid Build Coastguard Worker   /// Commutes the operands in the given instruction.
85*9880d681SAndroid Build Coastguard Worker   /// The commutable operands are specified by their indices OpIdx1 and OpIdx2.
86*9880d681SAndroid Build Coastguard Worker   ///
87*9880d681SAndroid Build Coastguard Worker   /// Do not call this method for a non-commutable instruction or for
88*9880d681SAndroid Build Coastguard Worker   /// non-commutable pair of operand indices OpIdx1 and OpIdx2.
89*9880d681SAndroid Build Coastguard Worker   /// Even though the instruction is commutable, the method may still
90*9880d681SAndroid Build Coastguard Worker   /// fail to commute the operands, null pointer is returned in such cases.
91*9880d681SAndroid Build Coastguard Worker   ///
92*9880d681SAndroid Build Coastguard Worker   /// For example, we can commute rlwimi instructions, but only if the
93*9880d681SAndroid Build Coastguard Worker   /// rotate amt is zero.  We also have to munge the immediates a bit.
94*9880d681SAndroid Build Coastguard Worker   MachineInstr *commuteInstructionImpl(MachineInstr &MI, bool NewMI,
95*9880d681SAndroid Build Coastguard Worker                                        unsigned OpIdx1,
96*9880d681SAndroid Build Coastguard Worker                                        unsigned OpIdx2) const override;
97*9880d681SAndroid Build Coastguard Worker 
98*9880d681SAndroid Build Coastguard Worker public:
99*9880d681SAndroid Build Coastguard Worker   explicit PPCInstrInfo(PPCSubtarget &STI);
100*9880d681SAndroid Build Coastguard Worker 
101*9880d681SAndroid Build Coastguard Worker   /// getRegisterInfo - TargetInstrInfo is a superset of MRegister info.  As
102*9880d681SAndroid Build Coastguard Worker   /// such, whenever a client has an instance of instruction info, it should
103*9880d681SAndroid Build Coastguard Worker   /// always be able to get register info as well (through this method).
104*9880d681SAndroid Build Coastguard Worker   ///
getRegisterInfo()105*9880d681SAndroid Build Coastguard Worker   const PPCRegisterInfo &getRegisterInfo() const { return RI; }
106*9880d681SAndroid Build Coastguard Worker 
107*9880d681SAndroid Build Coastguard Worker   ScheduleHazardRecognizer *
108*9880d681SAndroid Build Coastguard Worker   CreateTargetHazardRecognizer(const TargetSubtargetInfo *STI,
109*9880d681SAndroid Build Coastguard Worker                                const ScheduleDAG *DAG) const override;
110*9880d681SAndroid Build Coastguard Worker   ScheduleHazardRecognizer *
111*9880d681SAndroid Build Coastguard Worker   CreateTargetPostRAHazardRecognizer(const InstrItineraryData *II,
112*9880d681SAndroid Build Coastguard Worker                                      const ScheduleDAG *DAG) const override;
113*9880d681SAndroid Build Coastguard Worker 
114*9880d681SAndroid Build Coastguard Worker   unsigned getInstrLatency(const InstrItineraryData *ItinData,
115*9880d681SAndroid Build Coastguard Worker                            const MachineInstr &MI,
116*9880d681SAndroid Build Coastguard Worker                            unsigned *PredCost = nullptr) const override;
117*9880d681SAndroid Build Coastguard Worker 
118*9880d681SAndroid Build Coastguard Worker   int getOperandLatency(const InstrItineraryData *ItinData,
119*9880d681SAndroid Build Coastguard Worker                         const MachineInstr &DefMI, unsigned DefIdx,
120*9880d681SAndroid Build Coastguard Worker                         const MachineInstr &UseMI,
121*9880d681SAndroid Build Coastguard Worker                         unsigned UseIdx) const override;
getOperandLatency(const InstrItineraryData * ItinData,SDNode * DefNode,unsigned DefIdx,SDNode * UseNode,unsigned UseIdx)122*9880d681SAndroid Build Coastguard Worker   int getOperandLatency(const InstrItineraryData *ItinData,
123*9880d681SAndroid Build Coastguard Worker                         SDNode *DefNode, unsigned DefIdx,
124*9880d681SAndroid Build Coastguard Worker                         SDNode *UseNode, unsigned UseIdx) const override {
125*9880d681SAndroid Build Coastguard Worker     return PPCGenInstrInfo::getOperandLatency(ItinData, DefNode, DefIdx,
126*9880d681SAndroid Build Coastguard Worker                                               UseNode, UseIdx);
127*9880d681SAndroid Build Coastguard Worker   }
128*9880d681SAndroid Build Coastguard Worker 
hasLowDefLatency(const TargetSchedModel & SchedModel,const MachineInstr & DefMI,unsigned DefIdx)129*9880d681SAndroid Build Coastguard Worker   bool hasLowDefLatency(const TargetSchedModel &SchedModel,
130*9880d681SAndroid Build Coastguard Worker                         const MachineInstr &DefMI,
131*9880d681SAndroid Build Coastguard Worker                         unsigned DefIdx) const override {
132*9880d681SAndroid Build Coastguard Worker     // Machine LICM should hoist all instructions in low-register-pressure
133*9880d681SAndroid Build Coastguard Worker     // situations; none are sufficiently free to justify leaving in a loop
134*9880d681SAndroid Build Coastguard Worker     // body.
135*9880d681SAndroid Build Coastguard Worker     return false;
136*9880d681SAndroid Build Coastguard Worker   }
137*9880d681SAndroid Build Coastguard Worker 
useMachineCombiner()138*9880d681SAndroid Build Coastguard Worker   bool useMachineCombiner() const override {
139*9880d681SAndroid Build Coastguard Worker     return true;
140*9880d681SAndroid Build Coastguard Worker   }
141*9880d681SAndroid Build Coastguard Worker 
142*9880d681SAndroid Build Coastguard Worker   /// Return true when there is potentially a faster code sequence
143*9880d681SAndroid Build Coastguard Worker   /// for an instruction chain ending in <Root>. All potential patterns are
144*9880d681SAndroid Build Coastguard Worker   /// output in the <Pattern> array.
145*9880d681SAndroid Build Coastguard Worker   bool getMachineCombinerPatterns(
146*9880d681SAndroid Build Coastguard Worker       MachineInstr &Root,
147*9880d681SAndroid Build Coastguard Worker       SmallVectorImpl<MachineCombinerPattern> &P) const override;
148*9880d681SAndroid Build Coastguard Worker 
149*9880d681SAndroid Build Coastguard Worker   bool isAssociativeAndCommutative(const MachineInstr &Inst) const override;
150*9880d681SAndroid Build Coastguard Worker 
151*9880d681SAndroid Build Coastguard Worker   bool isCoalescableExtInstr(const MachineInstr &MI,
152*9880d681SAndroid Build Coastguard Worker                              unsigned &SrcReg, unsigned &DstReg,
153*9880d681SAndroid Build Coastguard Worker                              unsigned &SubIdx) const override;
154*9880d681SAndroid Build Coastguard Worker   unsigned isLoadFromStackSlot(const MachineInstr &MI,
155*9880d681SAndroid Build Coastguard Worker                                int &FrameIndex) const override;
156*9880d681SAndroid Build Coastguard Worker   unsigned isStoreToStackSlot(const MachineInstr &MI,
157*9880d681SAndroid Build Coastguard Worker                               int &FrameIndex) const override;
158*9880d681SAndroid Build Coastguard Worker 
159*9880d681SAndroid Build Coastguard Worker   bool findCommutedOpIndices(MachineInstr &MI, unsigned &SrcOpIdx1,
160*9880d681SAndroid Build Coastguard Worker                              unsigned &SrcOpIdx2) const override;
161*9880d681SAndroid Build Coastguard Worker 
162*9880d681SAndroid Build Coastguard Worker   void insertNoop(MachineBasicBlock &MBB,
163*9880d681SAndroid Build Coastguard Worker                   MachineBasicBlock::iterator MI) const override;
164*9880d681SAndroid Build Coastguard Worker 
165*9880d681SAndroid Build Coastguard Worker 
166*9880d681SAndroid Build Coastguard Worker   // Branch analysis.
167*9880d681SAndroid Build Coastguard Worker   bool analyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB,
168*9880d681SAndroid Build Coastguard Worker                      MachineBasicBlock *&FBB,
169*9880d681SAndroid Build Coastguard Worker                      SmallVectorImpl<MachineOperand> &Cond,
170*9880d681SAndroid Build Coastguard Worker                      bool AllowModify) const override;
171*9880d681SAndroid Build Coastguard Worker   unsigned RemoveBranch(MachineBasicBlock &MBB) const override;
172*9880d681SAndroid Build Coastguard Worker   unsigned InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB,
173*9880d681SAndroid Build Coastguard Worker                         MachineBasicBlock *FBB, ArrayRef<MachineOperand> Cond,
174*9880d681SAndroid Build Coastguard Worker                         const DebugLoc &DL) const override;
175*9880d681SAndroid Build Coastguard Worker 
176*9880d681SAndroid Build Coastguard Worker   // Select analysis.
177*9880d681SAndroid Build Coastguard Worker   bool canInsertSelect(const MachineBasicBlock &, ArrayRef<MachineOperand> Cond,
178*9880d681SAndroid Build Coastguard Worker                        unsigned, unsigned, int &, int &, int &) const override;
179*9880d681SAndroid Build Coastguard Worker   void insertSelect(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI,
180*9880d681SAndroid Build Coastguard Worker                     const DebugLoc &DL, unsigned DstReg,
181*9880d681SAndroid Build Coastguard Worker                     ArrayRef<MachineOperand> Cond, unsigned TrueReg,
182*9880d681SAndroid Build Coastguard Worker                     unsigned FalseReg) const override;
183*9880d681SAndroid Build Coastguard Worker 
184*9880d681SAndroid Build Coastguard Worker   void copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator I,
185*9880d681SAndroid Build Coastguard Worker                    const DebugLoc &DL, unsigned DestReg, unsigned SrcReg,
186*9880d681SAndroid Build Coastguard Worker                    bool KillSrc) const override;
187*9880d681SAndroid Build Coastguard Worker 
188*9880d681SAndroid Build Coastguard Worker   void storeRegToStackSlot(MachineBasicBlock &MBB,
189*9880d681SAndroid Build Coastguard Worker                            MachineBasicBlock::iterator MBBI,
190*9880d681SAndroid Build Coastguard Worker                            unsigned SrcReg, bool isKill, int FrameIndex,
191*9880d681SAndroid Build Coastguard Worker                            const TargetRegisterClass *RC,
192*9880d681SAndroid Build Coastguard Worker                            const TargetRegisterInfo *TRI) const override;
193*9880d681SAndroid Build Coastguard Worker 
194*9880d681SAndroid Build Coastguard Worker   void loadRegFromStackSlot(MachineBasicBlock &MBB,
195*9880d681SAndroid Build Coastguard Worker                             MachineBasicBlock::iterator MBBI,
196*9880d681SAndroid Build Coastguard Worker                             unsigned DestReg, int FrameIndex,
197*9880d681SAndroid Build Coastguard Worker                             const TargetRegisterClass *RC,
198*9880d681SAndroid Build Coastguard Worker                             const TargetRegisterInfo *TRI) const override;
199*9880d681SAndroid Build Coastguard Worker 
200*9880d681SAndroid Build Coastguard Worker   bool
201*9880d681SAndroid Build Coastguard Worker   ReverseBranchCondition(SmallVectorImpl<MachineOperand> &Cond) const override;
202*9880d681SAndroid Build Coastguard Worker 
203*9880d681SAndroid Build Coastguard Worker   bool FoldImmediate(MachineInstr &UseMI, MachineInstr &DefMI, unsigned Reg,
204*9880d681SAndroid Build Coastguard Worker                      MachineRegisterInfo *MRI) const override;
205*9880d681SAndroid Build Coastguard Worker 
206*9880d681SAndroid Build Coastguard Worker   // If conversion by predication (only supported by some branch instructions).
207*9880d681SAndroid Build Coastguard Worker   // All of the profitability checks always return true; it is always
208*9880d681SAndroid Build Coastguard Worker   // profitable to use the predicated branches.
isProfitableToIfCvt(MachineBasicBlock & MBB,unsigned NumCycles,unsigned ExtraPredCycles,BranchProbability Probability)209*9880d681SAndroid Build Coastguard Worker   bool isProfitableToIfCvt(MachineBasicBlock &MBB,
210*9880d681SAndroid Build Coastguard Worker                           unsigned NumCycles, unsigned ExtraPredCycles,
211*9880d681SAndroid Build Coastguard Worker                           BranchProbability Probability) const override {
212*9880d681SAndroid Build Coastguard Worker     return true;
213*9880d681SAndroid Build Coastguard Worker   }
214*9880d681SAndroid Build Coastguard Worker 
215*9880d681SAndroid Build Coastguard Worker   bool isProfitableToIfCvt(MachineBasicBlock &TMBB,
216*9880d681SAndroid Build Coastguard Worker                            unsigned NumT, unsigned ExtraT,
217*9880d681SAndroid Build Coastguard Worker                            MachineBasicBlock &FMBB,
218*9880d681SAndroid Build Coastguard Worker                            unsigned NumF, unsigned ExtraF,
219*9880d681SAndroid Build Coastguard Worker                            BranchProbability Probability) const override;
220*9880d681SAndroid Build Coastguard Worker 
isProfitableToDupForIfCvt(MachineBasicBlock & MBB,unsigned NumCycles,BranchProbability Probability)221*9880d681SAndroid Build Coastguard Worker   bool isProfitableToDupForIfCvt(MachineBasicBlock &MBB, unsigned NumCycles,
222*9880d681SAndroid Build Coastguard Worker                                  BranchProbability Probability) const override {
223*9880d681SAndroid Build Coastguard Worker     return true;
224*9880d681SAndroid Build Coastguard Worker   }
225*9880d681SAndroid Build Coastguard Worker 
isProfitableToUnpredicate(MachineBasicBlock & TMBB,MachineBasicBlock & FMBB)226*9880d681SAndroid Build Coastguard Worker   bool isProfitableToUnpredicate(MachineBasicBlock &TMBB,
227*9880d681SAndroid Build Coastguard Worker                                  MachineBasicBlock &FMBB) const override {
228*9880d681SAndroid Build Coastguard Worker     return false;
229*9880d681SAndroid Build Coastguard Worker   }
230*9880d681SAndroid Build Coastguard Worker 
231*9880d681SAndroid Build Coastguard Worker   // Predication support.
232*9880d681SAndroid Build Coastguard Worker   bool isPredicated(const MachineInstr &MI) const override;
233*9880d681SAndroid Build Coastguard Worker 
234*9880d681SAndroid Build Coastguard Worker   bool isUnpredicatedTerminator(const MachineInstr &MI) const override;
235*9880d681SAndroid Build Coastguard Worker 
236*9880d681SAndroid Build Coastguard Worker   bool PredicateInstruction(MachineInstr &MI,
237*9880d681SAndroid Build Coastguard Worker                             ArrayRef<MachineOperand> Pred) const override;
238*9880d681SAndroid Build Coastguard Worker 
239*9880d681SAndroid Build Coastguard Worker   bool SubsumesPredicate(ArrayRef<MachineOperand> Pred1,
240*9880d681SAndroid Build Coastguard Worker                          ArrayRef<MachineOperand> Pred2) const override;
241*9880d681SAndroid Build Coastguard Worker 
242*9880d681SAndroid Build Coastguard Worker   bool DefinesPredicate(MachineInstr &MI,
243*9880d681SAndroid Build Coastguard Worker                         std::vector<MachineOperand> &Pred) const override;
244*9880d681SAndroid Build Coastguard Worker 
245*9880d681SAndroid Build Coastguard Worker   bool isPredicable(MachineInstr &MI) const override;
246*9880d681SAndroid Build Coastguard Worker 
247*9880d681SAndroid Build Coastguard Worker   // Comparison optimization.
248*9880d681SAndroid Build Coastguard Worker 
249*9880d681SAndroid Build Coastguard Worker   bool analyzeCompare(const MachineInstr &MI, unsigned &SrcReg,
250*9880d681SAndroid Build Coastguard Worker                       unsigned &SrcReg2, int &Mask, int &Value) const override;
251*9880d681SAndroid Build Coastguard Worker 
252*9880d681SAndroid Build Coastguard Worker   bool optimizeCompareInstr(MachineInstr &CmpInstr, unsigned SrcReg,
253*9880d681SAndroid Build Coastguard Worker                             unsigned SrcReg2, int Mask, int Value,
254*9880d681SAndroid Build Coastguard Worker                             const MachineRegisterInfo *MRI) const override;
255*9880d681SAndroid Build Coastguard Worker 
256*9880d681SAndroid Build Coastguard Worker   /// GetInstSize - Return the number of bytes of code the specified
257*9880d681SAndroid Build Coastguard Worker   /// instruction may be.  This returns the maximum number of bytes.
258*9880d681SAndroid Build Coastguard Worker   ///
259*9880d681SAndroid Build Coastguard Worker   unsigned GetInstSizeInBytes(const MachineInstr &MI) const;
260*9880d681SAndroid Build Coastguard Worker 
261*9880d681SAndroid Build Coastguard Worker   void getNoopForMachoTarget(MCInst &NopInst) const override;
262*9880d681SAndroid Build Coastguard Worker 
263*9880d681SAndroid Build Coastguard Worker   std::pair<unsigned, unsigned>
264*9880d681SAndroid Build Coastguard Worker   decomposeMachineOperandsTargetFlags(unsigned TF) const override;
265*9880d681SAndroid Build Coastguard Worker 
266*9880d681SAndroid Build Coastguard Worker   ArrayRef<std::pair<unsigned, const char *>>
267*9880d681SAndroid Build Coastguard Worker   getSerializableDirectMachineOperandTargetFlags() const override;
268*9880d681SAndroid Build Coastguard Worker 
269*9880d681SAndroid Build Coastguard Worker   ArrayRef<std::pair<unsigned, const char *>>
270*9880d681SAndroid Build Coastguard Worker   getSerializableBitmaskMachineOperandTargetFlags() const override;
271*9880d681SAndroid Build Coastguard Worker 
272*9880d681SAndroid Build Coastguard Worker   // Lower pseudo instructions after register allocation.
273*9880d681SAndroid Build Coastguard Worker   bool expandPostRAPseudo(MachineInstr &MI) const override;
274*9880d681SAndroid Build Coastguard Worker };
275*9880d681SAndroid Build Coastguard Worker 
276*9880d681SAndroid Build Coastguard Worker }
277*9880d681SAndroid Build Coastguard Worker 
278*9880d681SAndroid Build Coastguard Worker #endif
279