|
LLVM 24.0.0git
|
#include "BPF.h"#include "BPFCORE.h"#include "BPFTargetMachine.h"#include "llvm/ADT/ArrayRef.h"#include "llvm/ADT/MapVector.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/SmallVector.h"#include "llvm/ADT/Twine.h"#include "llvm/BinaryFormat/Dwarf.h"#include "llvm/DebugInfo/BTF/BTF.h"#include "llvm/IR/DebugInfoMetadata.h"#include "llvm/IR/GlobalVariable.h"#include "llvm/IR/Instruction.h"#include "llvm/IR/Instructions.h"#include "llvm/IR/IntrinsicsBPF.h"#include "llvm/IR/Module.h"#include "llvm/IR/PassManager.h"#include "llvm/IR/Type.h"#include "llvm/IR/User.h"#include "llvm/IR/Value.h"#include "llvm/IR/ValueHandle.h"#include "llvm/Pass.h"#include "llvm/Transforms/Utils/BasicBlockUtils.h"#include <optional>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 "bpf-abstract-member-access" |
Functions | |
| static bool | SkipDIDerivedTag (unsigned Tag, bool skipTypedef) |
| static DIType * | stripQualifiers (DIType *Ty, bool skipTypedef=true) |
| static const DIType * | stripQualifiers (const DIType *Ty) |
| static uint32_t | calcArraySize (const DICompositeType *CTy, uint32_t StartDim) |
| static uint32_t | calcElementCount (DIType *&Ty) |
Return the number of innermost elements in Ty, looking through array element types such as Row in typedef struct S Row[3]. | |
| static Type * | getBaseElementType (const CallInst *Call) |
| static uint64_t | getConstant (const Value *IndexValue) |
| static void | replaceWithGEP (CallInst *Call, uint32_t DimensionIndex, uint32_t GEPIndex) |
| static std::string | formatAmaSuffix (uint32_t Kind, int64_t PatchImm, const Twine &AccessString) |
| static GlobalVariable * | getOrCreateAmaGlobal (Module &M, DIType *Root, IntegerType *ValueType, StringRef RelocSuffix) |
| #define DEBUG_TYPE "bpf-abstract-member-access" |
Definition at line 102 of file BPFAbstractMemberAccess.cpp.
|
static |
Definition at line 326 of file BPFAbstractMemberAccess.cpp.
References llvm::cast(), llvm::dyn_cast(), llvm::dyn_cast_or_null(), llvm::DISubrange::getCount(), llvm::DICompositeType::getElements(), and I.
Referenced by calcElementCount().
Return the number of innermost elements in Ty, looking through array element types such as Row in typedef struct S Row[3].
Ty is updated to the innermost element type.
Definition at line 344 of file BPFAbstractMemberAccess.cpp.
References calcArraySize(), llvm::Count, llvm::dyn_cast(), and stripQualifiers().
|
static |
Definition at line 923 of file BPFAbstractMemberAccess.cpp.
Definition at line 355 of file BPFAbstractMemberAccess.cpp.
References Call.
Referenced by replaceWithGEP().
Definition at line 360 of file BPFAbstractMemberAccess.cpp.
References assert(), llvm::dyn_cast(), llvm::ConstantInt::getValue(), llvm::APInt::getZExtValue(), and uint64_t.
Referenced by replaceWithGEP().
|
static |
Definition at line 1063 of file BPFAbstractMemberAccess.cpp.
References llvm::BPFCoreSharedInfo::AmaAttr, llvm::dyn_cast(), llvm::GlobalValue::ExternalLinkage, llvm::DIType::getName(), and N.
Definition at line 450 of file BPFAbstractMemberAccess.cpp.
References Call, llvm::GetElementPtrInst::CreateInBounds(), GEP, getBaseElementType(), getConstant(), llvm::Type::getInt32Ty(), and llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by llvm::BPFCoreSharedInfo::removeArrayAccessCall(), and llvm::BPFCoreSharedInfo::removeStructAccessCall().
Definition at line 297 of file BPFAbstractMemberAccess.cpp.
Referenced by stripQualifiers(), and stripQualifiers().
Definition at line 317 of file BPFAbstractMemberAccess.cpp.
References llvm::dyn_cast(), llvm::DINode::getTag(), and SkipDIDerivedTag().
Definition at line 308 of file BPFAbstractMemberAccess.cpp.
References llvm::dyn_cast(), llvm::DINode::getTag(), and SkipDIDerivedTag().
Referenced by calcElementCount().