#include "llvm/Transforms/Utils/InjectTLIMappings.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/DemandedBits.h"
#include "llvm/Analysis/GlobalsModRef.h"
#include "llvm/Analysis/OptimizationRemarkEmitter.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/Analysis/VectorUtils.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/VFABIDemangler.h"
#include "llvm/Transforms/Utils/ModuleUtils.h"
usingnamespacellvm;
#define DEBUG_TYPE …
STATISTIC(NumCallInjected,
"Number of calls in which the mappings have been injected.");
STATISTIC(NumVFDeclAdded,
"Number of function declarations that have been added.");
STATISTIC(NumCompUsedAdded,
"Number of `@llvm.compiler.used` operands that have been added.");
static void addVariantDeclaration(CallInst &CI, const ElementCount &VF,
const VecDesc *VD) { … }
static void addMappingsFromTLI(const TargetLibraryInfo &TLI, CallInst &CI) { … }
static bool runImpl(const TargetLibraryInfo &TLI, Function &F) { … }
PreservedAnalyses InjectTLIMappings::run(Function &F,
FunctionAnalysisManager &AM) { … }