|
LLVM 24.0.0git
|
#include "llvm/Transforms/Utils/RelLookupTableConverter.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 | shouldConvertToRelLookupTable (LookupTableInfo &Info, SmallVectorImpl< LookupTableUse > &Uses, Module &M, GlobalVariable &GV) |
| static GlobalVariable * | createRelLookupTable (const LookupTableInfo &Info, GlobalVariable &LookupTable) |
| static void | convertToRelLookupTable (const LookupTableInfo &Info, ArrayRef< LookupTableUse > Uses, GlobalVariable &LookupTable) |
| static bool | convertToRelativeLookupTables (Module &M, function_ref< TargetTransformInfo &(Function &)> GetTTI) |
|
static |
Definition at line 46 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 shouldConvertToRelLookupTable().
|
static |
Definition at line 271 of file RelLookupTableConverter.cpp.
References Changed, convertToRelLookupTable(), F, llvm::make_early_inc_range(), shouldConvertToRelLookupTable(), and Uses.
Referenced by llvm::RelLookupTableConverterPass::run().
|
static |
Definition at line 231 of file RelLookupTableConverter.cpp.
References llvm::cast(), createRelLookupTable(), llvm::Intrinsic::getOrInsertDeclaration(), llvm::BasicBlock::getParent(), llvm::Offset, and Uses.
Referenced by convertToRelativeLookupTables().
|
static |
Definition at line 192 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::GlobalVariable::setAlignment(), llvm::GlobalVariable::setInitializer(), llvm::GlobalValue::setUnnamedAddr(), llvm::Sub, and uint64_t.
Referenced by convertToRelLookupTable().
|
static |
Definition at line 82 of file RelLookupTableConverter.cpp.
References analyzeLookupTableUse(), C(), llvm::ConstantFoldLoadFromConst(), DL, llvm::dyn_cast(), llvm::GlobalVariable::getGlobalSize(), llvm::GlobalVariable::getInitializer(), llvm::GlobalVariable::hasInitializer(), llvm::GlobalValue::hasLocalLinkage(), llvm::isa(), llvm::GlobalVariable::isConstant(), llvm::IsConstantOffsetFromGlobal(), llvm::GlobalValue::isDSOLocal(), llvm::GlobalValue::isImplicitDSOLocal(), llvm::GlobalValue::None, llvm::Offset, llvm::SmallVectorTemplateBase< T, bool >::push_back(), uint64_t, llvm::Value::users(), and Uses.
Referenced by convertToRelativeLookupTables().