1 //===- HexagonInstrInfo.h - Hexagon Instruction Information -----*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // This file contains the Hexagon implementation of the TargetInstrInfo class.
11 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_LIB_TARGET_HEXAGON_HEXAGONINSTRINFO_H
14 #define LLVM_LIB_TARGET_HEXAGON_HEXAGONINSTRINFO_H
16 #include "MCTargetDesc/HexagonBaseInfo.h"
17 #include "llvm/ADT/ArrayRef.h"
18 #include "llvm/ADT/SmallVector.h"
19 #include "llvm/CodeGen/MachineBasicBlock.h"
20 #include "llvm/CodeGen/TargetInstrInfo.h"
21 #include "llvm/CodeGen/ValueTypes.h"
22 #include "llvm/Support/MachineValueType.h"
26 #define GET_INSTRINFO_HEADER
27 #include "HexagonGenInstrInfo.inc"
31 class HexagonSubtarget
;
32 class MachineBranchProbabilityInfo
;
33 class MachineFunction
;
36 class TargetRegisterInfo
;
38 class HexagonInstrInfo
: public HexagonGenInstrInfo
{
39 const HexagonSubtarget
&Subtarget
;
41 enum BundleAttribute
{
42 memShufDisabledMask
= 0x4
45 virtual void anchor();
48 explicit HexagonInstrInfo(HexagonSubtarget
&ST
);
50 /// TargetInstrInfo overrides.
52 /// If the specified machine instruction is a direct
53 /// load from a stack slot, return the virtual or physical register number of
54 /// the destination along with the FrameIndex of the loaded stack slot. If
55 /// not, return 0. This predicate must return 0 if the instruction has
56 /// any side effects other than loading from the stack slot.
57 unsigned isLoadFromStackSlot(const MachineInstr
&MI
,
58 int &FrameIndex
) const override
;
60 /// If the specified machine instruction is a direct
61 /// store to a stack slot, return the virtual or physical register number of
62 /// the source reg along with the FrameIndex of the loaded stack slot. If
63 /// not, return 0. This predicate must return 0 if the instruction has
64 /// any side effects other than storing to the stack slot.
65 unsigned isStoreToStackSlot(const MachineInstr
&MI
,
66 int &FrameIndex
) const override
;
68 /// Check if the instruction or the bundle of instructions has
69 /// load from stack slots. Return the frameindex and machine memory operand
71 bool hasLoadFromStackSlot(
72 const MachineInstr
&MI
,
73 SmallVectorImpl
<const MachineMemOperand
*> &Accesses
) const override
;
75 /// Check if the instruction or the bundle of instructions has
76 /// store to stack slots. Return the frameindex and machine memory operand
78 bool hasStoreToStackSlot(
79 const MachineInstr
&MI
,
80 SmallVectorImpl
<const MachineMemOperand
*> &Accesses
) const override
;
82 /// Analyze the branching code at the end of MBB, returning
83 /// true if it cannot be understood (e.g. it's a switch dispatch or isn't
84 /// implemented for a target). Upon success, this returns false and returns
85 /// with the following information in various cases:
87 /// 1. If this block ends with no branches (it just falls through to its succ)
88 /// just return false, leaving TBB/FBB null.
89 /// 2. If this block ends with only an unconditional branch, it sets TBB to be
90 /// the destination block.
91 /// 3. If this block ends with a conditional branch and it falls through to a
92 /// successor block, it sets TBB to be the branch destination block and a
93 /// list of operands that evaluate the condition. These operands can be
94 /// passed to other TargetInstrInfo methods to create new branches.
95 /// 4. If this block ends with a conditional branch followed by an
96 /// unconditional branch, it returns the 'true' destination in TBB, the
97 /// 'false' destination in FBB, and a list of operands that evaluate the
98 /// condition. These operands can be passed to other TargetInstrInfo
99 /// methods to create new branches.
101 /// Note that removeBranch and insertBranch must be implemented to support
102 /// cases where this method returns success.
104 /// If AllowModify is true, then this routine is allowed to modify the basic
105 /// block (e.g. delete instructions after the unconditional branch).
106 bool analyzeBranch(MachineBasicBlock
&MBB
, MachineBasicBlock
*&TBB
,
107 MachineBasicBlock
*&FBB
,
108 SmallVectorImpl
<MachineOperand
> &Cond
,
109 bool AllowModify
) const override
;
111 /// Remove the branching code at the end of the specific MBB.
112 /// This is only invoked in cases where AnalyzeBranch returns success. It
113 /// returns the number of instructions that were removed.
114 unsigned removeBranch(MachineBasicBlock
&MBB
,
115 int *BytesRemoved
= nullptr) const override
;
117 /// Insert branch code into the end of the specified MachineBasicBlock.
118 /// The operands to this method are the same as those
119 /// returned by AnalyzeBranch. This is only invoked in cases where
120 /// AnalyzeBranch returns success. It returns the number of instructions
123 /// It is also invoked by tail merging to add unconditional branches in
124 /// cases where AnalyzeBranch doesn't apply because there was no original
125 /// branch to analyze. At least this much must be implemented, else tail
126 /// merging needs to be disabled.
127 unsigned insertBranch(MachineBasicBlock
&MBB
, MachineBasicBlock
*TBB
,
128 MachineBasicBlock
*FBB
, ArrayRef
<MachineOperand
> Cond
,
130 int *BytesAdded
= nullptr) const override
;
132 /// Analyze the loop code, return true if it cannot be understood. Upon
133 /// success, this function returns false and returns information about the
134 /// induction variable and compare instruction used at the end.
135 bool analyzeLoop(MachineLoop
&L
, MachineInstr
*&IndVarInst
,
136 MachineInstr
*&CmpInst
) const override
;
138 /// Generate code to reduce the loop iteration by one and check if the loop
139 /// is finished. Return the value/register of the new loop count. We need
140 /// this function when peeling off one or more iterations of a loop. This
141 /// function assumes the nth iteration is peeled first.
142 unsigned reduceLoopCount(MachineBasicBlock
&MBB
,
143 MachineInstr
*IndVar
, MachineInstr
&Cmp
,
144 SmallVectorImpl
<MachineOperand
> &Cond
,
145 SmallVectorImpl
<MachineInstr
*> &PrevInsts
,
146 unsigned Iter
, unsigned MaxIter
) const override
;
148 /// Return true if it's profitable to predicate
149 /// instructions with accumulated instruction latency of "NumCycles"
150 /// of the specified basic block, where the probability of the instructions
151 /// being executed is given by Probability, and Confidence is a measure
152 /// of our confidence that it will be properly predicted.
153 bool isProfitableToIfCvt(MachineBasicBlock
&MBB
, unsigned NumCycles
,
154 unsigned ExtraPredCycles
,
155 BranchProbability Probability
) const override
;
157 /// Second variant of isProfitableToIfCvt. This one
158 /// checks for the case where two basic blocks from true and false path
159 /// of a if-then-else (diamond) are predicated on mutally exclusive
160 /// predicates, where the probability of the true path being taken is given
161 /// by Probability, and Confidence is a measure of our confidence that it
162 /// will be properly predicted.
163 bool isProfitableToIfCvt(MachineBasicBlock
&TMBB
,
164 unsigned NumTCycles
, unsigned ExtraTCycles
,
165 MachineBasicBlock
&FMBB
,
166 unsigned NumFCycles
, unsigned ExtraFCycles
,
167 BranchProbability Probability
) const override
;
169 /// Return true if it's profitable for if-converter to duplicate instructions
170 /// of specified accumulated instruction latencies in the specified MBB to
171 /// enable if-conversion.
172 /// The probability of the instructions being executed is given by
173 /// Probability, and Confidence is a measure of our confidence that it
174 /// will be properly predicted.
175 bool isProfitableToDupForIfCvt(MachineBasicBlock
&MBB
, unsigned NumCycles
,
176 BranchProbability Probability
) const override
;
178 /// Emit instructions to copy a pair of physical registers.
180 /// This function should support copies within any legal register class as
181 /// well as any cross-class copies created during instruction selection.
183 /// The source and destination registers may overlap, which may require a
184 /// careful implementation when multiple copy instructions are required for
185 /// large registers. See for example the ARM target.
186 void copyPhysReg(MachineBasicBlock
&MBB
, MachineBasicBlock::iterator I
,
187 const DebugLoc
&DL
, unsigned DestReg
, unsigned SrcReg
,
188 bool KillSrc
) const override
;
190 /// Store the specified register of the given register class to the specified
191 /// stack frame index. The store instruction is to be added to the given
192 /// machine basic block before the specified machine instruction. If isKill
193 /// is true, the register operand is the last use and must be marked kill.
194 void storeRegToStackSlot(MachineBasicBlock
&MBB
,
195 MachineBasicBlock::iterator MBBI
,
196 unsigned SrcReg
, bool isKill
, int FrameIndex
,
197 const TargetRegisterClass
*RC
,
198 const TargetRegisterInfo
*TRI
) const override
;
200 /// Load the specified register of the given register class from the specified
201 /// stack frame index. The load instruction is to be added to the given
202 /// machine basic block before the specified machine instruction.
203 void loadRegFromStackSlot(MachineBasicBlock
&MBB
,
204 MachineBasicBlock::iterator MBBI
,
205 unsigned DestReg
, int FrameIndex
,
206 const TargetRegisterClass
*RC
,
207 const TargetRegisterInfo
*TRI
) const override
;
209 /// This function is called for all pseudo instructions
210 /// that remain after register allocation. Many pseudo instructions are
211 /// created to help register allocation. This is the place to convert them
212 /// into real instructions. The target can edit MI in place, or it can insert
213 /// new instructions and erase MI. The function should return true if
214 /// anything was changed.
215 bool expandPostRAPseudo(MachineInstr
&MI
) const override
;
217 /// Get the base register and byte offset of a load/store instr.
218 bool getMemOperandWithOffset(MachineInstr
&LdSt
, MachineOperand
*&BaseOp
,
220 const TargetRegisterInfo
*TRI
) const override
;
222 /// Reverses the branch condition of the specified condition list,
223 /// returning false on success and true if it cannot be reversed.
224 bool reverseBranchCondition(SmallVectorImpl
<MachineOperand
> &Cond
)
227 /// Insert a noop into the instruction stream at the specified point.
228 void insertNoop(MachineBasicBlock
&MBB
,
229 MachineBasicBlock::iterator MI
) const override
;
231 /// Returns true if the instruction is already predicated.
232 bool isPredicated(const MachineInstr
&MI
) const override
;
234 /// Return true for post-incremented instructions.
235 bool isPostIncrement(const MachineInstr
&MI
) const override
;
237 /// Convert the instruction into a predicated instruction.
238 /// It returns true if the operation was successful.
239 bool PredicateInstruction(MachineInstr
&MI
,
240 ArrayRef
<MachineOperand
> Cond
) const override
;
242 /// Returns true if the first specified predicate
243 /// subsumes the second, e.g. GE subsumes GT.
244 bool SubsumesPredicate(ArrayRef
<MachineOperand
> Pred1
,
245 ArrayRef
<MachineOperand
> Pred2
) const override
;
247 /// If the specified instruction defines any predicate
248 /// or condition code register(s) used for predication, returns true as well
249 /// as the definition predicate(s) by reference.
250 bool DefinesPredicate(MachineInstr
&MI
,
251 std::vector
<MachineOperand
> &Pred
) const override
;
253 /// Return true if the specified instruction can be predicated.
254 /// By default, this returns true for every instruction with a
255 /// PredicateOperand.
256 bool isPredicable(const MachineInstr
&MI
) const override
;
258 /// Test if the given instruction should be considered a scheduling boundary.
259 /// This primarily includes labels and terminators.
260 bool isSchedulingBoundary(const MachineInstr
&MI
,
261 const MachineBasicBlock
*MBB
,
262 const MachineFunction
&MF
) const override
;
264 /// Measure the specified inline asm to determine an approximation of its
266 unsigned getInlineAsmLength(const char *Str
,
267 const MCAsmInfo
&MAI
) const override
;
269 /// Allocate and return a hazard recognizer to use for this target when
270 /// scheduling the machine instructions after register allocation.
271 ScheduleHazardRecognizer
*
272 CreateTargetPostRAHazardRecognizer(const InstrItineraryData
*II
,
273 const ScheduleDAG
*DAG
) const override
;
275 /// For a comparison instruction, return the source registers
276 /// in SrcReg and SrcReg2 if having two register operands, and the value it
277 /// compares against in CmpValue. Return true if the comparison instruction
279 bool analyzeCompare(const MachineInstr
&MI
, unsigned &SrcReg
,
280 unsigned &SrcReg2
, int &Mask
, int &Value
) const override
;
282 /// Compute the instruction latency of a given instruction.
283 /// If the instruction has higher cost when predicated, it's returned via
285 unsigned getInstrLatency(const InstrItineraryData
*ItinData
,
286 const MachineInstr
&MI
,
287 unsigned *PredCost
= nullptr) const override
;
289 /// Create machine specific model for scheduling.
291 CreateTargetScheduleState(const TargetSubtargetInfo
&STI
) const override
;
293 // Sometimes, it is possible for the target
294 // to tell, even without aliasing information, that two MIs access different
295 // memory addresses. This function returns true if two MIs access different
296 // memory addresses and false otherwise.
298 areMemAccessesTriviallyDisjoint(MachineInstr
&MIa
, MachineInstr
&MIb
,
299 AliasAnalysis
*AA
= nullptr) const override
;
301 /// For instructions with a base and offset, return the position of the
302 /// base register and offset operands.
303 bool getBaseAndOffsetPosition(const MachineInstr
&MI
, unsigned &BasePos
,
304 unsigned &OffsetPos
) const override
;
306 /// If the instruction is an increment of a constant value, return the amount.
307 bool getIncrementValue(const MachineInstr
&MI
, int &Value
) const override
;
309 /// getOperandLatency - Compute and return the use operand latency of a given
310 /// pair of def and use.
311 /// In most cases, the static scheduling itinerary was enough to determine the
312 /// operand latency. But it may not be possible for instructions with variable
313 /// number of defs / uses.
315 /// This is a raw interface to the itinerary that may be directly overriden by
316 /// a target. Use computeOperandLatency to get the best estimate of latency.
317 int getOperandLatency(const InstrItineraryData
*ItinData
,
318 const MachineInstr
&DefMI
, unsigned DefIdx
,
319 const MachineInstr
&UseMI
,
320 unsigned UseIdx
) const override
;
322 /// Decompose the machine operand's target flags into two values - the direct
323 /// target flag value and any of bit flags that are applied.
324 std::pair
<unsigned, unsigned>
325 decomposeMachineOperandsTargetFlags(unsigned TF
) const override
;
327 /// Return an array that contains the direct target flag values and their
330 /// MIR Serialization is able to serialize only the target flags that are
331 /// defined by this method.
332 ArrayRef
<std::pair
<unsigned, const char *>>
333 getSerializableDirectMachineOperandTargetFlags() const override
;
335 /// Return an array that contains the bitmask target flag values and their
338 /// MIR Serialization is able to serialize only the target flags that are
339 /// defined by this method.
340 ArrayRef
<std::pair
<unsigned, const char *>>
341 getSerializableBitmaskMachineOperandTargetFlags() const override
;
343 bool isTailCall(const MachineInstr
&MI
) const override
;
345 /// HexagonInstrInfo specifics.
347 unsigned createVR(MachineFunction
*MF
, MVT VT
) const;
348 MachineInstr
*findLoopInstr(MachineBasicBlock
*BB
, unsigned EndLoopOp
,
349 MachineBasicBlock
*TargetBB
,
350 SmallPtrSet
<MachineBasicBlock
*, 8> &Visited
) const;
352 bool isBaseImmOffset(const MachineInstr
&MI
) const;
353 bool isAbsoluteSet(const MachineInstr
&MI
) const;
354 bool isAccumulator(const MachineInstr
&MI
) const;
355 bool isAddrModeWithOffset(const MachineInstr
&MI
) const;
356 bool isComplex(const MachineInstr
&MI
) const;
357 bool isCompoundBranchInstr(const MachineInstr
&MI
) const;
358 bool isConstExtended(const MachineInstr
&MI
) const;
359 bool isDeallocRet(const MachineInstr
&MI
) const;
360 bool isDependent(const MachineInstr
&ProdMI
,
361 const MachineInstr
&ConsMI
) const;
362 bool isDotCurInst(const MachineInstr
&MI
) const;
363 bool isDotNewInst(const MachineInstr
&MI
) const;
364 bool isDuplexPair(const MachineInstr
&MIa
, const MachineInstr
&MIb
) const;
365 bool isEarlySourceInstr(const MachineInstr
&MI
) const;
366 bool isEndLoopN(unsigned Opcode
) const;
367 bool isExpr(unsigned OpType
) const;
368 bool isExtendable(const MachineInstr
&MI
) const;
369 bool isExtended(const MachineInstr
&MI
) const;
370 bool isFloat(const MachineInstr
&MI
) const;
371 bool isHVXMemWithAIndirect(const MachineInstr
&I
,
372 const MachineInstr
&J
) const;
373 bool isIndirectCall(const MachineInstr
&MI
) const;
374 bool isIndirectL4Return(const MachineInstr
&MI
) const;
375 bool isJumpR(const MachineInstr
&MI
) const;
376 bool isJumpWithinBranchRange(const MachineInstr
&MI
, unsigned offset
) const;
377 bool isLateInstrFeedsEarlyInstr(const MachineInstr
&LRMI
,
378 const MachineInstr
&ESMI
) const;
379 bool isLateResultInstr(const MachineInstr
&MI
) const;
380 bool isLateSourceInstr(const MachineInstr
&MI
) const;
381 bool isLoopN(const MachineInstr
&MI
) const;
382 bool isMemOp(const MachineInstr
&MI
) const;
383 bool isNewValue(const MachineInstr
&MI
) const;
384 bool isNewValue(unsigned Opcode
) const;
385 bool isNewValueInst(const MachineInstr
&MI
) const;
386 bool isNewValueJump(const MachineInstr
&MI
) const;
387 bool isNewValueJump(unsigned Opcode
) const;
388 bool isNewValueStore(const MachineInstr
&MI
) const;
389 bool isNewValueStore(unsigned Opcode
) const;
390 bool isOperandExtended(const MachineInstr
&MI
, unsigned OperandNum
) const;
391 bool isPredicatedNew(const MachineInstr
&MI
) const;
392 bool isPredicatedNew(unsigned Opcode
) const;
393 bool isPredicatedTrue(const MachineInstr
&MI
) const;
394 bool isPredicatedTrue(unsigned Opcode
) const;
395 bool isPredicated(unsigned Opcode
) const;
396 bool isPredicateLate(unsigned Opcode
) const;
397 bool isPredictedTaken(unsigned Opcode
) const;
398 bool isSaveCalleeSavedRegsCall(const MachineInstr
&MI
) const;
399 bool isSignExtendingLoad(const MachineInstr
&MI
) const;
400 bool isSolo(const MachineInstr
&MI
) const;
401 bool isSpillPredRegOp(const MachineInstr
&MI
) const;
402 bool isTC1(const MachineInstr
&MI
) const;
403 bool isTC2(const MachineInstr
&MI
) const;
404 bool isTC2Early(const MachineInstr
&MI
) const;
405 bool isTC4x(const MachineInstr
&MI
) const;
406 bool isToBeScheduledASAP(const MachineInstr
&MI1
,
407 const MachineInstr
&MI2
) const;
408 bool isHVXVec(const MachineInstr
&MI
) const;
409 bool isValidAutoIncImm(const EVT VT
, const int Offset
) const;
410 bool isValidOffset(unsigned Opcode
, int Offset
,
411 const TargetRegisterInfo
*TRI
, bool Extend
= true) const;
412 bool isVecAcc(const MachineInstr
&MI
) const;
413 bool isVecALU(const MachineInstr
&MI
) const;
414 bool isVecUsableNextPacket(const MachineInstr
&ProdMI
,
415 const MachineInstr
&ConsMI
) const;
416 bool isZeroExtendingLoad(const MachineInstr
&MI
) const;
418 bool addLatencyToSchedule(const MachineInstr
&MI1
,
419 const MachineInstr
&MI2
) const;
420 bool canExecuteInBundle(const MachineInstr
&First
,
421 const MachineInstr
&Second
) const;
422 bool doesNotReturn(const MachineInstr
&CallMI
) const;
423 bool hasEHLabel(const MachineBasicBlock
*B
) const;
424 bool hasNonExtEquivalent(const MachineInstr
&MI
) const;
425 bool hasPseudoInstrPair(const MachineInstr
&MI
) const;
426 bool hasUncondBranch(const MachineBasicBlock
*B
) const;
427 bool mayBeCurLoad(const MachineInstr
&MI
) const;
428 bool mayBeNewStore(const MachineInstr
&MI
) const;
429 bool producesStall(const MachineInstr
&ProdMI
,
430 const MachineInstr
&ConsMI
) const;
431 bool producesStall(const MachineInstr
&MI
,
432 MachineBasicBlock::const_instr_iterator MII
) const;
433 bool predCanBeUsedAsDotNew(const MachineInstr
&MI
, unsigned PredReg
) const;
434 bool PredOpcodeHasJMP_c(unsigned Opcode
) const;
435 bool predOpcodeHasNot(ArrayRef
<MachineOperand
> Cond
) const;
437 unsigned getAddrMode(const MachineInstr
&MI
) const;
438 MachineOperand
*getBaseAndOffset(const MachineInstr
&MI
, int64_t &Offset
,
439 unsigned &AccessSize
) const;
440 SmallVector
<MachineInstr
*,2> getBranchingInstrs(MachineBasicBlock
& MBB
) const;
441 unsigned getCExtOpNum(const MachineInstr
&MI
) const;
442 HexagonII::CompoundGroup
443 getCompoundCandidateGroup(const MachineInstr
&MI
) const;
444 unsigned getCompoundOpcode(const MachineInstr
&GA
,
445 const MachineInstr
&GB
) const;
446 int getCondOpcode(int Opc
, bool sense
) const;
447 int getDotCurOp(const MachineInstr
&MI
) const;
448 int getNonDotCurOp(const MachineInstr
&MI
) const;
449 int getDotNewOp(const MachineInstr
&MI
) const;
450 int getDotNewPredJumpOp(const MachineInstr
&MI
,
451 const MachineBranchProbabilityInfo
*MBPI
) const;
452 int getDotNewPredOp(const MachineInstr
&MI
,
453 const MachineBranchProbabilityInfo
*MBPI
) const;
454 int getDotOldOp(const MachineInstr
&MI
) const;
455 HexagonII::SubInstructionGroup
getDuplexCandidateGroup(const MachineInstr
&MI
)
457 short getEquivalentHWInstr(const MachineInstr
&MI
) const;
458 unsigned getInstrTimingClassLatency(const InstrItineraryData
*ItinData
,
459 const MachineInstr
&MI
) const;
460 bool getInvertedPredSense(SmallVectorImpl
<MachineOperand
> &Cond
) const;
461 unsigned getInvertedPredicatedOpcode(const int Opc
) const;
462 int getMaxValue(const MachineInstr
&MI
) const;
463 unsigned getMemAccessSize(const MachineInstr
&MI
) const;
464 int getMinValue(const MachineInstr
&MI
) const;
465 short getNonExtOpcode(const MachineInstr
&MI
) const;
466 bool getPredReg(ArrayRef
<MachineOperand
> Cond
, unsigned &PredReg
,
467 unsigned &PredRegPos
, unsigned &PredRegFlags
) const;
468 short getPseudoInstrPair(const MachineInstr
&MI
) const;
469 short getRegForm(const MachineInstr
&MI
) const;
470 unsigned getSize(const MachineInstr
&MI
) const;
471 uint64_t getType(const MachineInstr
&MI
) const;
472 unsigned getUnits(const MachineInstr
&MI
) const;
474 MachineBasicBlock::instr_iterator
expandVGatherPseudo(MachineInstr
&MI
) const;
476 /// getInstrTimingClassLatency - Compute the instruction latency of a given
477 /// instruction using Timing Class information, if available.
478 unsigned nonDbgBBSize(const MachineBasicBlock
*BB
) const;
479 unsigned nonDbgBundleSize(MachineBasicBlock::const_iterator BundleHead
) const;
481 void immediateExtend(MachineInstr
&MI
) const;
482 bool invertAndChangeJumpTarget(MachineInstr
&MI
,
483 MachineBasicBlock
*NewTarget
) const;
484 void genAllInsnTimingClasses(MachineFunction
&MF
) const;
485 bool reversePredSense(MachineInstr
&MI
) const;
486 unsigned reversePrediction(unsigned Opcode
) const;
487 bool validateBranchCond(const ArrayRef
<MachineOperand
> &Cond
) const;
489 void setBundleNoShuf(MachineBasicBlock::instr_iterator MIB
) const;
490 bool getBundleNoShuf(const MachineInstr
&MIB
) const;
491 // Addressing mode relations.
492 short changeAddrMode_abs_io(short Opc
) const;
493 short changeAddrMode_io_abs(short Opc
) const;
494 short changeAddrMode_io_pi(short Opc
) const;
495 short changeAddrMode_io_rr(short Opc
) const;
496 short changeAddrMode_pi_io(short Opc
) const;
497 short changeAddrMode_rr_io(short Opc
) const;
498 short changeAddrMode_rr_ur(short Opc
) const;
499 short changeAddrMode_ur_rr(short Opc
) const;
501 short changeAddrMode_abs_io(const MachineInstr
&MI
) const {
502 return changeAddrMode_abs_io(MI
.getOpcode());
504 short changeAddrMode_io_abs(const MachineInstr
&MI
) const {
505 return changeAddrMode_io_abs(MI
.getOpcode());
507 short changeAddrMode_io_rr(const MachineInstr
&MI
) const {
508 return changeAddrMode_io_rr(MI
.getOpcode());
510 short changeAddrMode_rr_io(const MachineInstr
&MI
) const {
511 return changeAddrMode_rr_io(MI
.getOpcode());
513 short changeAddrMode_rr_ur(const MachineInstr
&MI
) const {
514 return changeAddrMode_rr_ur(MI
.getOpcode());
516 short changeAddrMode_ur_rr(const MachineInstr
&MI
) const {
517 return changeAddrMode_ur_rr(MI
.getOpcode());
521 } // end namespace llvm
523 #endif // LLVM_LIB_TARGET_HEXAGON_HEXAGONINSTRINFO_H