LLVM: include/llvm/CodeGen/GlobalISel/MIPatternMatch.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13#ifndef LLVM_CODEGEN_GLOBALISEL_MIPATTERNMATCH_H

14#define LLVM_CODEGEN_GLOBALISEL_MIPATTERNMATCH_H

15

23

24namespace llvm {

26

27template <typename Reg, typename Pattern>

30 return P.match(MRI, R);

31}

32

33template

36 return P.match(MRI, &MI);

37}

38

39template

42 return P.match(MRI, &MI);

43}

44

45

54

55template

59

68

69template

73

74template

77

78template <>

83

84template <>

89

95 CR = *MaybeCst;

96 return true;

97 }

98 return false;

99 }

100};

101

108

109template

112

113template <>

118

119template <>

120inline std::optional<int64_t>

124

130 CR = *MaybeCst;

131 return true;

132 }

133

135 CR = *MaybeCstSplat;

136 return true;

137 }

138

139 return false;

140 };

141};

142

146

150

152 std::optional &ValReg;

158};

159

163

173

177

187

192

193

199 APInt MatchedVal;

203 else

205

207 }

208 return false;

209 }

210};

211

212

216

220

221

231

232

237

240 APInt(64, RequestedValue, true));

241}

242

243

249 APInt MatchedVal;

253 else

255

257 return true;

258 }

260 false);

261 }

262};

263

264

265

270

274 APInt(64, RequestedValue, true));

275}

276

277

284

285

293

294

298

299

300

301

302

303

307 return MO->isReg();

308 }

309};

310

312

313

314template <typename... Preds> struct And {

315 template

319};

320

321template <typename Pred, typename... Preds>

322struct And<Pred, Preds...> : And<Preds...> {

324 And(Pred &&p, Preds &&... preds)

325 : And<Preds...>(std::forward(preds)...), P(std::forward(p)) {

326 }

327 template

331};

332

333template <typename... Preds> struct Or {

334 template

338};

339

340template <typename Pred, typename... Preds>

341struct Or<Pred, Preds...> : Or<Preds...> {

343 Or(Pred &&p, Preds &&... preds)

344 : Or<Preds...>(std::forward(preds)...), P(std::forward(p)) {}

345 template

349};

350

351template <typename... Preds> And<Preds...> m_all_of(Preds &&... preds) {

352 return And<Preds...>(std::forward(preds)...);

353}

354

355template <typename... Preds> Or<Preds...> m_any_of(Preds &&... preds) {

356 return Or<Preds...>(std::forward(preds)...);

357}

358

361 VR = V;

362 return true;

363 }

364};

365

370 if (MI)

371 return true;

372 return false;

373 }

376 MI = Inst;

377 return MI;

378 }

379};

380

389 MI = Inst;

390 return MI;

391 }

392};

393

396 Ty = MRI.getType(Reg);

397 if (Ty.isValid())

398 return true;

399 return false;

400 }

401};

402

407 if (F)

408 return true;

409 return false;

410 }

411};

412

413template struct bind_ty {

415

417

421};

422

432

435 return VR == V;

436 }

437};

438

441 return VT == MRI.getType(R);

442 }

443};

444

454

455

456

457

458

459

462

467 return TmpMI->getOpcode() == TargetOpcode::G_IMPLICIT_DEF;

468 return false;

469 }

470};

471

473

474

476

477

478template <typename LHS_P, typename RHS_P, unsigned Opcode,

483

485 template

492

493

494

495

496

499 return false;

500 return (TmpMI->getFlags() & Flags) == Flags;

501 }

502 }

503 return false;

504 }

505};

506

507

508template <typename LHS_P, typename RHS_P, bool Commutable = false>

513

516 template

524

525

526

527

528

531 }

532 }

533 return false;

534 }

535};

536

537template <typename LHS, typename RHS>

542

543template <typename LHS, typename RHS>

548

549template <typename LHS, typename RHS>

554

555template <typename LHS, typename RHS>

560

561template <typename LHS, typename RHS>

567

568template <typename LHS, typename RHS>

573

574template <typename LHS, typename RHS>

579

