LLVM
20.0.0git
lib
Frontend
Driver
CodeGenOptions.cpp
Go to the documentation of this file.
1
//===--- CodeGenOptions.cpp - Shared codegen option handling --------------===//
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
#include "
llvm/Frontend/Driver/CodeGenOptions.h
"
10
#include "
llvm/Analysis/TargetLibraryInfo.h
"
11
#include "
llvm/TargetParser/Triple.h
"
12
13
namespace
llvm::driver
{
14
15
TargetLibraryInfoImpl
*
createTLII
(
llvm::Triple
&TargetTriple,
16
driver::VectorLibrary
Veclib) {
17
TargetLibraryInfoImpl
*TLII =
new
TargetLibraryInfoImpl
(TargetTriple);
18
19
using
VectorLibrary
=
llvm::driver::VectorLibrary
;
20
switch
(Veclib) {
21
case
VectorLibrary::Accelerate
:
22
TLII->
addVectorizableFunctionsFromVecLib
(
TargetLibraryInfoImpl::Accelerate
,
23
TargetTriple);
24
break
;
25
case
VectorLibrary::LIBMVEC
:
26
TLII->
addVectorizableFunctionsFromVecLib
(
TargetLibraryInfoImpl::LIBMVEC_X86
,
27
TargetTriple);
28
break
;
29
case
VectorLibrary::MASSV
:
30
TLII->
addVectorizableFunctionsFromVecLib
(
TargetLibraryInfoImpl::MASSV
,
31
TargetTriple);
32
break
;
33
case
VectorLibrary::SVML
:
34
TLII->
addVectorizableFunctionsFromVecLib
(
TargetLibraryInfoImpl::SVML
,
35
TargetTriple);
36
break
;
37
case
VectorLibrary::SLEEF
:
38
TLII->
addVectorizableFunctionsFromVecLib
(
TargetLibraryInfoImpl::SLEEFGNUABI
,
39
TargetTriple);
40
break
;
41
case
VectorLibrary::Darwin_libsystem_m
:
42
TLII->
addVectorizableFunctionsFromVecLib
(
43
TargetLibraryInfoImpl::DarwinLibSystemM
, TargetTriple);
44
break
;
45
case
VectorLibrary::ArmPL
:
46
TLII->
addVectorizableFunctionsFromVecLib
(
TargetLibraryInfoImpl::ArmPL
,
47
TargetTriple);
48
break
;
49
case
VectorLibrary::AMDLIBM
:
50
TLII->
addVectorizableFunctionsFromVecLib
(
TargetLibraryInfoImpl::AMDLIBM
,
51
TargetTriple);
52
break
;
53
default
:
54
break
;
55
}
56
return
TLII;
57
}
58
59
}
// namespace llvm::driver
CodeGenOptions.h
TargetLibraryInfo.h
Triple.h
llvm::TargetLibraryInfoImpl
Implementation of the target library information.
Definition:
TargetLibraryInfo.h:80
llvm::TargetLibraryInfoImpl::addVectorizableFunctionsFromVecLib
void addVectorizableFunctionsFromVecLib(enum VectorLibrary VecLib, const llvm::Triple &TargetTriple)
Calls addVectorizableFunctions with a known preset of functions for the given vector library.
Definition:
TargetLibraryInfo.cpp:1328
llvm::TargetLibraryInfoImpl::MASSV
@ MASSV
Definition:
TargetLibraryInfo.h:126
llvm::TargetLibraryInfoImpl::DarwinLibSystemM
@ DarwinLibSystemM
Definition:
TargetLibraryInfo.h:124
llvm::TargetLibraryInfoImpl::SVML
@ SVML
Definition:
TargetLibraryInfo.h:127
llvm::TargetLibraryInfoImpl::SLEEFGNUABI
@ SLEEFGNUABI
Definition:
TargetLibraryInfo.h:128
llvm::TargetLibraryInfoImpl::AMDLIBM
@ AMDLIBM
Definition:
TargetLibraryInfo.h:130
llvm::TargetLibraryInfoImpl::LIBMVEC_X86
@ LIBMVEC_X86
Definition:
TargetLibraryInfo.h:125
llvm::TargetLibraryInfoImpl::ArmPL
@ ArmPL
Definition:
TargetLibraryInfo.h:129
llvm::TargetLibraryInfoImpl::Accelerate
@ Accelerate
Definition:
TargetLibraryInfo.h:123
llvm::Triple
Triple - Helper class for working with autoconf configuration names.
Definition:
Triple.h:44
llvm::driver
Definition:
CodeGenOptions.h:21
llvm::driver::VectorLibrary
VectorLibrary
Vector library option used with -fveclib=.
Definition:
CodeGenOptions.h:24
llvm::driver::VectorLibrary::LIBMVEC
@ LIBMVEC
llvm::driver::VectorLibrary::Darwin_libsystem_m
@ Darwin_libsystem_m
llvm::driver::VectorLibrary::SVML
@ SVML
llvm::driver::VectorLibrary::ArmPL
@ ArmPL
llvm::driver::VectorLibrary::AMDLIBM
@ AMDLIBM
llvm::driver::VectorLibrary::Accelerate
@ Accelerate
llvm::driver::VectorLibrary::SLEEF
@ SLEEF
llvm::driver::VectorLibrary::MASSV
@ MASSV
llvm::driver::createTLII
TargetLibraryInfoImpl * createTLII(llvm::Triple &TargetTriple, VectorLibrary Veclib)
Definition:
CodeGenOptions.cpp:15
Generated on Mon Nov 18 2024 13:48:23 for LLVM by
1.9.6