LLVM 24.0.0git
ScalarOptions.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_SCALAR_SCALAROPTIONS_H
10#define LLVM_LIB_TRANSFORMS_SCALAR_SCALAROPTIONS_H
11
13#include "llvm/IR/Function.h"
14#include "llvm/IR/LLVMContext.h"
16#include <limits>
17#include <optional>
18
19namespace llvm {
28} // namespace llvm
29
30#define OPTIONS_STRUCT_DECL
31#include "ScalarOptions.inc"
32
33namespace llvm {
34
35class Loop;
36
37inline const ScalarOptions &getScalarOptions(const LLVMContext &C) {
38 return C.getLibraryOptions().get<ScalarOptions>();
39}
40
41inline const ScalarOptions &getScalarOptions(const Function &F) {
42 return getScalarOptions(F.getContext());
43}
44
45const ScalarOptions &getScalarOptions(const Loop &L);
46
47} // namespace llvm
48
49#endif // LLVM_LIB_TRANSFORMS_SCALAR_SCALAROPTIONS_H
static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")
#define F(x, y, z)
Definition MD5.cpp:54
This pass exposes codegen information to IR-level passes.
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.
const ScalarOptions & getScalarOptions(const LLVMContext &C)
LoopInterchangeRule
CRCStrategyKind
@ Auto
Determine whether to use color based on the command line argument and the raw_ostream.
Definition WithColor.h:43
@ Disable
Disable colors.
Definition WithColor.h:49