580template <typename LHS, typename RHS>

585

586template <typename LHS, typename RHS>

591

592template <typename LHS, typename RHS>

597

598template <typename LHS, typename RHS>

603

604template <typename LHS, typename RHS>

609

610template <typename LHS, typename RHS>

615

616template <typename LHS, typename RHS>

621

622template <typename LHS, typename RHS>

629

630template <typename LHS, typename RHS>

634

635template <typename LHS, typename RHS>

640

641template <typename LHS, typename RHS>

646

647template <typename LHS, typename RHS>

652

653template <typename LHS, typename RHS>

658

659template <typename LHS, typename RHS>

664

665template <typename LHS, typename RHS>

670

671template <typename LHS, typename RHS>

676

677

678template <typename SrcTy, unsigned Opcode> struct UnaryOp_match {

680

682 template

688 }

689 }

690 return false;

691 }

692};

693

694template

699

700template

704

705template

709

710template

714

715template

719

720template

725

726template

731

732template

737

738template

743

744template

748

749template

753

754template

758

759template

763

764

765

766template <typename Pred_P, typename LHS_P, typename RHS_P, unsigned Opcode,

767 bool Commutable = false>

772

775

776 template

780 return false;

781

782 auto TmpPred =

784 if (P.match(MRI, TmpPred))

785 return false;

789 return true;

790

791

792

793

794 if (Commutable && L.match(MRI, RHS) && R.match(MRI, LHS) &&

796 return true;

797 return false;

798 }

799};

800

801template <typename LHS_P, typename Test_P, unsigned Opcode>

805

807

808 template

812 return false;

813

816 return false;

817

820 if (T.match(MRI, TmpClass))

821 return true;

822

823 return false;

824 }

825};

826

827template <typename Pred, typename LHS, typename RHS>

832

833template <typename Pred, typename LHS, typename RHS>

838

839

840

841

842

843

844

845

846

847

848template <typename Pred, typename LHS, typename RHS>

853

854

855

856

857

858

859

860

861

862

863template <typename Pred, typename LHS, typename RHS>

868

869

870

871template <typename LHS, typename Test>

876

877

881

883 return MRI.getType(Reg) == Ty;

884 }

885};

886

888

889template <typename Src0Ty, typename Src1Ty, typename Src2Ty, unsigned Opcode>

894

897 template

905 }

906 }

907 return false;

908 }

909};

910template <typename Src0Ty, typename Src1Ty, typename Src2Ty>

912 TargetOpcode::G_INSERT_VECTOR_ELT>

913m_GInsertVecElt(const Src0Ty &Src0, const Src1Ty &Src1, const Src2Ty &Src2) {

915 TargetOpcode::G_INSERT_VECTOR_ELT>(Src0, Src1, Src2);

916}

917

918template <typename Src0Ty, typename Src1Ty, typename Src2Ty>

920m_GISelect(const Src0Ty &Src0, const Src1Ty &Src1, const Src2Ty &Src2) {

922 Src0, Src1, Src2);

923}

924

925

926

927template

932

933

934

935template

940

941}

942}

943

944#endif

unsigned const MachineRegisterInfo * MRI

This file implements a class to represent arbitrary precision integral constant values and operations...

Utilities for dealing with flags related to floating point properties and mode controls.

Declares convenience wrapper classes for interpreting MachineInstr instances as specific generic oper...

Class for arbitrary precision integers.

static APInt getAllOnes(unsigned numBits)

Return an APInt of a specified width with all bits set.

unsigned getBitWidth() const

Return the number of bits in the APInt.

LLVM_ABI APInt sext(unsigned width) const

Sign extend to a new width.

static bool isSameValue(const APInt &I1, const APInt &I2)

