CGPassBuilderOption.h 2.3 KB

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