LLVM 20.0.0git
|
#include "BPF.h"
#include "BPFCORE.h"
#include "BPFTargetMachine.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/IR/DebugInfoMetadata.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/User.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 Value * | aspaceWrapValue (DenseMap< Value *, Value * > &Cache, Function *F, Value *ToWrap) |
static void | aspaceWrapOperand (DenseMap< Value *, Value * > &Cache, Instruction *I, unsigned OpNum) |
#define DEBUG_TYPE "bpf-check-and-opt-ir" |
Definition at line 39 of file BPFCheckAndAdjustIR.cpp.
|
static |
Definition at line 464 of file BPFCheckAndAdjustIR.cpp.
References aspaceWrapValue(), llvm::Type::getPointerAddressSpace(), llvm::Value::getType(), and I.
|
static |
Definition at line 431 of file BPFCheckAndAdjustIR.cpp.
References aspaceWrapValue(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), F, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), GEP, llvm::Value::getName(), llvm::Value::getType(), and Ptr.
Referenced by aspaceWrapOperand(), and aspaceWrapValue().
INITIALIZE_PASS | ( | BPFCheckAndAdjustIR | , |
DEBUG_TYPE | , | ||
"BPF Check And Adjust IR" | , | ||
false | , | ||
false | |||
) |
Definition at line 65 of file BPFCheckAndAdjustIR.cpp.
Definition at line 386 of file BPFCheckAndAdjustIR.cpp.
References llvm::SmallVectorBase< Size_T >::empty(), F, llvm::for_each(), Insn, llvm::SmallVectorTemplateBase< T, bool >::push_back(), unrollGEPLoad(), and unrollGEPStore().
|
static |
Definition at line 188 of file BPFCheckAndAdjustIR.cpp.
References A, assert(), B, llvm::IRBuilderBase::CreateICmp(), llvm::IRBuilderBase::CreateLogicalAnd(), llvm::IRBuilderBase::CreateLogicalOr(), llvm::IRBuilderBase::CreateSExt(), llvm::IRBuilderBase::CreateZExt(), llvm::Filter, llvm::First, llvm::User::getOperand(), llvm::CmpInst::getPredicate(), I, Info, llvm::ICmpInst::isGE(), llvm::ICmpInst::isGT(), llvm::ICmpInst::isLE(), llvm::ICmpInst::isLT(), llvm::ICmpInst::isRelational(), LHS, P, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::Value::replaceAllUsesWith(), RHS, ToRemove, and X.
|
static |
Definition at line 371 of file BPFCheckAndAdjustIR.cpp.
References GEP, and llvm::BPFPreserveStaticOffsetPass::reconstructLoad().
Referenced by removeGEPBuiltinsInFunc().
|
static |
Definition at line 379 of file BPFCheckAndAdjustIR.cpp.
References GEP, and llvm::BPFPreserveStaticOffsetPass::reconstructStore().
Referenced by removeGEPBuiltinsInFunc().