#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"
usingnamespacellvm;
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) { … }
PreservedAnalyses RelLookupTableConverterPass::run(Module &M,
ModuleAnalysisManager &AM) { … }