blob: 6a61fcdf0f86b475f5e8b73ffdbfd37b142560b5 [file] [log] [blame]
Evan Cheng0d639a22011-07-01 21:01:15 +00001//===-- TargetSubtargetInfo.cpp - General Target Information ---------------==//
Nate Begemanf26625e2005-07-12 01:41:54 +00002//
3// The LLVM Compiler Infrastructure
4//
Chris Lattnerf3ebc3f2007-12-29 20:36:04 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Nate Begemanf26625e2005-07-12 01:41:54 +00007//
8//===----------------------------------------------------------------------===//
9//
10// This file describes the general parts of a Subtarget.
11//
12//===----------------------------------------------------------------------===//
13
Andrew Trick71e8bb62013-09-26 05:53:35 +000014#include "llvm/Support/CommandLine.h"
David Goodwin0d412c22009-11-10 00:48:55 +000015#include "llvm/ADT/SmallVector.h"
Chandler Carruth8a8cd2b2014-01-07 11:48:04 +000016#include "llvm/Target/TargetSubtargetInfo.h"
Nate Begemanf26625e2005-07-12 01:41:54 +000017using namespace llvm;
18
19//---------------------------------------------------------------------------
Evan Cheng0d639a22011-07-01 21:01:15 +000020// TargetSubtargetInfo Class
Nate Begemanf26625e2005-07-12 01:41:54 +000021//
Duncan P. N. Exon Smith754e21f2015-07-10 22:43:42 +000022TargetSubtargetInfo::TargetSubtargetInfo(
Daniel Sanders50f17232015-09-15 16:17:27 +000023 const Triple &TT, StringRef CPU, StringRef FS,
Duncan P. N. Exon Smith754e21f2015-07-10 22:43:42 +000024 ArrayRef<SubtargetFeatureKV> PF, ArrayRef<SubtargetFeatureKV> PD,
25 const SubtargetInfoKV *ProcSched, const MCWriteProcResEntry *WPR,
26 const MCWriteLatencyEntry *WL, const MCReadAdvanceEntry *RA,
27 const InstrStage *IS, const unsigned *OC, const unsigned *FP)
28 : MCSubtargetInfo(TT, CPU, FS, PF, PD, ProcSched, WPR, WL, RA, IS, OC, FP) {
29}
Nate Begemanf26625e2005-07-12 01:41:54 +000030
Evan Cheng0d639a22011-07-01 21:01:15 +000031TargetSubtargetInfo::~TargetSubtargetInfo() {}
David Goodwin0d412c22009-11-10 00:48:55 +000032
Robin Morisset59c23cd2014-08-21 21:50:01 +000033bool TargetSubtargetInfo::enableAtomicExpand() const {
Eric Christopherc40e5ed2014-06-19 21:03:04 +000034 return true;
35}
36
Andrew Trick108c88c2012-11-13 08:47:29 +000037bool TargetSubtargetInfo::enableMachineScheduler() const {
38 return false;
39}
40
Eric Christopher5f141b02015-03-11 22:56:10 +000041bool TargetSubtargetInfo::enableJoinGlobalCopies() const {
42 return enableMachineScheduler();
43}
44
Quentin Colombet5caa6a22014-07-02 18:32:04 +000045bool TargetSubtargetInfo::enableRALocalReassignment(
46 CodeGenOpt::Level OptLevel) const {
47 return true;
48}
49
Matthias Braun39a2afc2015-06-13 03:42:16 +000050bool TargetSubtargetInfo::enablePostRAScheduler() const {
Pete Cooper11759452014-09-02 17:43:54 +000051 return getSchedModel().PostRAScheduler;
David Goodwin0d412c22009-11-10 00:48:55 +000052}
53
Hal Finkelb350ffd2013-08-29 03:25:05 +000054bool TargetSubtargetInfo::useAA() const {
55 return false;
56}