LLVM 20.0.0git
AMDGPUCombinerHelper.h
Go to the documentation of this file.
1//=== lib/CodeGen/GlobalISel/AMDGPUCombinerHelper.h -------------*- 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/// \file
10/// This contains common combine transformations that may be used in a combine
11/// pass.
12///
13//===----------------------------------------------------------------------===//
14
15#ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUCOMBINERHELPER_H
16#define LLVM_LIB_TARGET_AMDGPU_AMDGPUCOMBINERHELPER_H
17
18#include "GCNSubtarget.h"
21
22namespace llvm {
24protected:
27
28public:
33 const GCNSubtarget &STI);
34
35 bool matchFoldableFneg(MachineInstr &MI, MachineInstr *&MatchInfo) const;
36 void applyFoldableFneg(MachineInstr &MI, MachineInstr *&MatchInfo) const;
37
39 Register Src1, Register Src2) const;
41 Register Src1, Register Src2) const;
42
45 std::function<void(MachineIRBuilder &)> &MatchInfo) const;
46};
47
48} // namespace llvm
49
50#endif // LLVM_LIB_TARGET_AMDGPU_AMDGPUCOMBINERHELPER_H
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
This contains common combine transformations that may be used in a combine pass,or by the target else...
This contains the base class for all Combiners generated by TableGen.
AMD GCN specific subclass of TargetSubtarget.
IRTranslator LLVM IR MI
bool matchCombineFmulWithSelectToFldexp(MachineInstr &MI, MachineInstr &Sel, std::function< void(MachineIRBuilder &)> &MatchInfo) const
bool matchExpandPromotedF16FMed3(MachineInstr &MI, Register Src0, Register Src1, Register Src2) const
void applyFoldableFneg(MachineInstr &MI, MachineInstr *&MatchInfo) const
bool matchFoldableFneg(MachineInstr &MI, MachineInstr *&MatchInfo) const
void applyExpandPromotedF16FMed3(MachineInstr &MI, Register Src0, Register Src1, Register Src2) const
GISelKnownBits * KB
CombinerHelper(GISelChangeObserver &Observer, MachineIRBuilder &B, bool IsPreLegalize, GISelKnownBits *KB=nullptr, MachineDominatorTree *MDT=nullptr, const LegalizerInfo *LI=nullptr)
const LegalizerInfo * LI
MachineDominatorTree * MDT
GISelChangeObserver & Observer
Abstract class that contains various methods for clients to notify about changes.
DominatorTree Class - Concrete subclass of DominatorTreeBase that is used to compute a normal dominat...
Helper class to build MachineInstr.
Representation of each machine instruction.
Definition: MachineInstr.h:69
Wrapper class representing virtual and physical registers.
Definition: Register.h:19
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18