1//===----------------------------------------------------------------------===//
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#ifndef LLVM_LIB_CODEGEN_CODEGENOPTIONS_H
10#define LLVM_LIB_CODEGEN_CODEGENOPTIONS_H
11
12#include "llvm/Target/TargetOptions.h"
13#include <cstdint>
14#include <optional>
15
16namespace llvm {
17#ifdef EXPENSIVE_CHECKS
18constexpr bool MachineCombinerVerifyPatternOrderDefault = true;
19#else
20constexpr bool MachineCombinerVerifyPatternOrderDefault = false;
21#endif
22} // namespace llvm
23
24#define OPTIONS_STRUCT_DECL
25#include "CodeGenOptions.inc"
26
27namespace llvm {
28
29class Function;
30class LLVMContext;
31class MachineFunction;
32class Module;
33
34const CodeGenOptions &getCodeGenOptions(const LLVMContext &C);
35const CodeGenOptions &getCodeGenOptions(const Function &F);
36const CodeGenOptions &getCodeGenOptions(const Module &M);
37const CodeGenOptions &getCodeGenOptions(const MachineFunction &MF);
38
39} // namespace llvm
40
41#endif // LLVM_LIB_CODEGEN_CODEGENOPTIONS_H
42