LLVM  16.0.0git
ReplaceWithVeclib.h
Go to the documentation of this file.
1 //===- ReplaceWithVeclib.h - Replace vector intrinsics with veclib calls --===//
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 // Replaces calls to LLVM vector intrinsics (i.e., calls to LLVM intrinsics
10 // with vector operands) with matching calls to functions from a vector
11 // library (e.g., libmvec, SVML) according to TargetLibraryInfo.
12 //
13 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_CODEGEN_REPLACEWITHVECLIB_H
15 #define LLVM_CODEGEN_REPLACEWITHVECLIB_H
16 
17 #include "llvm/IR/PassManager.h"
18 #include "llvm/InitializePasses.h"
19 #include "llvm/Pass.h"
20 #include "llvm/PassRegistry.h"
21 
22 namespace llvm {
23 class Function;
24 struct ReplaceWithVeclib : public PassInfoMixin<ReplaceWithVeclib> {
26 };
27 
28 // Legacy pass
30  static char ID;
33  }
34  void getAnalysisUsage(AnalysisUsage &AU) const override;
35  bool runOnFunction(Function &F) override;
36 };
37 
38 } // End namespace llvm
39 #endif // LLVM_CODEGEN_REPLACEWITHVECLIB_H
llvm::PreservedAnalyses
A set of analyses that are preserved following a run of a transformation pass.
Definition: PassManager.h:152
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::ReplaceWithVeclib
Definition: ReplaceWithVeclib.h:24
llvm::PassInfoMixin
A CRTP mix-in to automatically provide informational APIs needed for passes.
Definition: PassManager.h:371
llvm::Function
Definition: Function.h:60
Pass.h
llvm::ReplaceWithVeclibLegacy::getAnalysisUsage
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
Definition: ReplaceWithVeclib.cpp:226
llvm::ReplaceWithVeclibLegacy::ID
static char ID
Definition: ReplaceWithVeclib.h:30
PassRegistry.h
F
#define F(x, y, z)
Definition: MD5.cpp:55
llvm::PassRegistry::getPassRegistry
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
Definition: PassRegistry.cpp:24
llvm::AnalysisUsage
Represent the analysis usage information of a pass.
Definition: PassAnalysisSupport.h:47
llvm::CallingConv::ID
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
Definition: CallingConv.h:24
llvm::initializeReplaceWithVeclibLegacyPass
void initializeReplaceWithVeclibLegacyPass(PassRegistry &)
llvm::ReplaceWithVeclibLegacy::ReplaceWithVeclibLegacy
ReplaceWithVeclibLegacy()
Definition: ReplaceWithVeclib.h:31
llvm::ReplaceWithVeclibLegacy
Definition: ReplaceWithVeclib.h:29
llvm::ReplaceWithVeclibLegacy::runOnFunction
bool runOnFunction(Function &F) override
runOnFunction - Virtual method overriden by subclasses to do the per-function processing of the pass.
Definition: ReplaceWithVeclib.cpp:220
PassManager.h
llvm::ReplaceWithVeclib::run
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
Definition: ReplaceWithVeclib.cpp:198
llvm::AnalysisManager
A container for analyses that lazily runs them and caches their results.
Definition: InstructionSimplify.h:42
llvm::FunctionPass
FunctionPass class - This class is used to implement most global optimizations.
Definition: Pass.h:308
InitializePasses.h
llvm::codeview::PublicSymFlags::Function
@ Function