LLVM 20.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.
Functions | |
static bool | shouldConvertToRelLookupTable (Module &M, GlobalVariable &GV) |
static GlobalVariable * | createRelLookupTable (Function &Func, GlobalVariable &LookupTable) |
static void | convertToRelLookupTable (GlobalVariable &LookupTable) |
static bool | convertToRelativeLookupTables (Module &M, function_ref< TargetTransformInfo &(Function &)> GetTTI) |
|
static |
Definition at line 170 of file RelLookupTableConverter.cpp.
References convertToRelLookupTable(), F, llvm::make_early_inc_range(), and shouldConvertToRelLookupTable().
Referenced by llvm::RelLookupTableConverterPass::run().
|
static |
Definition at line 130 of file RelLookupTableConverter.cpp.
References llvm::IRBuilderBase::CreateCall(), createRelLookupTable(), llvm::IRBuilderBase::CreateShl(), GEP, llvm::Intrinsic::getDeclaration(), llvm::BasicBlock::getParent(), llvm::Offset, and llvm::IRBuilderBase::SetInsertPoint().
Referenced by convertToRelativeLookupTables().
|
static |
Definition at line 93 of file RelLookupTableConverter.cpp.
References llvm::sampleprof::Base, llvm::ConstantArray::get(), llvm::Type::getInt32Ty(), llvm::ArrayType::getNumElements(), llvm::ConstantExpr::getPtrToInt(), llvm::ConstantExpr::getSub(), llvm::ConstantExpr::getTrunc(), llvm::ConstantArray::getType(), Idx, llvm::User::operands(), llvm::GlobalObject::setAlignment(), llvm::GlobalVariable::setInitializer(), and llvm::GlobalValue::setUnnamedAddr().
Referenced by convertToRelLookupTable().
|
static |
Definition at line 24 of file RelLookupTableConverter.cpp.
References DL, GEP, llvm::GlobalVariable::getInitializer(), llvm::GlobalValue::getValueType(), llvm::GlobalVariable::hasInitializer(), llvm::GlobalValue::hasLocalLinkage(), llvm::Value::hasOneUse(), llvm::GlobalVariable::isConstant(), llvm::IsConstantOffsetFromGlobal(), llvm::GlobalValue::isDSOLocal(), llvm::GlobalValue::isImplicitDSOLocal(), llvm::Type::isPointerTy(), llvm::Offset, and llvm::Value::use_begin().
Referenced by convertToRelativeLookupTables().