12#ifndef LLVM_CODEGEN_GLOBALISEL_CSEINFO_H
13#define LLVM_CODEGEN_GLOBALISEL_CSEINFO_H
26class MachineBasicBlock;
44 bool shouldCSEOpc(
unsigned Opc)
override;
51 bool shouldCSEOpc(
unsigned Opc)
override;
58LLVM_ABI std::unique_ptr<CSEConfigBase>
79 std::unique_ptr<CSEConfigBase> CSEOpt;
116 bool HandlingRecordedInstrs =
false;
140 void handleRecordedInsts();
146 void releaseMemory();
149 CSEOpt = std::move(Opt);
152 bool shouldCSE(
unsigned Opc)
const;
156 void countOpcodeHit(
unsigned Opc);
167class TargetRegisterClass;
214 bool AlreadyComputed =
false;
222 bool ReCompute =
false);
unsigned const MachineRegisterInfo * MRI
amdgpu aa AMDGPU Address space based Alias Analysis Wrapper
This file defines the BumpPtrAllocator interface.
static void print(raw_ostream &Out, object::Archive::Kind Kind, T Val)
Analysis containing CSE Info
This file defines a hash set that can be used to remove duplication of nodes in a graph.
This contains common code to allow clients to notify changes to machine instr.
Represent the analysis usage information of a pass.
Allocate memory in an ever growing pool, as if by bump-pointer.
virtual ~CSEConfigConstantOnly()=default
virtual ~CSEConfigFull()=default
Defines a builder that does CSE of MachineInstructions using GISelCSEInfo.
Lightweight error class with error context and mandatory checking.
Node - This class is used to maintain the singly linked bucket list in a folding set.
FoldingSetNodeID - This class is used to gather all the unique data bits of a node.
FoldingSet - This template class is used to instantiate a specialized implementation of the folding s...
The actual analysis pass wrapper.
const GISelCSEAnalysisWrapper & getCSEWrapper() const
void releaseMemory() override
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...
GISelCSEAnalysisWrapper & getCSEWrapper()
Simple wrapper that does the following.
void setComputed(bool Computed)
void setMF(MachineFunction &MFunc)
LLVM_ABI GISelCSEInfo & get(std::unique_ptr< CSEConfigBase > CSEOpt, bool ReCompute=false)
Takes a CSEConfigBase object that defines what opcodes get CSEd.
void setCSEConfig(std::unique_ptr< CSEConfigBase > Opt)
Abstract class that contains various methods for clients to notify about changes.
LLVM_ABI const GISelInstProfileBuilder & addNodeIDOpcode(unsigned Opc) const
LLVM_ABI const GISelInstProfileBuilder & addNodeIDRegNum(Register Reg) const
LLVM_ABI const GISelInstProfileBuilder & addNodeIDFlag(unsigned Flag) const
LLVM_ABI const GISelInstProfileBuilder & addNodeIDImmediate(int64_t Imm) const
LLVM_ABI const GISelInstProfileBuilder & addNodeIDReg(Register Reg) const
LLVM_ABI const GISelInstProfileBuilder & addNodeID(const MachineInstr *MI) const
LLVM_ABI const GISelInstProfileBuilder & addNodeIDMBB(const MachineBasicBlock *MBB) const
GISelInstProfileBuilder(FoldingSetNodeID &ID, const MachineRegisterInfo &MRI)
LLVM_ABI const GISelInstProfileBuilder & addNodeIDRegType(const LLT Ty) const
LLVM_ABI const GISelInstProfileBuilder & addNodeIDMachineOperand(const MachineOperand &MO) const
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
Representation of each machine instruction.
MachineOperand class - Representation of each machine instruction operand.
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
This class implements the register bank concept.
Wrapper class representing virtual and physical registers.
A class that wraps MachineInstrs and derives from FoldingSetNode in order to be uniqued in a CSEMap.
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI std::unique_ptr< CSEConfigBase > getStandardCSEConfigForOpt(CodeGenOptLevel Level)
CodeGenOptLevel
Code generation optimization level.
All attributes(register class or bank and low-level type) a virtual register can have.