summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix "not all control paths return a value" warning on MSVCSimon Pilgrim2016-07-071-0/+2
| | | | llvm-svn: 274746
* [CUDA] Fix "control reaches end of non-void function" warnings in Cuda.cpp.Justin Lebar2016-07-071-0/+6
| | | | | | | | | | Some compilers are too dumb to realize that the switch statement covers all cases. (Don't use a "default" label, because we explicitly want to get a warning if our switch doesn't cover all the cases.) llvm-svn: 274713
* [CUDA] Add utility functions for dealing with CUDA versions / architectures.Justin Lebar2016-07-063-49/+185
| | | | | | | | | | | | | | | | | | Summary: Currently our handling of CUDA architectures is scattered all around clang. This patch centralizes it. A key advantage of this centralization is that you can now write a C++ switch on e.g. CudaArch and get a compile error if you don't handle one of the enum values. Reviewers: tra Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D21867 llvm-svn: 274681
* [CUDA] Add support for CUDA 8 and sm_60-62.Justin Lebar2016-07-061-29/+39
| | | | | | | | | | | | Summary: Also add sm_32, which was missing. Reviewers: tra Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D21778 llvm-svn: 274680
* [OpenMP] Sema and parsing for 'distribute simd' pragmaKelvin Li2016-07-061-4/+18
| | | | | | | | Summary: This patch is an implementation of sema and parsing for the OpenMP composite pragma 'distribute simd'. Differential Revision: http://reviews.llvm.org/D22007 llvm-svn: 274604
* [OpenMP] remove outdated comment (NFC)Kelvin Li2016-07-051-1/+0
| | | | llvm-svn: 274577
* [OpenMP] Sema and parse for 'distribute parallel for simd'Kelvin Li2016-07-051-8/+26
| | | | | | | | Summary: This patch is an implementation of sema and parsing for the OpenMP composite pragma 'distribute parallel for simd'. Differential Revision: http://reviews.llvm.org/D21977 llvm-svn: 274530
* [OpenCL] Make OpenCL Builtins added according to the right version.Anastasia Stulova2016-07-041-1/+2
| | | | | | | | | | Currently we only have OpenCL 2.0 Builtins i.e. pipes or address space conversions. They have to be added only in the version 2.0 compilation mode to make the identifiers available for use in the other versions. Review: http://reviews.llvm.org/D20249 llvm-svn: 274509
* [Sparc] Allow LEON cpu models to be selected with -mcpuJacob Baungard Hansen2016-07-041-1/+25
| | | | | | | | | | | | Summary: This change exposes the recently added LEON CPUs (D19359) in the LLVM Sparc backend to Clang, allowing the cpu's to be selected using the -mcpu flag. Reviewers: jyknight, lero_chris Subscribers: jyknight, cfe-commits Differential Revision: http://reviews.llvm.org/D21683 llvm-svn: 274487
* Add TargetInfo for 32-bit and 64-bit RenderScriptPirama Arumuga Nainar2016-07-021-0/+41
| | | | | | | | | | | | | | | | | | | Summary: The TargetInfo for 'renderscript32' and 'renderscript64' ArchTypes are subclasses of ARMleTargetInfo and AArch64leTargetInfo respectively. RenderScript32TargetInfo modifies the ARM ABI to set LongWidth and LongAlign to be 64-bits. Other than this modification, the underlying TargetInfo base classes is initialized as if they have "armv7" and "aarch64" architecture type respectively. Reviewers: rsmith, echristo Subscribers: aemerson, tberghammer, cfe-commits, danalbert, mehdi_amini, srhines Differential Revision: http://reviews.llvm.org/D21334 llvm-svn: 274409
* AMDGPU: Set amdgpu_kernel calling convention for OpenCL kernels.Nikolay Haustov2016-06-301-2/+12
| | | | | | | | | | | | | | | | | | Summary: Summary: Change Clang calling convention SpirKernel to OpenCLKernel. Set calling convention OpenCLKernel for amdgcn as well. Add virtual method .getOpenCLKernelCallingConv() to TargetCodeGenInfo and use it to set target calling convention for AMDGPU and SPIR. Update tests. Reviewers: rsmith, tstellarAMD, Anastasia, yaxunl Subscribers: kzhuravl, cfe-commits Differential Revision: http://reviews.llvm.org/D21367 llvm-svn: 274220
* [Driver][AArch64] Add support for Broadcom Vulcan core.Pankaj Gode2016-06-291-0/+1
| | | | | | | | Adding support for new Broadcom Vulcan core (ARMv8.1A). Differential Revision: http://reviews.llvm.org/D21501 llvm-svn: 274114
* AvailabilityAttr: we accept "macos" as the platform name.Manman Ren2016-06-281-1/+1
| | | | | | | | | | | | | | We continue accepting "macosx" but canonicalize it to "macos", When emitting diagnostics, we use "macOS" instead of "OS X". The PlatformName in TargetInfo is changed from "macosx" to "macos" so we can directly compare the Platform in AvailabilityAttr with the PlatformName in TargetInfo. rdar://26795172 rdar://26800775 llvm-svn: 274064
* [SPARC] Allows inlining of atomics for Sparc32 with appropriate store barrier.Chris Dewhurst2016-06-281-0/+1
| | | | | | The final change is required to extend the back-end's AtomicExpandPass that was implemented for Sparc (64 bit) and later extended for Sparc (32 bit). llvm-svn: 274012
* Revert r273950, (empty). Please recommit it with readable commit message.NAKAMURA Takumi2016-06-281-2/+0
| | | | llvm-svn: 273994
* [clang-cl] Define _MSVC_LANGDavid Majnemer2016-06-281-0/+7
| | | | | | | | | | | Recently, Microsoft added support for a flag, /std, which controls which version of the language rules MSVC should use. MSVC hasn't updated __cplusplus though. Instead, they added a new macro, _MSVC_LANG, which is defined in a similar fashion to __cplusplus. This is used to indicate which mode the compiler is in. llvm-svn: 273987
* (no commit message)Chris Dewhurst2016-06-271-0/+2
| | | | llvm-svn: 273950
* Resubmission of http://reviews.llvm.org/D21564 after fixes.Carlo Bertolli2016-06-271-5/+22
| | | | | | | | | | | | | [OpenMP] Initial implementation of parse and sema for composite pragma 'distribute parallel for' This patch is an initial implementation for #distribute parallel for. The main differences that affect other pragmas are: The implementation of 'distribute parallel for' requires blocking of the associated loop, where blocks are "distributed" to different teams and iterations within each block are scheduled to parallel threads within each team. To implement blocking, sema creates two additional worksharing directive fields that are used to pass the team assigned block lower and upper bounds through the outlined function resulting from 'parallel'. In this way, scheduling for 'for' to threads can use those bounds. As a consequence of blocking, the stride of 'distribute' is not 1 but it is equal to the blocking size. This is returned by the runtime and sema prepares a DistIncrExpr variable to hold that value. As a consequence of blocking, the global upper bound (EnsureUpperBound) expression of the 'for' is not the original loop upper bound (e.g. in for(i = 0 ; i < N; i++) this is 'N') but it is the team-assigned block upper bound. Sema creates a new expression holding the calculation of the actual upper bound for 'for' as UB = min(UB, PrevUB), where UB is the loop upper bound, and PrevUB is the team-assigned block upper bound. llvm-svn: 273884
* Add support for musl-libc on ARM Linux.Rafael Espindola2016-06-241-0/+2
| | | | | | Patch by Lei Zhang! llvm-svn: 273735
* [CMake] Remove CLANG_APPEND_VC_REV optionChris Bieneman2016-06-241-0/+7
| | | | | | | | | | | | I added this option in r257827 to try and add compatibility with autoconf. At the time I misunderstood the problem. Our CMake automatically generates the SVN revision information and generates a build action to update it so builds don't need to be re-configured on SCM update (which is a better solution than we had in autoconf). The problem I was actually seeing was isolated cases where SVN revision information isn't available because the repository structures have been removed. This happens in some automated testing systems. This patch allows SVN_REVISION to be overridden if the build configuration could not find the SCM repository structures, and removes the code from my original patch because it is unnecessary. llvm-svn: 273714
* Revert r273705Carlo Bertolli2016-06-241-22/+5
| | | | | | [OpenMP] Initial implementation of parse and sema for composite pragma 'distribute parallel for' llvm-svn: 273709
* [OpenMP] Initial implementation of parse and sema for composite pragma ↵Carlo Bertolli2016-06-241-5/+22
| | | | | | | | | | | | | | | 'distribute parallel for' http://reviews.llvm.org/D21564 This patch is an initial implementation for #distribute parallel for. The main differences that affect other pragmas are: The implementation of 'distribute parallel for' requires blocking of the associated loop, where blocks are "distributed" to different teams and iterations within each block are scheduled to parallel threads within each team. To implement blocking, sema creates two additional worksharing directive fields that are used to pass the team assigned block lower and upper bounds through the outlined function resulting from 'parallel'. In this way, scheduling for 'for' to threads can use those bounds. As a consequence of blocking, the stride of 'distribute' is not 1 but it is equal to the blocking size. This is returned by the runtime and sema prepares a DistIncrExpr variable to hold that value. As a consequence of blocking, the global upper bound (EnsureUpperBound) expression of the 'for' is not the original loop upper bound (e.g. in for(i = 0 ; i < N; i++) this is 'N') but it is the team-assigned block upper bound. Sema creates a new expression holding the calculation of the actual upper bound for 'for' as UB = min(UB, PrevUB), where UB is the loop upper bound, and PrevUB is the team-assigned block upper bound. llvm-svn: 273705
* [AArch64] Change the preferred alignment for char and short to word alignmentEvandro Menezes2016-06-211-2/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D21414 llvm-svn: 273280
* NVPTX: Add supported CL featuresJan Vesely2016-06-171-0/+13
| | | | | | | | | | Fixes libclc compilation broken by r269670 Reviewers: jholewinsky Differential Revision: http://reviews.llvm.org/D20389 llvm-svn: 273031
* AMDGPU: Fix supported CL featuresJan Vesely2016-06-171-23/+22
| | | | | | | | Reviewers: arsenm Differential Revision: http://reviews.llvm.org/D20388 llvm-svn: 272986
* [Sparc] setjmp and longjmp intrinsic support update to add unit tests and ↵Chris Dewhurst2016-06-151-1/+0
| | | | | | | | remove accidentally checked-in code. Related to revision r272782 llvm-svn: 272798
* [Sparc] Change to let clang know that setjmp and longjmp intrinsics are ↵Chris Dewhurst2016-06-151-0/+5
| | | | | | | | implemented in the back-end. Differential Revision: http://reviews.llvm.org/D19798 llvm-svn: 272782
* [mips] Defer validity check for CPU/ABI pairs and improve error message for ↵Daniel Sanders2016-06-141-34/+79
| | | | | | | | | | | | | | | | | | | | | invalid cases. Summary: The validity of ABI/CPU pairs is no longer checked on the fly but is instead checked after initialization. As a result, invalid CPU/ABI pairs can be reported as being known but invalid instead of being unknown. For example, we now emit: error: ABI 'n32' is not supported on CPU 'mips32r2' instead of: error: unknown target ABI 'n64' Reviewers: atanasyan Subscribers: sdardis, cfe-commits Differential Revision: http://reviews.llvm.org/D21023 llvm-svn: 272645
* Use the name of the file on disk to issue a new diagnostic about ↵Taewook Oh2016-06-132-4/+15
| | | | | | | | | | | non-portable #include and #import paths. Differential Revision: http://reviews.llvm.org/D19843 Corresponding LLVM change: http://reviews.llvm.org/D19842 Re-commit of r272562 after addressing clang-x86-win2008-selfhost failure. llvm-svn: 272584
* Revert r272562 for build bot failure (clang-x86-win2008-selfhost)Taewook Oh2016-06-132-15/+4
| | | | llvm-svn: 272572
* Use the name of the file on disk to issue a new diagnostic about ↵Taewook Oh2016-06-132-4/+15
| | | | | | | | | | | | | non-portable #include and #import paths. Differential Revision: http://reviews.llvm.org/D19843 Corresponding LLVM change: http://reviews.llvm.org/D19842 Re-commit after addressing issues with of generating too many warnings for Windows and asan test failures. Patch by Eric Niebler llvm-svn: 272562
* Add some std::move where the value is only read otherwise.Benjamin Kramer2016-06-121-3/+4
| | | | | | This mostly affects smart pointers. No functionality change intended. llvm-svn: 272520
* AMDGPU: Verify subtarget specific builtinsMatt Arsenault2016-06-081-49/+87
| | | | | | Cleanup setup of subtarget features. llvm-svn: 272091
* [mips] The P5600 does not support N32/N64 since it's a 32-bit CPU.Daniel Sanders2016-06-061-1/+1
| | | | | | | | | | | | Summary: Reviewers: atanasyan Subscribers: cfe-commits, sdardis Differential Revision: http://reviews.llvm.org/D20963 llvm-svn: 271877
* [mips] Replace almost all Arch checks in MipsTargetInfo with ABI checks. NFC.Daniel Sanders2016-06-061-51/+65
| | | | | | | | | | | | | | Summary: setABI() is still tied to the Arch component of the Triple to preserve existing behaviour. Reviewers: atanasyan Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20961 llvm-svn: 271875
* Revert commit r271708Taewook Oh2016-06-042-15/+4
| | | | llvm-svn: 271761
* Use the name of the file on disk to issue a new diagnostic about ↵Taewook Oh2016-06-032-4/+15
| | | | | | | | | | | non-portable #include and #import paths. Differential Revision: http://reviews.llvm.org/D19843 Corresponding LLVM change: http://reviews.llvm.org/D19842 Patch by Eric Niebler llvm-svn: 271708
* [mips] Slightly simplify MipsTargetInfo::setDataLayout(). NFC.Daniel Sanders2016-06-031-19/+15
| | | | | | | | | | | | Summary: Reviewers: atanasyan Subscribers: atanasyan, cfe-commits Differential Revision: http://reviews.llvm.org/D20680 llvm-svn: 271647
* This adds target support and tests for Cortex-A73Sjoerd Meijer2016-06-021-0/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D20864 llvm-svn: 271507
* AMDGPU: Update datalayout stringMatt Arsenault2016-05-311-1/+1
| | | | llvm-svn: 271297
* [mips] Kill 'support' for untested EABI.Daniel Sanders2016-05-271-6/+4
| | | | | | | | | | | | | | | | | Summary: There are no llvm backend tests* for EABI and no EABI buildbots. There were only three clang tests, all of which checked that -mabi=eabi was passed to the assembler. *There is a single backend test that specifies EABI but it actually tests MIPS16. Reviewers: atanasyan Subscribers: emaste, sdardis, atanasyan, cfe-commits Differential Revision: http://reviews.llvm.org/D20679 llvm-svn: 270998
* Apply clang-tidy's misc-move-constructor-init throughout Clang.Benjamin Kramer2016-05-271-3/+4
| | | | | | No functionality change intended, maybe a tiny performance improvement. llvm-svn: 270996
* [mips] Fold MipsTargetInfoBase subclasses into MipsTargetInfoBase and rename ↵Daniel Sanders2016-05-271-317/+209
| | | | | | | | | | | | | | | | | to MipsTargetInfo. NFC Summary: This unifies mips/mipsel and mips64/mips64el into a single class so that we can later support O32 on mips64/mips64el and N32/N64 on mips/mipsel (when an appropriate CPU selected). Reviewers: atanasyan Subscribers: atanasyan, jfb, cfe-commits, dschuff Differential Revision: http://reviews.llvm.org/D20678 llvm-svn: 270984
* [OpenMP] Parsing and sema support for the from clauseSamuel Antao2016-05-261-0/+2
| | | | | | | | | | | | | | | Summary: The patch contains the parsing and sema support for the `from` clause. Patch based on the original post by Kelvin Li. Reviewers: hfinkel, carlo.bertolli, kkwli0, arpith-jacob, ABataev Subscribers: caomhin, cfe-commits Differential Revision: http://reviews.llvm.org/D18488 llvm-svn: 270882
* [OpenMP] Parsing and sema support for the to clauseSamuel Antao2016-05-261-0/+2
| | | | | | | | | | | | | | | Summary: The patch contains the parsing and sema support for the `to` clause. Patch based on the original post by Kelvin Li. Reviewers: carlo.bertolli, hfinkel, kkwli0, arpith-jacob, ABataev Subscribers: caomhin, cfe-commits Differential Revision: http://reviews.llvm.org/D18597 llvm-svn: 270880
* [OpenMP] Parsing and sema support for target update directiveSamuel Antao2016-05-261-1/+11
| | | | | | | | | | | | | | | Summary: This patch is to add parsing and sema support for `target update` directive. Support for the `to` and `from` clauses will be added by a different patch. This patch also adds support for other clauses that are already implemented upstream and apply to `target update`, e.g. `device` and `if`. This patch is based on the original post by Kelvin Li. Reviewers: hfinkel, carlo.bertolli, kkwli0, arpith-jacob, ABataev Subscribers: caomhin, cfe-commits Differential Revision: http://reviews.llvm.org/D15944 llvm-svn: 270878
* Revert "[AArch64] Using new TargetParser in Clang"Renato Golin2016-05-251-4/+8
| | | | | | | | This reverts commit r270688 and r270689. The issue is not a random order, but a different order for some targets and others (prob. Linux vs Darwin). Reverting until we have a better fix. llvm-svn: 270691
* [AArch64] Using new TargetParser in ClangRenato Golin2016-05-251-8/+4
| | | | | | | | | | Using AArch64TargetParser in clang to avoid repetitive string parsing. Use TargetParser to do ARCH/CPU/ArchExt parsing instead of local implementation. Patch by Jojo Ma. llvm-svn: 270688
* [Sparc] Add software float option -msoft-floatJacob Baungard Hansen2016-05-241-3/+1
| | | | | | | | | | | | | | | Summary: Following patch D19265 which enable software floating point support in the Sparc backend, this patch enables the option to be enabled in the front-end using the -msoft-float option. The user should ensure a library (such as the builtins from Compiler-RT) that includes the software floating point routines is provided. Reviewers: jyknight, lero_chris Subscribers: jyknight, cfe-commits Differential Revision: http://reviews.llvm.org/D20419 llvm-svn: 270538
* Make __FreeBSD_cc_version predefined macro configurable at build timeDimitry Andric2016-05-201-2/+9
| | | | | | | | | | | | | | | | | | The `FreeBSDTargetInfo` class has always set the `__FreeBSD_cc_version` predefined macro to a rather static value, calculated from the major OS version. In the FreeBSD base system, we will start incrementing the value of this macro whenever we make any signifant change to clang, so we need a way to configure the macro's value at build time. Use `FREEBSD_CC_VERSION` for this, which we can define in the FreeBSD build system using either the `-D` command line option, or an include file. Stock builds will keep the earlier value. Differential Revision: http://reviews.llvm.org/D20037 llvm-svn: 270240
OpenPOWER on IntegriCloud