LLVM
15.0.0git
include
llvm
CodeGen
GlobalISel
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
17
#include "
llvm/CodeGen/GlobalISel/MachineIRBuilder.h
"
18
19
namespace
llvm
{
20
class
MachineRegisterInfo;
21
class
CombinerInfo;
22
class
GISelCSEInfo;
23
class
TargetPassConfig;
24
class
MachineFunction;
25
26
class
Combiner
{
27
public
:
28
Combiner
(
CombinerInfo
&
CombinerInfo
,
const
TargetPassConfig
*
TPC
);
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.
33
bool
combineMachineInstrs
(
MachineFunction
&MF,
GISelCSEInfo
*CSEInfo);
34
35
protected
:
36
CombinerInfo
&
CInfo
;
37
38
MachineRegisterInfo
*
MRI
=
nullptr
;
39
const
TargetPassConfig
*
TPC
;
40
std::unique_ptr<MachineIRBuilder>
Builder
;
41
};
42
43
}
// End namespace llvm.
44
45
#endif // LLVM_CODEGEN_GLOBALISEL_COMBINER_H
llvm::Combiner::TPC
const TargetPassConfig * TPC
Definition:
Combiner.h:39
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:
AddressRanges.h:17
llvm::MachineRegisterInfo
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
Definition:
MachineRegisterInfo.h:50
llvm::GISelCSEInfo
The CSE Analysis object.
Definition:
CSEInfo.h:69
llvm::Combiner::Builder
std::unique_ptr< MachineIRBuilder > Builder
Definition:
Combiner.h:40
MachineIRBuilder.h
llvm::CombinerInfo
Definition:
CombinerInfo.h:26
llvm::Combiner::MRI
MachineRegisterInfo * MRI
Definition:
Combiner.h:38
llvm::TargetPassConfig
Target-Independent Code Generator Pass Configuration Options.
Definition:
TargetPassConfig.h:84
llvm::Combiner
Definition:
Combiner.h:26
llvm::MachineFunction
Definition:
MachineFunction.h:241
llvm::Combiner::Combiner
Combiner(CombinerInfo &CombinerInfo, const TargetPassConfig *TPC)
Definition:
Combiner.cpp:90
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:95
llvm::Combiner::CInfo
CombinerInfo & CInfo
Definition:
Combiner.h:36
Generated on Wed May 18 2022 09:07:47 for LLVM by
1.8.17