summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Triple.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [mips] Recognise the triple used by Debian stretch for mips64el.Daniel Sanders2016-07-191-0/+2
| | | | | | | | | | | | | Summary: The triple used for this distribution is mips64el-linux-gnuabi64. Reviewers: sdardis Subscribers: sdardis, llvm-commits Differential Revision: https://reviews.llvm.org/D22406 llvm-svn: 275966
* IR: Set a TargetPrefix for nvvm intrinsicsJustin Bogner2016-07-081-2/+3
| | | | | | | | | Since these are named nvvm_* rather than nvptx_*, we also need to update getArchTypePrefix. It's a bit unusual for getArchTypePrefix not to match the backend name, but I think this fits the intent of the function in this case. llvm-svn: 274890
* Add RenderScript ArchTypePirama Arumuga Nainar2016-07-021-73/+91
| | | | | | | | | | | | | | | | Summary: Add renderscript32 and renderscript64 ArchTypes. This is to configure the ABI requirement on 32-bit RenderScript that 'long' types have 64-bit size and alignment. 64-bit RenderScript is the same as AArch64, but is added here for completeness. Reviewers: echristo, rsmith Subscribers: aemerson, jfb, rampitec, dschuff, mehdi_amini, llvm-commits, srhines Differential Revision: http://reviews.llvm.org/D21333 llvm-svn: 274412
* [Triple] Reimplement isLittleEndian(). Now it works for arm too.Davide Italiano2016-06-291-30/+25
| | | | | | Differential Revision: http://reviews.llvm.org/D21846 llvm-svn: 274154
* [Triple] Add isLittleEndian().Davide Italiano2016-06-291-0/+4
| | | | | | | | | | This allows us to query about the endianness without having to look at DataLayout. The API will be used (and tested) in lld, in order to find out the endianness of BitcodeFiles. Briefly discussed with Rafael. llvm-svn: 274090
* Add support for musl-libc on ARM Linux.Rafael Espindola2016-06-241-0/+5
| | | | | | Patch by Lei Zhang! llvm-svn: 273726
* Add a Musl environment to the triple.Rafael Espindola2016-06-141-0/+2
| | | | | | | | It will be used in clang. Patch by Lei Zhang. llvm-svn: 272660
* Add AMDGPU related triple vendors/OSesMatt Arsenault2016-02-131-0/+6
| | | | | | | | As support expands to more runtimes, we'll need to distinguish between more than just HSA and unknown. This also lets us stop using unknown everywhere. llvm-svn: 260790
* ARMv7k: use Cortex-A7 by default even for tvOSTim Northover2016-02-111-0/+1
| | | | | | Also actually test the default CPU from those triples. llvm-svn: 260621
* [lanai] Add Lanai triple.Jacques Pienaar2016-02-111-0/+10
| | | | | | | | | | Add triple for the Lanai backend. General Lanai backend discussion on llvm-dev thread "[RFC] Lanai backend". Differential Revision: http://reviews.llvm.org/D17003 llvm-svn: 260545
* AMDGPU: Fix getArchTypePrefixMatt Arsenault2016-01-221-2/+2
| | | | llvm-svn: 258525
* parseArch() supports more variations of arch names for PowerPC buildsKelvin Li2016-01-191-4/+4
| | | | llvm-svn: 258103
* [ARM] Add ARMv8-M Baseline/Mainline LLVM targetingBradley Smith2016-01-151-0/+4
| | | | llvm-svn: 257878
* Mark arm as the 32bit variant of aarch64 in TripleTamas Berghammer2016-01-071-28/+28
| | | | | | | | | | Change Triple::get32BitArchVariant to return arm/armeb as the 32bit variant of aarch64/aarch64_be and do the same change for the oppoiste direction in Triple::get64BitArchVariant. Differential revision: http://reviews.llvm.org/D15529 llvm-svn: 257048
* [MC] Don't use the architecture to govern which object file format to useDavid Majnemer2015-12-221-11/+37
| | | | | | | | | | | InitMCObjectFileInfo was trying to override the triple in awkward ways. For example, a triple specifying COFF but not Windows was forced as ELF. This makes it easy for internal invariants to get violated, such as those which triggered PR25912. This fixes PR25912. llvm-svn: 256226
* [WebAssembly] Experimental ELF writer supportDan Gohman2015-12-171-5/+2
| | | | | | | | | This creates the initial infrastructure for writing ELF output files. It doesn't yet have any implementation for encoding instructions. Differential Revision: http://reviews.llvm.org/D15555 llvm-svn: 255869
* [ARM] Add ARMv8.2-A to TargetParserOliver Stannard2015-12-011-0/+2
| | | | | | | | | | | | Add ARMv8.2-A to TargetParser, so that it can be used by the clang command-line options and the .arch directive. Most testing of this will be done in clang, checking that the command-line options that this enables work. Differential Revision: http://reviews.llvm.org/D15037 llvm-svn: 254400
* Avoid duplicate entry for cortex-a7 in the TargetParser (NFC)Artyom Skrobov2015-11-201-0/+6
| | | | | | | | | | Reviewers: t.p.northover, rengolin Subscribers: aemerson, rengolin, llvm-commits Differential Revision: http://reviews.llvm.org/D14757 llvm-svn: 253676
* Handle ARMv6-J as an alias, instead of fake architectureArtyom Skrobov2015-11-201-1/+0
| | | | | | | | | | | | | | | | | | | | | | Summary: This follows D14577 to treat ARMv6-J as an alias for ARMv6, instead of an architecture in its own right. The functional change is that the default CPU when targeting ARMv6-J changes from arm1136j-s to arm1136jf-s, which is currently used as the default CPU for ARMv6; both are, in fact, ARMv6-J CPUs. The J-bit (Jazelle support) is irrelevant to LLVM, and it doesn't affect code generation, attributes, optimizations, or anything else, apart from selecting the default CPU. Reviewers: rengolin, logan, compnerd Subscribers: aemerson, llvm-commits, rengolin Differential Revision: http://reviews.llvm.org/D14755 llvm-svn: 253675
* Handle ARMv6KZ namingArtyom Skrobov2015-11-161-2/+1
| | | | | | | | | | | | | | | | | | | | | | | Summary: * ARMv6KZ is the "canonical" name, given in the ARMARM * ARMv6Z is an "official abbreviation" for it, mentioned in the ARMARM * ARMv6ZK is a popular misspelling, which we should support as an alias. The patch corrects the handling of the names. Functional changes: * ARMv6Z no longer treated as an architecture in its own right * ARMv6ZK renamed to ARMv6KZ, accepting ARMv6ZK as an alias * arm1176jz-s and arm1176jzf-s recognized as ARMv6ZK, instead of ARMv6K * default ARMv6K CPU changed to arm1176j-s Reviewers: rengolin, logan, compnerd Subscribers: aemerson, llvm-commits, rengolin Differential Revision: http://reviews.llvm.org/D14568 llvm-svn: 253206
* Cull non-standard variants of ARM architectures (NFC)Artyom Skrobov2015-11-121-7/+0
| | | | | | | | | | | | | | | Summary: This patch changes ARMV5, ARMV5E, ARMV6SM, ARMV6HL, ARMV7, ARMV7L, ARMV7HL, ARMV7EM to be treated as aliases for the corresponding standard architectures, instead of as actual architectures. Reviewers: rengolin Subscribers: aemerson, llvm-commits, rengolin Differential Revision: http://reviews.llvm.org/D14577 llvm-svn: 252903
* ARM: add watchOS default version support function.Tim Northover2015-10-281-1/+26
| | | | | | It's useful for Clang's Driver faff. llvm-svn: 251574
* ARM: support .watchos_version_min and .tvos_version_min.Tim Northover2015-10-281-0/+10
| | | | | | | | These MachO file directives are used by linkers and other tools to provide compatibility information, much like the existing .ios_version_min and .macosx_version_min. llvm-svn: 251569
* [X86] Make elfiamcu an OS, not an environment.Michael Kuperstein2015-10-271-2/+2
| | | | | | | | | | GNU tools require elfiamcu to take up the entire OS field, so, e.g. i?86-*-linux-elfiamcu is not considered a legal triple. Make us compatible. Differential Revision: http://reviews.llvm.org/D14081 llvm-svn: 251390
* [X86] Add support for elfiamcu tripleMichael Kuperstein2015-10-251-0/+2
| | | | | | | | This adds support for the i?86-*-elfiamcu triple, which indicates the IAMCU psABI is used. Differential Revision: http://reviews.llvm.org/D13977 llvm-svn: 251222
* Initial migration of AVR backendDylan McKay2015-10-161-0/+10
| | | | | | | | This patch adds the underlying infrastructure for an AVR backend to be included into LLVM. It is the first of a series of patches aimed at moving the out-of-tree AVR backend into the tree. It consists of adding a new`Triple` target 'avr'. llvm-svn: 250492
* [ADT] Micro-optimize the Triple constructor by doing a single split andChandler Carruth2015-09-101-8/+21
| | | | | | | | | | | | re-using the resulting components rather than repeatedly splitting and re-splitting to compute each component as part of the initializer list. This is more work on PR23676. Sadly, it doesn't help much. It removes the constructor from my profile, but doesn't make a sufficient dent in the total time. But it should play together nicely with subsequent changes. llvm-svn: 247250
* [ADT] Add a single-character version of the small vector split routineChandler Carruth2015-09-101-1/+1
| | | | | | | | | | | on StringRef. Finding and splitting on a single character is substantially faster than doing it on even a single character StringRef -- we immediately get to a *very* tuned memchr call this way. Even nicer, we get to this even in a debug build, shaving 18% off the runtime of TripleTest.Normalization, helping PR23676 some more. llvm-svn: 247244
* Add Myriad into enum VendorTypeDouglas Katzman2015-09-021-0/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D12540 llvm-svn: 246732
* Stop calling the flat out insane ARM target parsing code unless theChandler Carruth2015-08-301-8/+20
| | | | | | | | | | | | | | | | | | | | | | | architecture string is something quite weird. Similarly delay calling the BPF parsing code, although that is more reasonable. To understand why I was motivated to make this change, it cuts the time for running the ADT TripleTest unittests by a factor of two in non-optimized builds (the developer default) and reduces my 'check-llvm' time by a full 15 seconds. The implementation of parseARMArch is *that* slow. I tried to fix it in the prior series of commits, but frankly, I have no idea how to finish fixing it. The entire premise of the function (to allow 'v7a-unknown-linux' or some such to parse as an 'arm-unknown-linux' triple) seems completely insane to me, but I'll let the ARM folks sort that out. At least it is now out of the critical path of every developer working on LLVM. It also will likely make some other folks' code significantly faster as I've heard reports of 2% of time spent in triple parsing even in optimized builds! I'm not done making this code faster, but I am done trying to improve the ARM target parsing code. llvm-svn: 246378
* Teach the target parsing framework to directly compute the length of allChandler Carruth2015-08-301-4/+4
| | | | | | | | | | of its strings when expanding the string literals from the macros, and push all of the APIs to be StringRef instead of C-string APIs. This (remarkably) removes a very non-trivial number of strlen calls. It even deletes code and complexity from one of the primary users -- Clang. llvm-svn: 246374
* [Triple] Stop abusing a class to have only static methods and just useChandler Carruth2015-08-301-9/+9
| | | | | | | the namespace that we are already using for the enums that are produced by the parsing. llvm-svn: 246367
* [WebAssembly] Don't default to ELF in the triple.Dan Gohman2015-08-171-0/+5
| | | | | | | | WebAssembly doesn't yet have a specified binary format, and it may not end up being ELF, so we don't want the Triple class defaulting to ELF for it at this time. llvm-svn: 245254
* [WebAssembly] Make getArchTypePrefix return "wasm".Dan Gohman2015-08-171-2/+2
| | | | | | | | The arch prefix string isn't currently being used for anything on WebAssembly, but if it were to be used, it makes sense to use the same arch prefix string for wasm32 and wasm64. llvm-svn: 245252
* Add a target environment for CoreCLR.Pat Gavlin2015-08-141-0/+2
| | | | | | | | | | Although targeting CoreCLR is similar to targeting MSVC, there are certain important differences that the backend must be aware of (e.g. differences in stack probes, EH, and library calls). Differential Revision: http://reviews.llvm.org/D11012 llvm-svn: 245115
* Add amdopencl environment to tripleMatt Arsenault2015-07-301-0/+2
| | | | | | | This is used by the AMD x86 OpenCL implementation to change some ABI details on Windows and Linux. llvm-svn: 243627
* [Triple] Add a helper to switch between big/little endian variantsBenjamin Kramer2015-07-061-0/+116
| | | | | | This will be used from clang's driver. llvm-svn: 241527
* Drop the OS from the WebAssembly target triple for now.Dan Gohman2015-06-301-2/+0
| | | | | | | This unbreaks TripleTest.Normalization. We'll have to come up with a new plan for the OS component of the target triple for WebAssembly. llvm-svn: 241041
* [WebAssembly] Initial WebAssembly backendDan Gohman2015-06-291-0/+16
| | | | | | | This WebAssembly backend is just a skeleton at this time and is not yet functional. llvm-svn: 241022
* Add 'shave' processor name to TripleDouglas Katzman2015-06-121-0/+7
| | | | | | | | | | Based on ArchType, Clang's driver can select a non-Clang compiler. String parsing in Clang would have sufficed if it were only that, however this change anticipates true llvm support. Differential Revision: http://reviews.llvm.org/D10413 llvm-svn: 239631
* [bpf] rename triple names bpf_be -> bpfebAlexei Starovoitov2015-06-051-16/+16
| | | | llvm-svn: 239162
* Simplify ARMTargetParser::getArchSynonymArtyom Skrobov2015-06-041-2/+1
| | | | | | | | | | | | | | | | Summary: 1) The only caller, ARMTargetParser::parseArch, uses the results for an "endswith" test; so, including the "arm" prefix into the result is unnecessary. 2) Most ARMTargetParser::parseArch callers pass it the output from ARMTargetParser::getCanonicalArchName; so, make this behaviour the default. Then, including the "arm" prefix into the cases is unnecessary. Reviewers: rengolin Reviewed By: rengolin Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10249 llvm-svn: 239099
* [bpf] add big- and host- endian supportAlexei Starovoitov2015-06-041-7/+30
| | | | | | | | | | | | | | | | | | | Summary: -march=bpf -> host endian -march=bpf_le -> little endian -match=bpf_be -> big endian Test Plan: v1 was tested by IBM s390 guys and appears to be working there. It bit rots too fast here. Reviewers: chandlerc, tstellarAMD Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10177 llvm-svn: 239071
* [Support] Simplify Triple::getOSVersionDavid Majnemer2015-06-011-9/+1
| | | | | | | Those who are interested in the Android version can use getEnvironmentVersion instead of getOSVersion. llvm-svn: 238798
* [ADT] Add Triple::getEnvironmentVersionDavid Majnemer2015-06-011-16/+40
| | | | | | | | This allows us to extract version numbers from the environment. getOSVersion is currently overloaded for that purpose, this allows us to clean it up. llvm-svn: 238796
* ARMTargetParser: Make BSD Thumb/BE armv6 workRenato Golin2015-05-271-2/+2
| | | | | | | Simple change to make arch like "thumbv6" and "armbev6" to return the correct CPU for FreeBSD and NetBSD. llvm-svn: 238353
* Move parseSubArch to ARMTargetParser. NFCRenato Golin2015-05-241-30/+58
| | | | | | | | | | | | Using getCanonicalArchName() is the right way to parse ARM arch names. Mapping ARMTargetParser IDs to Triple Arch IDs is temporary, until they are merged into a TargetDescription class. This was the last LLVM FIXME to move things to ARMTargetParser. Now on to Clang and beyond. llvm-svn: 238110
* Adding profile and version parsers to ARMTargetParserRenato Golin2015-05-221-2/+10
| | | | | | | This allows us to match armv6m to default to thumb, but will also be used by Clang's driver and remove the current incomplete copy in it. llvm-svn: 238036
* Make Triple::parseARMArch use ARMTargetParserRenato Golin2015-05-211-49/+43
| | | | | | | | | | | Simplifying Triple::parseARMArch, leaving all the parsing to ARMTargetParser. This commit also adds AArch64 detection to ARMTargetParser canonicalization, and a two RedHat arch names (v{6,7}hl, meaning hard-float / little-endian). Adding enough unit tests to cover the basics. Clang checks fine. llvm-svn: 237902
* Remove unnecessary FIXME commentRenato Golin2015-05-211-2/+0
| | | | | | It has been fixed by commit r237797. llvm-svn: 237890
OpenPOWER on IntegriCloud