TargetSubtargetInfo.cpp 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. //===- TargetSubtargetInfo.cpp - General Target Information ----------------==//
  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. /// \file This file describes the general parts of a Subtarget.
  10. //
  11. //===----------------------------------------------------------------------===//
  12. #include "llvm/CodeGen/TargetSubtargetInfo.h"
  13. using namespace llvm;
  14. TargetSubtargetInfo::TargetSubtargetInfo(
  15. const Triple &TT, StringRef CPU, StringRef TuneCPU, StringRef FS,
  16. ArrayRef<SubtargetFeatureKV> PF, ArrayRef<SubtargetSubTypeKV> PD,
  17. const MCWriteProcResEntry *WPR, const MCWriteLatencyEntry *WL,
  18. const MCReadAdvanceEntry *RA, const InstrStage *IS, const unsigned *OC,
  19. const unsigned *FP)
  20. : MCSubtargetInfo(TT, CPU, TuneCPU, FS, PF, PD, WPR, WL, RA, IS, OC, FP) {}
  21. TargetSubtargetInfo::~TargetSubtargetInfo() = default;
  22. bool TargetSubtargetInfo::enableAtomicExpand() const {
  23. return true;
  24. }
  25. bool TargetSubtargetInfo::enableIndirectBrExpand() const {
  26. return false;
  27. }
  28. bool TargetSubtargetInfo::enableMachineScheduler() const {
  29. return false;
  30. }
  31. bool TargetSubtargetInfo::enableJoinGlobalCopies() const {
  32. return enableMachineScheduler();
  33. }
  34. bool TargetSubtargetInfo::enableRALocalReassignment(
  35. CodeGenOpt::Level OptLevel) const {
  36. return true;
  37. }
  38. bool TargetSubtargetInfo::enableAdvancedRASplitCost() const {
  39. return false;
  40. }
  41. bool TargetSubtargetInfo::enablePostRAScheduler() const {
  42. return getSchedModel().PostRAScheduler;
  43. }
  44. bool TargetSubtargetInfo::enablePostRAMachineScheduler() const {
  45. return enableMachineScheduler() && enablePostRAScheduler();
  46. }
  47. bool TargetSubtargetInfo::useAA() const {
  48. return false;
  49. }
  50. void TargetSubtargetInfo::mirFileLoaded(MachineFunction &MF) const { }