LLVM 20.0.0git
Classes | Macros | Functions
BPFCheckAndAdjustIR.cpp File Reference
#include "BPF.h"
#include "BPFCORE.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicsBPF.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Value.h"
#include "llvm/Pass.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"

Go to the source code of this file.

Classes

struct  MinMaxSinkInfo
 

Macros

#define DEBUG_TYPE   "bpf-check-and-opt-ir"
 

Functions

 INITIALIZE_PASS (BPFCheckAndAdjustIR, DEBUG_TYPE, "BPF Check And Adjust IR", false, false) ModulePass *llvm
 
static bool sinkMinMaxInBB (BasicBlock &BB, const std::function< bool(Instruction *)> &Filter)
 
static void unrollGEPLoad (CallInst *Call)
 
static void unrollGEPStore (CallInst *Call)
 
static bool removeGEPBuiltinsInFunc (Function &F)
 
static ValueaspaceWrapValue (DenseMap< Value *, Value * > &Cache, Function *F, Value *ToWrap)
 
static void aspaceWrapOperand (DenseMap< Value *, Value * > &Cache, Instruction *I, unsigned OpNum)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "bpf-check-and-opt-ir"

Definition at line 36 of file BPFCheckAndAdjustIR.cpp.

Function Documentation

◆ aspaceWrapOperand()

static void aspaceWrapOperand ( DenseMap< Value *, Value * > &  Cache,
Instruction I,
unsigned  OpNum 
)
static

◆ aspaceWrapValue()

static Value * aspaceWrapValue ( DenseMap< Value *, Value * > &  Cache,
Function F,
Value ToWrap 
)
static

◆ INITIALIZE_PASS()

INITIALIZE_PASS ( BPFCheckAndAdjustIR  ,
DEBUG_TYPE  ,
"BPF Check And Adjust IR"  ,
false  ,
false   
)

Definition at line 62 of file BPFCheckAndAdjustIR.cpp.

◆ removeGEPBuiltinsInFunc()

static bool removeGEPBuiltinsInFunc ( Function F)
static

◆ sinkMinMaxInBB()

static bool sinkMinMaxInBB ( BasicBlock BB,
const std::function< bool(Instruction *)> &  Filter 
)
static

◆ unrollGEPLoad()

static void unrollGEPLoad ( CallInst Call)
static

◆ unrollGEPStore()

static void unrollGEPStore ( CallInst Call)
static