CGPassBuilderOption.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- CGPassBuilderOption.h - Options for pass builder ---------*- C++ -*-===//
  7. //
  8. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  9. // See https://llvm.org/LICENSE.txt for license information.
  10. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  11. //
  12. //===----------------------------------------------------------------------===//
  13. //
  14. // This file declares the CCState and CCValAssign classes, used for lowering
  15. // and implementing calling conventions.
  16. //
  17. //===----------------------------------------------------------------------===//
  18. #ifndef LLVM_TARGET_CGPASSBUILDEROPTION_H
  19. #define LLVM_TARGET_CGPASSBUILDEROPTION_H
  20. #include "llvm/ADT/StringRef.h"
  21. #include "llvm/Target/TargetOptions.h"
  22. #include <optional>
  23. namespace llvm {
  24. enum class RunOutliner { TargetDefault, AlwaysOutline, NeverOutline };
  25. enum class RegAllocType { Default, Basic, Fast, Greedy, PBQP };
  26. // Not one-on-one but mostly corresponding to commandline options in
  27. // TargetPassConfig.cpp.
  28. struct CGPassBuilderOption {
  29. std::optional<bool> OptimizeRegAlloc;
  30. std::optional<bool> EnableIPRA;
  31. bool DebugPM = false;
  32. bool DisableVerify = false;
  33. bool EnableImplicitNullChecks = false;
  34. bool EnableBlockPlacementStats = false;
  35. bool MISchedPostRA = false;
  36. bool EarlyLiveIntervals = false;
  37. bool DisableLSR = false;
  38. bool DisableCGP = false;
  39. bool PrintLSR = false;
  40. bool DisableMergeICmps = false;
  41. bool DisablePartialLibcallInlining = false;
  42. bool DisableConstantHoisting = false;
  43. bool DisableSelectOptimize = true;
  44. bool PrintISelInput = false;
  45. bool PrintGCInfo = false;
  46. bool RequiresCodeGenSCCOrder = false;
  47. RunOutliner EnableMachineOutliner = RunOutliner::TargetDefault;
  48. RegAllocType RegAlloc = RegAllocType::Default;
  49. std::optional<GlobalISelAbortMode> EnableGlobalISelAbort;
  50. std::optional<bool> VerifyMachineCode;
  51. std::optional<bool> EnableFastISelOption;
  52. std::optional<bool> EnableGlobalISelOption;
  53. };
  54. CGPassBuilderOption getCGPassBuilderOption();
  55. } // namespace llvm
  56. #endif // LLVM_TARGET_CGPASSBUILDEROPTION_H
  57. #ifdef __GNUC__
  58. #pragma GCC diagnostic pop
  59. #endif