12#ifndef LLVM_CODEGEN_GLOBALISEL_CSEINFO_H
13#define LLVM_CODEGEN_GLOBALISEL_CSEINFO_H
25class MachineBasicBlock;
57std::unique_ptr<CSEConfigBase>
78 std::unique_ptr<CSEConfigBase> CSEOpt;
115 bool HandlingRecordedInstrs =
false;
148 CSEOpt = std::move(Opt);
166class TargetRegisterClass;
210 bool AlreadyComputed =
false;
218 bool ReCompute =
false);
unsigned const MachineRegisterInfo * MRI
amdgpu aa AMDGPU Address space based Alias Analysis Wrapper
This file defines the BumpPtrAllocator interface.
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.
bool shouldCSEOpc(unsigned Opc) override
virtual ~CSEConfigConstantOnly()=default
bool shouldCSEOpc(unsigned Opc) override
------— CSEConfigFull -------— ///
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...
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
bool runOnMachineFunction(MachineFunction &MF) override
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...
GISelCSEAnalysisWrapper & getCSEWrapper()
GISelCSEAnalysisWrapperPass()
Simple wrapper that does the following.
void setComputed(bool Computed)
void setMF(MachineFunction &MFunc)
GISelCSEInfo & get(std::unique_ptr< CSEConfigBase > CSEOpt, bool ReCompute=false)
Takes a CSEConfigBase object that defines what opcodes get CSEd.
bool shouldCSE(unsigned Opc) const
void changingInstr(MachineInstr &MI) override
This instruction is about to be mutated in some way.
void analyze(MachineFunction &MF)
void changedInstr(MachineInstr &MI) override
This instruction was mutated in some way.
void recordNewInstruction(MachineInstr *MI)
Records a newly created inst in a list and lazily insert it to the CSEMap.
void setMF(MachineFunction &MF)
-----— GISelCSEInfo ----------—//
void erasingInstr(MachineInstr &MI) override
An instruction is about to be erased.
void countOpcodeHit(unsigned Opc)
void setCSEConfig(std::unique_ptr< CSEConfigBase > Opt)
void handleRecordedInsts()
Use this callback to insert all the recorded instructions.
void handleRecordedInst(MachineInstr *MI)
Use this callback to inform CSE about a newly fully created instruction.
void handleRemoveInst(MachineInstr *MI)
Remove this inst from the CSE map.
void createdInstr(MachineInstr &MI) override
An instruction has been created and inserted into the function.
Abstract class that contains various methods for clients to notify about changes.
const GISelInstProfileBuilder & addNodeIDOpcode(unsigned Opc) const
const GISelInstProfileBuilder & addNodeIDRegNum(Register Reg) const
const GISelInstProfileBuilder & addNodeIDFlag(unsigned Flag) const
const GISelInstProfileBuilder & addNodeIDImmediate(int64_t Imm) const
const GISelInstProfileBuilder & addNodeIDReg(Register Reg) const
const GISelInstProfileBuilder & addNodeID(const MachineInstr *MI) const
const GISelInstProfileBuilder & addNodeIDMBB(const MachineBasicBlock *MBB) const
GISelInstProfileBuilder(FoldingSetNodeID &ID, const MachineRegisterInfo &MRI)
const GISelInstProfileBuilder & addNodeIDRegType(const LLT Ty) const
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.
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.