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;
21class TargetLibraryInfoImpl;
22} // namespace llvm
23
24namespace 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=
40enum 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
53 VectorLibrary Veclib);
54
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.
67} // end namespace llvm::driver
68
69#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=.
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18