summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ADT/TripleTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [VE] Target stub for NEC SX-AuroraKazushi (Jam) Marukawa2020-01-091-0/+8
| | | | | | | | | Summary: This patch registers the 've' target: the NEC SX-Aurora TSUBASA Vector Engine. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D69103
* [PowerPC]: Add powerpcspe target triple subarch componentJustin Hibbits2020-01-081-0/+7
| | | | | | | | | | Summary: This allows the use of '-target powerpcspe-unknown-linux-gnu' or 'powerpcspe-unknown-freebsd' to be used, instead of '-target powerpc-unknown-linux-gnu -mspe'. Reviewed By: dim Differential Revision: https://reviews.llvm.org/D72014
* Add support for openSUSE RISC-V tripleSam Elliott2019-08-011-0/+6
| | | | | | | | | | | | | | | | Reviewers: asb Reviewed By: asb Subscribers: lenary, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, zzheng, edward-jones, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, lebedev.ri, kito-cheng, shiva0217, rogfer01, dexonsmith, rkruppe, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D63497 Patch by Andreas Schwab (schwab) llvm-svn: 367565
* Standardize on MSVC behavior for triples with no environmentReid Kleckner2019-07-081-0/+2
| | | | | | | | | | | | | | | | | | | | | Summary: This makes it so that IR files using triples without an environment work out of the box, without normalizing them. Typically, the MSVC behavior is more desirable. For example, it tends to enable things like constant merging, use of associative comdats, etc. Addresses PR42491 Reviewers: compnerd Subscribers: hiraditya, dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64109 llvm-svn: 365387
* [Triple] Add isRISCV functionAlex Bradbury2019-07-081-0/+2
| | | | | | | | | | | | This matches isARM, isThumb, isAArch64 and similar helpers. Future commits which clean-up code that currently checks for Triple::riscv32 || Triple::riscv64. Differential Revision: https://reviews.llvm.org/D54215 Patch by Simon Cook. Test case added by Alex Bradbury. llvm-svn: 365327
* [triple] Use 'macabi' environment name for the Mac Catalyst triplesAlex Lorenz2019-07-031-2/+2
| | | | | | The 'macabi' environment name is preferred instead of 'maccatalyst'. llvm-svn: 364988
* [triple] add 'macCatalyst' environment typeAlex Lorenz2019-07-021-0/+11
| | | | | | | | Mac Catalyst is a new deployment platform in macOS Catalina. Differential Revision: https://reviews.llvm.org/D64097 llvm-svn: 364971
* arm64_32: add some unittests that were in the wrong commit.Tim Northover2019-05-151-0/+11
| | | | | | | Accidentally dropped them when committing the arm64_32 binutils support. There's no change to real code. llvm-svn: 360763
* [WebAssembly] Test the "wasm32-wasi" tripleDan Gohman2019-04-301-8/+18
| | | | | | | | | | | | Add triple tests for "wasm32-wasi" and "wasm64-wasi", and also remove the "-musl" component from the existing wasm triple tests as we're not using that in practice (WASI libc is derived in part from musl, but it is not fully musl-compatible). Differential Revision: https://reviews.llvm.org/D61334 Reviewer: sbc100 llvm-svn: 359629
* Add XCOFF triple object format type for AIXJason Liu2019-03-121-0/+8
| | | | | | | | | This patch adds an XCOFF triple object format type into LLVM. This XCOFF triple object file type will be used later by object file and assembly generation for the AIX platform. Differential Revision: https://reviews.llvm.org/D58930 llvm-svn: 355989
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [WebAssembly] COWS has been renamed to WASI.Dan Gohman2019-01-161-8/+8
| | | | llvm-svn: 351297
* [WebAssembly] Support multilibs for wasm32 and add a wasm OS that uses itDan Gohman2019-01-151-0/+18
| | | | | | | | | | | | This adds support for multilib paths for wasm32 targets, following [Debian's Multiarch conventions], and also adds an experimental OS name in order to test it. [Debian's Multiarch conventions]: https://wiki.debian.org/Multiarch/ Differential Revision: https://reviews.llvm.org/D56553 llvm-svn: 351163
* Add Hurd target to LLVMSupport (1/2)Kristina Brooks2018-11-291-0/+6
| | | | | | | | | | | Add the required target triples to LLVMSupport to support Hurd in LLVM (formally `pc-hurd-gnu`). Patch by sthibaul (Samuel Thibault) Differential Revision: https://reviews.llvm.org/D54378 llvm-svn: 347832
* [mips] Add support MIPS r6 Debian triplesSimon Atanasyan2018-09-271-0/+104
| | | | | | | | | | | | | | | | | | | Debian uses different triples for MIPS r6 and paths. Here we use SubArch to determine whether it is r6, if we found `r6' in CPU section of triple. These new triples include: mipsisa32r6-linux-gnu mipsisa32r6el-linux-gnu mipsisa64r6-linux-gnuabi64 mipsisa64r6el-linux-gnuabi64 mipsisa64r6-linux-gnuabin32 mipsisa64r6el-linux-gnuabin32 Patch by YunQiang Su. Differential revision: https://reviews.llvm.org/D50857 llvm-svn: 343185
* [mips] Fix MIPS N32 ABI triples supportSimon Atanasyan2018-09-171-0/+53
| | | | | | | | | | | | Add support mips64(el)-linux-gnuabin32 triples, and set them to N32. Debian architecture name mipsn32/mipsn32el are also added. Set UseIntegratedAssembler for N32 if we can detect it. Patch by YunQiang Su. Differential revision: https://reviews.llvm.org/D51408 llvm-svn: 342416
* This patch adds support to LLVM for writing HermitCore ↵Eric Christopher2018-08-251-0/+6
| | | | | | | | | | | (https://hermitcore.org) ELF binaries. HermitCore is a POSIX-compatible kernel for running a single application in an isolated environment to get maximum performance and predictable runtime behavior. It can either be used bare-metal on hardware or a VM (Unikernel) or side by side to an existing Linux system (Multikernel). Due to the latter feature, HermitCore binaries are marked with ELFOSABI_STANDALONE to let the Linux ELF loader distinguish them from regular Unix/Linux binaries and load them using the HermitCore "proxy" tool. Patch by Colin Finck! llvm-svn: 340675
* [ADT] Normalize empty triple componentsPetr Hosek2018-08-081-46/+79
| | | | | | | | | | | | | | | | | LLVM triple normalization is handling "unknown" and empty components differently; for example given "x86_64-unknown-linux-gnu" and "x86_64-linux-gnu" which should be equivalent, triple normalization returns "x86_64-unknown-linux-gnu" and "x86_64--linux-gnu". autoconf's config.sub returns "x86_64-unknown-linux-gnu" for both "x86_64-linux-gnu" and "x86_64-unknown-linux-gnu". This changes the triple normalization to behave the same way, replacing empty triple components with "unknown". This addresses PR37129. Differential Revision: https://reviews.llvm.org/D50219 llvm-svn: 339294
* [OpenEmbedded] Add a unittest for aarch64-oe-linuxMandeep Singh Grang2018-07-191-0/+6
| | | | | | | | | | | | | | Summary: Added a unittest for aarch64-oe-linux which was missed in D48861. Reviewers: compnerd, rengolin, javed.absar Reviewed By: compnerd Subscribers: kristof.beyls, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D49314 llvm-svn: 337479
* [WebAssembly] Remove ELF file support.Sam Clegg2018-07-161-5/+0
| | | | | | | | | This support was partial and temporary. Now that we have wasm object file support its no longer needed. Differential Revision: https://reviews.llvm.org/D48744 llvm-svn: 337222
* [OpenEmbedded] Add OpenEmbedded vendorMandeep Singh Grang2018-07-051-0/+6
| | | | | | | | | | | | | | | | | | Summary: The lib paths are not correctly picked up for OpenEmbedded sysroots (like arm-oe-linux-gnueabi). I fix this in a follow-up clang patch. But in order to add the correct libs I need to detect if the vendor is oe. For this reason, it is first necessary to teach llvm to detect oe vendor, which is what this patch does. Reviewers: chandlerc, compnerd, rengolin, javed.absar Reviewed By: compnerd Subscribers: kristof.beyls, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D48861 llvm-svn: 336401
* [AMDGPU] Remove use of OpenCL triple environment and replace with function ↵Tony Tye2018-03-231-6/+0
| | | | | | | | | | | attribute for AMDGPU - Remove use of the opencl and amdopencl environment member of the target triple for the AMDGPU target. - Use function attribute to communicate to the AMDGPU backend to add implicit arguments for OpenCL kernels for the AMDHSA OS. Differential Revision: https://reviews.llvm.org/D43736 llvm-svn: 328349
* [AMDGPU] Remove unused AMDOpenCL triple environmentTony Tye2018-03-051-3/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D43895 llvm-svn: 326745
* [ADT] Recognize ppc as valid architecture in target triple.Jonas Devlieghere2018-02-271-0/+17
| | | | | | | | | | | | | | | | Until this patch, only `powerpc` and `ppc32` were recognized as valid PowerPC 32-bit architectures in a target triple. This was incompatible with the triple `ppc-apple-darwin` as returned for libObject. I found out about this when working on a test case using a binary generated on an old PowerBook G4. We had the choice of either fix this in the Mach-O object parser or in the Triple implementation. I chose the latter because it feels like the most canonical place. Differential revision: https://reviews.llvm.org/D43760 llvm-svn: 326182
* [WebAssembly] Restore "*-wasm" tests.Dan Gohman2018-02-151-0/+5
| | | | | | | Even though "...-wasm" is now the default for wasm, it's still desirable to test this form. llvm-svn: 325273
* [WebAssembly] Update ADT/TripleTest.cpp now that default file format has changedSam Clegg2018-02-121-2/+7
| | | | | | Differential Revision: https://reviews.llvm.org/D43212 llvm-svn: 324966
* Add a new Simulator entry for the target triple environment.Bob Wilson2017-10-231-0/+9
| | | | | | | | | | | | | | | | | | | | | | | Apple's iOS, tvOS and watchOS simulator platforms have never been clearly distinguished in the target triples. Even though they are intended to behave similarly to the corresponding device platforms, they have separate SDKs and are really separate platforms from the compiler's perspective. Clang now defines a macro when building for one of these simulator platforms (r297866) but that relies on the very indirect mechanism of checking to see which option was used to specify the minimum deployment target. That is not so great. Swift would also like to distinguish these simulator platforms in a similar way, but unlike Clang, Swift does not use a separate option to specify the minimum deployment target -- it uses a -target option to specify the target triple directly, including the OS version number. Using a different target triple for the simulator platforms is a much more direct and obvious way to specify this. Putting the "simulator" in the environment component of the triple means the OS values can stay the same and existing code the looks at the OS field will not be affected. https://reviews.llvm.org/D39143 rdar://problem/34729432 llvm-svn: 316380
* [Triple] Add AMDPAL operating system typeTim Renouf2017-09-291-0/+6
| | | | | | | | | | | | | | | | | | Summary: This operating system type represents the AMDGPU PAL runtime, and will be required by the AMDGPU backend in order to generate correct code for this runtime. Currently it generates the same code as not specifying an OS at all. That will change in future commits. Patch from Tim Corringham. Subscribers: arsenm, nhaehnle Differential Revision: https://reviews.llvm.org/D37380 llvm-svn: 314500
* [mips] Recognise the triple used by Debian for MIPS n32 ABISimon Atanasyan2017-09-141-0/+6
| | | | | | | Triples like mips64-linux-gnuabin32 are documented in this article: https://wiki.debian.org/Multiarch/Tuples llvm-svn: 313231
* [mips] Add unitests to check parsing MIPS triples. NFCSimon Atanasyan2017-09-131-0/+30
| | | | llvm-svn: 313160
* [Triple] Define OS Check for HaikuRenato Golin2017-08-181-0/+12
| | | | | | | | | | | | | This adds the OS check for the Haiku operating system, as it was missing in the Triple class. Tests for x86_64-unknown-haiku and i586-pc-haiku were also added. These patches only affect Haiku and are completely harmless for other platforms. Patch by Calvin Hill <calvin@hakobaito.co.uk> llvm-svn: 311153
* Add support for Ananas platformEd Schouten2017-06-251-0/+6
| | | | | | | | | | | | | | | | | Ananas is a home-brew operating system, mainly for amd64 machines. After using GCC for quite some time, it has switched to clang and never looked back - yet, having to manually patch things is annoying, so it'd be much nicer if this was in the official tree. More information: https://github.com/zhmu/ananas/ https://rink.nu/projects/ananas.html Submitted by: Rink Springer Differential Revision: https://reviews.llvm.org/D32937 llvm-svn: 306237
* Revert r305642Ismail Donmez2017-06-181-1/+1
| | | | llvm-svn: 305643
* Test to correct triple for SUSE on ARMv7Ismail Donmez2017-06-181-1/+1
| | | | llvm-svn: 305642
* Re-sort #include lines for unittests. This uses a slightly modifiedChandler Carruth2017-06-061-1/+1
| | | | | | | | | | | | | | | clang-format (https://reviews.llvm.org/D33932) to keep primary headers at the top and handle new utility headers like 'gmock' consistently with other utility headers. No other change was made. I did no manual edits, all of this is clang-format. This should allow other changes to have more clear and focused diffs, and is especially motivated by moving some headers into more focused libraries. llvm-svn: 304786
* ADT: handle special case of ARM environment for SUSESaleem Abdulrasool2017-06-031-0/+5
| | | | | | | SUSE treats "gnueabi" as "gnueabihf" so make sure that we normalise the environment. llvm-svn: 304670
* Add SUSE vendorIsmail Donmez2017-04-241-0/+6
| | | | | | | | | | | | | | Summary: SUSE's ARM triples end with -gnueabi even though they are hard-float. This requires special handling of SUSE ARM triples. Hence we need a way to differentiate the SUSE as vendor. This CL adds that. Reviewers: chandlerc, compnerd, echristo, rengolin Reviewed By: rengolin Subscribers: aemerson, rengolin, llvm-commits Differential Revision: https://reviews.llvm.org/D32426 llvm-svn: 301174
* Set default CPU for OpenBSD/arm to Cortex-A8Brad Smith2017-02-281-0/+4
| | | | llvm-svn: 296493
* TripleTest.FileFormat: check non-default valueAlex Denisov2017-02-041-0/+3
| | | | | | | Triple::objectFormat defaults to an Elf format. Changing objectFormat to Elf doesn't make any difference. llvm-svn: 294104
* TripleTest.BitWidthArchVariants: add missing arch types (thumb, arm, le, ...)Alex Denisov2017-02-041-0/+48
| | | | llvm-svn: 294096
* TripleTest.EndianArchVariants: add missing arch types (tce, le)Alex Denisov2017-02-041-0/+16
| | | | llvm-svn: 294095
* [WebAssembly] Add triple support for the new wasm object formatDan Gohman2017-01-171-0/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D26701 llvm-svn: 292252
* [RISCV] Recognise riscv32 and riscv64 in triple parsing codeAlex Bradbury2016-11-011-0/+36
| | | | | | | | | | | This is the first in a series of 10 initial patches that incrementally add an MC layer for RISC-V to LLVM. See <http://lists.llvm.org/pipermail/llvm-dev/2016-August/103748.html> for more discussion. Differential Revision: https://reviews.llvm.org/D23557 llvm-svn: 285707
* Define "contiki" OS specifier.David L Kreitzer2016-10-141-0/+6
| | | | | | | | Patch by Michael LeMay Differential revision: http://reviews.llvm.org/D24897 llvm-svn: 284240
* [Triple] Add triple for FuchsiaPetr Hosek2016-10-061-0/+6
| | | | | | | | Fuchsia is a new operating system. Differential Revision: https://reviews.llvm.org/D25116 llvm-svn: 283419
* Triple: Add opencl environment typeTom Stellard2016-09-231-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: For AMDGPU, we have been using the operating system component of the triple for specifying the low-level runtime that is being used. The rationale for this is that the host operating system (e.g. Linux) is irrelevant for GPU code, since its execution enviroment will be mostly controled by the low-level runtime being used to execute the code. In most cases, higher level languages have their own runtime which is implemented on top of the low-level runtime. The kernel ABIs of each language mostly depend on the low-level runtime, but there may be some slight differences between languages. OpenCL for example, may append additional arguments to the kernel in order to pass values like global offsets or buffers for printf. OpenMP, HCC, or other languages may want to add their own values which differ from OpenCL. The reason for adding a new opencl environment type is to make it possible for the backend to distinguish between the ABIs of the higher-level languages and handle them correctly. It seems cleaner to use the enviroment component for this rather than creating a new OS type for every combination of low-level runtime / high-level language. Reviewers: Anastasia, chandlerc Subscribers: whchung, pekka.jaaskelainen, wdng, yaxunl, llvm-commits Differential Revision: https://reviews.llvm.org/D24735 llvm-svn: 282218
* Remove the Triple tests that stressing the TargetParser's behaviour.Zijiao Ma2016-08-171-191/+0
| | | | | | | | Now the tests of TargetParser is in place: unittests/Support/TargetParserTest.cpp. So the tests in TripleTest.cpp which actually stressing TargetParser's behavior could be removed. llvm-svn: 278899
* [ADT] Make the triple test 1000x faster through more focused test cases.Chandler Carruth2016-08-061-53/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current approach isn't a long-term viable pattern. Given the set of architectures A, vendors V, operating systems O, and environments E, it does |A| * |V| * |O| * |E| * 4! tests. As LLVM grows, this test keeps getting slower, despite my working very hard to make it get some "optimizations" even in -O0 builds in order to lower the constant factors. Fundamentally, we're doing an unreasonable amount of work.i Looking at the specific thing being tested -- the goal seems very clearly to be testing the *permutations*, not the *combinations*. The combinations are driving up the complexity much more than anything else. Instead, test every possible value for a given triple entry in every permutation of *some* triple. This really seems to cover the core goal of the test. Every single possible triple component is tested in every position. But because we keep the rest of the triple constant, it does so in a dramatically more scalable amount of time. With this model we do (|A| + |V| + |O| + |E|) * 4! tests. For me on a debug build, this goes from running for 19 seconds to 19 milliseconds, or a 1000x improvement. This makes a world of difference for the critical path of 'ninja check-llvm' and other extremely common workflows. Thanks to Renato, Dean, and David for the helpful review comments and helping me refine the explanation of the change. Differential Revision: https://reviews.llvm.org/D23156 llvm-svn: 277912
* [Triple] Reimplement isLittleEndian(). Now it works for arm too.Davide Italiano2016-06-291-0/+8
| | | | | | Differential Revision: http://reviews.llvm.org/D21846 llvm-svn: 274154
* Add support for musl-libc on ARM Linux.Rafael Espindola2016-06-241-0/+6
| | | | | | Patch by Lei Zhang! llvm-svn: 273726
OpenPOWER on IntegriCloud