Eugene Zelenko | 8361b0a | 2017-06-19 22:43:19 +0000 | [diff] [blame] | 1 | //===- TargetSubtargetInfo.cpp - General Target Information ----------------==// |
Nate Begeman | f26625e | 2005-07-12 01:41:54 +0000 | [diff] [blame] | 2 | // |
Chandler Carruth | 2946cd7 | 2019-01-19 08:50:56 +0000 | [diff] [blame] | 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 |
Nate Begeman | f26625e | 2005-07-12 01:41:54 +0000 | [diff] [blame] | 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | // |
Matthias Braun | 7f42344 | 2016-11-22 22:09:03 +0000 | [diff] [blame] | 9 | /// \file This file describes the general parts of a Subtarget. |
Nate Begeman | f26625e | 2005-07-12 01:41:54 +0000 | [diff] [blame] | 10 | // |
| 11 | //===----------------------------------------------------------------------===// |
| 12 | |
David Blaikie | b3bde2e | 2017-11-17 01:07:10 +0000 | [diff] [blame] | 13 | #include "llvm/CodeGen/TargetSubtargetInfo.h" |
Eugene Zelenko | 8361b0a | 2017-06-19 22:43:19 +0000 | [diff] [blame] | 14 | |
Nate Begeman | f26625e | 2005-07-12 01:41:54 +0000 | [diff] [blame] | 15 | using namespace llvm; |
| 16 | |
Duncan P. N. Exon Smith | 754e21f | 2015-07-10 22:43:42 +0000 | [diff] [blame] | 17 | TargetSubtargetInfo::TargetSubtargetInfo( |
Daniel Sanders | 50f1723 | 2015-09-15 16:17:27 +0000 | [diff] [blame] | 18 | const Triple &TT, StringRef CPU, StringRef FS, |
Duncan P. N. Exon Smith | 754e21f | 2015-07-10 22:43:42 +0000 | [diff] [blame] | 19 | ArrayRef<SubtargetFeatureKV> PF, ArrayRef<SubtargetFeatureKV> PD, |
| 20 | const SubtargetInfoKV *ProcSched, const MCWriteProcResEntry *WPR, |
| 21 | const MCWriteLatencyEntry *WL, const MCReadAdvanceEntry *RA, |
| 22 | const InstrStage *IS, const unsigned *OC, const unsigned *FP) |
| 23 | : MCSubtargetInfo(TT, CPU, FS, PF, PD, ProcSched, WPR, WL, RA, IS, OC, FP) { |
| 24 | } |
Nate Begeman | f26625e | 2005-07-12 01:41:54 +0000 | [diff] [blame] | 25 | |
Eugene Zelenko | 8361b0a | 2017-06-19 22:43:19 +0000 | [diff] [blame] | 26 | TargetSubtargetInfo::~TargetSubtargetInfo() = default; |
David Goodwin | 0d412c2 | 2009-11-10 00:48:55 +0000 | [diff] [blame] | 27 | |
Robin Morisset | 59c23cd | 2014-08-21 21:50:01 +0000 | [diff] [blame] | 28 | bool TargetSubtargetInfo::enableAtomicExpand() const { |
Eric Christopher | c40e5ed | 2014-06-19 21:03:04 +0000 | [diff] [blame] | 29 | return true; |
| 30 | } |
| 31 | |
Chandler Carruth | c58f216 | 2018-01-22 22:05:25 +0000 | [diff] [blame] | 32 | bool TargetSubtargetInfo::enableIndirectBrExpand() const { |
| 33 | return false; |
| 34 | } |
| 35 | |
Andrew Trick | 108c88c | 2012-11-13 08:47:29 +0000 | [diff] [blame] | 36 | bool TargetSubtargetInfo::enableMachineScheduler() const { |
| 37 | return false; |
| 38 | } |
| 39 | |
Eric Christopher | 5f141b0 | 2015-03-11 22:56:10 +0000 | [diff] [blame] | 40 | bool TargetSubtargetInfo::enableJoinGlobalCopies() const { |
| 41 | return enableMachineScheduler(); |
| 42 | } |
| 43 | |
Quentin Colombet | 5caa6a2 | 2014-07-02 18:32:04 +0000 | [diff] [blame] | 44 | bool TargetSubtargetInfo::enableRALocalReassignment( |
| 45 | CodeGenOpt::Level OptLevel) const { |
| 46 | return true; |
| 47 | } |
| 48 | |
Marina Yatsina | f9371d8 | 2017-10-22 17:59:38 +0000 | [diff] [blame] | 49 | bool TargetSubtargetInfo::enableAdvancedRASplitCost() const { |
| 50 | return false; |
| 51 | } |
| 52 | |
Matthias Braun | 39a2afc | 2015-06-13 03:42:16 +0000 | [diff] [blame] | 53 | bool TargetSubtargetInfo::enablePostRAScheduler() const { |
Pete Cooper | 1175945 | 2014-09-02 17:43:54 +0000 | [diff] [blame] | 54 | return getSchedModel().PostRAScheduler; |
David Goodwin | 0d412c2 | 2009-11-10 00:48:55 +0000 | [diff] [blame] | 55 | } |
| 56 | |
Hal Finkel | b350ffd | 2013-08-29 03:25:05 +0000 | [diff] [blame] | 57 | bool TargetSubtargetInfo::useAA() const { |
| 58 | return false; |
| 59 | } |
Andrew V. Tischenko | 75745d0 | 2017-04-14 07:44:23 +0000 | [diff] [blame] | 60 | |
Andrea Di Biagio | edbf06a | 2019-02-04 12:51:26 +0000 | [diff] [blame^] | 61 | void TargetSubtargetInfo::mirFileLoaded(MachineFunction &MF) const { } |