LLVM 20.0.0git
|
#include "SPIRV.h"
#include "SPIRVSubtarget.h"
#include "SPIRVUtils.h"
#include "llvm/ADT/PostOrderIterator.h"
#include "llvm/Analysis/OptimizationRemarkEmitter.h"
#include "llvm/CodeGen/MachinePostDominators.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/IR/IntrinsicsSPIRV.h"
#include "llvm/Target/TargetIntrinsicInfo.h"
#include <stack>
Go to the source code of this file.
Namespaces | |
namespace | llvm |
This is an optimization pass for GlobalISel generic memory operations. | |
Macros | |
#define | DEBUG_TYPE "spirv-postlegalizer" |
Functions | |
bool | isTypeFoldingSupported (unsigned Opcode) |
Register | llvm::insertAssignInstr (Register Reg, Type *Ty, SPIRVType *SpirvTy, SPIRVGlobalRegistry *GR, MachineIRBuilder &MIB, MachineRegisterInfo &MRI) |
Helper external function for inserting ASSIGN_TYPE instuction between Reg and its definition, set the new register as a destination of the definition, assign SPIRVType to both registers. | |
void | llvm::processInstr (MachineInstr &MI, MachineIRBuilder &MIB, MachineRegisterInfo &MRI, SPIRVGlobalRegistry *GR) |
static bool | isMetaInstrGET (unsigned Opcode) |
static bool | mayBeInserted (unsigned Opcode) |
static void | processNewInstrs (MachineFunction &MF, SPIRVGlobalRegistry *GR, MachineIRBuilder MIB) |
void | visit (MachineFunction &MF, MachineBasicBlock &Start, std::function< void(MachineBasicBlock *)> op) |
void | visit (MachineFunction &MF, std::function< void(MachineBasicBlock *)> op) |
void | sortBlocks (MachineFunction &MF) |
#define DEBUG_TYPE "spirv-postlegalizer" |
Definition at line 30 of file SPIRVPostLegalizer.cpp.
Definition at line 58 of file SPIRVPostLegalizer.cpp.
Referenced by processNewInstrs().
Definition at line 53 of file SPIRVLegalizerInfo.cpp.
Referenced by mayBeInserted(), and processNewInstrs().
Definition at line 64 of file SPIRVPostLegalizer.cpp.
References isTypeFoldingSupported().
Referenced by processNewInstrs().
|
static |
Definition at line 80 of file SPIRVPostLegalizer.cpp.
References llvm::SPIRVGlobalRegistry::assignSPIRVTypeToVReg(), llvm::SPIRVGlobalRegistry::CurMF, llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::SPIRVGlobalRegistry::getRegClass(), llvm::MachineFunction::getRegInfo(), llvm::SPIRVGlobalRegistry::getRegType(), llvm::SPIRVGlobalRegistry::getScalarOrVectorBitWidth(), llvm::SPIRVGlobalRegistry::getSPIRVTypeForVReg(), I, llvm::insertAssignInstr(), isMetaInstrGET(), isTypeFoldingSupported(), llvm::Register::isValid(), mayBeInserted(), MBB, MRI, llvm::processInstr(), llvm::report_fatal_error(), and llvm::LLT::scalar().
void sortBlocks | ( | MachineFunction & | MF | ) |
Definition at line 179 of file SPIRVPostLegalizer.cpp.
References LHS, MBB, RHS, llvm::MachineFunction::size(), llvm::MachineFunction::sort(), and visit().
void visit | ( | MachineFunction & | MF, |
MachineBasicBlock & | Start, | ||
std::function< void(MachineBasicBlock *)> | op | ||
) |
Definition at line 150 of file SPIRVPostLegalizer.cpp.
References llvm::SmallPtrSetImpl< PtrType >::contains(), llvm::SmallPtrSetImpl< PtrType >::insert(), MBB, op, and llvm::MachineBasicBlock::successors().
Referenced by llvm::computeDeadSymbolsAndUpdateIndirectCalls(), llvm::ScalarEvolution::getLosslessPtrToIntExpr(), sortBlocks(), and visit().
void visit | ( | MachineFunction & | MF, |
std::function< void(MachineBasicBlock *)> | op | ||
) |
Definition at line 174 of file SPIRVPostLegalizer.cpp.
References llvm::MachineFunction::begin(), op, and visit().