Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:44:36

0001 //===- CGPassBuilderOption.h - Options for pass builder ---------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 //
0009 // This file declares the CCState and CCValAssign classes, used for lowering
0010 // and implementing calling conventions.
0011 //
0012 //===----------------------------------------------------------------------===//
0013 
0014 #ifndef LLVM_TARGET_CGPASSBUILDEROPTION_H
0015 #define LLVM_TARGET_CGPASSBUILDEROPTION_H
0016 
0017 #include "llvm/Target/TargetOptions.h"
0018 #include <optional>
0019 
0020 namespace llvm {
0021 
0022 enum class RunOutliner { TargetDefault, AlwaysOutline, NeverOutline };
0023 enum class RegAllocType { Default, Basic, Fast, Greedy, PBQP };
0024 
0025 // Not one-on-one but mostly corresponding to commandline options in
0026 // TargetPassConfig.cpp.
0027 struct CGPassBuilderOption {
0028   std::optional<bool> OptimizeRegAlloc;
0029   std::optional<bool> EnableIPRA;
0030   bool DebugPM = false;
0031   bool DisableVerify = false;
0032   bool EnableImplicitNullChecks = false;
0033   bool EnableBlockPlacementStats = false;
0034   bool EnableGlobalMergeFunc = false;
0035   bool EnableMachineFunctionSplitter = false;
0036   bool MISchedPostRA = false;
0037   bool EarlyLiveIntervals = false;
0038   bool GCEmptyBlocks = false;
0039 
0040   bool DisableLSR = false;
0041   bool DisableCGP = false;
0042   bool DisableMergeICmps = false;
0043   bool DisablePartialLibcallInlining = false;
0044   bool DisableConstantHoisting = false;
0045   bool DisableSelectOptimize = true;
0046   bool DisableAtExitBasedGlobalDtorLowering = false;
0047   bool DisableExpandReductions = false;
0048   bool DisableRAFSProfileLoader = false;
0049   bool DisableCFIFixup = false;
0050   bool PrintAfterISel = false;
0051   bool PrintISelInput = false;
0052   bool RequiresCodeGenSCCOrder = false;
0053 
0054   RunOutliner EnableMachineOutliner = RunOutliner::TargetDefault;
0055   StringRef RegAlloc = "default";
0056   std::optional<GlobalISelAbortMode> EnableGlobalISelAbort;
0057   std::string FSProfileFile;
0058   std::string FSRemappingFile;
0059 
0060   std::optional<bool> VerifyMachineCode;
0061   std::optional<bool> EnableFastISelOption;
0062   std::optional<bool> EnableGlobalISelOption;
0063   std::optional<bool> DebugifyAndStripAll;
0064   std::optional<bool> DebugifyCheckAndStripAll;
0065 };
0066 
0067 CGPassBuilderOption getCGPassBuilderOption();
0068 
0069 } // namespace llvm
0070 
0071 #endif // LLVM_TARGET_CGPASSBUILDEROPTION_H