TargetSubtargetInfo.cpp 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. //===-- TargetSubtargetInfo.cpp - General Target Information ---------------==//
  2. //
  3. // The LLVM Compiler Infrastructure
  4. //
  5. // This file is distributed under the University of Illinois Open Source
  6. // License. See LICENSE.TXT for details.
  7. //
  8. //===----------------------------------------------------------------------===//
  9. //
  10. // This file describes the general parts of a Subtarget.
  11. //
  12. //===----------------------------------------------------------------------===//
  13. #include "llvm/Support/CommandLine.h"
  14. #include "llvm/ADT/SmallVector.h"
  15. #include "llvm/Target/TargetSubtargetInfo.h"
  16. using namespace llvm;
  17. //---------------------------------------------------------------------------
  18. // TargetSubtargetInfo Class
  19. //
  20. TargetSubtargetInfo::TargetSubtargetInfo(
  21. const Triple &TT, StringRef CPU, StringRef FS,
  22. ArrayRef<SubtargetFeatureKV> PF, ArrayRef<SubtargetFeatureKV> PD,
  23. const SubtargetInfoKV *ProcSched, const MCWriteProcResEntry *WPR,
  24. const MCWriteLatencyEntry *WL, const MCReadAdvanceEntry *RA,
  25. const InstrStage *IS, const unsigned *OC, const unsigned *FP)
  26. : MCSubtargetInfo(TT, CPU, FS, PF, PD, ProcSched, WPR, WL, RA, IS, OC, FP) {
  27. }
  28. TargetSubtargetInfo::~TargetSubtargetInfo() {}
  29. bool TargetSubtargetInfo::enableAtomicExpand() const {
  30. return true;
  31. }
  32. bool TargetSubtargetInfo::enableMachineScheduler() const {
  33. return false;
  34. }
  35. bool TargetSubtargetInfo::enableJoinGlobalCopies() const {
  36. return enableMachineScheduler();
  37. }
  38. bool TargetSubtargetInfo::enableRALocalReassignment(
  39. CodeGenOpt::Level OptLevel) const {
  40. return true;
  41. }
  42. bool TargetSubtargetInfo::enablePostRAScheduler() const {
  43. return getSchedModel().PostRAScheduler;
  44. }
  45. bool TargetSubtargetInfo::useAA() const {
  46. return false;
  47. }