TargetSubtargetInfo.cpp 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 FS,
  16. ArrayRef<SubtargetFeatureKV> PF, ArrayRef<SubtargetSubTypeKV> PD,
  17. const MCWriteProcResEntry *WPR,
  18. const MCWriteLatencyEntry *WL, const MCReadAdvanceEntry *RA,
  19. const InstrStage *IS, const unsigned *OC, const unsigned *FP)
  20. : MCSubtargetInfo(TT, CPU, FS, PF, PD, WPR, WL, RA, IS, OC, FP) {
  21. }
  22. TargetSubtargetInfo::~TargetSubtargetInfo() = default;
  23. bool TargetSubtargetInfo::enableAtomicExpand() const {
  24. return true;
  25. }
  26. bool TargetSubtargetInfo::enableIndirectBrExpand() const {
  27. return false;
  28. }
  29. bool TargetSubtargetInfo::enableMachineScheduler() const {
  30. return false;
  31. }
  32. bool TargetSubtargetInfo::enableJoinGlobalCopies() const {
  33. return enableMachineScheduler();
  34. }
  35. bool TargetSubtargetInfo::enableRALocalReassignment(
  36. CodeGenOpt::Level OptLevel) const {
  37. return true;
  38. }
  39. bool TargetSubtargetInfo::enableAdvancedRASplitCost() const {
  40. return false;
  41. }
  42. bool TargetSubtargetInfo::enablePostRAScheduler() const {
  43. return getSchedModel().PostRAScheduler;
  44. }
  45. bool TargetSubtargetInfo::useAA() const {
  46. return false;
  47. }
  48. void TargetSubtargetInfo::mirFileLoaded(MachineFunction &MF) const { }