LLVM
24.0.0git
lib
Transforms
IPO
IPOOptions.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_TRANSFORMS_IPO_IPOOPTIONS_H
10
#define LLVM_LIB_TRANSFORMS_IPO_IPOOPTIONS_H
11
12
#include "
llvm/Analysis/ReplayInlineAdvisor.h
"
13
#include "
llvm/IR/Function.h
"
14
#include "
llvm/IR/LLVMContext.h
"
15
#include "
llvm/IR/Module.h
"
16
#include "
llvm/IR/ModuleSummaryIndex.h
"
17
#include <limits>
18
#include <optional>
19
20
namespace
llvm
{
21
enum class
ExpandVariadicsMode
;
22
enum class
PassSummaryAction
;
23
24
/// Mechanism to add runtime checking of devirtualization decisions, optionally
25
/// trapping or falling back to indirect call on any that are not correct.
26
/// Trapping mode is useful for debugging undefined behavior leading to failures
27
/// with WPD. Fallback mode is useful for ensuring safety when whole program
28
/// visibility may be compromised.
29
enum class
WPDCheckMode
{
None
,
Trap
,
Fallback
};
30
31
/// How much of the MemProf context graph to export to dot.
32
enum class
MemProfDotScope
{
33
All
,
// The full CCG graph.
34
Alloc
,
// Only contexts for the specified allocation.
35
Context
,
// Only the specified context.
36
};
37
}
// namespace llvm
38
39
#define OPTIONS_STRUCT_DECL
40
#include "IPOOptions.inc"
41
42
namespace
llvm
{
43
44
inline
const
IPOOptions &
getIPOOptions
(
const
LLVMContext
&
C
) {
45
return
C
.getLibraryOptions().get<IPOOptions>();
46
}
47
48
inline
const
IPOOptions &
getIPOOptions
(
const
Function
&
F
) {
49
return
getIPOOptions
(
F
.getContext());
50
}
51
52
inline
const
IPOOptions &
getIPOOptions
(
const
Module
&M) {
53
return
getIPOOptions
(M.getContext());
54
}
55
56
}
// namespace llvm
57
58
#endif
// LLVM_LIB_TRANSFORMS_IPO_IPOOPTIONS_H
C
static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")
Function.h
Module.h
Module.h This file contains the declarations for the Module class.
LLVMContext.h
F
#define F(x, y, z)
Definition
MD5.cpp:54
ModuleSummaryIndex.h
ModuleSummaryIndex.h This file contains the declarations the classes that hold the module index and s...
ReplayInlineAdvisor.h
llvm::Function
Definition
Function.h:65
llvm::LLVMContext
This is an important class for using LLVM in a threaded context.
Definition
LLVMContext.h:76
llvm::Module
A Module instance is used to store all the information related to an LLVM module.
Definition
Module.h:68
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition
DefaultTargetInfo.h:21
llvm::AllocationType::All
@ All
Definition
ModuleSummaryIndex.h:476
llvm::AllocFnKind::Alloc
@ Alloc
Definition
Attributes.h:56
llvm::PassSummaryAction
PassSummaryAction
What to do with the summary when running passes that operate on it.
Definition
IPO.h:35
llvm::ExpandVariadicsMode
ExpandVariadicsMode
Definition
ExpandVariadics.h:18
llvm::getIPOOptions
const IPOOptions & getIPOOptions(const LLVMContext &C)
Definition
IPOOptions.h:44
llvm::WPDCheckMode
WPDCheckMode
Mechanism to add runtime checking of devirtualization decisions, optionally trapping or falling back ...
Definition
IPOOptions.h:29
llvm::WPDCheckMode::Fallback
@ Fallback
Definition
IPOOptions.h:29
llvm::WPDCheckMode::Trap
@ Trap
Definition
IPOOptions.h:29
llvm::None
@ None
Definition
CodeGenData.h:111
llvm::MemProfDotScope
MemProfDotScope
How much of the MemProf context graph to export to dot.
Definition
IPOOptions.h:32
llvm::MemProfDotScope::Context
@ Context
Definition
IPOOptions.h:35
Generated on
for LLVM by
1.14.0