Jia Liu | b22310f | 2012-02-18 12:03:15 +0000 | [diff] [blame] | 1 | //===-- ARMSubtarget.cpp - ARM Subtarget Information ----------------------===// |
Evan Cheng | 10043e2 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Chris Lattner | f3ebc3f | 2007-12-29 20:36:04 +0000 | [diff] [blame] | 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
Evan Cheng | 10043e2 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
Evan Cheng | 0d639a2 | 2011-07-01 21:01:15 +0000 | [diff] [blame] | 10 | // This file implements the ARM specific subclass of TargetSubtargetInfo. |
Evan Cheng | 10043e2 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #include "ARMSubtarget.h" |
Andrew Trick | ab722bd | 2012-09-18 03:18:56 +0000 | [diff] [blame] | 15 | #include "ARMBaseInstrInfo.h" |
Chandler Carruth | ed0881b | 2012-12-03 16:50:05 +0000 | [diff] [blame] | 16 | #include "ARMBaseRegisterInfo.h" |
Bill Wendling | 5a92eec | 2013-02-15 22:41:25 +0000 | [diff] [blame] | 17 | #include "llvm/IR/Attributes.h" |
Chandler Carruth | 9fb823b | 2013-01-02 11:36:10 +0000 | [diff] [blame] | 18 | #include "llvm/IR/GlobalValue.h" |
Bill Wendling | 5a92eec | 2013-02-15 22:41:25 +0000 | [diff] [blame] | 19 | #include "llvm/IR/Function.h" |
Bob Wilson | 4582530 | 2009-06-22 21:01:46 +0000 | [diff] [blame] | 20 | #include "llvm/Support/CommandLine.h" |
Chandler Carruth | ed0881b | 2012-12-03 16:50:05 +0000 | [diff] [blame] | 21 | #include "llvm/Target/TargetInstrInfo.h" |
Renato Golin | b4dd6c5 | 2013-03-21 18:47:47 +0000 | [diff] [blame] | 22 | #include "llvm/Target/TargetOptions.h" |
Evan Cheng | 54b68e3 | 2011-07-01 20:45:01 +0000 | [diff] [blame] | 23 | |
Evan Cheng | 54b68e3 | 2011-07-01 20:45:01 +0000 | [diff] [blame] | 24 | #define GET_SUBTARGETINFO_TARGET_DESC |
Evan Cheng | 4d1ca96 | 2011-07-08 01:53:10 +0000 | [diff] [blame] | 25 | #define GET_SUBTARGETINFO_CTOR |
Evan Cheng | c9c090d | 2011-07-01 22:36:09 +0000 | [diff] [blame] | 26 | #include "ARMGenSubtargetInfo.inc" |
Evan Cheng | 54b68e3 | 2011-07-01 20:45:01 +0000 | [diff] [blame] | 27 | |
Evan Cheng | 10043e2 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 28 | using namespace llvm; |
| 29 | |
Bob Wilson | 4582530 | 2009-06-22 21:01:46 +0000 | [diff] [blame] | 30 | static cl::opt<bool> |
| 31 | ReserveR9("arm-reserve-r9", cl::Hidden, |
| 32 | cl::desc("Reserve R9, making it unavailable as GPR")); |
| 33 | |
Anton Korobeynikov | 2522908 | 2009-11-24 00:44:37 +0000 | [diff] [blame] | 34 | static cl::opt<bool> |
Renato Golin | ca57063 | 2013-08-15 20:54:38 +0000 | [diff] [blame] | 35 | ArmUseMOVT("arm-use-movt", cl::init(true), cl::Hidden); |
Anton Korobeynikov | 2522908 | 2009-11-24 00:44:37 +0000 | [diff] [blame] | 36 | |
Bob Wilson | 3dc9732 | 2010-09-28 04:09:35 +0000 | [diff] [blame] | 37 | static cl::opt<bool> |
Bob Wilson | e8a549c | 2012-09-29 21:43:49 +0000 | [diff] [blame] | 38 | UseFusedMulOps("arm-use-mulops", |
| 39 | cl::init(true), cl::Hidden); |
| 40 | |
JF Bastien | 97b08c40 | 2013-05-17 23:49:01 +0000 | [diff] [blame] | 41 | enum AlignMode { |
| 42 | DefaultAlign, |
| 43 | StrictAlign, |
| 44 | NoStrictAlign |
| 45 | }; |
| 46 | |
| 47 | static cl::opt<AlignMode> |
| 48 | Align(cl::desc("Load/store alignment support"), |
| 49 | cl::Hidden, cl::init(DefaultAlign), |
| 50 | cl::values( |
| 51 | clEnumValN(DefaultAlign, "arm-default-align", |
| 52 | "Generate unaligned accesses only on hardware/OS " |
| 53 | "combinations that are known to support them"), |
| 54 | clEnumValN(StrictAlign, "arm-strict-align", |
| 55 | "Disallow all unaligned memory accesses"), |
| 56 | clEnumValN(NoStrictAlign, "arm-no-strict-align", |
| 57 | "Allow unaligned memory accesses"), |
| 58 | clEnumValEnd)); |
Bob Wilson | 3dc9732 | 2010-09-28 04:09:35 +0000 | [diff] [blame] | 59 | |
Evan Cheng | fe6e405 | 2011-06-30 01:53:36 +0000 | [diff] [blame] | 60 | ARMSubtarget::ARMSubtarget(const std::string &TT, const std::string &CPU, |
Renato Golin | b4dd6c5 | 2013-03-21 18:47:47 +0000 | [diff] [blame] | 61 | const std::string &FS, const TargetOptions &Options) |
Evan Cheng | 1a72add6 | 2011-07-07 07:07:08 +0000 | [diff] [blame] | 62 | : ARMGenSubtargetInfo(TT, CPU, FS) |
Evan Cheng | bf40707 | 2010-09-10 01:29:16 +0000 | [diff] [blame] | 63 | , ARMProcFamily(Others) |
Amara Emerson | 330afb5 | 2013-09-23 14:26:15 +0000 | [diff] [blame] | 64 | , ARMProcClass(None) |
Lauro Ramos Venancio | 048e16ff | 2007-02-13 19:52:28 +0000 | [diff] [blame] | 65 | , stackAlignment(4) |
Evan Cheng | fe6e405 | 2011-06-30 01:53:36 +0000 | [diff] [blame] | 66 | , CPUString(CPU) |
Evan Cheng | e45d685 | 2011-01-11 21:46:47 +0000 | [diff] [blame] | 67 | , TargetTriple(TT) |
Renato Golin | b4dd6c5 | 2013-03-21 18:47:47 +0000 | [diff] [blame] | 68 | , Options(Options) |
Lauro Ramos Venancio | 048e16ff | 2007-02-13 19:52:28 +0000 | [diff] [blame] | 69 | , TargetABI(ARM_ABI_APCS) { |
Bill Wendling | 61375d8 | 2013-02-16 01:36:26 +0000 | [diff] [blame] | 70 | initializeEnvironment(); |
Bill Wendling | 5a92eec | 2013-02-15 22:41:25 +0000 | [diff] [blame] | 71 | resetSubtargetFeatures(CPU, FS); |
| 72 | } |
| 73 | |
Bill Wendling | 61375d8 | 2013-02-16 01:36:26 +0000 | [diff] [blame] | 74 | void ARMSubtarget::initializeEnvironment() { |
| 75 | HasV4TOps = false; |
| 76 | HasV5TOps = false; |
| 77 | HasV5TEOps = false; |
| 78 | HasV6Ops = false; |
Amara Emerson | 5035ee0 | 2013-10-07 16:55:23 +0000 | [diff] [blame^] | 79 | HasV6MOps = false; |
Bill Wendling | 61375d8 | 2013-02-16 01:36:26 +0000 | [diff] [blame] | 80 | HasV6T2Ops = false; |
| 81 | HasV7Ops = false; |
Joey Gouly | b3f550e | 2013-06-26 16:58:26 +0000 | [diff] [blame] | 82 | HasV8Ops = false; |
Bill Wendling | 61375d8 | 2013-02-16 01:36:26 +0000 | [diff] [blame] | 83 | HasVFPv2 = false; |
| 84 | HasVFPv3 = false; |
| 85 | HasVFPv4 = false; |
Joey Gouly | ccd0489 | 2013-09-13 13:46:57 +0000 | [diff] [blame] | 86 | HasFPARMv8 = false; |
Bill Wendling | 61375d8 | 2013-02-16 01:36:26 +0000 | [diff] [blame] | 87 | HasNEON = false; |
| 88 | UseNEONForSinglePrecisionFP = false; |
| 89 | UseMulOps = UseFusedMulOps; |
| 90 | SlowFPVMLx = false; |
| 91 | HasVMLxForwarding = false; |
| 92 | SlowFPBrcc = false; |
| 93 | InThumbMode = false; |
| 94 | HasThumb2 = false; |
Bill Wendling | 61375d8 | 2013-02-16 01:36:26 +0000 | [diff] [blame] | 95 | NoARM = false; |
| 96 | PostRAScheduler = false; |
| 97 | IsR9Reserved = ReserveR9; |
| 98 | UseMovt = false; |
| 99 | SupportsTailCall = false; |
| 100 | HasFP16 = false; |
| 101 | HasD16 = false; |
| 102 | HasHardwareDivide = false; |
| 103 | HasHardwareDivideInARM = false; |
| 104 | HasT2ExtractPack = false; |
| 105 | HasDataBarrier = false; |
| 106 | Pref32BitThumb = false; |
| 107 | AvoidCPSRPartialUpdate = false; |
| 108 | AvoidMOVsShifterOperand = false; |
| 109 | HasRAS = false; |
| 110 | HasMPExtension = false; |
| 111 | FPOnlySP = false; |
Tim Northover | cedd481 | 2013-05-23 19:11:14 +0000 | [diff] [blame] | 112 | HasPerfMon = false; |
Tim Northover | c604765 | 2013-04-10 12:08:35 +0000 | [diff] [blame] | 113 | HasTrustZone = false; |
Amara Emerson | 3308909 | 2013-09-19 11:59:01 +0000 | [diff] [blame] | 114 | HasCrypto = false; |
Bill Wendling | 61375d8 | 2013-02-16 01:36:26 +0000 | [diff] [blame] | 115 | AllowsUnalignedMem = false; |
| 116 | Thumb2DSP = false; |
| 117 | UseNaClTrap = false; |
Renato Golin | b4dd6c5 | 2013-03-21 18:47:47 +0000 | [diff] [blame] | 118 | UnsafeFPMath = false; |
Bill Wendling | 61375d8 | 2013-02-16 01:36:26 +0000 | [diff] [blame] | 119 | } |
| 120 | |
Bill Wendling | 5a92eec | 2013-02-15 22:41:25 +0000 | [diff] [blame] | 121 | void ARMSubtarget::resetSubtargetFeatures(const MachineFunction *MF) { |
| 122 | AttributeSet FnAttrs = MF->getFunction()->getAttributes(); |
| 123 | Attribute CPUAttr = FnAttrs.getAttribute(AttributeSet::FunctionIndex, |
| 124 | "target-cpu"); |
| 125 | Attribute FSAttr = FnAttrs.getAttribute(AttributeSet::FunctionIndex, |
| 126 | "target-features"); |
| 127 | std::string CPU = |
| 128 | !CPUAttr.hasAttribute(Attribute::None) ?CPUAttr.getValueAsString() : ""; |
| 129 | std::string FS = |
| 130 | !FSAttr.hasAttribute(Attribute::None) ? FSAttr.getValueAsString() : ""; |
Bill Wendling | 61375d8 | 2013-02-16 01:36:26 +0000 | [diff] [blame] | 131 | if (!FS.empty()) { |
| 132 | initializeEnvironment(); |
Bill Wendling | 5a92eec | 2013-02-15 22:41:25 +0000 | [diff] [blame] | 133 | resetSubtargetFeatures(CPU, FS); |
Bill Wendling | 61375d8 | 2013-02-16 01:36:26 +0000 | [diff] [blame] | 134 | } |
Bill Wendling | 5a92eec | 2013-02-15 22:41:25 +0000 | [diff] [blame] | 135 | } |
| 136 | |
| 137 | void ARMSubtarget::resetSubtargetFeatures(StringRef CPU, StringRef FS) { |
Tilmann Scheller | 63872ce | 2013-09-02 17:09:01 +0000 | [diff] [blame] | 138 | if (CPUString.empty()) { |
| 139 | if (isTargetIOS() && TargetTriple.getArchName().endswith("v7s")) |
| 140 | // Default to the Swift CPU when targeting armv7s/thumbv7s. |
| 141 | CPUString = "swift"; |
| 142 | else |
| 143 | CPUString = "generic"; |
| 144 | } |
Evan Cheng | ec415ef | 2009-03-08 04:02:49 +0000 | [diff] [blame] | 145 | |
Evan Cheng | 0b33a32 | 2011-06-30 02:12:44 +0000 | [diff] [blame] | 146 | // Insert the architecture feature derived from the target triple into the |
| 147 | // feature string. This is important for setting features that are implied |
| 148 | // based on the architecture version. |
Bill Wendling | 5a92eec | 2013-02-15 22:41:25 +0000 | [diff] [blame] | 149 | std::string ArchFS = ARM_MC::ParseARMTriple(TargetTriple.getTriple(), |
| 150 | CPUString); |
Evan Cheng | 2bd6536 | 2011-07-07 00:08:19 +0000 | [diff] [blame] | 151 | if (!FS.empty()) { |
| 152 | if (!ArchFS.empty()) |
Bill Wendling | 5a92eec | 2013-02-15 22:41:25 +0000 | [diff] [blame] | 153 | ArchFS = ArchFS + "," + FS.str(); |
Evan Cheng | 2bd6536 | 2011-07-07 00:08:19 +0000 | [diff] [blame] | 154 | else |
| 155 | ArchFS = FS; |
| 156 | } |
Evan Cheng | 1a72add6 | 2011-07-07 07:07:08 +0000 | [diff] [blame] | 157 | ParseSubtargetFeatures(CPUString, ArchFS); |
Evan Cheng | 2bd6536 | 2011-07-07 00:08:19 +0000 | [diff] [blame] | 158 | |
| 159 | // Thumb2 implies at least V6T2. FIXME: Fix tests to explicitly specify a |
| 160 | // ARM version or CPU and then remove this. |
Evan Cheng | 8b2bda0 | 2011-07-07 03:55:05 +0000 | [diff] [blame] | 161 | if (!HasV6T2Ops && hasThumb2()) |
Amara Emerson | 5035ee0 | 2013-10-07 16:55:23 +0000 | [diff] [blame^] | 162 | HasV4TOps = HasV5TOps = HasV5TEOps = HasV6Ops = HasV6MOps = HasV6T2Ops = true; |
Bob Wilson | d0046ca | 2010-11-09 22:50:47 +0000 | [diff] [blame] | 163 | |
Andrew Trick | 352abc1 | 2012-08-08 02:44:16 +0000 | [diff] [blame] | 164 | // Keep a pointer to static instruction cost data for the specified CPU. |
| 165 | SchedModel = getSchedModelForCPU(CPUString); |
| 166 | |
Evan Cheng | 54b68e3 | 2011-07-01 20:45:01 +0000 | [diff] [blame] | 167 | // Initialize scheduling itinerary for the specified CPU. |
| 168 | InstrItins = getInstrItineraryForCPU(CPUString); |
| 169 | |
Bill Wendling | 5a92eec | 2013-02-15 22:41:25 +0000 | [diff] [blame] | 170 | if ((TargetTriple.getTriple().find("eabi") != std::string::npos) || |
| 171 | (isTargetIOS() && isMClass())) |
Evan Cheng | 0460ae8 | 2012-02-21 20:46:00 +0000 | [diff] [blame] | 172 | // FIXME: We might want to separate AAPCS and EABI. Some systems, e.g. |
| 173 | // Darwin-EABI conforms to AACPS but not the rest of EABI. |
Evan Cheng | 1a72add6 | 2011-07-07 07:07:08 +0000 | [diff] [blame] | 174 | TargetABI = ARM_ABI_AAPCS; |
| 175 | |
Lauro Ramos Venancio | 048e16ff | 2007-02-13 19:52:28 +0000 | [diff] [blame] | 176 | if (isAAPCS_ABI()) |
| 177 | stackAlignment = 8; |
| 178 | |
Renato Golin | ca57063 | 2013-08-15 20:54:38 +0000 | [diff] [blame] | 179 | UseMovt = hasV6T2Ops() && ArmUseMOVT; |
| 180 | |
Renato Golin | 0a41d9a | 2013-08-15 20:45:13 +0000 | [diff] [blame] | 181 | if (!isTargetIOS()) { |
Renato Golin | 0a41d9a | 2013-08-15 20:45:13 +0000 | [diff] [blame] | 182 | IsR9Reserved = ReserveR9; |
| 183 | } else { |
Evan Cheng | 8b2bda0 | 2011-07-07 03:55:05 +0000 | [diff] [blame] | 184 | IsR9Reserved = ReserveR9 | !HasV6Ops; |
Evan Cheng | 0460ae8 | 2012-02-21 20:46:00 +0000 | [diff] [blame] | 185 | SupportsTailCall = !getTargetTriple().isOSVersionLT(5, 0); |
Evan Cheng | dfce83c | 2011-01-17 08:03:18 +0000 | [diff] [blame] | 186 | } |
David Goodwin | 9a051a5 | 2009-10-01 21:46:35 +0000 | [diff] [blame] | 187 | |
Evan Cheng | 03da4db | 2009-10-16 06:11:08 +0000 | [diff] [blame] | 188 | if (!isThumb() || hasThumb2()) |
| 189 | PostRAScheduler = true; |
Bob Wilson | 3dc9732 | 2010-09-28 04:09:35 +0000 | [diff] [blame] | 190 | |
JF Bastien | 97b08c40 | 2013-05-17 23:49:01 +0000 | [diff] [blame] | 191 | switch (Align) { |
| 192 | case DefaultAlign: |
| 193 | // Assume pre-ARMv6 doesn't support unaligned accesses. |
| 194 | // |
| 195 | // ARMv6 may or may not support unaligned accesses depending on the |
| 196 | // SCTLR.U bit, which is architecture-specific. We assume ARMv6 |
| 197 | // Darwin targets support unaligned accesses, and others don't. |
| 198 | // |
| 199 | // ARMv7 always has SCTLR.U set to 1, but it has a new SCTLR.A bit |
| 200 | // which raises an alignment fault on unaligned accesses. Linux |
| 201 | // defaults this bit to 0 and handles it as a system-wide (not |
| 202 | // per-process) setting. It is therefore safe to assume that ARMv7+ |
| 203 | // Linux targets support unaligned accesses. The same goes for NaCl. |
| 204 | // |
| 205 | // The above behavior is consistent with GCC. |
| 206 | AllowsUnalignedMem = ( |
| 207 | (hasV7Ops() && (isTargetLinux() || isTargetNaCl())) || |
| 208 | (hasV6Ops() && isTargetDarwin())); |
| 209 | break; |
| 210 | case StrictAlign: |
| 211 | AllowsUnalignedMem = false; |
| 212 | break; |
| 213 | case NoStrictAlign: |
| 214 | AllowsUnalignedMem = true; |
| 215 | break; |
| 216 | } |
Renato Golin | b4dd6c5 | 2013-03-21 18:47:47 +0000 | [diff] [blame] | 217 | |
| 218 | // NEON f32 ops are non-IEEE 754 compliant. Darwin is ok with it by default. |
| 219 | uint64_t Bits = getFeatureBits(); |
| 220 | if ((Bits & ARM::ProcA5 || Bits & ARM::ProcA8) && // Where this matters |
| 221 | (Options.UnsafeFPMath || isTargetDarwin())) |
| 222 | UseNEONForSinglePrecisionFP = true; |
Evan Cheng | 10043e2 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 223 | } |
Evan Cheng | 43b9ca6 | 2009-08-28 23:18:09 +0000 | [diff] [blame] | 224 | |
| 225 | /// GVIsIndirectSymbol - true if the GV will be accessed via an indirect symbol. |
Evan Cheng | 1b38952 | 2009-09-03 07:04:02 +0000 | [diff] [blame] | 226 | bool |
Dan Gohman | bcaf681 | 2010-04-15 01:51:59 +0000 | [diff] [blame] | 227 | ARMSubtarget::GVIsIndirectSymbol(const GlobalValue *GV, |
| 228 | Reloc::Model RelocM) const { |
Evan Cheng | 1b38952 | 2009-09-03 07:04:02 +0000 | [diff] [blame] | 229 | if (RelocM == Reloc::Static) |
Evan Cheng | 43b9ca6 | 2009-08-28 23:18:09 +0000 | [diff] [blame] | 230 | return false; |
Evan Cheng | 1b38952 | 2009-09-03 07:04:02 +0000 | [diff] [blame] | 231 | |
Jeffrey Yasskin | 091217b | 2010-01-27 20:34:15 +0000 | [diff] [blame] | 232 | // Materializable GVs (in JIT lazy compilation mode) do not require an extra |
| 233 | // load from stub. |
Evan Cheng | 2ce6630 | 2011-02-22 06:58:34 +0000 | [diff] [blame] | 234 | bool isDecl = GV->hasAvailableExternallyLinkage(); |
| 235 | if (GV->isDeclaration() && !GV->isMaterializable()) |
| 236 | isDecl = true; |
Evan Cheng | 1b38952 | 2009-09-03 07:04:02 +0000 | [diff] [blame] | 237 | |
| 238 | if (!isTargetDarwin()) { |
| 239 | // Extra load is needed for all externally visible. |
| 240 | if (GV->hasLocalLinkage() || GV->hasHiddenVisibility()) |
| 241 | return false; |
| 242 | return true; |
| 243 | } else { |
| 244 | if (RelocM == Reloc::PIC_) { |
| 245 | // If this is a strong reference to a definition, it is definitely not |
| 246 | // through a stub. |
| 247 | if (!isDecl && !GV->isWeakForLinker()) |
| 248 | return false; |
| 249 | |
| 250 | // Unless we have a symbol with hidden visibility, we have to go through a |
| 251 | // normal $non_lazy_ptr stub because this symbol might be resolved late. |
| 252 | if (!GV->hasHiddenVisibility()) // Non-hidden $non_lazy_ptr reference. |
| 253 | return true; |
| 254 | |
| 255 | // If symbol visibility is hidden, we have a stub for common symbol |
| 256 | // references and external declarations. |
| 257 | if (isDecl || GV->hasCommonLinkage()) |
| 258 | // Hidden $non_lazy_ptr reference. |
| 259 | return true; |
| 260 | |
| 261 | return false; |
| 262 | } else { |
| 263 | // If this is a strong reference to a definition, it is definitely not |
| 264 | // through a stub. |
| 265 | if (!isDecl && !GV->isWeakForLinker()) |
| 266 | return false; |
Andrew Trick | c416ba6 | 2010-12-24 04:28:06 +0000 | [diff] [blame] | 267 | |
Evan Cheng | 1b38952 | 2009-09-03 07:04:02 +0000 | [diff] [blame] | 268 | // Unless we have a symbol with hidden visibility, we have to go through a |
| 269 | // normal $non_lazy_ptr stub because this symbol might be resolved late. |
| 270 | if (!GV->hasHiddenVisibility()) // Non-hidden $non_lazy_ptr reference. |
| 271 | return true; |
| 272 | } |
| 273 | } |
| 274 | |
| 275 | return false; |
Evan Cheng | 43b9ca6 | 2009-08-28 23:18:09 +0000 | [diff] [blame] | 276 | } |
David Goodwin | 0d412c2 | 2009-11-10 00:48:55 +0000 | [diff] [blame] | 277 | |
Owen Anderson | a3181e2 | 2010-09-28 21:57:50 +0000 | [diff] [blame] | 278 | unsigned ARMSubtarget::getMispredictionPenalty() const { |
Andrew Trick | 352abc1 | 2012-08-08 02:44:16 +0000 | [diff] [blame] | 279 | return SchedModel->MispredictPenalty; |
Owen Anderson | a3181e2 | 2010-09-28 21:57:50 +0000 | [diff] [blame] | 280 | } |
| 281 | |
David Goodwin | 0d412c2 | 2009-11-10 00:48:55 +0000 | [diff] [blame] | 282 | bool ARMSubtarget::enablePostRAScheduler( |
| 283 | CodeGenOpt::Level OptLevel, |
Evan Cheng | 0d639a2 | 2011-07-01 21:01:15 +0000 | [diff] [blame] | 284 | TargetSubtargetInfo::AntiDepBreakMode& Mode, |
David Goodwin | b9fe5d5 | 2009-11-13 19:52:48 +0000 | [diff] [blame] | 285 | RegClassVector& CriticalPathRCs) const { |
Andrew Trick | d24698c | 2013-09-25 00:26:16 +0000 | [diff] [blame] | 286 | Mode = TargetSubtargetInfo::ANTIDEP_NONE; |
David Goodwin | 0d412c2 | 2009-11-10 00:48:55 +0000 | [diff] [blame] | 287 | return PostRAScheduler && OptLevel >= CodeGenOpt::Default; |
| 288 | } |