1//===--- CodeGenOptions.def - Code generation option database ----- 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 the code generation options. Users of this file 10// must define the CODEGENOPT macro to make use of this information. 11// 12//===----------------------------------------------------------------------===// 13#ifndef CODEGENOPT 14# error Define the CODEGENOPT macro to handle language options 15#endif 16 17#ifndef ENUM_CODEGENOPT 18# define ENUM_CODEGENOPT(Name, Type, Bits, Default) \ 19CODEGENOPT(Name, Bits, Default) 20#endif 21 22CODEGENOPT(OptimizationLevel, 2, 0) ///< The -O[0-3] option specified. 23 24CODEGENOPT(DebugPassManager, 1, 0) ///< Prints debug information for the new 25 ///< pass manager. 26 27CODEGENOPT(IsPIE, 1, 0) ///< PIE level is the same as PIC Level. 28CODEGENOPT(PICLevel, 2, 0) ///< PIC level of the LLVM module. 29CODEGENOPT(PrepareForFullLTO , 1, 0) ///< Set when -flto is enabled on the 30 ///< compile step. 31CODEGENOPT(PrepareForThinLTO , 1, 0) ///< Set when -flto=thin is enabled on the 32 ///< compile step. 33CODEGENOPT(StackArrays, 1, 0) ///< -fstack-arrays (enable the stack-arrays pass) 34CODEGENOPT(LoopVersioning, 1, 0) ///< Enable loop versioning. 35CODEGENOPT(UnrollLoops, 1, 0) ///< Enable loop unrolling 36CODEGENOPT(AliasAnalysis, 1, 0) ///< Enable alias analysis pass 37 38CODEGENOPT(Underscoring, 1, 1) 39ENUM_CODEGENOPT(RelocationModel, llvm::Reloc::Model, 3, llvm::Reloc::PIC_) ///< Name of the relocation model to use. 40ENUM_CODEGENOPT(DebugInfo, llvm::codegenoptions::DebugInfoKind, 4, llvm::codegenoptions::NoDebugInfo) ///< Level of debug info to generate 41ENUM_CODEGENOPT(VecLib, llvm::driver::VectorLibrary, 3, llvm::driver::VectorLibrary::NoLibrary) ///< Vector functions library to use 42ENUM_CODEGENOPT(FramePointer, llvm::FramePointerKind, 2, llvm::FramePointerKind::None) ///< Enable the usage of frame pointers 43 44#undef CODEGENOPT 45#undef ENUM_CODEGENOPT 46