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/ADT/Optional.h" 18 #include "llvm/ADT/StringRef.h" 19 #include "llvm/Target/TargetOptions.h" 20 21 namespace llvm { 22 23 enum class RunOutliner { TargetDefault, AlwaysOutline, NeverOutline }; 24 enum class RegAllocType { Default, Basic, Fast, Greedy, PBQP }; 25 enum class CFLAAType { None, Steensgaard, Andersen, Both }; 26 27 // Not one-on-one but mostly corresponding to commandline options in 28 // TargetPassConfig.cpp. 29 struct CGPassBuilderOption { 30 Optional<bool> OptimizeRegAlloc; 31 Optional<bool> EnableIPRA; 32 bool DebugPM = false; 33 bool DisableVerify = false; 34 bool EnableImplicitNullChecks = false; 35 bool EnableBlockPlacementStats = false; 36 bool MISchedPostRA = false; 37 bool EarlyLiveIntervals = 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 PrintISelInput = false; 47 bool PrintGCInfo = false; 48 bool RequiresCodeGenSCCOrder = false; 49 50 RunOutliner EnableMachineOutliner = RunOutliner::TargetDefault; 51 RegAllocType RegAlloc = RegAllocType::Default; 52 CFLAAType UseCFLAA = CFLAAType::None; 53 Optional<GlobalISelAbortMode> EnableGlobalISelAbort; 54 55 Optional<bool> VerifyMachineCode; 56 Optional<bool> EnableFastISelOption; 57 Optional<bool> EnableGlobalISelOption; 58 }; 59 60 CGPassBuilderOption getCGPassBuilderOption(); 61 62 } // namespace llvm 63 64 #endif // LLVM_TARGET_CGPASSBUILDEROPTION_H 65