CGPassBuilderOption.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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/Optional.h"
  21. #include "llvm/ADT/StringRef.h"
  22. #include "llvm/Target/TargetOptions.h"
  23. namespace llvm {
  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. // 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. bool DisableLSR = false;
  39. bool DisableCGP = false;
  40. bool PrintLSR = false;
  41. bool DisableMergeICmps = false;
  42. bool DisablePartialLibcallInlining = false;
  43. bool DisableConstantHoisting = false;
  44. bool PrintISelInput = false;
  45. bool PrintGCInfo = false;
  46. bool RequiresCodeGenSCCOrder = false;
  47. RunOutliner EnableMachineOutliner = RunOutliner::TargetDefault;
  48. RegAllocType RegAlloc = RegAllocType::Default;
  49. CFLAAType UseCFLAA = CFLAAType::None;
  50. Optional<GlobalISelAbortMode> EnableGlobalISelAbort;
  51. Optional<bool> VerifyMachineCode;
  52. Optional<bool> EnableFastISelOption;
  53. Optional<bool> EnableGlobalISelOption;
  54. };
  55. CGPassBuilderOption getCGPassBuilderOption();
  56. } // namespace llvm
  57. #endif // LLVM_TARGET_CGPASSBUILDEROPTION_H
  58. #ifdef __GNUC__
  59. #pragma GCC diagnostic pop
  60. #endif