Determine if two APInts have the same value, after zero-extending one of them (if needed!...

static APInt getZero(unsigned numBits)

Get the '0' value for the specified bit-width.

Predicate

This enumeration lists the possible predicates for CmpInst subclasses.

Predicate getSwappedPredicate() const

For example, EQ->EQ, SLE->SGE, ULT->UGT, OEQ->OEQ, ULE->UGE, OLT->OGT, etc.

ConstantFP - Floating Point Values [float, double].

Representation of each machine instruction.

unsigned getOpcode() const

Returns the opcode of this MachineInstr.

unsigned getNumOperands() const

Retuns the total number of operands.

const MachineOperand & getOperand(unsigned i) const

uint32_t getFlags() const

Return the MI flags bitvector.

unsigned getNumDefs() const

Returns the total number of definitions.

MachineOperand class - Representation of each machine instruction operand.

bool isReg() const

isReg - Tests if this is a MO_Register operand.

Register getReg() const

getReg - Returns the register number.

MachineRegisterInfo - Keep track of information for virtual and physical registers,...

Wrapper class representing virtual and physical registers.

@ C

The default llvm calling convention, compatible with C.

Definition MIPatternMatch.h:25

operand_type_match m_Reg()

Definition MIPatternMatch.h:311

SpecificConstantMatch m_SpecificICst(const APInt &RequestedValue)

Matches a constant equal to RequestedValue.

Definition MIPatternMatch.h:213

std::optional< ConstT > matchConstantSplat(Register, const MachineRegisterInfo &)

auto m_GAddLike(const LHS &L, const RHS &R)

Definition MIPatternMatch.h:631

BinaryOp_match< LHS, RHS, TargetOpcode::G_BUILD_VECTOR, false > m_GBuildVector(const LHS &L, const RHS &R)

Definition MIPatternMatch.h:557

SpecificConstantSplatMatch m_SpecificICstSplat(const APInt &RequestedValue)

Matches a constant splat of RequestedValue.

Definition MIPatternMatch.h:234

GCstAndRegMatch m_GCst(std::optional< ValueAndVReg > &ValReg)

Definition MIPatternMatch.h:160

UnaryOp_match< SrcTy, TargetOpcode::COPY > m_Copy(SrcTy &&Src)

Definition MIPatternMatch.h:755

operand_type_match m_Pred()

Definition MIPatternMatch.h:430

BinaryOp_match< LHS, RHS, TargetOpcode::G_UMIN, true > m_GUMin(const LHS &L, const RHS &R)

Definition MIPatternMatch.h:673

UnaryOp_match< SrcTy, TargetOpcode::G_ZEXT > m_GZExt(const SrcTy &Src)

Definition MIPatternMatch.h:706

BinaryOp_match< LHS, RHS, TargetOpcode::G_XOR, true > m_GXor(const LHS &L, const RHS &R)

Definition MIPatternMatch.h:612

UnaryOp_match< SrcTy, TargetOpcode::G_SEXT > m_GSExt(const SrcTy &Src)

Definition MIPatternMatch.h:701

deferred_ty< LLT > m_DeferredType(LLT &Ty)

Definition MIPatternMatch.h:461

UnaryOp_match< SrcTy, TargetOpcode::G_FPEXT > m_GFPExt(const SrcTy &Src)

Definition MIPatternMatch.h:711

SpecificConstantMatch m_ZeroInt()

Convenience matchers for specific integer values.

Definition MIPatternMatch.h:278

ConstantMatch< APInt > m_ICst(APInt &Cst)

Definition MIPatternMatch.h:102

UnaryOp_match< SrcTy, TargetOpcode::G_FSQRT > m_GFSqrt(const SrcTy &Src)

Definition MIPatternMatch.h:760

UnaryOp_match< SrcTy, TargetOpcode::G_INTTOPTR > m_GIntToPtr(const SrcTy &Src)

Definition MIPatternMatch.h:734

SpecificConstantMatch m_AllOnesInt()

Definition MIPatternMatch.h:281

BinaryOp_match< LHS, RHS, TargetOpcode::G_OR, true, MachineInstr::Disjoint > m_GDisjointOr(const LHS &L, const RHS &R)

Definition MIPatternMatch.h:625

BinaryOp_match< LHS, RHS, TargetOpcode::G_ADD, true > m_GAdd(const LHS &L, const RHS &R)

Definition MIPatternMatch.h:551

BinaryOp_match< LHS, RHS, TargetOpcode::G_OR, true > m_GOr(const LHS &L, const RHS &R)

Definition MIPatternMatch.h:617

BinaryOp_match< SpecificConstantMatch, SrcTy, TargetOpcode::G_SUB > m_Neg(const SrcTy &&Src)

Matches a register negated by a G_SUB.

Definition MIPatternMatch.h:929

ICstOrSplatMatch< APInt > m_ICstOrSplat(APInt &Cst)

Definition MIPatternMatch.h:143

bind_ty< FPClassTest > m_FPClassTest(FPClassTest &T)

Definition MIPatternMatch.h:431

ImplicitDefMatch m_GImplicitDef()

Definition MIPatternMatch.h:472

OneNonDBGUse_match< SubPat > m_OneNonDBGUse(const SubPat &SP)

Definition MIPatternMatch.h:70

CheckType m_SpecificType(LLT Ty)

Definition MIPatternMatch.h:887

deferred_ty< Register > m_DeferredReg(Register &R)

Similar to m_SpecificReg/Type, but the specific value to match originated from an earlier sub-pattern...

Definition MIPatternMatch.h:460

BinaryOp_match< LHS, RHS, TargetOpcode::G_UMAX, true > m_GUMax(const LHS &L, const RHS &R)

Definition MIPatternMatch.h:667

BinaryOp_match< SrcTy, SpecificConstantMatch, TargetOpcode::G_XOR, true > m_Not(const SrcTy &&Src)

Matches a register not-ed by a G_XOR.

Definition MIPatternMatch.h:937

BinaryOpc_match< LHS, RHS, true > m_CommutativeBinOp(unsigned Opcode, const LHS &L, const RHS &R)

Definition MIPatternMatch.h:545

CompareOp_match< Pred, LHS, RHS, TargetOpcode::G_ICMP > m_GICmp(const Pred &P, const LHS &L, const RHS &R)

Definition MIPatternMatch.h:829

BinaryOp_match< LHS, RHS, TargetOpcode::G_FADD, true > m_GFAdd(const LHS &L, const RHS &R)

Definition MIPatternMatch.h:588

CompareOp_match< Pred, LHS, RHS, TargetOpcode::G_FCMP, true > m_c_GFCmp(const Pred &P, const LHS &L, const RHS &R)

G_FCMP matcher that also matches commuted compares.

Definition MIPatternMatch.h:865

UnaryOp_match< SrcTy, TargetOpcode::G_PTRTOINT > m_GPtrToInt(const SrcTy &Src)

Definition MIPatternMatch.h:728

BinaryOp_match< LHS, RHS, TargetOpcode::G_FSUB, false > m_GFSub(const LHS &L, const RHS &R)

Definition MIPatternMatch.h:600

BinaryOp_match< LHS, RHS, TargetOpcode::G_SUB > m_GSub(const LHS &L, const RHS &R)

Definition MIPatternMatch.h:575

BinaryOp_match< LHS, RHS, TargetOpcode::G_ASHR, false > m_GAShr(const LHS &L, const RHS &R)

Definition MIPatternMatch.h:649

TernaryOp_match< Src0Ty, Src1Ty, Src2Ty, TargetOpcode::G_SELECT > m_GISelect(const Src0Ty &Src0, const Src1Ty &Src1, const Src2Ty &Src2)

Definition MIPatternMatch.h:920

bool mi_match(Reg R, const MachineRegisterInfo &MRI, Pattern &&P)

Definition MIPatternMatch.h:28

BinaryOp_match< LHS, RHS, TargetOpcode::G_PTR_ADD, false > m_GPtrAdd(const LHS &L, const RHS &R)

Definition MIPatternMatch.h:570

SpecificRegisterMatch m_SpecificReg(Register RequestedReg)

Matches a register only if it is equal to RequestedReg.

Definition MIPatternMatch.h:295

BinaryOp_match< LHS, RHS, TargetOpcode::G_SHL, false > m_GShl(const LHS &L, const RHS &R)

Definition MIPatternMatch.h:637

Or< Preds... > m_any_of(Preds &&... preds)

Definition MIPatternMatch.h:355

SpecificConstantOrSplatMatch m_SpecificICstOrSplat(const APInt &RequestedValue)

Matches a RequestedValue constant or a constant splat of RequestedValue.

Definition MIPatternMatch.h:267

BinaryOp_match< LHS, RHS, TargetOpcode::G_AND, true > m_GAnd(const LHS &L, const RHS &R)

Definition MIPatternMatch.h:606

UnaryOp_match< SrcTy, TargetOpcode::G_BITCAST > m_GBitcast(const SrcTy &Src)

Definition MIPatternMatch.h:722

BinaryOp_match< LHS, RHS, TargetOpcode::G_BUILD_VECTOR_TRUNC, false > m_GBuildVectorTrunc(const LHS &L, const RHS &R)

Definition MIPatternMatch.h:563

bind_ty< MachineInstr * > m_MInstr(MachineInstr *&MI)

Definition MIPatternMatch.h:424

UnaryOp_match< SrcTy, TargetOpcode::G_FNEG > m_GFNeg(const SrcTy &Src)

Definition MIPatternMatch.h:750

CompareOp_match< Pred, LHS, RHS, TargetOpcode::G_ICMP, true > m_c_GICmp(const Pred &P, const LHS &L, const RHS &R)

G_ICMP matcher that also matches commuted compares.

Definition MIPatternMatch.h:850

GFCstAndRegMatch m_GFCst(std::optional< FPValueAndVReg > &FPValReg)

Definition MIPatternMatch.h:174

ClassifyOp_match< LHS, Test, TargetOpcode::G_IS_FPCLASS > m_GIsFPClass(const LHS &L, const Test &T)

Matches the register and immediate used in a fpclass test G_IS_FPCLASS val, 96.

Definition MIPatternMatch.h:873

TernaryOp_match< Src0Ty, Src1Ty, Src2Ty, TargetOpcode::G_INSERT_VECTOR_ELT > m_GInsertVecElt(const Src0Ty &Src0, const Src1Ty &Src1, const Src2Ty &Src2)

Definition MIPatternMatch.h:913

GFCstOrSplatGFCstMatch m_GFCstOrSplat(std::optional< FPValueAndVReg > &FPValReg)

Definition MIPatternMatch.h:189

And< Preds... > m_all_of(Preds &&... preds)

Definition MIPatternMatch.h:351

BinaryOp_match< LHS, RHS, TargetOpcode::G_SMIN, true > m_GSMin(const LHS &L, const RHS &R)

Definition MIPatternMatch.h:661

UnaryOp_match< SrcTy, TargetOpcode::G_FABS > m_GFabs(const SrcTy &Src)

Definition MIPatternMatch.h:745

BinaryOp_match< LHS, RHS, TargetOpcode::G_LSHR, false > m_GLShr(const LHS &L, const RHS &R)

Definition MIPatternMatch.h:643

UnaryOp_match< SrcTy, TargetOpcode::G_ANYEXT > m_GAnyExt(const SrcTy &Src)

Definition MIPatternMatch.h:696

UnaryOp_match< SrcTy, TargetOpcode::G_FPTRUNC > m_GFPTrunc(const SrcTy &Src)

Definition MIPatternMatch.h:740

std::optional< ConstT > matchConstant(Register, const MachineRegisterInfo &)

OneUse_match< SubPat > m_OneUse(const SubPat &SP)

Definition MIPatternMatch.h:56

BinaryOp_match< LHS, RHS, TargetOpcode::G_FMUL, true > m_GFMul(const LHS &L, const RHS &R)

Definition MIPatternMatch.h:594

BinaryOp_match< LHS, RHS, TargetOpcode::G_MUL, true > m_GMul(const LHS &L, const RHS &R)

Definition MIPatternMatch.h:582

UnaryOp_match< SrcTy, TargetOpcode::G_TRUNC > m_GTrunc(const SrcTy &Src)

Definition MIPatternMatch.h:716

bind_ty< LLT > m_Type(LLT &Ty)

Definition MIPatternMatch.h:428

BinaryOp_match< LHS, RHS, TargetOpcode::G_SMAX, true > m_GSMax(const LHS &L, const RHS &R)

Definition MIPatternMatch.h:655

CompareOp_match< Pred, LHS, RHS, TargetOpcode::G_FCMP > m_GFCmp(const Pred &P, const LHS &L, const RHS &R)

Definition MIPatternMatch.h:835

class_match< BinaryOperator > m_BinOp()

Match an arbitrary binary operation and ignore it.

This is an optimization pass for GlobalISel generic memory operations.

LLVM_ABI const ConstantFP * getConstantFPVRegVal(Register VReg, const MachineRegisterInfo &MRI)

LLVM_ABI std::optional< APInt > getIConstantVRegVal(Register VReg, const MachineRegisterInfo &MRI)

If VReg is defined by a G_CONSTANT, return the corresponding value.

LLVM_ABI std::optional< APInt > getIConstantSplatVal(const Register Reg, const MachineRegisterInfo &MRI)

LLVM_ABI std::optional< int64_t > getIConstantVRegSExtVal(Register VReg, const MachineRegisterInfo &MRI)

If VReg is defined by a G_CONSTANT fits in int64_t returns it.

MachineInstr * getImm(const MachineOperand &MO, const MachineRegisterInfo *MRI)

FPClassTest

Floating-point class tests, supported by 'is_fpclass' intrinsic.

LLVM_ABI std::optional< FPValueAndVReg > getFConstantSplat(Register VReg, const MachineRegisterInfo &MRI, bool AllowUndef=true)

Returns a floating point scalar constant of a build vector splat if it exists.

DWARFExpression::Operation Op

LLVM_ABI std::optional< FPValueAndVReg > getFConstantVRegValWithLookThrough(Register VReg, const MachineRegisterInfo &MRI, bool LookThroughInstrs=true)

If VReg is defined by a statically evaluable chain of instructions rooted on a G_FCONSTANT returns it...

LLVM_ABI bool isBuildVectorConstantSplat(const Register Reg, const MachineRegisterInfo &MRI, int64_t SplatValue, bool AllowUndef)

Return true if the specified register is defined by G_BUILD_VECTOR or G_BUILD_VECTOR_TRUNC where all ...

LLVM_ABI std::optional< ValueAndVReg > getIConstantVRegValWithLookThrough(Register VReg, const MachineRegisterInfo &MRI, bool LookThroughInstrs=true)

If VReg is defined by a statically evaluable chain of instructions rooted on a G_CONSTANT returns its...

LLVM_ABI std::optional< int64_t > getIConstantSplatSExtVal(const Register Reg, const MachineRegisterInfo &MRI)

Implement std::hash so that hash_code can be used in STL containers.

Pred P

Definition MIPatternMatch.h:323

And(Pred &&p, Preds &&... preds)

Definition MIPatternMatch.h:324

bool match(const MachineRegisterInfo &MRI, MatchSrc &&src)

Definition MIPatternMatch.h:328

Matching combinators.

Definition MIPatternMatch.h:314

bool match(const MachineRegisterInfo &MRI, MatchSrc &&src)

Definition MIPatternMatch.h:316

Definition MIPatternMatch.h:480

BinaryOp_match(const LHS_P &LHS, const RHS_P &RHS)

Definition MIPatternMatch.h:484

RHS_P R

Definition MIPatternMatch.h:482

bool match(const MachineRegisterInfo &MRI, OpTy &&Op)

Definition MIPatternMatch.h:486

LHS_P L

Definition MIPatternMatch.h:481

Definition MIPatternMatch.h:509

unsigned Opc

Definition MIPatternMatch.h:510

LHS_P L

Definition MIPatternMatch.h:511

bool match(const MachineRegisterInfo &MRI, OpTy &&Op)

Definition MIPatternMatch.h:517

BinaryOpc_match(unsigned Opcode, const LHS_P &LHS, const RHS_P &RHS)

Definition MIPatternMatch.h:514

RHS_P R

Definition MIPatternMatch.h:512

Definition MIPatternMatch.h:878

LLT Ty

Definition MIPatternMatch.h:879

CheckType(const LLT Ty)

Definition MIPatternMatch.h:880

bool match(const MachineRegisterInfo &MRI, Register Reg)

Definition MIPatternMatch.h:882

Definition MIPatternMatch.h:802

Test_P T

Definition MIPatternMatch.h:804

LHS_P L

Definition MIPatternMatch.h:803

ClassifyOp_match(const LHS_P &LHS, const Test_P &Tst)

Definition MIPatternMatch.h:806

bool match(const MachineRegisterInfo &MRI, OpTy &&Op)

Definition MIPatternMatch.h:809

Definition MIPatternMatch.h:768

RHS_P R

Definition MIPatternMatch.h:771

Pred_P P

Definition MIPatternMatch.h:769

LHS_P L

Definition MIPatternMatch.h:770

CompareOp_match(const Pred_P &Pred, const LHS_P &LHS, const RHS_P &RHS)

Definition MIPatternMatch.h:773

bool match(const MachineRegisterInfo &MRI, OpTy &&Op)

Definition MIPatternMatch.h:777

Definition MIPatternMatch.h:90

ConstT & CR

Definition MIPatternMatch.h:91

bool match(const MachineRegisterInfo &MRI, Register Reg)

Definition MIPatternMatch.h:93

ConstantMatch(ConstT &C)

Definition MIPatternMatch.h:92

Definition MIPatternMatch.h:151

bool match(const MachineRegisterInfo &MRI, Register Reg)

Definition MIPatternMatch.h:154

GCstAndRegMatch(std::optional< ValueAndVReg > &ValReg)

Definition MIPatternMatch.h:153

std::optional< ValueAndVReg > & ValReg

Definition MIPatternMatch.h:152

Definition MIPatternMatch.h:164

GFCstAndRegMatch(std::optional< FPValueAndVReg > &FPValReg)

Definition MIPatternMatch.h:166

std::optional< FPValueAndVReg > & FPValReg

Definition MIPatternMatch.h:165

bool match(const MachineRegisterInfo &MRI, Register Reg)

Definition MIPatternMatch.h:168

Definition MIPatternMatch.h:178

GFCstOrSplatGFCstMatch(std::optional< FPValueAndVReg > &FPValReg)

Definition MIPatternMatch.h:180

bool match(const MachineRegisterInfo &MRI, Register Reg)

Definition MIPatternMatch.h:182

std::optional< FPValueAndVReg > & FPValReg

Definition MIPatternMatch.h:179

Definition MIPatternMatch.h:125

ICstOrSplatMatch(ConstT &C)

Definition MIPatternMatch.h:127

ConstT & CR

Definition MIPatternMatch.h:126

bool match(const MachineRegisterInfo &MRI, Register Reg)

Definition MIPatternMatch.h:128

Definition MIPatternMatch.h:463

bool match(const MachineRegisterInfo &MRI, Register Reg)

Definition MIPatternMatch.h:464

Definition MIPatternMatch.h:60

SubPatternT SubPat

Definition MIPatternMatch.h:61

OneNonDBGUse_match(const SubPatternT &SP)

Definition MIPatternMatch.h:62

bool match(const MachineRegisterInfo &MRI, Register Reg)

Definition MIPatternMatch.h:64

Definition MIPatternMatch.h:46

OneUse_match(const SubPatternT &SP)

Definition MIPatternMatch.h:48

SubPatternT SubPat

Definition MIPatternMatch.h:47

bool match(const MachineRegisterInfo &MRI, Register Reg)

Definition MIPatternMatch.h:50

Or(Pred &&p, Preds &&... preds)

Definition MIPatternMatch.h:343

bool match(const MachineRegisterInfo &MRI, MatchSrc &&src)

Definition MIPatternMatch.h:346

Pred P

Definition MIPatternMatch.h:342

Definition MIPatternMatch.h:333

bool match(const MachineRegisterInfo &MRI, MatchSrc &&src)

Definition MIPatternMatch.h:335

Matcher for a specific constant value.

Definition MIPatternMatch.h:194

APInt RequestedVal

Definition MIPatternMatch.h:195

SpecificConstantMatch(const APInt &RequestedVal)

Definition MIPatternMatch.h:196

bool match(const MachineRegisterInfo &MRI, Register Reg)

Definition MIPatternMatch.h:198

Matcher for a specific constant or constant splat.

Definition MIPatternMatch.h:244

APInt RequestedVal

Definition MIPatternMatch.h:245

bool match(const MachineRegisterInfo &MRI, Register Reg)

Definition MIPatternMatch.h:248

SpecificConstantOrSplatMatch(const APInt &RequestedVal)

Definition MIPatternMatch.h:246

Matcher for a specific constant splat.

Definition MIPatternMatch.h:222

APInt RequestedVal

Definition MIPatternMatch.h:223

SpecificConstantSplatMatch(const APInt &RequestedVal)

Definition MIPatternMatch.h:224

bool match(const MachineRegisterInfo &MRI, Register Reg)

Definition MIPatternMatch.h:226

Matcher for a specific register.

Definition MIPatternMatch.h:286

Register RequestedReg

Definition MIPatternMatch.h:287

bool match(const MachineRegisterInfo &MRI, Register Reg)

Definition MIPatternMatch.h:289

SpecificRegisterMatch(Register RequestedReg)

Definition MIPatternMatch.h:288

Definition MIPatternMatch.h:890

bool match(const MachineRegisterInfo &MRI, OpTy &&Op)

Definition MIPatternMatch.h:898

Src2Ty Src2

Definition MIPatternMatch.h:893

Src1Ty Src1

Definition MIPatternMatch.h:892

Src0Ty Src0

Definition MIPatternMatch.h:891

TernaryOp_match(const Src0Ty &Src0, const Src1Ty &Src1, const Src2Ty &Src2)

Definition MIPatternMatch.h:895

Definition MIPatternMatch.h:678

bool match(const MachineRegisterInfo &MRI, OpTy &&Op)

Definition MIPatternMatch.h:683

UnaryOp_match(const SrcTy &LHS)

Definition MIPatternMatch.h:681

SrcTy L

Definition MIPatternMatch.h:679

static bool bind(const MachineRegisterInfo &MRI, LLT &Ty, Register Reg)

Definition MIPatternMatch.h:395

static bool bind(const MachineRegisterInfo &MRI, MachineInstr *&MI, Register Reg)

Definition MIPatternMatch.h:367

static bool bind(const MachineRegisterInfo &MRI, MachineInstr *&MI, MachineInstr *Inst)

Definition MIPatternMatch.h:374

static bool bind(const MachineRegisterInfo &MRI, const ConstantFP *&F, Register Reg)

Definition MIPatternMatch.h:404

static bool bind(const MachineRegisterInfo &MRI, const MachineInstr *&MI, Register Reg)

Definition MIPatternMatch.h:382

static bool bind(const MachineRegisterInfo &MRI, const MachineInstr *&MI, const MachineInstr *Inst)

Definition MIPatternMatch.h:387

Definition MIPatternMatch.h:359

static bool bind(const MachineRegisterInfo &MRI, BindTy &VR, BindTy &V)

Definition MIPatternMatch.h:360

Definition MIPatternMatch.h:413

bool match(const MachineRegisterInfo &MRI, ITy &&V)

Definition MIPatternMatch.h:418

bind_ty(Class &V)

Definition MIPatternMatch.h:416

Class & VR

Definition MIPatternMatch.h:414

static bool match(const MachineRegisterInfo &MRI, LLT VT, Register R)

Definition MIPatternMatch.h:440

Definition MIPatternMatch.h:433

static bool match(const MachineRegisterInfo &MRI, BindTy &VR, BindTy &V)

Definition MIPatternMatch.h:434

Definition MIPatternMatch.h:445

bool match(const MachineRegisterInfo &MRI, ITy &&V)

Definition MIPatternMatch.h:450

deferred_ty(Class &V)

Definition MIPatternMatch.h:448

Class & VR

Definition MIPatternMatch.h:446

Definition MIPatternMatch.h:304

bool match(const MachineRegisterInfo &MRI, MachineOperand *MO)

Definition MIPatternMatch.h:306

bool match(const MachineRegisterInfo &MRI, Register Reg)

Definition MIPatternMatch.h:305