Subversion Repositories QNX 8.QNX8 LLVM/Clang compiler suite

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
14 pmbaty 1
//===- InjectTLIMAppings.h - TLI to VFABI attribute injection  ------------===//
2
//
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
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
// Populates the VFABI attribute with the scalar-to-vector mappings
10
// from the TargetLibraryInfo.
11
//
12
//===----------------------------------------------------------------------===//
13
#ifndef LLVM_TRANSFORMS_UTILS_INJECTTLIMAPPINGS_H
14
#define LLVM_TRANSFORMS_UTILS_INJECTTLIMAPPINGS_H
15
 
16
#include "llvm/IR/PassManager.h"
17
#include "llvm/InitializePasses.h"
18
#include "llvm/Pass.h"
19
 
20
namespace llvm {
21
class Function;
22
class InjectTLIMappings : public PassInfoMixin<InjectTLIMappings> {
23
public:
24
  PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
25
};
26
 
27
// Legacy pass
28
class InjectTLIMappingsLegacy : public FunctionPass {
29
public:
30
  static char ID;
31
  InjectTLIMappingsLegacy() : FunctionPass(ID) {
32
    initializeInjectTLIMappingsLegacyPass(*PassRegistry::getPassRegistry());
33
  }
34
  void getAnalysisUsage(AnalysisUsage &AU) const override;
35
  bool runOnFunction(Function &F) override;
36
};
37
 
38
} // End namespace llvm
39
#endif // LLVM_TRANSFORMS_UTILS_INJECTTLIMAPPINGS_H