LLVM
22.0.0git
include
llvm
CodeGen
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
#include "
llvm/Support/Compiler.h
"
22
23
namespace
llvm
{
24
class
Function
;
25
struct
ReplaceWithVeclib
:
public
PassInfoMixin
<ReplaceWithVeclib> {
26
LLVM_ABI
PreservedAnalyses
run
(
Function
&
F
,
FunctionAnalysisManager
&AM);
27
};
28
29
// Legacy pass
30
struct
LLVM_ABI
ReplaceWithVeclibLegacy
:
public
FunctionPass
{
31
static
char
ID
;
32
ReplaceWithVeclibLegacy
() :
FunctionPass
(
ID
) {
33
initializeReplaceWithVeclibLegacyPass
(*PassRegistry::getPassRegistry());
34
}
35
void
getAnalysisUsage(
AnalysisUsage
&AU)
const override
;
36
bool
runOnFunction
(
Function
&
F
)
override
;
37
};
38
39
}
// End namespace llvm
40
#endif
// LLVM_CODEGEN_REPLACEWITHVECLIB_H
Compiler.h
LLVM_ABI
#define LLVM_ABI
Definition:
Compiler.h:213
runOnFunction
static bool runOnFunction(Function &F, bool PostInlining)
Definition:
EntryExitInstrumenter.cpp:103
PassManager.h
This header defines various interfaces for pass management in LLVM.
InitializePasses.h
F
#define F(x, y, z)
Definition:
MD5.cpp:55
PassRegistry.h
Pass.h
llvm::AnalysisManager
A container for analyses that lazily runs them and caches their results.
Definition:
PassManager.h:255
llvm::AnalysisUsage
Represent the analysis usage information of a pass.
Definition:
PassAnalysisSupport.h:48
llvm::FunctionPass
FunctionPass class - This class is used to implement most global optimizations.
Definition:
Pass.h:314
llvm::Function
Definition:
Function.h:64
llvm::PreservedAnalyses
A set of analyses that are preserved following a run of a transformation pass.
Definition:
Analysis.h:112
unsigned
llvm::codeview::PublicSymFlags::Function
@ Function
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:
AddressRanges.h:18
llvm::initializeReplaceWithVeclibLegacyPass
LLVM_ABI void initializeReplaceWithVeclibLegacyPass(PassRegistry &)
llvm::PassInfoMixin
A CRTP mix-in to automatically provide informational APIs needed for passes.
Definition:
PassManager.h:70
llvm::ReplaceWithVeclibLegacy
Definition:
ReplaceWithVeclib.h:30
llvm::ReplaceWithVeclibLegacy::ReplaceWithVeclibLegacy
ReplaceWithVeclibLegacy()
Definition:
ReplaceWithVeclib.h:32
llvm::ReplaceWithVeclibLegacy::ID
static char ID
Definition:
ReplaceWithVeclib.h:31
llvm::ReplaceWithVeclib
Definition:
ReplaceWithVeclib.h:25
llvm::ReplaceWithVeclib::run
LLVM_ABI PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
Definition:
ReplaceWithVeclib.cpp:229
Generated on Wed Sep 3 2025 01:18:39 for LLVM by
1.9.6