LLVM 24.0.0git
AnalysisOptions.h
Go to the documentation of this file.
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_ANALYSIS_ANALYSISOPTIONS_H
10#define LLVM_LIB_ANALYSIS_ANALYSISOPTIONS_H
11
12#include "llvm/IR/Function.h"
13#include "llvm/IR/LLVMContext.h"
14#include <optional>
15
16namespace llvm {
17
25
31
32// Types of dependence test routines.
44
46
47enum class InlinePriorityMode : int { Size, Cost, CostBenefit, ML };
48
50
52
53} // namespace llvm
54
55#define OPTIONS_STRUCT_DECL
56#include "AnalysisOptions.inc"
57
58namespace llvm {
59
60class Loop;
61class Module;
62
63inline const AnalysisOptions &getAnalysisOptions(const LLVMContext &C) {
64 return C.getLibraryOptions().get<AnalysisOptions>();
65}
66
67inline const AnalysisOptions &getAnalysisOptions(const Function &F) {
68 return getAnalysisOptions(F.getContext());
69}
70
71const AnalysisOptions &getAnalysisOptions(const Module &M);
72const AnalysisOptions &getAnalysisOptions(const Loop &L);
73
74} // namespace llvm
75
76#endif // LLVM_LIB_ANALYSIS_ANALYSISOPTIONS_H
static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")
#define F(x, y, z)
Definition MD5.cpp:54
Machine Check Debug Module
This is an important class for using LLVM in a threaded context.
Definition LLVMContext.h:76
This is an optimization pass for GlobalISel generic memory operations.
InstructionCost Cost
ForceSummaryHotness
const AnalysisOptions & getAnalysisOptions(const LLVMContext &C)
IntrinsicCostStrategy
SkipMLPolicyCriteria
@ Auto
Determine whether to use color based on the command line argument and the raw_ostream.
Definition WithColor.h:43