1//===- CGPassBuilderOption.h - Options for pass builder ---------*- C++ -*-===//
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// This file declares the CCState and CCValAssign classes, used for lowering
10// and implementing calling conventions.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_TARGET_CGPASSBUILDEROPTION_H
15#define LLVM_TARGET_CGPASSBUILDEROPTION_H
16
17#include "llvm/Target/TargetOptions.h"
18#include <optional>
19
20namespace llvm {
21
22enum class RunOutliner { TargetDefault, AlwaysOutline, NeverOutline };
23enum class RegAllocType { Default, Basic, Fast, Greedy, PBQP };
24
25// Not one-on-one but mostly corresponding to commandline options in
26// TargetPassConfig.cpp.
27struct CGPassBuilderOption {
28 std::optional<bool> OptimizeRegAlloc;
29 std::optional<bool> EnableIPRA;
30 bool DebugPM = false;
31 bool DisableVerify = false;
32 bool EnableImplicitNullChecks = false;
33 bool EnableBlockPlacementStats = false;
34 bool EnableMachineFunctionSplitter = false;
35 bool MISchedPostRA = false;
36 bool EarlyLiveIntervals = false;
37 bool GCEmptyBlocks = false;
38
39 bool DisableLSR = false;
40 bool DisableCGP = false;
41 bool PrintLSR = false;
42 bool DisableMergeICmps = false;
43 bool DisablePartialLibcallInlining = false;
44 bool DisableConstantHoisting = false;
45 bool DisableSelectOptimize = true;
46 bool DisableAtExitBasedGlobalDtorLowering = false;
47 bool DisableExpandReductions = false;
48 bool DisableRAFSProfileLoader = false;
49 bool DisableCFIFixup = false;
50 bool PrintAfterISel = false;
51 bool PrintISelInput = false;
52 bool RequiresCodeGenSCCOrder = false;
53
54 RunOutliner EnableMachineOutliner = RunOutliner::TargetDefault;
55 StringRef RegAlloc = "default";
56 std::optional<GlobalISelAbortMode> EnableGlobalISelAbort;
57 std::string FSProfileFile;
58 std::string FSRemappingFile;
59
60 std::optional<bool> VerifyMachineCode;
61 std::optional<bool> EnableFastISelOption;
62 std::optional<bool> EnableGlobalISelOption;
63 std::optional<bool> DebugifyAndStripAll;
64 std::optional<bool> DebugifyCheckAndStripAll;
65};
66
67CGPassBuilderOption getCGPassBuilderOption();
68
69} // namespace llvm
70
71#endif // LLVM_TARGET_CGPASSBUILDEROPTION_H
72

source code of llvm/include/llvm/Target/CGPassBuilderOption.h