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 class TargetMachine; 23 24 enum class RunOutliner { TargetDefault, AlwaysOutline, NeverOutline }; 25 enum class RegAllocType { Default, Basic, Fast, Greedy, PBQP }; 26 enum class CFLAAType { None, Steensgaard, Andersen, Both }; 27 28 // Not one-on-one but mostly corresponding to commandline options in 29 // TargetPassConfig.cpp. 30 struct CGPassBuilderOption { 31 Optional<bool> OptimizeRegAlloc; 32 Optional<bool> EnableIPRA; 33 bool DebugPM = false; 34 bool DisableVerify = false; 35 bool EnableImplicitNullChecks = false; 36 bool EnableBlockPlacementStats = false; 37 bool MISchedPostRA = false; 38 bool EarlyLiveIntervals = false; 39 40 bool DisableLSR = false; 41 bool DisableCGP = false; 42 bool PrintLSR = false; 43 bool DisableMergeICmps = false; 44 bool DisablePartialLibcallInlining = false; 45 bool DisableConstantHoisting = false; 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