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
18// Forward-declared so that Analysis headers can include this one. Fields of
19// these types default to the zero enumerator.
20enum class IR2VecKind;
21enum class PGOViewCountsType;
22
30
36
37// Types of dependence test routines.
49
51
52enum class InlinePriorityMode : int { Size, Cost, CostBenefit, ML };
53
55
57
58} // namespace llvm
59
60#define OPTIONS_STRUCT_DECL
61#include "AnalysisOptions.inc"
62
63namespace llvm {
64
65class Loop;
66class Module;
67
68inline const AnalysisOptions &getAnalysisOptions(const LLVMContext &C) {
69 return C.getLibraryOptions().get<AnalysisOptions>();
70}
71
72inline const AnalysisOptions &getAnalysisOptions(const Function &F) {
73 return getAnalysisOptions(F.getContext());
74}
75
76const AnalysisOptions &getAnalysisOptions(const Module &M);
77const AnalysisOptions &getAnalysisOptions(const Loop &L);
78
79} // namespace llvm
80
81#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)
IR2VecKind
IR2Vec computes two kinds of embeddings: Symbolic and Flow-aware.
Definition IR2Vec.h:70
IntrinsicCostStrategy
SkipMLPolicyCriteria
@ Auto
Determine whether to use color based on the command line argument and the raw_ostream.
Definition WithColor.h:43