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