LLVM 17.0.0git
Combiner.h
Go to the documentation of this file.
1//== ----- llvm/CodeGen/GlobalISel/Combiner.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/// \file
9/// This contains common code to drive combines. Combiner Passes will need to
10/// setup a CombinerInfo and call combineMachineFunction.
11///
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_CODEGEN_GLOBALISEL_COMBINER_H
15#define LLVM_CODEGEN_GLOBALISEL_COMBINER_H
16
18
19namespace llvm {
20class MachineRegisterInfo;
21class CombinerInfo;
22class GISelCSEInfo;
23class TargetPassConfig;
24class MachineFunction;
25
26class Combiner {
27public:
29
30 /// If CSEInfo is not null, then the Combiner will setup observer for
31 /// CSEInfo and instantiate a CSEMIRBuilder. Pass nullptr if CSE is not
32 /// needed.
34
35protected:
37
40 std::unique_ptr<MachineIRBuilder> Builder;
41};
42
43} // End namespace llvm.
44
45#endif // LLVM_CODEGEN_GLOBALISEL_COMBINER_H
This file declares the MachineIRBuilder class.
MachineRegisterInfo * MRI
Definition: Combiner.h:38
bool combineMachineInstrs(MachineFunction &MF, GISelCSEInfo *CSEInfo)
If CSEInfo is not null, then the Combiner will setup observer for CSEInfo and instantiate a CSEMIRBui...
Definition: Combiner.cpp:98
const TargetPassConfig * TPC
Definition: Combiner.h:39
std::unique_ptr< MachineIRBuilder > Builder
Definition: Combiner.h:40
CombinerInfo & CInfo
Definition: Combiner.h:36
The CSE Analysis object.
Definition: CSEInfo.h:69
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
Target-Independent Code Generator Pass Configuration Options.
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18