LLVM
22.0.0git
include
llvm
Frontend
Driver
CodeGenOptions.h
Go to the documentation of this file.
1
//===--- CodeGenOptions.h ---------------------------------------*- C++ -*-===//
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
// This file defines frontend codegen options common to clang and flang
10
//
11
//===----------------------------------------------------------------------===//
12
13
#ifndef LLVM_FRONTEND_DRIVER_CODEGENOPTIONS_H
14
#define LLVM_FRONTEND_DRIVER_CODEGENOPTIONS_H
15
16
#include "
llvm/Support/Compiler.h
"
17
#include <string>
18
19
namespace
llvm
{
20
class
Triple
;
21
class
TargetLibraryInfoImpl
;
22
}
// namespace llvm
23
24
namespace
llvm::driver
{
25
// The current supported vector libraries in enum \VectorLibrary are 9(including
26
// the NoLibrary). Changing the bitcount from 3 to 4 so that more than 8 values
27
// can be supported. Now the maximum number of vector libraries supported
28
// increase from 8(2^3) to 16(2^4).
29
//
30
// ENUM_CODEGENOPT(VecLib, llvm::driver::VectorLibrary,
31
// <bitcount>4</bitcount>, llvm::driver::VectorLibrary::NoLibrary) is the
32
// currently defined in clang/include/clang/Basic/CodeGenOptions.def
33
// bitcount is the number of bits used to represent the enum value.
34
//
35
// IMPORTANT NOTE: When adding a new vector library support, and if count of
36
// supported vector libraries crosses the current max limit. Please increment
37
// the bitcount value.
38
39
/// Vector library option used with -fveclib=
40
enum class
VectorLibrary
{
41
NoLibrary
,
// Don't use any vector library.
42
Accelerate
,
// Use the Accelerate framework.
43
LIBMVEC
,
// GLIBC vector math library.
44
MASSV
,
// IBM MASS vector library.
45
SVML
,
// Intel short vector math library.
46
SLEEF
,
// SLEEF SIMD Library for Evaluating Elementary Functions.
47
Darwin_libsystem_m
,
// Use Darwin's libsystem_m vector functions.
48
ArmPL
,
// Arm Performance Libraries.
49
AMDLIBM
// AMD vector math library.
50
};
51
52
LLVM_ABI
TargetLibraryInfoImpl
*
createTLII
(
const
llvm::Triple
&TargetTriple,
53
VectorLibrary
Veclib);
54
55
enum
ProfileInstrKind
{
56
ProfileNone
,
// Profile instrumentation is turned off.
57
ProfileClangInstr
,
// Clang instrumentation to generate execution counts
58
// to use with PGO.
59
ProfileIRInstr
,
// IR level PGO instrumentation in LLVM.
60
ProfileCSIRInstr
,
// IR level PGO context sensitive instrumentation in LLVM.
61
ProfileIRSampleColdCov
,
// IR level sample pgo based cold function coverage
62
// instrumentation in LLVM.
63
};
64
65
// Default filename used for profile generation.
66
LLVM_ABI
std::string
getDefaultProfileGenName
();
67
}
// end namespace llvm::driver
68
69
#endif
Compiler.h
LLVM_ABI
#define LLVM_ABI
Definition
Compiler.h:213
llvm::TargetLibraryInfoImpl
Implementation of the target library information.
Definition
TargetLibraryInfo.h:86
llvm::Triple
Triple - Helper class for working with autoconf configuration names.
Definition
Triple.h:47
llvm::driver
Definition
CodeGenOptions.h:24
llvm::driver::getDefaultProfileGenName
LLVM_ABI std::string getDefaultProfileGenName()
Definition
CodeGenOptions.cpp:66
llvm::driver::createTLII
LLVM_ABI TargetLibraryInfoImpl * createTLII(const llvm::Triple &TargetTriple, VectorLibrary Veclib)
Definition
CodeGenOptions.cpp:22
llvm::driver::ProfileInstrKind
ProfileInstrKind
Definition
CodeGenOptions.h:55
llvm::driver::ProfileClangInstr
@ ProfileClangInstr
Definition
CodeGenOptions.h:57
llvm::driver::ProfileIRSampleColdCov
@ ProfileIRSampleColdCov
Definition
CodeGenOptions.h:61
llvm::driver::ProfileNone
@ ProfileNone
Definition
CodeGenOptions.h:56
llvm::driver::ProfileCSIRInstr
@ ProfileCSIRInstr
Definition
CodeGenOptions.h:60
llvm::driver::ProfileIRInstr
@ ProfileIRInstr
Definition
CodeGenOptions.h:59
llvm::driver::VectorLibrary
VectorLibrary
Vector library option used with -fveclib=.
Definition
CodeGenOptions.h:40
llvm::driver::VectorLibrary::LIBMVEC
@ LIBMVEC
Definition
CodeGenOptions.h:43
llvm::driver::VectorLibrary::Darwin_libsystem_m
@ Darwin_libsystem_m
Definition
CodeGenOptions.h:47
llvm::driver::VectorLibrary::SVML
@ SVML
Definition
CodeGenOptions.h:45
llvm::driver::VectorLibrary::ArmPL
@ ArmPL
Definition
CodeGenOptions.h:48
llvm::driver::VectorLibrary::AMDLIBM
@ AMDLIBM
Definition
CodeGenOptions.h:49
llvm::driver::VectorLibrary::Accelerate
@ Accelerate
Definition
CodeGenOptions.h:42
llvm::driver::VectorLibrary::SLEEF
@ SLEEF
Definition
CodeGenOptions.h:46
llvm::driver::VectorLibrary::MASSV
@ MASSV
Definition
CodeGenOptions.h:44
llvm::driver::VectorLibrary::NoLibrary
@ NoLibrary
Definition
CodeGenOptions.h:41
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition
AddressRanges.h:18
Generated on
for LLVM by
1.14.0