summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/Targets.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix Neon detection for Cortex-A class, plus adds some more CPUs to default ↵Renato Golin2013-09-131-5/+8
| | | | | | features llvm-svn: 190702
* Certain multi-platform languages, such as OpenCL, have the concept ofDavid Tweed2013-09-131-0/+4
| | | | | | | | | | | | | | address spaces which is both (1) a "semantic" concept and (2) possibly a hardware level restriction. It is desirable to be able to discard/merge the LLVM-level address spaces on arguments for which there is no difference to the current backend while keeping track of the semantic address spaces in a funciton prototype. To do this enable addition of the address space into the name-mangling process. Add some tests to document this behaviour against inadvertent changes. Patch by Michele Scandale! llvm-svn: 190684
* Fix a bug where -msse followed by -mno-sse would leave MMX enabled.Craig Topper2013-09-111-2/+4
| | | | llvm-svn: 190496
* Delete unused static class membersAlexey Samsonov2013-09-101-2/+0
| | | | llvm-svn: 190394
* Separate popcnt and sse4.2 feature control somewhat to match gcc behavior.Craig Topper2013-09-101-2/+11
| | | | | | | Enabling sse4.2 will implicitly enable popcnt unless popcnt is explicitly disabled. Disabling sse4.2 will not disable popcnt if popcnt is explicitly enabled. llvm-svn: 190387
* Fix the profile of the function (fix commit 190048)Sylvestre Ledru2013-09-051-2/+1
| | | | llvm-svn: 190051
* Fix bug #17104 - Target info for GNU/kFreeBSD were missing.Sylvestre Ledru2013-09-051-0/+28
| | | | | | | | | As a result, Clang doesn't define the pre-processor macros that are expected on this platform. Thanks to Robert Millan for the patch llvm-svn: 190048
* Add support for -march=slm, aka Intel Atom Silvermont.Benjamin Kramer2013-08-301-0/+7
| | | | llvm-svn: 189670
* Add ms_abi and sysv_abi attribute handling.Charles Davis2013-08-301-1/+8
| | | | | | Based on a patch by Benno Rice! llvm-svn: 189644
* Delete CC_Default and use the target default CC everywhereReid Kleckner2013-08-271-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Makes functions with implicit calling convention compatible with function types with a matching explicit calling convention. This fixes things like calls to qsort(), which has an explicit __cdecl attribute on the comparator in Windows headers. Clang will now infer the calling convention from the declarator. There are two cases when the CC must be adjusted during redeclaration: 1. When defining a non-inline static method. 2. When redeclaring a function with an implicit or mismatched convention. Fixes PR13457, and allows clang to compile CommandLine.cpp for the Microsoft C++ ABI. Excellent test cases provided by Alexander Zinenko! Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D1231 llvm-svn: 189412
* R600: Add local address pointer size to DataLayoutTom Stellard2013-08-271-0/+1
| | | | llvm-svn: 189302
* Update now that llvm uses the same feature names as the driver.Rafael Espindola2013-08-231-18/+14
| | | | llvm-svn: 189142
* Move -mfpmath handling to -cc1 and implement it for x86.Rafael Espindola2013-08-211-9/+87
| | | | | | | | | | | | | | | | | | | | | | | The original idea was to implement it all on the driver, but to do that the driver needs to know the sse level and to do that it has to know the default features of a cpu. Benjamin Kramer pointed out that if one day we decide to implement support for ' __attribute__ ((__target__ ("arch=core2")))', then the frontend needs to keep its knowledge of default features of a cpu. To avoid duplicating which part of clang handles default cpu features, it is probably better to handle -mfpmath in the frontend. For ARM this patch is just a small improvement. Instead of a cpu list, we check if neon is enabled, which allows us to reject things like -mcpu=cortex-a9 -mfpu=vfp -mfpmath=neon For X86, since LLVM doesn't support an independent ssefp feature, we just make sure the selected -mfpmath matches the sse level. llvm-svn: 188939
* Remove dead code.Rafael Espindola2013-08-211-10/+0
| | | | | | | setFeatureEnabled is never called with "32" or "64". The driver never passes it and mips' getDefaultFeatures sets the Features map directly. llvm-svn: 188913
* Move the logic for selecting the last feature in the command line to the driver.Rafael Espindola2013-08-211-16/+0
| | | | | | | This is a partial revert of r188817 now that the driver handles -target-feature in a single place. llvm-svn: 188910
* Don't disable SSE4A when disabling AVX.Rafael Espindola2013-08-211-1/+1
| | | | | | Thanks for Craig Topper for noticing it. llvm-svn: 188902
* Add avx512cd, avx512er, avx512pf feature flags and enable them on KNL CPU.Craig Topper2013-08-211-6/+40
| | | | llvm-svn: 188867
* Replace avx-512 with avx512f to match llvm side and what gcc patches appear ↵Craig Topper2013-08-211-10/+10
| | | | | | to be using. llvm-svn: 188860
* Centralize the logic for handling -m* options and fix pr16943.Rafael Espindola2013-08-201-24/+20
| | | | | | | | | This moves the logic for handling -mfoo -mno-foo from the driver to -cc1. It also changes -cc1 to apply the options in order, fixing pr16943. The handling of -mno-mmx -msse is now an explicit special case. llvm-svn: 188817
* Remove duplicated error checking.Rafael Espindola2013-08-201-111/+11
| | | | | | | The driver validates its options, so we don't need to redo the work in "clang -cc1". llvm-svn: 188806
* Remove dead code.Rafael Espindola2013-08-201-17/+0
| | | | llvm-svn: 188802
* Refactor the x86 feature handling.Rafael Espindola2013-08-201-185/+193
| | | | | | | This removes the very long chains of Feature["avx"] = Feature["sse42"] = ... = true; llvm-svn: 188799
* Change 'avx512' to 'avx-512' to match llvm backend.Craig Topper2013-08-201-16/+16
| | | | llvm-svn: 188762
* Add AVX-512 feature flag and knl cpu to clang.Craig Topper2013-08-201-14/+49
| | | | llvm-svn: 188758
* Revert r188756 because some other changes snuck in with it.Craig Topper2013-08-201-49/+14
| | | | llvm-svn: 188757
* Add AVX-512 feature flag and knl cpu to clang.Craig Topper2013-08-201-14/+49
| | | | llvm-svn: 188756
* Bump the value of the __APPLE_CC__ predefined macro up to 6000.Bob Wilson2013-08-191-1/+1
| | | | | | | | | The previous value was set to match some ancient version of Apple's GCC. The value should be higher than anything used by Apple's GCC, but we don't intend for this value to be updated in the future. We have other macros to identify compiler versions. <rdar://problem/14749599> llvm-svn: 188700
* Add XCore targetRobert Lytton2013-08-131-0/+61
| | | | llvm-svn: 188258
* [Mips] MSA frontend option supportJack Carter2013-08-121-2/+10
| | | | | | | | | | | This patch adds -mmsa and -mno-msa to the options supported by clang to enable and disable support for MSA. When MSA is enabled, a predefined macro '__mips_msa' is defined to 1. Patch by Daniel Sanders llvm-svn: 188184
* AArch64: initial NEON supportTim Northover2013-08-011-3/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch by Ana Pazos - Completed implementation of instruction formats: AdvSIMD three same AdvSIMD modified immediate AdvSIMD scalar pairwise - Completed implementation of instruction classes (some of the instructions in these classes belong to yet unfinished instruction formats): Vector Arithmetic Vector Immediate Vector Pairwise Arithmetic - Initial implementation of instruction formats: AdvSIMD scalar two-reg misc AdvSIMD scalar three same - Intial implementation of instruction class: Scalar Arithmetic - Initial clang changes to support arm v8 intrinsics. Note: no clang changes for scalar intrinsics function name mangling yet. - Comprehensive test cases for added instructions To verify auto codegen, encoding, decoding, diagnosis, intrinsics. llvm-svn: 187568
* [PowerPC] Support powerpc64le as a syntax-checking target.Bill Schmidt2013-07-261-4/+25
| | | | | | | | | | | | | | | | | | | This patch provides basic support for powerpc64le as an LLVM target. However, use of this target will not actually generate little-endian code. Instead, use of the target will cause the correct little-endian built-in defines to be generated, so that code that tests for __LITTLE_ENDIAN__, for example, will be correctly parsed for syntax-only testing. Code generation will otherwise be the same as powerpc64 (big-endian), for now. The patch leaves open the possibility of creating a little-endian PowerPC64 back end, but there is no immediate intent to create such a thing. The new test case variant ensures that correct built-in defines for little-endian code are generated. llvm-svn: 187180
* Remove the mblaze backend from clang.Rafael Espindola2013-07-251-134/+0
| | | | | | Approval in here http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-July/064169.html llvm-svn: 187143
* [SystemZ] Add -march= command-line optionRichard Sandiford2013-07-191-0/+11
| | | | llvm-svn: 186694
* [PowerPC] FreeBSD does not require f128 in its data layout string.Bill Schmidt2013-07-031-1/+1
| | | | | | Long double is 64 bits on FreeBSD PPC, so the f128 entry is superfluous. llvm-svn: 185582
* Dont define __LONG_DOUBLE_128__ unless LongDoubleWidth is really 128bits width.Roman Divacky2013-07-031-1/+2
| | | | | | It's not the case on ie. FreeBSD. llvm-svn: 185572
* Fix MSP430 builtin types.Anton Korobeynikov2013-07-011-3/+3
| | | | | | Patch by Job Noorman! llvm-svn: 185362
* Driver: Push triple objects around instead of going to std::string all the time.Benjamin Kramer2013-06-291-306/+275
| | | | | | No functionality change. llvm-svn: 185261
* Add support for passing v8fp options via -mfpu.Joey Gouly2013-06-271-1/+1
| | | | llvm-svn: 185075
* Add support for passing '-target armv8' through the Driver.Joey Gouly2013-06-261-0/+1
| | | | llvm-svn: 184970
* Fix a couple of PPC predefined macros that I spotted while driving byChandler Carruth2013-06-251-2/+2
| | | | | | | | this code. These aren't technically standard predefines for the platform but apparantly lots of folks use them as they show up within LLVM's own codebase. ;] This may even fix some self host issues w/ the JIT!!! llvm-svn: 184830
* [NVPTX] Add NVPTX register constraintsJustin Holewinski2013-06-211-3/+12
| | | | llvm-svn: 184578
* size_t on Darwin AAPCS targets is "unsigned long". <rdar://problem/14136459>Bob Wilson2013-06-181-0/+3
| | | | | | | | Some embedded targets use ARM's AAPCS with iOS header files that define size_t as unsigned long, which conflicts with the usual AAPCS definition of size_t as unsigned int. llvm-svn: 184171
* Use atomic instructions on Bitrig armv6. Patch by Patrick Wildt.Rafael Espindola2013-06-171-1/+3
| | | | llvm-svn: 184113
* Emit native implementations of atomic operations on FreeBSD/armv6.Ed Schouten2013-06-151-2/+2
| | | | | | | | | | | | Just like on Linux, FreeBSD/armv6 assumes the system supports ldrex/strex unconditionally. It is also used by the kernel. We can therefore enable support for it, like we do on Linux. While there, change one of the unit tests to explicitly test against armv5 instead of armv7, as it actually tests whether libcalls are emitted. llvm-svn: 184040
* Do not report -Wasm-operand-widths for ARM output operands. <rdar://14050337>Bob Wilson2013-06-031-2/+1
| | | | | | | | | We're getting reports of this warning getting triggered in cases where it is not adding any value. There is no asm operand modifier that you can use to silence it, and there's really nothing wrong with having an LDRB, for example, with a "char" output. llvm-svn: 183172
* OpenBSD/sparc64 uses long long for int64_t and intmax_t.Jakob Stoklund Olesen2013-05-191-3/+10
| | | | | | Other operating systems, including FreeBSD and NetBSD, use long. llvm-svn: 182215
* fix PR 15726: ptrdiff_t should be int on PowerPC DarwinDavid Fang2013-05-161-0/+1
| | | | llvm-svn: 182029
* Use correct types for SPARC v9.Jakob Stoklund Olesen2013-05-151-0/+5
| | | | | | It's an LP64 platform. llvm-svn: 181867
* Use atomic instructions on linux thumb v7.Rafael Espindola2013-05-141-3/+17
| | | | | | | This matches gcc's behaviour. The patch also explicitly parses the version so that this keeps working when we add support for v8. llvm-svn: 181750
* Use atomic instructions on ARM linux.Rafael Espindola2013-05-131-1/+16
| | | | | | | | | This is safe given how the pre-v6 atomic ops funcions in libgcc are implemented. This fixes pr15429. llvm-svn: 181728
OpenPOWER on IntegriCloud