14 #ifndef LLVM_LIB_TARGET_POWERPC_PPCINSTRINFO_H 15 #define LLVM_LIB_TARGET_POWERPC_PPCINSTRINFO_H 21 #define GET_INSTRINFO_HEADER 22 #include "PPCGenInstrInfo.inc" 119 void StoreRegToStackSlot(
MachineFunction &MF,
unsigned SrcReg,
bool isKill,
123 unsigned DestReg,
int FrameIdx,
127 unsigned ConstantOpNo, int64_t Imm)
const;
129 bool &SeenIntermediateUse)
const;
130 const unsigned *getStoreOpcodesForSpillArray()
const;
131 const unsigned *getLoadOpcodesForSpillArray()
const;
132 virtual void anchor();
147 unsigned OpIdx2)
const override;
171 unsigned *PredCost =
nullptr)
const override;
176 unsigned UseIdx)
const override;
178 SDNode *DefNode,
unsigned DefIdx,
179 SDNode *UseNode,
unsigned UseIdx)
const override {
180 return PPCGenInstrInfo::getOperandLatency(ItinData, DefNode, DefIdx,
186 unsigned DefIdx)
const override {
200 bool getMachineCombinerPatterns(
204 bool isAssociativeAndCommutative(
const MachineInstr &Inst)
const override;
207 unsigned &SrcReg,
unsigned &DstReg,
208 unsigned &SubIdx)
const override;
211 bool isReallyTriviallyReMaterializable(
const MachineInstr &MI,
214 int &FrameIndex)
const override;
216 bool findCommutedOpIndices(
MachineInstr &MI,
unsigned &SrcOpIdx1,
217 unsigned &SrcOpIdx2)
const override;
227 bool AllowModify)
const override;
229 int *BytesRemoved =
nullptr)
const override;
233 int *BytesAdded =
nullptr)
const override;
237 unsigned,
unsigned,
int &,
int &,
int &)
const override;
239 const DebugLoc &DL,
unsigned DstReg,
241 unsigned FalseReg)
const override;
244 const DebugLoc &DL,
unsigned DestReg,
unsigned SrcReg,
245 bool KillSrc)
const override;
249 unsigned SrcReg,
bool isKill,
int FrameIndex,
255 unsigned DestReg,
int FrameIndex,
259 unsigned getStoreOpcodeForSpill(
unsigned Reg,
262 unsigned getLoadOpcodeForSpill(
unsigned Reg,
275 unsigned NumCycles,
unsigned ExtraPredCycles,
281 unsigned NumT,
unsigned ExtraT,
283 unsigned NumF,
unsigned ExtraF,
299 bool isUnpredicatedTerminator(
const MachineInstr &MI)
const override;
308 std::vector<MachineOperand> &Pred)
const override;
310 bool isPredicable(
const MachineInstr &MI)
const override;
314 bool analyzeCompare(
const MachineInstr &MI,
unsigned &SrcReg,
315 unsigned &SrcReg2,
int &
Mask,
int &
Value)
const override;
317 bool optimizeCompareInstr(
MachineInstr &CmpInstr,
unsigned SrcReg,
318 unsigned SrcReg2,
int Mask,
int Value,
324 unsigned getInstSizeInBytes(
const MachineInstr &MI)
const override;
326 void getNoop(
MCInst &NopInst)
const override;
328 std::pair<unsigned, unsigned>
329 decomposeMachineOperandsTargetFlags(
unsigned TF)
const override;
332 getSerializableDirectMachineOperandTargetFlags()
const override;
335 getSerializableBitmaskMachineOperandTargetFlags()
const override;
341 bool expandPostRAPseudo(
MachineInstr &MI)
const override;
344 return Reg >= PPC::VF0 && Reg <= PPC::VF31;
347 return Reg >= PPC::V0 && Reg <= PPC::V31;
350 static int getRecordFormOpcode(
unsigned Opcode);
354 bool isSignOrZeroExtended(
const MachineInstr &MI,
bool SignExt,
355 const unsigned PhiDepth)
const;
360 return isSignOrZeroExtended(MI,
true, depth);
366 return isSignOrZeroExtended(MI,
false, depth);
The VSX instruction that uses VSX register (vs0-vs63), instead of VMX register (v0-v31).
Compute iterated dominance frontiers using a linear time algorithm.
uint64_t ZeroIsSpecialNew
bool useMachineCombiner() const override
These are the various PPC970 execution unit pipelines.
unsigned const TargetRegisterInfo * TRI
bool isSignExtended(const MachineInstr &MI, const unsigned depth=0) const
Return true if the output of the instruction is always a sign-extended, i.e.
bool isXFormMemOp(unsigned Opcode) const
static bool isVRRegister(unsigned Reg)
PPC970_First - This instruction starts a new dispatch group, so it will always be the first one in th...
bool isProfitableToUnpredicate(MachineBasicBlock &TMBB, MachineBasicBlock &FMBB) const override
Provide an instruction scheduling machine model to CodeGen passes.
uint64_t ZeroIsSpecialOrig
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
Itinerary data supplied by a subtarget to be used by a target.
Instances of this class represent a single low-level machine instruction.
unsigned const MachineRegisterInfo * MRI
HazardRecognizer - This determines whether or not an instruction can be issued this cycle...
MachineInstrBuilder & UseMI
bool isProfitableToDupForIfCvt(MachineBasicBlock &MBB, unsigned NumCycles, BranchProbability Probability) const override
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
PPC970_Cracked - This instruction is cracked into two pieces, requiring two dispatch pipes to be avai...
Shift count to bypass PPC970 flags.
MachineInstrBuilder MachineInstrBuilder & DefMI
Represents one node in the SelectionDAG.
static bool isVFRegister(unsigned Reg)
bool hasLowDefLatency(const TargetSchedModel &SchedModel, const MachineInstr &DefMI, unsigned DefIdx) const override
PPC970_Mask/Shift - This is a bitmask that selects the pipeline type that an instruction is issued to...
bool isPredicated(MCInstrInfo const &MCII, MCInst const &MCI)
MachineRegisterInfo - Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc.
TargetSubtargetInfo - Generic base class for all target subtargets.
Representation of each machine instruction.
int getOperandLatency(const InstrItineraryData *ItinData, SDNode *DefNode, unsigned DefIdx, SDNode *UseNode, unsigned UseIdx) const override
This instruction is an X-Form memory operation.
uint64_t ImmMustBeMultipleOf
LLVM Value Representation.
std::underlying_type< E >::type Mask()
Get a bitmask with 1s in all places up to the high-order bit of E's largest value.
PPC970_Single - This instruction starts a new dispatch group and terminates it, so it will be the sol...
const PPCRegisterInfo & getRegisterInfo() const
getRegisterInfo - TargetInstrInfo is a superset of MRegister info.
bool isProfitableToIfCvt(MachineBasicBlock &MBB, unsigned NumCycles, unsigned ExtraPredCycles, BranchProbability Probability) const override
bool isZeroExtended(const MachineInstr &MI, const unsigned depth=0) const
Return true if the output of the instruction is always zero-extended, i.e.