CGPassBuilderOption.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. #ifndef LLVM_TARGET_CGPASSBUILDEROPTION_H
  14. #define LLVM_TARGET_CGPASSBUILDEROPTION_H
  15. #include "llvm/ADT/Optional.h"
  16. #include "llvm/ADT/StringRef.h"
  17. #include "llvm/Target/TargetOptions.h"
  18. namespace llvm {
  19. class TargetMachine;
  20. enum class RunOutliner { TargetDefault, AlwaysOutline, NeverOutline };
  21. enum class RegAllocType { Default, Basic, Fast, Greedy, PBQP };
  22. enum class CFLAAType { None, Steensgaard, Andersen, Both };
  23. // Not one-on-one but mostly corresponding to commandline options in
  24. // TargetPassConfig.cpp.
  25. struct CGPassBuilderOption {
  26. Optional<bool> OptimizeRegAlloc;
  27. Optional<bool> EnableIPRA;
  28. bool DebugPM = false;
  29. bool DisableVerify = false;
  30. bool EnableImplicitNullChecks = false;
  31. bool EnableBlockPlacementStats = false;
  32. bool MISchedPostRA = false;
  33. bool EarlyLiveIntervals = false;
  34. bool DisableLSR = false;
  35. bool DisableCGP = false;
  36. bool PrintLSR = false;
  37. bool DisableMergeICmps = false;
  38. bool DisablePartialLibcallInlining = false;
  39. bool DisableConstantHoisting = false;
  40. bool PrintISelInput = false;
  41. bool PrintGCInfo = false;
  42. bool RequiresCodeGenSCCOrder = false;
  43. RunOutliner EnableMachineOutliner = RunOutliner::TargetDefault;
  44. RegAllocType RegAlloc = RegAllocType::Default;
  45. CFLAAType UseCFLAA = CFLAAType::None;
  46. Optional<GlobalISelAbortMode> EnableGlobalISelAbort;
  47. Optional<bool> VerifyMachineCode;
  48. Optional<bool> EnableFastISelOption;
  49. Optional<bool> EnableGlobalISelOption;
  50. };
  51. CGPassBuilderOption getCGPassBuilderOption();
  52. } // namespace llvm
  53. #endif // LLVM_TARGET_CGPASSBUILDEROPTION_H