1 //===- InjectTLIMAppings.h - TLI to VFABI attribute injection ------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // Populates the VFABI attribute with the scalar-to-vector mappings
10 // from the TargetLibraryInfo.
12 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_TRANSFORMS_UTILS_INJECTTLIMAPPINGS_H
14 #define LLVM_TRANSFORMS_UTILS_INJECTTLIMAPPINGS_H
16 #include "llvm/IR/PassManager.h"
17 #include "llvm/InitializePasses.h"
20 class InjectTLIMappings : public PassInfoMixin<InjectTLIMappings> {
22 PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
26 class InjectTLIMappingsLegacy : public FunctionPass {
29 InjectTLIMappingsLegacy() : FunctionPass(ID) {
30 initializeInjectTLIMappingsLegacyPass(*PassRegistry::getPassRegistry());
32 void getAnalysisUsage(AnalysisUsage &AU) const override;
33 bool runOnFunction(Function &F) override;
36 } // End namespace llvm
37 #endif // LLVM_TRANSFORMS_UTILS_INJECTTLIMAPPINGS_H