LLVM 24.0.0git
HexagonInstrInfo.h
Go to the documentation of this file.
1//===- HexagonInstrInfo.h - Hexagon Instruction Information -----*- C++ -*-===//
2//
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
6//
7//===----------------------------------------------------------------------===//
8//
9// This file contains the Hexagon implementation of the TargetInstrInfo class.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_LIB_TARGET_HEXAGON_HEXAGONINSTRINFO_H
14#define LLVM_LIB_TARGET_HEXAGON_HEXAGONINSTRINFO_H
15
17#include "llvm/ADT/ArrayRef.h"
23#include <cstdint>
24#include <vector>
25
26#include "HexagonRegisterInfo.h"
27
28#define GET_INSTRINFO_HEADER
29#include "HexagonGenInstrInfo.inc"
30
31namespace llvm {
32
33class AAResults;
34class HexagonSubtarget;
35class MachineBranchProbabilityInfo;
36class MachineFunction;
37class MachineInstr;
38class MachineOperand;
39
41 const HexagonRegisterInfo RegInfo;
42 const HexagonSubtarget &Subtarget;
43
44 enum BundleAttribute {
45 memShufDisabledMask = 0x4
46 };
47
48 virtual void anchor();
49
50public:
51 explicit HexagonInstrInfo(const HexagonSubtarget &ST);
52
53 const HexagonRegisterInfo &getRegisterInfo() const { return RegInfo; }
54
56 InlineAsm::ConstraintCode C) const override {
57 return &Hexagon::IntRegsRegClass;
58 }
59
60 bool isMIBefore(const MachineInstr *A, const MachineInstr *B) const;
61
62 /// Copies the debug values of the variables that read the register First and
63 /// Second define to just after \p Second, in their original order, and sets
64 /// each dependent original undef. If a copy would read a value that changes
65 /// in between, nothing is copied and only the originals are set undef.
66 ///
67 /// Call this before the replacement for First and Second is created, and
68 /// insert the replacement before \p Second. The replacement must not write a
69 /// register the copies read, unless First or Second writes it too.
71 MachineInstr &Second) const;
72
73 bool hasQFPInstrs(const MachineFunction &MF) const;
74
75 /// TargetInstrInfo overrides.
76
77 /// If the specified machine instruction is a direct
78 /// load from a stack slot, return the virtual or physical register number of
79 /// the destination along with the FrameIndex of the loaded stack slot. If
80 /// not, return 0. This predicate must return 0 if the instruction has
81 /// any side effects other than loading from the stack slot.
83 int &FrameIndex) const override;
84
85 /// If the specified machine instruction is a direct
86 /// store to a stack slot, return the virtual or physical register number of
87 /// the source reg along with the FrameIndex of the loaded stack slot. If
88 /// not, return 0. This predicate must return 0 if the instruction has
89 /// any side effects other than storing to the stack slot.
91 int &FrameIndex) const override;
92
93 /// Check if the instruction or the bundle of instructions has
94 /// load from stack slots. Return the frameindex and machine memory operand
95 /// if true.
97 const MachineInstr &MI,
99
100 /// Check if the instruction or the bundle of instructions has
101 /// store to stack slots. Return the frameindex and machine memory operand
102 /// if true.
104 const MachineInstr &MI,
106
107 /// Per-instruction (Use, Def) register bit-vectors, keyed by MachineInstr.
108 using UseDefBitVectors = std::pair<BitVector, BitVector>;
110
111 /// Kinds of dependence reported by srcDependence() and the global
112 /// scheduler's dstDependence().
113 struct Dependency {
114 enum Kind {
115 Independent = 0x0, // !Dependent
116 RAW = 1 << 0,
117 WAR = 1 << 1,
118 WAW = 1 << 2,
120 SamePacketRAW = (1 << 3) | RAW, // e.g., .new jumps
121 // MI and another MI in its packet have a WAR, so they must move
122 // together: in { r1 = add(r2,r3); r4 = r1 }, moving only the add up
123 // would make r4 read the new r1.
124 SamePacketWAR = (1 << 4) | WAR,
126 Unknown = 1 << 5,
127 Duplex = 1 << 6, // Duplex-Dependency
128 // MI writes a reg that the destination packet reads. The packet still
129 // reads the old value, so MI may join it (if isSafeInBundleWAR allows)
130 // but not move above it: { r5 = r1 } <- r1 = add(r2,r3).
131 // No WAR bit; callers mask it.
133 };
134 static bool has(int Dep, Kind K) {
135 if (K == Independent)
136 return Dep == Independent;
137 return Dep & K;
138 }
139 static bool hasOnly(int Dep, Kind K) { return Dep == K; }
140 };
141
142 /// Compute the intra-packet dependence of \p RMII against the rest of the
143 /// bundle [\p SrcBeg, \p SrcEnd). With a null \p DepSet the first conflict
144 /// is returned; with a \p DepSet (cluster mode) all instructions that must
145 /// move with \p RMII are collected into it. Returns a bitmask of
146 /// Dependency::Kind. \p IsPullDown models moving \p RMII later (vs. the
147 /// default pull-up): a regular producer \p RMII reads must then move down
148 /// with it.
152 const MIUseDefMap &MIUseDefs,
153 SmallPtrSetImpl<MachineInstr *> *DepSet = nullptr,
154 bool PreventDuplexSep = true,
155 bool IsPullDown = false) const;
156
158
159 /// Analyze the branching code at the end of MBB, returning
160 /// true if it cannot be understood (e.g. it's a switch dispatch or isn't
161 /// implemented for a target). Upon success, this returns false and returns
162 /// with the following information in various cases:
163 ///
164 /// 1. If this block ends with no branches (it just falls through to its succ)
165 /// just return false, leaving TBB/FBB null.
166 /// 2. If this block ends with only an unconditional branch, it sets TBB to be
167 /// the destination block.
168 /// 3. If this block ends with a conditional branch and it falls through to a
169 /// successor block, it sets TBB to be the branch destination block and a
170 /// list of operands that evaluate the condition. These operands can be
171 /// passed to other TargetInstrInfo methods to create new branches.
172 /// 4. If this block ends with a conditional branch followed by an
173 /// unconditional branch, it returns the 'true' destination in TBB, the
174 /// 'false' destination in FBB, and a list of operands that evaluate the
175 /// condition. These operands can be passed to other TargetInstrInfo
176 /// methods to create new branches.
177 ///
178 /// Note that removeBranch and insertBranch must be implemented to support
179 /// cases where this method returns success.
180 ///
181 /// If AllowModify is true, then this routine is allowed to modify the basic
182 /// block (e.g. delete instructions after the unconditional branch).
184 MachineBasicBlock *&FBB,
186 bool AllowModify) const override;
187
188 /// Remove the branching code at the end of the specific MBB.
189 /// This is only invoked in cases where analyzeBranch returns success. It
190 /// returns the number of instructions that were removed.
192 int *BytesRemoved = nullptr) const override;
193
194 /// Insert branch code into the end of the specified MachineBasicBlock.
195 /// The operands to this method are the same as those
196 /// returned by analyzeBranch. This is only invoked in cases where
197 /// analyzeBranch returns success. It returns the number of instructions
198 /// inserted.
199 ///
200 /// It is also invoked by tail merging to add unconditional branches in
201 /// cases where analyzeBranch doesn't apply because there was no original
202 /// branch to analyze. At least this much must be implemented, else tail
203 /// merging needs to be disabled.
206 const DebugLoc &DL,
207 int *BytesAdded = nullptr) const override;
208
209 /// Analyze loop L, which must be a single-basic-block loop, and if the
210 /// conditions can be understood enough produce a PipelinerLoopInfo object.
211 std::unique_ptr<PipelinerLoopInfo>
212 analyzeLoopForPipelining(MachineBasicBlock *LoopBB) const override;
213
214 /// Return true if it's profitable to predicate
215 /// instructions with accumulated instruction latency of "NumCycles"
216 /// of the specified basic block, where the probability of the instructions
217 /// being executed is given by Probability, and Confidence is a measure
218 /// of our confidence that it will be properly predicted.
219 bool isProfitableToIfCvt(MachineBasicBlock &MBB, unsigned NumCycles,
220 unsigned ExtraPredCycles,
221 BranchProbability Probability) const override;
222
223 /// Second variant of isProfitableToIfCvt. This one
224 /// checks for the case where two basic blocks from true and false path
225 /// of a if-then-else (diamond) are predicated on mutually exclusive
226 /// predicates, where the probability of the true path being taken is given
227 /// by Probability, and Confidence is a measure of our confidence that it
228 /// will be properly predicted.
230 unsigned NumTCycles, unsigned ExtraTCycles,
231 MachineBasicBlock &FMBB,
232 unsigned NumFCycles, unsigned ExtraFCycles,
233 BranchProbability Probability) const override;
234
235 /// Return true if it's profitable for if-converter to duplicate instructions
236 /// of specified accumulated instruction latencies in the specified MBB to
237 /// enable if-conversion.
238 /// The probability of the instructions being executed is given by
239 /// Probability, and Confidence is a measure of our confidence that it
240 /// will be properly predicted.
241 bool isProfitableToDupForIfCvt(MachineBasicBlock &MBB, unsigned NumCycles,
242 BranchProbability Probability) const override;
243
244 /// Emit instructions to copy a pair of physical registers.
245 ///
246 /// This function should support copies within any legal register class as
247 /// well as any cross-class copies created during instruction selection.
248 ///
249 /// The source and destination registers may overlap, which may require a
250 /// careful implementation when multiple copy instructions are required for
251 /// large registers. See for example the ARM target.
253 const DebugLoc &DL, Register DestReg, Register SrcReg,
254 bool KillSrc, bool RenamableDest = false,
255 bool RenamableSrc = false) const override;
256
257 /// Store the specified register of the given register class to the specified
258 /// stack frame index. The store instruction is to be added to the given
259 /// machine basic block before the specified machine instruction. If isKill
260 /// is true, the register operand is the last use and must be marked kill.
263 bool isKill, int FrameIndex, const TargetRegisterClass *RC, Register VReg,
264 MachineInstr::MIFlag Flags = MachineInstr::NoFlags) const override;
265
266 /// Load the specified register of the given register class from the specified
267 /// stack frame index. The load instruction is to be added to the given
268 /// machine basic block before the specified machine instruction.
271 Register DestReg, int FrameIndex, const TargetRegisterClass *RC,
272 Register VReg, unsigned SubReg = 0,
273 MachineInstr::MIFlag Flags = MachineInstr::NoFlags) const override;
274
275 /// This function is called for all pseudo instructions
276 /// that remain after register allocation. Many pseudo instructions are
277 /// created to help register allocation. This is the place to convert them
278 /// into real instructions. The target can edit MI in place, or it can insert
279 /// new instructions and erase MI. The function should return true if
280 /// anything was changed.
281 bool expandPostRAPseudo(MachineInstr &MI) const override;
282
283 /// Get the base register and byte offset of a load/store instr.
285 const MachineInstr &LdSt,
287 bool &OffsetIsScalable, LocationSize &Width) const override;
288
289 /// Reverses the branch condition of the specified condition list,
290 /// returning false on success and true if it cannot be reversed.
292 const override;
293
294 /// Insert a noop into the instruction stream at the specified point.
296 MachineBasicBlock::iterator MI) const override;
297
298 /// Returns true if the instruction is already predicated.
299 bool isPredicated(const MachineInstr &MI) const override;
300
301 /// Return true for post-incremented instructions.
302 bool isPostIncrement(const MachineInstr &MI) const override;
303 bool isPostIncWithImmOffset(const MachineInstr &MI) const;
304
305 /// Convert the instruction into a predicated instruction.
306 /// It returns true if the operation was successful.
308 ArrayRef<MachineOperand> Cond) const override;
309
310 /// Returns true if the first specified predicate
311 /// subsumes the second, e.g. GE subsumes GT.
313 ArrayRef<MachineOperand> Pred2) const override;
314
315 /// If the specified instruction defines any predicate
316 /// or condition code register(s) used for predication, returns true as well
317 /// as the definition predicate(s) by reference.
318 bool ClobbersPredicate(MachineInstr &MI, std::vector<MachineOperand> &Pred,
319 bool SkipDead) const override;
320
321 /// Return true if the specified instruction can be predicated.
322 /// By default, this returns true for every instruction with a
323 /// PredicateOperand.
324 bool isPredicable(const MachineInstr &MI) const override;
325
326 /// Test if the given instruction should be considered a scheduling boundary.
327 /// This primarily includes labels and terminators.
329 const MachineBasicBlock *MBB,
330 const MachineFunction &MF) const override;
331
332 /// Measure the specified inline asm to determine an approximation of its
333 /// length.
334 unsigned getInlineAsmLength(const char *Str, const MCAsmInfo &MAI,
335 unsigned MaxInstLength = 0) const override;
336
337 /// Allocate and return a hazard recognizer to use for this target when
338 /// scheduling the machine instructions after register allocation.
341 const ScheduleDAG *DAG) const override;
342
343 /// For a comparison instruction, return the source registers
344 /// in SrcReg and SrcReg2 if having two register operands, and the value it
345 /// compares against in CmpValue. Return true if the comparison instruction
346 /// can be analyzed.
347 bool analyzeCompare(const MachineInstr &MI, Register &SrcReg,
348 Register &SrcReg2, int64_t &Mask,
349 int64_t &Value) const override;
350
351 /// Compute the instruction latency of a given instruction.
352 /// If the instruction has higher cost when predicated, it's returned via
353 /// PredCost.
354 unsigned getInstrLatency(const InstrItineraryData *ItinData,
355 const MachineInstr &MI,
356 unsigned *PredCost = nullptr) const override;
357
358 /// Create machine specific model for scheduling.
360 CreateTargetScheduleState(const TargetSubtargetInfo &STI) const override;
361
362 // Sometimes, it is possible for the target
363 // to tell, even without aliasing information, that two MIs access different
364 // memory addresses. This function returns true if two MIs access different
365 // memory addresses and false otherwise.
366 bool
368 const MachineInstr &MIb) const override;
369
370 /// Return true if the memory accesses of \p MIa and \p MIb may depend on
371 /// each other. Uses \p AA, if not null, for accesses that are not
372 /// trivially disjoint.
374 const MachineInstr *MIb) const;
375
376 /// For instructions with a base and offset, return the position of the
377 /// base register and offset operands.
378 bool getBaseAndOffsetPosition(const MachineInstr &MI, unsigned &BasePos,
379 unsigned &OffsetPos) const override;
380
381 /// If the instruction is an increment of a constant value, return the amount.
382 bool getIncrementValue(const MachineInstr &MI, int &Value) const override;
383
384 /// getOperandLatency - Compute and return the use operand latency of a given
385 /// pair of def and use.
386 /// In most cases, the static scheduling itinerary was enough to determine the
387 /// operand latency. But it may not be possible for instructions with variable
388 /// number of defs / uses.
389 ///
390 /// This is a raw interface to the itinerary that may be directly overridden
391 /// by a target. Use computeOperandLatency to get the best estimate of
392 /// latency.
393 std::optional<unsigned> getOperandLatency(const InstrItineraryData *ItinData,
394 const MachineInstr &DefMI,
395 unsigned DefIdx,
396 const MachineInstr &UseMI,
397 unsigned UseIdx) const override;
398
399 /// Decompose the machine operand's target flags into two values - the direct
400 /// target flag value and any of bit flags that are applied.
401 std::pair<unsigned, unsigned>
402 decomposeMachineOperandsTargetFlags(unsigned TF) const override;
403
404 /// Return an array that contains the direct target flag values and their
405 /// names.
406 ///
407 /// MIR Serialization is able to serialize only the target flags that are
408 /// defined by this method.
411
412 /// Return an array that contains the bitmask target flag values and their
413 /// names.
414 ///
415 /// MIR Serialization is able to serialize only the target flags that are
416 /// defined by this method.
419
420 bool isTailCall(const MachineInstr &MI) const override;
421 bool isAsCheapAsAMove(const MachineInstr &MI) const override;
422
423 // Return true if the instruction should be sunk by MachineSink.
424 // MachineSink determines on its own whether the instruction is safe to sink;
425 // this gives the target a hook to override the default behavior with regards
426 // to which instructions should be sunk.
427 bool shouldSink(const MachineInstr &MI) const override;
428
429 /// HexagonInstrInfo specifics.
430
431 Register createVR(MachineFunction *MF, MVT VT) const;
432 MachineInstr *findLoopInstr(MachineBasicBlock *BB, unsigned EndLoopOp,
433 MachineBasicBlock *TargetBB,
435
436 bool isAbsoluteSet(const MachineInstr &MI) const;
437 bool isAccumulator(const MachineInstr &MI) const;
438 bool isAddrModeWithOffset(const MachineInstr &MI) const;
439 bool isBaseImmOffset(const MachineInstr &MI) const;
440 bool isComplex(const MachineInstr &MI) const;
441 bool isCompoundBranchInstr(const MachineInstr &MI) const;
442 bool isConstExtended(const MachineInstr &MI) const;
443 bool isDeallocRet(const MachineInstr &MI) const;
444 bool isDependent(const MachineInstr &ProdMI,
445 const MachineInstr &ConsMI) const;
446 bool isDotCurInst(const MachineInstr &MI) const;
447 bool definesPredicateReg(const MachineInstr &MI) const;
448 std::optional<unsigned> getInvertedCompare(const int OpC) const;
450 bool isFloatCompare(const MachineInstr &MI) const;
453 unsigned Reg, const TargetRegisterInfo &TRI) const;
456 bool isDotCurOperand(const MachineInstr &MI, unsigned OpIndex) const;
457 bool isDotNewOperand(const MachineInstr &MI, unsigned OpIndex) const;
458 bool isDotTmpInst(const MachineInstr &MI) const;
459 bool isDotTmpOperand(const MachineInstr &MI, unsigned OpIndex) const;
460 /// A use (\p UseMI) can share a bundle with an instruction that redefines the
461 /// same register (\p DefMI), the use still sees the old value (WAR).
462 /// Returns true when that holds: no operand forwarding (.new/.tmp/.cur)
463 /// exposes the new value. Caller ensures same-bundle intent. \p IsPullDown
464 /// (push-down) is not yet supported and always returns false.
465 /// \p DefViaRegMask = true when the def is a regmask clobber (no operand):
466 /// such a def never forwards, so the def-side operand checks are skipped.
467 bool isSafeInBundleWAR(const MachineInstr &DefMI, unsigned DefOpIdx,
468 const MachineInstr &UseMI, unsigned UseOpIdx,
469 bool IsPullDown = false,
470 bool DefViaRegMask = false) const;
471 bool isDotNewInst(const MachineInstr &MI) const;
472 bool isDuplexPair(const MachineInstr &MIa, const MachineInstr &MIb) const;
473 bool isHMXActivateInstr(const MachineInstr &MI) const;
474 bool isHMXWeightInstr(const MachineInstr &MI) const;
475 bool isActivateWeightPair(const MachineInstr &MIa,
476 const MachineInstr &MIb) const;
477 bool isEndLoopN(unsigned Opcode) const;
478 bool isExpr(unsigned OpType) const;
479 bool isExtendable(const MachineInstr &MI) const;
480 bool isExtended(const MachineInstr &MI) const;
481 bool isFloat(const MachineInstr &MI) const;
483 const MachineInstr &J) const;
484 bool isIndirectCall(const MachineInstr &MI) const;
485 bool isIndirectL4Return(const MachineInstr &MI) const;
486 bool isJumpR(const MachineInstr &MI) const;
487 bool isJumpWithinBranchRange(const MachineInstr &MI, unsigned offset) const;
488 bool isLateSourceInstr(const MachineInstr &MI) const;
489 bool isLoopN(const MachineInstr &MI) const;
490 bool isMemOp(const MachineInstr &MI) const;
491 bool isNewValue(const MachineInstr &MI) const;
492 bool isNewValue(unsigned Opcode) const;
493 bool isNewValueInst(const MachineInstr &MI) const;
494 bool isNewValueJump(const MachineInstr &MI) const;
495 bool isNewValueJump(unsigned Opcode) const;
496 bool isNewValueStore(const MachineInstr &MI) const;
497 bool isNewValueStore(unsigned Opcode) const;
498 bool isOperandExtended(const MachineInstr &MI, unsigned OperandNum) const;
499 bool isPredicatedNew(const MachineInstr &MI) const;
500 bool isPredicatedNew(unsigned Opcode) const;
501 bool isPredicatedTrue(const MachineInstr &MI) const;
502 bool isPredicatedTrue(unsigned Opcode) const;
503 bool isPredicated(unsigned Opcode) const;
504 bool isPredicateLate(unsigned Opcode) const;
505 bool isPredictedTaken(unsigned Opcode) const;
506 bool isPureSlot0(const MachineInstr &MI) const;
507 bool isRestrictNoSlot1Store(const MachineInstr &MI) const;
508 bool isSaveCalleeSavedRegsCall(const MachineInstr &MI) const;
509 bool isSignExtendingLoad(const MachineInstr &MI) const;
510 bool isSolo(const MachineInstr &MI) const;
511 bool isSpillPredRegOp(const MachineInstr &MI) const;
512 bool isTC1(const MachineInstr &MI) const;
513 bool isTC2(const MachineInstr &MI) const;
514 bool isTC2Early(const MachineInstr &MI) const;
515 bool isTC4x(const MachineInstr &MI) const;
516 bool isToBeScheduledASAP(const MachineInstr &MI1,
517 const MachineInstr &MI2) const;
518 bool isHVXVec(const MachineInstr &MI) const;
519 bool isHLXVec(const MachineInstr &MI) const;
520 bool isValidAutoIncImm(const EVT VT, const int Offset) const;
521 bool isValidOffset(unsigned Opcode, int Offset, bool Extend = true) const;
522 bool isVecAcc(const MachineInstr &MI) const;
523 bool isVecALU(const MachineInstr &MI) const;
524 bool isVecUsableNextPacket(const MachineInstr &ProdMI,
525 const MachineInstr &ConsMI) const;
526 bool isZeroExtendingLoad(const MachineInstr &MI) const;
527
528 bool addLatencyToSchedule(const MachineInstr &MI1,
529 const MachineInstr &MI2) const;
531 const MachineInstr &Second) const;
532 bool doesNotReturn(const MachineInstr &CallMI) const;
533 bool hasEHLabel(const MachineBasicBlock *B) const;
534 bool hasNonExtEquivalent(const MachineInstr &MI) const;
535 bool hasUncondBranch(const MachineBasicBlock *B) const;
536 bool mayBeCurLoad(const MachineInstr &MI) const;
537 bool mayBeNewStore(const MachineInstr &MI) const;
538 // Identify HLX pseudos that expand to a tmp load or new store and a copy.
539 bool isTmpLoadPseudo(const MachineInstr &MI) const;
540 bool isNewStorePseudo(const MachineInstr &MI) const;
541 bool producesStall(const MachineInstr &ProdMI,
542 const MachineInstr &ConsMI) const;
543 bool producesStall(const MachineInstr &MI,
545 bool predCanBeUsedAsDotNew(const MachineInstr &MI, Register PredReg) const;
546 bool PredOpcodeHasJMP_c(unsigned Opcode) const;
548
549 unsigned getAddrMode(const MachineInstr &MI) const;
551 LocationSize &AccessSize) const;
553 unsigned getCExtOpNum(const MachineInstr &MI) const;
556 unsigned getCompoundOpcode(const MachineInstr &GA,
557 const MachineInstr &GB) const;
558 int getDuplexOpcode(const MachineInstr &MI, bool ForBigCore = true) const;
559 int getCondOpcode(int Opc, bool sense) const;
560 int getDotCurOp(const MachineInstr &MI) const;
561 int getNonDotCurOp(const MachineInstr &MI) const;
562 int getDotNewOp(const MachineInstr &MI) const;
564 const MachineBranchProbabilityInfo *MBPI) const;
566 const MachineBranchProbabilityInfo *MBPI) const;
567 int getDotOldOp(const MachineInstr &MI) const;
570 unsigned getInstrTimingClassLatency(const InstrItineraryData *ItinData,
571 const MachineInstr &MI) const;
573 unsigned getInvertedPredicatedOpcode(const int Opc) const;
574 int getMaxValue(const MachineInstr &MI) const;
575 unsigned getMemAccessSize(const MachineInstr &MI) const;
576 int getMinValue(const MachineInstr &MI) const;
577 short getNonExtOpcode(const MachineInstr &MI) const;
579 unsigned &PredRegPos, RegState &PredRegFlags) const;
580 short getRegForm(const MachineInstr &MI) const;
581 unsigned getSize(const MachineInstr &MI) const;
582 uint64_t getType(const MachineInstr &MI) const;
584
586
587 /// getInstrTimingClassLatency - Compute the instruction latency of a given
588 /// instruction using Timing Class information, if available.
589 unsigned nonDbgBBSize(const MachineBasicBlock *BB) const;
590 unsigned nonDbgBundleSize(MachineBasicBlock::const_iterator BundleHead) const;
591
592 void immediateExtend(MachineInstr &MI) const;
594 MachineBasicBlock *NewTarget) const;
596 bool reversePredSense(MachineInstr &MI) const;
597 unsigned reversePrediction(unsigned Opcode) const;
599
601 bool getBundleNoShuf(const MachineInstr &MIB) const;
602
603 // When TinyCore with Duplexes is enabled, this function is used to translate
604 // tiny-instructions to big-instructions and vice versa to get the slot
605 // consumption.
607 bool ToBigInstrs) const;
609 bool ToBigInstrs = true) const;
611 bool ToBigInstrs) const;
612 bool useMachineCombiner() const override { return true; }
614 bool Invert) const override;
615
616 // Addressing mode relations.
617 short changeAddrMode_abs_io(short Opc) const;
618 short changeAddrMode_io_abs(short Opc) const;
619 short changeAddrMode_io_pi(short Opc) const;
620 short changeAddrMode_io_rr(short Opc) const;
621 short changeAddrMode_pi_io(short Opc) const;
622 short changeAddrMode_rr_io(short Opc) const;
623 short changeAddrMode_rr_ur(short Opc) const;
624 short changeAddrMode_ur_rr(short Opc) const;
625
627 return changeAddrMode_abs_io(MI.getOpcode());
628 }
630 return changeAddrMode_io_abs(MI.getOpcode());
631 }
633 return changeAddrMode_io_rr(MI.getOpcode());
634 }
636 return changeAddrMode_rr_io(MI.getOpcode());
637 }
639 return changeAddrMode_rr_ur(MI.getOpcode());
640 }
642 return changeAddrMode_ur_rr(MI.getOpcode());
643 }
644
645 MCInst getNop() const override;
646 bool isQFPMul(const MachineInstr *MF) const;
647
648 // Check if the instruction uses a qf32/qf16 operand.
649 // 'Index' specifies the input operand number (1..3). If 0, check any.
650 bool usesQF32Operand(MachineInstr *MI, unsigned Index = 0) const;
651 bool usesQF16Operand(MachineInstr *MI, unsigned Index = 0) const;
652 bool usesQFOperand(MachineInstr *MI, unsigned Index = 0) const;
653
654 // Check if the instruction has a qf32/qf16 output.
655 bool isQFP32Instr(MachineInstr *MI) const;
656 bool isQFP16Instr(MachineInstr *MI) const;
657 bool isQFPInstr(MachineInstr *MI) const;
658};
659
660/// \brief Create RegSubRegPair from a register MachineOperand
661inline TargetInstrInfo::RegSubRegPair
662getRegSubRegPair(const MachineOperand &O) {
663 assert(O.isReg());
664 return TargetInstrInfo::RegSubRegPair(O.getReg(), O.getSubReg());
665}
666
667} // end namespace llvm
668
669#endif // LLVM_LIB_TARGET_HEXAGON_HEXAGONINSTRINFO_H
MachineInstrBuilder & UseMI
MachineInstrBuilder MachineInstrBuilder & DefMI
SDValue Pred
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
uint64_t uint64_t
MachineBasicBlock & MBB
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
MachineBasicBlock MachineBasicBlock::iterator MBBI
static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
DXIL Forward Handle Accesses
static cl::opt< bool > PreventDuplexSep("prevent-duplex-sep-v2", cl::Hidden, cl::init(true), cl::desc("Prevent separation of duplex while pullup in global scheduler V2"))
IRTranslator LLVM IR MI
SmallVector< MachineOperand, 4 > Cond
unsigned Opc
#define I(x, y, z)
Definition MD5.cpp:57
Register Reg
Register const TargetRegisterInfo * TRI
uint64_t IntrinsicInst * II
const SmallVectorImpl< MachineOperand > MachineBasicBlock * TBB
This file defines the SmallVector class.
Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition ArrayRef.h:40
A debug info location.
Definition DebugLoc.h:126
bool isTmpLoadPseudo(const MachineInstr &MI) const
int getDuplexOpcode(const MachineInstr &MI, bool ForBigCore=true) const
bool isHLXVec(const MachineInstr &MI) const
unsigned removeBranch(MachineBasicBlock &MBB, int *BytesRemoved=nullptr) const override
Remove the branching code at the end of the specific MBB.
bool isPredicated(const MachineInstr &MI) const override
Returns true if the instruction is already predicated.
bool isHVXMemWithAIndirect(const MachineInstr &I, const MachineInstr &J) const
short changeAddrMode_abs_io(short Opc) const
bool isRestrictNoSlot1Store(const MachineInstr &MI) const
short getRegForm(const MachineInstr &MI) const
bool isVecALU(const MachineInstr &MI) const
bool definesPredicateReg(const MachineInstr &MI) const
bool isCompoundBranchInstr(const MachineInstr &MI) const
bool isDuplexPair(const MachineInstr &MIa, const MachineInstr &MIb) const
Symmetrical. See if these two instructions are fit for duplex pair.
bool isJumpR(const MachineInstr &MI) const
ScheduleHazardRecognizer * CreateTargetPostRAHazardRecognizer(const InstrItineraryData *II, const ScheduleDAG *DAG) const override
Allocate and return a hazard recognizer to use for this target when scheduling the machine instructio...
std::pair< unsigned, unsigned > decomposeMachineOperandsTargetFlags(unsigned TF) const override
Decompose the machine operand's target flags into two values - the direct target flag value and any o...
unsigned getInlineAsmLength(const char *Str, const MCAsmInfo &MAI, unsigned MaxInstLength=0) const override
Measure the specified inline asm to determine an approximation of its length.
bool getMemOperandsWithOffsetWidth(const MachineInstr &LdSt, SmallVectorImpl< const MachineOperand * > &BaseOps, int64_t &Offset, bool &OffsetIsScalable, LocationSize &Width) const override
Get the base register and byte offset of a load/store instr.
bool producesStall(const MachineInstr &ProdMI, const MachineInstr &ConsMI) const
bool invertAndChangeJumpTarget(MachineInstr &MI, MachineBasicBlock *NewTarget) const
void storeRegToStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, Register SrcReg, bool isKill, int FrameIndex, const TargetRegisterClass *RC, Register VReg, MachineInstr::MIFlag Flags=MachineInstr::NoFlags) const override
Store the specified register of the given register class to the specified stack frame index.
bool isDotTmpInst(const MachineInstr &MI) const
bool isSoftwarePipelineLoopInstr(const MachineInstr &MI) const
bool isPredictedTaken(unsigned Opcode) const
bool isSaveCalleeSavedRegsCall(const MachineInstr &MI) const
bool hasQFPInstrs(const MachineFunction &MF) const
Register isLoadFromStackSlot(const MachineInstr &MI, int &FrameIndex) const override
TargetInstrInfo overrides.
unsigned nonDbgBundleSize(MachineBasicBlock::const_iterator BundleHead) const
int getDotNewPredOp(const MachineInstr &MI, const MachineBranchProbabilityInfo *MBPI) const
bool isQFP32Instr(MachineInstr *MI) const
bool ClobbersPredicate(MachineInstr &MI, std::vector< MachineOperand > &Pred, bool SkipDead) const override
If the specified instruction defines any predicate or condition code register(s) used for predication...
unsigned getInvertedPredicatedOpcode(const int Opc) const
bool isPureSlot0(const MachineInstr &MI) const
bool doesNotReturn(const MachineInstr &CallMI) const
HexagonII::SubInstructionGroup getDuplexCandidateGroup(const MachineInstr &MI) const
bool analyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, SmallVectorImpl< MachineOperand > &Cond, bool AllowModify) const override
Analyze the branching code at the end of MBB, returning true if it cannot be understood (e....
bool usesQF16Operand(MachineInstr *MI, unsigned Index=0) const
bool isPredicatedNew(const MachineInstr &MI) const
bool isSignExtendingLoad(const MachineInstr &MI) const
bool isVecAcc(const MachineInstr &MI) const
bool reversePredSense(MachineInstr &MI) const
bool isPostIncWithImmOffset(const MachineInstr &MI) const
bool isQFPMul(const MachineInstr *MF) const
unsigned getAddrMode(const MachineInstr &MI) const
MCInst getNop() const override
bool isJumpWithinBranchRange(const MachineInstr &MI, unsigned offset) const
bool mayBeNewStore(const MachineInstr &MI) const
short changeAddrMode_rr_ur(const MachineInstr &MI) const
bool isOperandExtended(const MachineInstr &MI, unsigned OperandNum) const
bool canExecuteInBundle(const MachineInstr &First, const MachineInstr &Second) const
Can these instructions execute at the same time in a bundle.
bool isQFP16Instr(MachineInstr *MI) const
std::optional< unsigned > getOperandLatency(const InstrItineraryData *ItinData, const MachineInstr &DefMI, unsigned DefIdx, const MachineInstr &UseMI, unsigned UseIdx) const override
getOperandLatency - Compute and return the use operand latency of a given pair of def and use.
int srcDependence(MachineBasicBlock::instr_iterator SrcBeg, MachineBasicBlock::instr_iterator SrcEnd, MachineBasicBlock::instr_iterator RMII, const MIUseDefMap &MIUseDefs, SmallPtrSetImpl< MachineInstr * > *DepSet=nullptr, bool PreventDuplexSep=true, bool IsPullDown=false) const
Compute the intra-packet dependence of RMII against the rest of the bundle [SrcBeg,...
bool isAddrModeWithOffset(const MachineInstr &MI) const
bool hasCallUseInBundle(MachineBasicBlock::const_instr_iterator MIBegin, MachineBasicBlock::const_instr_iterator MIEnd, unsigned Reg, const TargetRegisterInfo &TRI) const
bool isBaseImmOffset(const MachineInstr &MI) const
bool isAbsoluteSet(const MachineInstr &MI) const
short changeAddrMode_io_pi(short Opc) const
void copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, const DebugLoc &DL, Register DestReg, Register SrcReg, bool KillSrc, bool RenamableDest=false, bool RenamableSrc=false) const override
Emit instructions to copy a pair of physical registers.
void findInstrPredicate(MachineInstr *MI, SmallVectorImpl< MachineOperand > &Cond) const
findInstrPredicate - Set the predicate of the instruction in the specified predicate vector First ent...
const HexagonRegisterInfo & getRegisterInfo() const
short changeAddrMode_pi_io(short Opc) const
bool analyzeCompare(const MachineInstr &MI, Register &SrcReg, Register &SrcReg2, int64_t &Mask, int64_t &Value) const override
For a comparison instruction, return the source registers in SrcReg and SrcReg2 if having two registe...
bool reverseBranchCondition(SmallVectorImpl< MachineOperand > &Cond) const override
Reverses the branch condition of the specified condition list, returning false on success and true if...
std::unique_ptr< PipelinerLoopInfo > analyzeLoopForPipelining(MachineBasicBlock *LoopBB) const override
Analyze loop L, which must be a single-basic-block loop, and if the conditions can be understood enou...
bool isLoopN(const MachineInstr &MI) const
bool isSpillPredRegOp(const MachineInstr &MI) const
bool hasStoreToStackSlot(const MachineInstr &MI, SmallVectorImpl< const MachineMemOperand * > &Accesses) const override
Check if the instruction or the bundle of instructions has store to stack slots.
bool isFloatCompare(const MachineInstr &MI) const
ArrayRef< std::pair< unsigned, const char * > > getSerializableDirectMachineOperandTargetFlags() const override
Return an array that contains the direct target flag values and their names.
bool useMachineCombiner() const override
bool isIndirectCall(const MachineInstr &MI) const
short changeAddrMode_ur_rr(short Opc) const
bool isValidAutoIncImm(const EVT VT, const int Offset) const
bool hasNonExtEquivalent(const MachineInstr &MI) const
bool isConstExtended(const MachineInstr &MI) const
bool getIncrementValue(const MachineInstr &MI, int &Value) const override
If the instruction is an increment of a constant value, return the amount.
int getCondOpcode(int Opc, bool sense) const
void moveDependentDebugValues(MachineInstr &First, MachineInstr &Second) const
Copies the debug values of the variables that read the register First and Second define to just after...
MachineInstr * findLoopInstr(MachineBasicBlock *BB, unsigned EndLoopOp, MachineBasicBlock *TargetBB, SmallPtrSet< MachineBasicBlock *, 8 > &Visited) const
Find the hardware loop instruction used to set-up the specified loop.
unsigned getInstrTimingClassLatency(const InstrItineraryData *ItinData, const MachineInstr &MI) const
bool usesQF32Operand(MachineInstr *MI, unsigned Index=0) const
bool isAccumulator(const MachineInstr &MI) const
unsigned insertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, ArrayRef< MachineOperand > Cond, const DebugLoc &DL, int *BytesAdded=nullptr) const override
Insert branch code into the end of the specified MachineBasicBlock.
unsigned getInstrLatency(const InstrItineraryData *ItinData, const MachineInstr &MI, unsigned *PredCost=nullptr) const override
Compute the instruction latency of a given instruction.
bool PredOpcodeHasJMP_c(unsigned Opcode) const
bool isNewValue(const MachineInstr &MI) const
Register createVR(MachineFunction *MF, MVT VT) const
HexagonInstrInfo specifics.
bool isDotCurInst(const MachineInstr &MI) const
bool validateBranchCond(const ArrayRef< MachineOperand > &Cond) const
bool areMemAccessesDependent(AAResults *AA, const MachineInstr *MIa, const MachineInstr *MIb) const
Return true if the memory accesses of MIa and MIb may depend on each other.
bool isExtended(const MachineInstr &MI) const
bool isProfitableToIfCvt(MachineBasicBlock &MBB, unsigned NumCycles, unsigned ExtraPredCycles, BranchProbability Probability) const override
Return true if it's profitable to predicate instructions with accumulated instruction latency of "Num...
bool isAsCheapAsAMove(const MachineInstr &MI) const override
int getMaxValue(const MachineInstr &MI) const
bool isPredicateLate(unsigned Opcode) const
short changeAddrMode_rr_ur(short Opc) const
bool isNewValueInst(const MachineInstr &MI) const
bool isHMXWeightInstr(const MachineInstr &MI) const
bool areMemAccessesTriviallyDisjoint(const MachineInstr &MIa, const MachineInstr &MIb) const override
int getNonDotCurOp(const MachineInstr &MI) const
bool isIndirectL4Return(const MachineInstr &MI) const
unsigned reversePrediction(unsigned Opcode) const
ArrayRef< std::pair< unsigned, const char * > > getSerializableBitmaskMachineOperandTargetFlags() const override
Return an array that contains the bitmask target flag values and their names.
bool isAssociativeAndCommutative(const MachineInstr &Inst, bool Invert) const override
short changeAddrMode_rr_io(const MachineInstr &MI) const
InstrStage::FuncUnits getUnits(const MachineInstr &MI) const
short changeAddrMode_ur_rr(const MachineInstr &MI) const
unsigned getMemAccessSize(const MachineInstr &MI) const
bool predOpcodeHasNot(ArrayRef< MachineOperand > Cond) const
bool isComplex(const MachineInstr &MI) const
bool isPostIncrement(const MachineInstr &MI) const override
Return true for post-incremented instructions.
void setBundleNoShuf(MachineBasicBlock::instr_iterator MIB) const
short changeAddrMode_io_abs(const MachineInstr &MI) const
MachineBasicBlock::instr_iterator expandVGatherPseudo(MachineInstr &MI) const
bool isDotCurOperand(const MachineInstr &MI, unsigned OpIndex) const
Returns true if the specified operand is a .cur (current) operand.
void loadRegFromStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, Register DestReg, int FrameIndex, const TargetRegisterClass *RC, Register VReg, unsigned SubReg=0, MachineInstr::MIFlag Flags=MachineInstr::NoFlags) const override
Load the specified register of the given register class from the specified stack frame index.
int getDotNewOp(const MachineInstr &MI) const
void changeDuplexOpcode(MachineBasicBlock::instr_iterator MII, bool ToBigInstrs) const
bool isMemOp(const MachineInstr &MI) const
int getDotOldOp(const MachineInstr &MI) const
bool hasUncondBranch(const MachineBasicBlock *B) const
short getNonExtOpcode(const MachineInstr &MI) const
bool isNewStorePseudo(const MachineInstr &MI) const
bool isTailCall(const MachineInstr &MI) const override
void insertNoop(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI) const override
Insert a noop into the instruction stream at the specified point.
bool isDeallocRet(const MachineInstr &MI) const
HexagonInstrInfo(const HexagonSubtarget &ST)
unsigned getCExtOpNum(const MachineInstr &MI) const
bool isSolo(const MachineInstr &MI) const
DFAPacketizer * CreateTargetScheduleState(const TargetSubtargetInfo &STI) const override
Create machine specific model for scheduling.
bool isLateSourceInstr(const MachineInstr &MI) const
bool isDotNewInst(const MachineInstr &MI) const
void translateInstrsForDup(MachineFunction &MF, bool ToBigInstrs=true) const
bool isTC1(const MachineInstr &MI) const
bool isSchedulingBoundary(const MachineInstr &MI, const MachineBasicBlock *MBB, const MachineFunction &MF) const override
Test if the given instruction should be considered a scheduling boundary.
bool predCanBeUsedAsDotNew(const MachineInstr &MI, Register PredReg) const
unsigned getSize(const MachineInstr &MI) const
std::optional< unsigned > getInvertedCompare(const int OpC) const
bool isDotNewOperand(const MachineInstr &MI, unsigned OpIndex) const
Should be able to tell if the operand in question is .new.
bool isProfitableToDupForIfCvt(MachineBasicBlock &MBB, unsigned NumCycles, BranchProbability Probability) const override
Return true if it's profitable for if-converter to duplicate instructions of specified accumulated in...
short changeAddrMode_io_abs(short Opc) const
int getDotCurOp(const MachineInstr &MI) const
bool expandPostRAPseudo(MachineInstr &MI) const override
This function is called for all pseudo instructions that remain after register allocation.
bool isMIBefore(const MachineInstr *A, const MachineInstr *B) const
bool isExpr(unsigned OpType) const
bool isSafeInBundleWAR(const MachineInstr &DefMI, unsigned DefOpIdx, const MachineInstr &UseMI, unsigned UseOpIdx, bool IsPullDown=false, bool DefViaRegMask=false) const
A use (UseMI) can share a bundle with an instruction that redefines the same register (DefMI),...
std::pair< BitVector, BitVector > UseDefBitVectors
Per-instruction (Use, Def) register bit-vectors, keyed by MachineInstr.
DenseMap< const MachineInstr *, UseDefBitVectors > MIUseDefMap
void genAllInsnTimingClasses(MachineFunction &MF) const
bool isTC2Early(const MachineInstr &MI) const
bool hasEHLabel(const MachineBasicBlock *B) const
bool shouldSink(const MachineInstr &MI) const override
bool isZeroExtendingLoad(const MachineInstr &MI) const
short changeAddrMode_rr_io(short Opc) const
bool isHVXVec(const MachineInstr &MI) const
bool isDotTmpOperand(const MachineInstr &MI, unsigned OpIndex) const
Returns true if the specified operand is a .tmp (temporary) operand.
bool isDependent(const MachineInstr &ProdMI, const MachineInstr &ConsMI) const
short changeAddrMode_io_rr(short Opc) const
bool SubsumesPredicate(ArrayRef< MachineOperand > Pred1, ArrayRef< MachineOperand > Pred2) const override
Returns true if the first specified predicate subsumes the second, e.g.
bool mayBeCurLoad(const MachineInstr &MI) const
bool getBundleNoShuf(const MachineInstr &MIB) const
bool isNewValueJump(const MachineInstr &MI) const
bool isTC4x(const MachineInstr &MI) const
bool PredicateInstruction(MachineInstr &MI, ArrayRef< MachineOperand > Cond) const override
Convert the instruction into a predicated instruction.
bool getPredReg(ArrayRef< MachineOperand > Cond, Register &PredReg, unsigned &PredRegPos, RegState &PredRegFlags) const
bool isFloat(const MachineInstr &MI) const
bool isQFPInstr(MachineInstr *MI) const
bool isToBeScheduledASAP(const MachineInstr &MI1, const MachineInstr &MI2) const
MachineOperand * getBaseAndOffset(const MachineInstr &MI, int64_t &Offset, LocationSize &AccessSize) const
bool getInvertedPredSense(SmallVectorImpl< MachineOperand > &Cond) const
unsigned nonDbgBBSize(const MachineBasicBlock *BB) const
getInstrTimingClassLatency - Compute the instruction latency of a given instruction using Timing Clas...
uint64_t getType(const MachineInstr &MI) const
bool isEndLoopN(unsigned Opcode) const
bool getBaseAndOffsetPosition(const MachineInstr &MI, unsigned &BasePos, unsigned &OffsetPos) const override
For instructions with a base and offset, return the position of the base register and offset operands...
bool isPredicable(const MachineInstr &MI) const override
Return true if the specified instruction can be predicated.
bool isHMXActivateInstr(const MachineInstr &MI) const
bool isExtendable(const MachineInstr &MI) const
short changeAddrMode_abs_io(const MachineInstr &MI) const
void immediateExtend(MachineInstr &MI) const
immediateExtend - Changes the instruction in place to one using an immediate extender.
short changeAddrMode_io_rr(const MachineInstr &MI) const
bool isValidOffset(unsigned Opcode, int Offset, bool Extend=true) const
bool isActivateWeightPair(const MachineInstr &MIa, const MachineInstr &MIb) const
HexagonII::CompoundGroup getCompoundCandidateGroup(const MachineInstr &MI) const
bool hasLoadFromStackSlot(const MachineInstr &MI, SmallVectorImpl< const MachineMemOperand * > &Accesses) const override
Check if the instruction or the bundle of instructions has load from stack slots.
SmallVector< MachineInstr *, 2 > getBranchingInstrs(MachineBasicBlock &MBB) const
const TargetRegisterClass * getInlineAsmMemoryOperandRegClass(InlineAsm::ConstraintCode C) const override
bool isPredicatedTrue(const MachineInstr &MI) const
bool isNewValueStore(const MachineInstr &MI) const
int getMinValue(const MachineInstr &MI) const
bool isVecUsableNextPacket(const MachineInstr &ProdMI, const MachineInstr &ConsMI) const
unsigned getCompoundOpcode(const MachineInstr &GA, const MachineInstr &GB) const
bool addLatencyToSchedule(const MachineInstr &MI1, const MachineInstr &MI2) const
Register isStoreToStackSlot(const MachineInstr &MI, int &FrameIndex) const override
If the specified machine instruction is a direct store to a stack slot, return the virtual or physica...
int getDotNewPredJumpOp(const MachineInstr &MI, const MachineBranchProbabilityInfo *MBPI) const
bool usesQFOperand(MachineInstr *MI, unsigned Index=0) const
bool isTC2(const MachineInstr &MI) const
Itinerary data supplied by a subtarget to be used by a target.
This class is intended to be used as a base class for asm properties and features specific to the tar...
Definition MCAsmInfo.h:69
Instances of this class represent a single low-level machine instruction.
Definition MCInst.h:187
Machine Value Type.
MachineInstrBundleIterator< const MachineInstr > const_iterator
Instructions::iterator instr_iterator
Instructions::const_iterator const_instr_iterator
MachineInstrBundleIterator< MachineInstr > iterator
Representation of each machine instruction.
MachineOperand class - Representation of each machine instruction operand.
Wrapper class representing virtual and physical registers.
Definition Register.h:20
HazardRecognizer - This determines whether or not an instruction can be issued this cycle,...
A templated base class for SmallPtrSet which provides the typesafe interface that is common across al...
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
virtual bool analyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, SmallVectorImpl< MachineOperand > &Cond, bool AllowModify=false) const
Analyze the branching code at the end of MBB, returning true if it cannot be understood (e....
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
TargetSubtargetInfo - Generic base class for all target subtargets.
LLVM Value Representation.
Definition Value.h:75
Abstract Attribute helper functions.
Definition Attributor.h:166
This is an optimization pass for GlobalISel generic memory operations.
@ Offset
Definition DWP.cpp:577
TargetInstrInfo::RegSubRegPair getRegSubRegPair(const MachineOperand &O)
Create RegSubRegPair from a register MachineOperand.
RegState
Flags to represent properties of register accesses.
@ First
Helpers to iterate all locations in the MemoryEffectsBase class.
Definition ModRef.h:74
MCRegisterClass TargetRegisterClass
Definition FastISel.h:58
Extended Value Type.
Definition ValueTypes.h:35
Kinds of dependence reported by srcDependence() and the global scheduler's dstDependence().
static bool has(int Dep, Kind K)
static bool hasOnly(int Dep, Kind K)
uint64_t FuncUnits
Bitmask representing a set of functional units.