LLVM  13.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 //
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 
19 
20 namespace llvm {
21 class MachineRegisterInfo;
22 class CombinerInfo;
23 class GISelCSEInfo;
24 class TargetPassConfig;
25 class MachineFunction;
26 
27 class Combiner {
28 public:
30 
31  /// If CSEInfo is not null, then the Combiner will setup observer for
32  /// CSEInfo and instantiate a CSEMIRBuilder. Pass nullptr if CSE is not
33  /// needed.
35 
36 protected:
38 
41  std::unique_ptr<MachineIRBuilder> Builder;
42 };
43 
44 } // End namespace llvm.
45 
46 #endif // LLVM_CODEGEN_GLOBALISEL_COMBINER_H
llvm::Combiner::TPC
const TargetPassConfig * TPC
Definition: Combiner.h:40
llvm
This class represents lattice values for constants.
Definition: AllocatorList.h:23
llvm::MachineRegisterInfo
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
Definition: MachineRegisterInfo.h:52
llvm::GISelCSEInfo
The CSE Analysis object.
Definition: CSEInfo.h:69
llvm::Combiner::Builder
std::unique_ptr< MachineIRBuilder > Builder
Definition: Combiner.h:41
MachineIRBuilder.h
llvm::CombinerInfo
Definition: CombinerInfo.h:27
llvm::Combiner::MRI
MachineRegisterInfo * MRI
Definition: Combiner.h:39
llvm::TargetPassConfig
Target-Independent Code Generator Pass Configuration Options.
Definition: TargetPassConfig.h:84
llvm::Combiner
Definition: Combiner.h:27
MachineFunctionPass.h
llvm::MachineFunction
Definition: MachineFunction.h:227
llvm::Combiner::Combiner
Combiner(CombinerInfo &CombinerInfo, const TargetPassConfig *TPC)
Definition: Combiner.cpp:93
llvm::Combiner::combineMachineInstrs
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
llvm::Combiner::CInfo
CombinerInfo & CInfo
Definition: Combiner.h:37