aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/SubtargetFeature.cpp
AgeCommit message (Collapse)AuthorFilesLines
2016-08-22[MC] Remove guard(s). NFCI.Davide Italiano1-2/+0
All the methods are already marked with LLVM_DUMP_METHOD. llvm-svn: 279428
2016-04-18[NFC] Header cleanupMehdi Amini1-0/+1
Removed some unused headers, replaced some headers with forward class declarations. Found using simple scripts like this one: clear && ack --cpp -l '#include "llvm/ADT/IndexedMap.h"' | xargs grep -L 'IndexedMap[<]' | xargs grep -n --color=auto 'IndexedMap' Patch by Eugene Kosov <claprix@yandex.ru> Differential Revision: http://reviews.llvm.org/D19219 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266595
2016-01-29Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith ↵Yaron Keren1-1/+1
r259192 post commit comment. clang part in r259232, this is the LLVM part of the patch. llvm-svn: 259240
2016-01-05(NFC) Change SubtargetFeatures::ToggleFeature andArtyom Skrobov1-12/+6
SubtargetFeatures::ApplyFeatureFlag to be static, so that MCSubtargetInfo doesn't need to instantiate SubtargetFeatures for nothing. Also change the return type to void, as it wasn't ever used. This is a partial commit of http://reviews.llvm.org/D15746 llvm-svn: 256823
2016-01-03Use std::is_sorted instead of manual loops. NFCCraig Topper1-8/+4
llvm-svn: 256701
2015-09-10[ADT] Switch a bunch of places in LLVM that were doing single-characterChandler Carruth1-1/+1
splits to actually use the single character split routine which does less work, and in a debug build is *substantially* faster. llvm-svn: 247245
2015-06-05[ARM] Add knowledge of FPU subtarget features to TargetParserJohn Brawn1-22/+33
Add getFPUFeatures to TargetParser, which gets the list of subtarget features that are enabled/disabled for each FPU, and use it when handling the .fpu directive. No functional change in this commit, though clang will start behaving differently once it starts using this. Differential Revision: http://reviews.llvm.org/D10237 llvm-svn: 239150
2015-05-28[MC] Replace custom string join function with the one from StringExtras.Benjamin Kramer1-22/+2
NFC. llvm-svn: 238414
2015-05-26Use std::bitset for SubtargetFeatures.Michael Kuperstein1-11/+12
Previously, subtarget features were a bitfield with the underlying type being uint64_t. Since several targets (X86 and ARM, in particular) have hit or were very close to hitting this bound, switching the features to use a bitset. No functional change. The first several times this was committed (e.g. r229831, r233055), it caused several buildbot failures. Apparently the reason for most failures was both clang and gcc's inability to deal with large numbers (> 10K) of bitset constructor calls in tablegen-generated initializers of instruction info tables. This should now be fixed. llvm-svn: 238192
2015-05-13Reverting r237234, "Use std::bitset for SubtargetFeatures"Michael Kuperstein1-12/+11
The buildbots are still not satisfied. MIPS and ARM are failing (even though at least MIPS was expected to pass). llvm-svn: 237245
2015-05-13Use std::bitset for SubtargetFeaturesMichael Kuperstein1-11/+12
Previously, subtarget features were a bitfield with the underlying type being uint64_t. Since several targets (X86 and ARM, in particular) have hit or were very close to hitting this bound, switching the features to use a bitset. No functional change. The first two times this was committed (r229831, r233055), it caused several buildbot failures. At least some of the ARM and MIPS ones were due to gcc/binutils issues, and should now be fixed. llvm-svn: 237234
2015-03-31Make llc use getHostCPUFeatures when 'native' is specified for cpu.Craig Topper1-2/+3
This is necessary for x86 where not all Sandybridge, Ivybrige, Haswell, and Broadwell CPUs support AVX. Currently we modify the CPU name back to Nehalem for this case, but that turns off additional features for these CPUs. llvm-svn: 233673
2015-03-28Convert feature strings to lowercase even if they have a '+'/'-' in front of ↵Craig Topper1-1/+1
them. llvm-svn: 233475
2015-03-28Update comment to match code behavior.Craig Topper1-1/+1
llvm-svn: 233470
2015-03-24Revert "Use std::bitset for SubtargetFeatures"Michael Kuperstein1-12/+11
This reverts commit r233055. It still causes buildbot failures (gcc running out of memory on several platforms, and a self-host failure on arm), although less than the previous time. llvm-svn: 233068
2015-03-24Use std::bitset for SubtargetFeaturesMichael Kuperstein1-11/+12
Previously, subtarget features were a bitfield with the underlying type being uint64_t. Since several targets (X86 and ARM, in particular) have hit or were very close to hitting this bound, switching the features to use a bitset. No functional change. The first time this was committed (r229831), it caused several buildbot failures. At least some of the ARM ones were due to gcc/binutils issues, and should now be fixed. Differential Revision: http://reviews.llvm.org/D8542 llvm-svn: 233055
2015-02-19Reverting r229831 due to multiple ARM/PPC/MIPS build-bot failures.Michael Kuperstein1-12/+11
llvm-svn: 229841
2015-02-19Use std::bitset for SubtargetFeaturesMichael Kuperstein1-11/+12
Previously, subtarget features were a bitfield with the underlying type being uint64_t. Since several targets (X86 and ARM, in particular) have hit or were very close to hitting this bound, switching the features to use a bitset. No functional change. Differential Revision: http://reviews.llvm.org/D7065 llvm-svn: 229831
2014-08-30Fix some cases where StringRef was being passed by const reference. Remove ↵Craig Topper1-8/+8
const from some other StringRefs since its implicitly const already. llvm-svn: 216820
2014-08-11SubTargetFeature.cpp: it seems the size of this SmallVector should be 3Hans Wennborg1-1/+1
because some subtarget feature strings have three components. llvm-svn: 215339
2014-05-13Make the split function use StringRef::split.Eric Christopher1-19/+3
llvm-svn: 208723
2014-05-06Use a range based for loop for the SubtargetFeatures print function.Eric Christopher1-2/+2
llvm-svn: 208132
2014-05-06Fix odd formatting that snuck into last patch.Eric Christopher1-3/+3
llvm-svn: 208130
2014-05-06ArrayRef-ize the Feature and Processor tables for SubtargetFeatures.Eric Christopher1-60/+46
This removes arguments passed everywhere and allows the use of standard iteration over lists. Should be no functional change. llvm-svn: 208127
2014-05-06Have the SubtargetFeature help routine just not return a number andEric Christopher1-6/+4
fall back to the normal path without a cpu. While doing this fix llc to just exit when we don't have a module to process instead of asserting. llvm-svn: 208102
2014-05-06Revert "Walk back commits for unused function parameters - they're still being"Eric Christopher1-19/+5
this reapplies 208012 and 208002. llvm-svn: 208037
2014-05-05Walk back commits for unused function parameters - they're still beingEric Christopher1-5/+19
used via dragonegg for now. llvm-svn: 208016
2014-05-05Remove a now unnecessary function since all calls have one versionEric Christopher1-17/+4
and inline it into its caller. llvm-svn: 208012
2014-05-05Remove a call to std::exit in a library. Make "Help" returnEric Christopher1-5/+7
a 0 as a default answer. llvm-svn: 208009
2014-05-05Remove unused argument from AddFeature.Eric Christopher1-3/+2
llvm-svn: 208002
2014-04-13[C++11] More 'nullptr' conversion or in some cases just using a boolean ↵Craig Topper1-1/+1
check instead of comparing to nullptr. llvm-svn: 206129
2014-01-25Reverting r199886 (Prevent repetitive warnings for unrecognized processors ↵Artyom Skrobov1-34/+20
and features) llvm-svn: 200083
2014-01-23Prevent repetitive warnings for unrecognized processors and featuresArtyom Skrobov1-20/+34
llvm-svn: 199886
2013-10-13MC: Don't assume incoming StringRef's are null terminated.Will Dietz1-4/+1
This can happen when processing command line arguments, which are often stored as std::string's and later turned into StringRef's via std::string::data(). Unfortunately this is not guaranteed to return a null-terminated string until C++11, causing breakage on platforms that don't do this. llvm-svn: 192558
2013-10-07Fix the documentation of getDefaultSubtargetFeatures.Rafael Espindola1-2/+1
Patch by David Nadlinger. llvm-svn: 192098
2012-10-20Symbol hygiene: Make sure declarations and definitions match, make helper ↵Benjamin Kramer1-2/+2
functions static. llvm-svn: 166376
2012-10-04Remove template from function that is only used with one type after r165092.Craig Topper1-4/+5
llvm-svn: 165203
2012-10-03Remove unused function that used to get itineraries from SubTargetFeatures. ↵Craig Topper1-24/+0
This is done from MCSubTargetInfo these days. llvm-svn: 165092
2012-09-12Release build: guard dump functions withManman Ren1-1/+1
"#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)" No functional change. Update r163344. llvm-svn: 163679
2012-09-06Release build: guard dump functions with "ifndef NDEBUG"Manman Ren1-0/+2
No functional change. llvm-svn: 163344
2012-09-05Constify subtarget info properly so that we dont cast away the const inRoman Divacky1-3/+3
the SubtargetInfoKV tables. Found by gcc48 -Wcast-qual. llvm-svn: 163251
2012-05-11Tidy up. Trailing whitespace.Jim Grosbach1-8/+8
llvm-svn: 156602
2011-11-06Replace (Lower|Upper)caseString in favor of StringRef's newest methods.Benjamin Kramer1-2/+1
llvm-svn: 143891
2011-10-16Let printf do the formatting instead aligning strings ourselves.Benjamin Kramer1-11/+10
While at it, merge some format strings. llvm-svn: 142140
2011-07-09Change createAsmParser to take a MCSubtargetInfo instead of triple,Evan Cheng1-0/+32
CPU, and feature string. Parsing some asm directives can change subtarget state (e.g. .code 16) and it must be reflected in other modules (e.g. MCCodeEmitter). That is, the MCSubtargetInfo instance must be shared. llvm-svn: 134795
2011-07-07Compute feature bits at time of MCSubtargetInfo initialization.Evan Cheng1-18/+22
llvm-svn: 134606
2011-07-01Eliminate one extra conversion.Evan Cheng1-1/+1
llvm-svn: 134240
2011-07-01Another misuse of StringRef. MSVC is very sensitive to that kind of error.Francois Pichet1-2/+2
llvm-svn: 134236
2011-07-01Fix use after free.Rafael Espindola1-1/+1
llvm-svn: 134234
2011-07-01Switch SubtargetFeatures from std::string to StringRef.Evan Cheng1-22/+19
llvm-svn: 134219