blob: 59eb2f9c88cb40b12810d1e08cf9723d4ca1b4db [file] [log] [blame]
Eugene Zelenko8361b0a2017-06-19 22:43:19 +00001//===- TargetSubtargetInfo.cpp - General Target Information ----------------==//
Nate Begemanf26625e2005-07-12 01:41:54 +00002//
Chandler Carruth2946cd72019-01-19 08:50:56 +00003// 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
Nate Begemanf26625e2005-07-12 01:41:54 +00006//
7//===----------------------------------------------------------------------===//
8//
Matthias Braun7f423442016-11-22 22:09:03 +00009/// \file This file describes the general parts of a Subtarget.
Nate Begemanf26625e2005-07-12 01:41:54 +000010//
11//===----------------------------------------------------------------------===//
12
David Blaikieb3bde2e2017-11-17 01:07:10 +000013#include "llvm/CodeGen/TargetSubtargetInfo.h"
Eugene Zelenko8361b0a2017-06-19 22:43:19 +000014
Nate Begemanf26625e2005-07-12 01:41:54 +000015using namespace llvm;
16
Duncan P. N. Exon Smith754e21f2015-07-10 22:43:42 +000017TargetSubtargetInfo::TargetSubtargetInfo(
Daniel Sanders50f17232015-09-15 16:17:27 +000018 const Triple &TT, StringRef CPU, StringRef FS,
Craig Topperca268082019-03-05 18:54:34 +000019 ArrayRef<SubtargetFeatureKV> PF, ArrayRef<SubtargetSubTypeKV> PD,
Craig Topper2982b842019-03-05 18:54:38 +000020 const MCWriteProcResEntry *WPR,
Duncan P. N. Exon Smith754e21f2015-07-10 22:43:42 +000021 const MCWriteLatencyEntry *WL, const MCReadAdvanceEntry *RA,
22 const InstrStage *IS, const unsigned *OC, const unsigned *FP)
Craig Topper2982b842019-03-05 18:54:38 +000023 : MCSubtargetInfo(TT, CPU, FS, PF, PD, WPR, WL, RA, IS, OC, FP) {
Duncan P. N. Exon Smith754e21f2015-07-10 22:43:42 +000024}
Nate Begemanf26625e2005-07-12 01:41:54 +000025
Eugene Zelenko8361b0a2017-06-19 22:43:19 +000026TargetSubtargetInfo::~TargetSubtargetInfo() = default;
David Goodwin0d412c22009-11-10 00:48:55 +000027
Robin Morisset59c23cd2014-08-21 21:50:01 +000028bool TargetSubtargetInfo::enableAtomicExpand() const {
Eric Christopherc40e5ed2014-06-19 21:03:04 +000029 return true;
30}
31
Chandler Carruthc58f2162018-01-22 22:05:25 +000032bool TargetSubtargetInfo::enableIndirectBrExpand() const {
33 return false;
34}
35
Andrew Trick108c88c2012-11-13 08:47:29 +000036bool TargetSubtargetInfo::enableMachineScheduler() const {
37 return false;
38}
39
Eric Christopher5f141b02015-03-11 22:56:10 +000040bool TargetSubtargetInfo::enableJoinGlobalCopies() const {
41 return enableMachineScheduler();
42}
43
Quentin Colombet5caa6a22014-07-02 18:32:04 +000044bool TargetSubtargetInfo::enableRALocalReassignment(
45 CodeGenOpt::Level OptLevel) const {
46 return true;
47}
48
Marina Yatsinaf9371d82017-10-22 17:59:38 +000049bool TargetSubtargetInfo::enableAdvancedRASplitCost() const {
50 return false;
51}
52
Matthias Braun39a2afc2015-06-13 03:42:16 +000053bool TargetSubtargetInfo::enablePostRAScheduler() const {
Pete Cooper11759452014-09-02 17:43:54 +000054 return getSchedModel().PostRAScheduler;
David Goodwin0d412c22009-11-10 00:48:55 +000055}
56
Hal Finkelb350ffd2013-08-29 03:25:05 +000057bool TargetSubtargetInfo::useAA() const {
58 return false;
59}
Andrew V. Tischenko75745d02017-04-14 07:44:23 +000060
Andrea Di Biagioedbf06a2019-02-04 12:51:26 +000061void TargetSubtargetInfo::mirFileLoaded(MachineFunction &MF) const { }