LLVM  10.0.0svn
Namespaces | Macros | Functions
BPFAbstractMemberAccess.cpp File Reference
#include "BPF.h"
#include "BPFCORE.h"
#include "BPFTargetMachine.h"
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.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"
#include <stack>
Include dependency graph for BPFAbstractMemberAccess.cpp:

Go to the source code of this file.

Namespaces

 llvm
 This class represents lattice values for constants.
 

Macros

#define DEBUG_TYPE   "bpf-abstract-member-access"
 

Functions

 INITIALIZE_PASS (BPFAbstractMemberAccess, DEBUG_TYPE, "abstracting struct/union member accessees", false, false) ModulePass *llvm
 
static bool SkipDIDerivedTag (unsigned Tag)
 
static DITypestripQualifiers (DIType *Ty)
 
static const DITypestripQualifiers (const DIType *Ty)
 
static uint32_t calcArraySize (const DICompositeType *CTy, uint32_t StartDim)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "bpf-abstract-member-access"

Definition at line 92 of file BPFAbstractMemberAccess.cpp.

Function Documentation

◆ calcArraySize()

static uint32_t calcArraySize ( const DICompositeType CTy,
uint32_t  StartDim 
)
static

Definition at line 215 of file BPFAbstractMemberAccess.cpp.

References llvm::BPFCoreSharedInfo::AmaAttr, assert(), llvm::Triple::bpfel, C, llvm::GetElementPtrInst::Create(), llvm::GetElementPtrInst::CreateInBounds(), llvm::dyn_cast(), llvm::Instruction::eraseFromParent(), llvm::GlobalValue::ExternalLinkage, F(), llvm::BPFCoreSharedInfo::FIELD_BYTE_OFFSET, llvm::BPFCoreSharedInfo::FIELD_BYTE_SIZE, llvm::BPFCoreSharedInfo::FIELD_EXISTENCE, llvm::BPFCoreSharedInfo::FIELD_LSHIFT_U64, llvm::BPFCoreSharedInfo::FIELD_RSHIFT_U64, llvm::BPFCoreSharedInfo::FIELD_SIGNEDNESS, GEP, llvm::ConstantInt::get(), llvm::Triple::getArch(), llvm::CallBase::getArgOperand(), llvm::DICompositeType::getBaseType(), llvm::CallBase::getCalledValue(), llvm::BasicBlock::getContext(), llvm::DISubrange::getCount(), llvm::DICompositeType::getElements(), llvm::BasicBlock::getInstList(), llvm::Type::getInt32Ty(), llvm::Type::getInt64Ty(), llvm::Type::getInt8PtrTy(), llvm::Type::getInt8Ty(), llvm::ilist_node_impl< OptionsT >::getIterator(), llvm::Instruction::getMetadata(), llvm::DIType::getName(), llvm::DIType::getOffsetInBits(), llvm::Instruction::getParent(), llvm::DIType::getSizeInBits(), llvm::DINode::getTag(), llvm::Value::getType(), llvm::ConstantInt::getValue(), llvm::APInt::getZExtValue(), I, llvm::iplist_impl< IntrusiveListT, TraitsT >::insert(), llvm::DIType::isBitField(), llvm_unreachable, llvm::BPFCoreSharedInfo::MAX_FIELD_RELOC_KIND, llvm::SmallVectorTemplateBase< T >::push_back(), llvm::Value::replaceAllUsesWith(), llvm::report_fatal_error(), stripQualifiers(), llvm::Tag, llvm::SystemZISD::TM, llvm::to_string(), llvm::AMDGPU::HSAMD::Kernel::Arg::Key::TypeName, and llvm::Value::users().

◆ INITIALIZE_PASS()

INITIALIZE_PASS ( BPFAbstractMemberAccess  ,
DEBUG_TYPE  ,
"abstracting struct/union member accessees"  ,
false  ,
false   
)

◆ SkipDIDerivedTag()

static bool SkipDIDerivedTag ( unsigned  Tag)
static

Definition at line 188 of file BPFAbstractMemberAccess.cpp.

Referenced by stripQualifiers().

◆ stripQualifiers() [1/2]

static DIType* stripQualifiers ( DIType Ty)
static

Definition at line 197 of file BPFAbstractMemberAccess.cpp.

References SkipDIDerivedTag().

Referenced by calcArraySize().

◆ stripQualifiers() [2/2]

static const DIType* stripQualifiers ( const DIType Ty)
static

Definition at line 206 of file BPFAbstractMemberAccess.cpp.

References SkipDIDerivedTag().