LLVM 22.0.0git
InstVisitor.h File Reference
#include "llvm/IR/Function.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Instruction.def"

Go to the source code of this file.

Classes

class  llvm::InstVisitor< SubClass, RetTy >
 Base class for instruction visitors. More...

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.

Macros

#define HANDLE_INST(NUM, OPCODE, CLASS)
#define DELEGATE(CLASS_TO_VISIT)
#define HANDLE_INST(NUM, OPCODE, CLASS)
#define HANDLE_INST(NUM, OPCODE, CLASS)

Macro Definition Documentation

◆ DELEGATE

#define DELEGATE ( CLASS_TO_VISIT)
Value:
return static_cast<SubClass*>(this)-> \
visit##CLASS_TO_VISIT(static_cast<CLASS_TO_VISIT&>(I))
#define I(x, y, z)
Definition MD5.cpp:58
void visit(MachineFunction &MF, MachineBasicBlock &Start, std::function< void(MachineBasicBlock *)> op)

Definition at line 27 of file InstVisitor.h.

Referenced by llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitAddrSpaceCastInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitAllocaInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitAtomicCmpXchgInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitAtomicRMWInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitBinaryOperator(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitBitCastInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitCallBase(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitCallBrInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitCallInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitCastInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitCatchPadInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitCleanupPadInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitCmpInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitExtractElementInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitExtractValueInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitFCmpInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitFenceInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitFPExtInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitFPToSIInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitFPToUIInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitFPTruncInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitFreezeInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitFuncletPadInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitGetElementPtrInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitICmpInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitInsertElementInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitInsertValueInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitIntrinsicInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitIntToPtrInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitInvokeInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitLandingPadInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitLoadInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitMemCpyInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitMemIntrinsic(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitMemMoveInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitMemSetInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitMemSetPatternInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitMemTransferInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitPHINode(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitPtrToAddrInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitPtrToIntInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitSelectInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitSExtInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitShuffleVectorInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitSIToFPInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitStoreInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitTerminator(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitTruncInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitUIToFPInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitUnaryInstruction(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitUnaryOperator(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitVAArgInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitVACopyInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitVAEndInst(), llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitVAStartInst(), and llvm::InstVisitor< UnrolledInstAnalyzer, bool >::visitZExtInst().

◆ HANDLE_INST [1/3]

#define HANDLE_INST ( NUM,
OPCODE,
CLASS )
Value:
class CLASS;

Definition at line 24 of file InstVisitor.h.

◆ HANDLE_INST [2/3]

#define HANDLE_INST ( NUM,
OPCODE,
CLASS )
Value:
case Instruction::OPCODE: return \
static_cast<SubClass*>(this)-> \
visit##OPCODE(static_cast<CLASS&>(I));
#define OPCODE(NAME)

Definition at line 24 of file InstVisitor.h.

◆ HANDLE_INST [3/3]

#define HANDLE_INST ( NUM,
OPCODE,
CLASS )
Value:
RetTy visit##OPCODE(CLASS &I) { \
if (NUM == Instruction::Call) \
return delegateCallInst(I); \
else \
DELEGATE(CLASS); \
}

Definition at line 24 of file InstVisitor.h.