|
LLVM 24.0.0git
|
#include "llvm/Transforms/Utils/RelLookupTableConverter.h"#include "llvm/ADT/SetVector.h"#include "llvm/Analysis/ConstantFolding.h"#include "llvm/Analysis/TargetTransformInfo.h"#include "llvm/IR/BasicBlock.h"#include "llvm/IR/IRBuilder.h"#include "llvm/IR/Instructions.h"#include "llvm/IR/Module.h"Go to the source code of this file.
Classes | |
| struct | LookupTableInfo |
| struct | LookupTableUse |
| struct | AccessPattern |
Functions | |
| static bool | analyzeLookupTableUse (AccessPattern &Pattern, LookupTableUse &UseInfo, User *Usr) |
| static bool | isEligibleForRelLookupTable (const GlobalVariable &GV) |
| static bool | analyzeLookupTable (LookupTableInfo &Info, const AccessPattern &Pattern, GlobalVariable &GV) |
| static GlobalVariable * | createRelLookupTable (const LookupTableInfo &Info, GlobalVariable &LookupTable) |
| static void | convertLookupTableUse (const LookupTableUse &UseInfo) |
| static bool | convertToRelativeLookupTables (Module &M, function_ref< TargetTransformInfo &(Function &)> GetTTI) |
|
static |
Definition at line 96 of file RelLookupTableConverter.cpp.
References C(), llvm::ConstantFoldLoadFromConst(), DL, llvm::dyn_cast(), llvm::GlobalVariable::getGlobalSize(), llvm::GlobalVariable::getInitializer(), llvm::GlobalValue::getParent(), llvm::isa(), llvm::IsConstantOffsetFromGlobal(), llvm::Offset, and uint64_t.
Referenced by convertToRelativeLookupTables().
|
static |
Definition at line 48 of file RelLookupTableConverter.cpp.
References DL, llvm::dyn_cast(), llvm::MapVector< KeyT, ValueT, MapType, VectorType, N >::front(), llvm::APInt::isZero(), and llvm::MapVector< KeyT, ValueT, MapType, VectorType, N >::size().
Referenced by convertToRelativeLookupTables().
|
static |
Definition at line 212 of file RelLookupTableConverter.cpp.
References llvm::cast(), llvm::BasicBlock::getModule(), llvm::Intrinsic::getOrInsertDeclaration(), llvm::BasicBlock::getParent(), and llvm::Offset.
Referenced by convertToRelativeLookupTables().
|
static |
Definition at line 245 of file RelLookupTableConverter.cpp.
References analyzeLookupTable(), analyzeLookupTableUse(), Changed, convertLookupTableUse(), createRelLookupTable(), llvm::drop_begin(), llvm::dyn_cast(), F, I, llvm::SetVector< T, Vector, Set, N >::insert(), llvm::isa(), isEligibleForRelLookupTable(), llvm::User::operands(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::SetVector< T, Vector, Set, N >::size(), llvm::MapVector< KeyT, ValueT, MapType, VectorType, N >::try_emplace(), llvm::Value::user_begin(), llvm::Value::user_end(), and Uses.
Referenced by llvm::RelLookupTableConverterPass::run().
|
static |
Definition at line 170 of file RelLookupTableConverter.cpp.
References llvm::sampleprof::Base, llvm::ArrayType::get(), llvm::ConstantArray::get(), llvm::PoisonValue::get(), llvm::Type::getInt32Ty(), llvm::ConstantExpr::getPtrToInt(), llvm::ConstantExpr::getSub(), llvm::ConstantExpr::getTrunc(), llvm::GlobalValue::Global, llvm::IntPtrTy, llvm::isa(), llvm::GlobalValue::None, llvm::GlobalVariable::setAlignment(), llvm::GlobalVariable::setInitializer(), llvm::GlobalValue::setUnnamedAddr(), llvm::Sub, and uint64_t.
Referenced by convertToRelativeLookupTables().
|
static |
Definition at line 84 of file RelLookupTableConverter.cpp.
References llvm::GlobalVariable::hasInitializer(), llvm::GlobalValue::hasLocalLinkage(), llvm::GlobalVariable::isConstant(), llvm::GlobalValue::isDSOLocal(), and llvm::GlobalValue::isImplicitDSOLocal().
Referenced by convertToRelativeLookupTables().