summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
Commit message (Collapse)AuthorAgeFilesLines
...
* test commitGuy Blank2016-08-181-1/+1
| | | | llvm-svn: 279042
* [OpenMP] Sema and parsing for 'teams distribute simd’ pragmaKelvin Li2016-08-171-5/+18
| | | | | | | | | | This patch is to implement sema and parsing for 'teams distribute simd’ pragma. This patch is originated by Carlo Bertolli. Differential Revision: https://reviews.llvm.org/D23528 llvm-svn: 279003
* [OpenCL] AMDGPU: add support of cl_khr_subgroupsYaxun Liu2016-08-171-0/+1
| | | | | | | | Patch by Aaron En Ye Shi. Differential Revision: https://reviews.llvm.org/D23573 llvm-svn: 278972
* Some missing usage of TargetParser. NFC.Zijiao Ma2016-08-171-2/+2
| | | | llvm-svn: 278890
* [OpenCL] AMDGPU: Add extensions cl_amd_media_ops and cl_amd_media_ops2Yaxun Liu2016-08-161-0/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D23322 llvm-svn: 278851
* Fix build broken after llvm/ADT/DenseMap.h replacement of climits with limits.Eugene Zelenko2016-08-131-1/+6
| | | | llvm-svn: 278586
* Reapply [VFS] Skip non existent files from the VFS treeBruno Cardoso Lopes2016-08-121-8/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reapply r278457 with test fixed to not abouse fs case sensitivity. When the VFS uses a YAML file, the real file path for a virtual file is described in the "external-contents" field. Example: ... { 'type': 'file', 'name': 'a.h', 'external-contents': '/a/b/c/a.h' } Currently, when parsing umbrella directories, we use vfs::recursive_directory_iterator to gather the header files to generate the equivalent modules for. If the external contents for a header does not exist, we currently are unable to build a module, since the VFS vfs::recursive_directory_iterator will fail when it finds an entry without a reliable real path. Since the YAML file could be prepared ahead of time and shared among different compiler invocations, an entry might not yet have a reliable path in 'external-contents', breaking the iteration. Give the VFS the capability to skip such entries whenever 'ignore-non-existent-contents' property is set in the YAML file. rdar://problem/27531549 llvm-svn: 278543
* Revert "[VFS] Skip non existent files from the VFS tree"Bruno Cardoso Lopes2016-08-121-26/+8
| | | | | | | | | Breaking bots: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/27281/ This reverts commit r278457. llvm-svn: 278459
* [VFS] Skip non existent files from the VFS treeBruno Cardoso Lopes2016-08-121-8/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the VFS uses a YAML file, the real file path for a virtual file is described in the "external-contents" field. Example: ... { 'type': 'file', 'name': 'a.h', 'external-contents': '/a/b/c/a.h' } Currently, when parsing umbrella directories, we use vfs::recursive_directory_iterator to gather the header files to generate the equivalent modules for. If the external contents for a header does not exist, we currently are unable to build a module, since the VFS vfs::recursive_directory_iterator will fail when it finds an entry without a reliable real path. Since the YAML file could be prepared ahead of time and shared among different compiler invocations, an entry might not yet have a reliable path in 'external-contents', breaking the iteration. Give the VFS the capability to skip such entries whenever 'ignore-non-existent-contents' property is set in the YAML file. rdar://problem/27531549 llvm-svn: 278457
* [VFS] Add 'ignore-non-existent-contents' field to YAML filesBruno Cardoso Lopes2016-08-121-2/+24
| | | | | | | | | | | | | | | | | | Add 'ignore-non-existent-contents' to tell the VFS whether an invalid path obtained via 'external-contents' should cause iteration on the VFS to stop. If 'true', the VFS should ignore the entry and continue with the next. Allows YAML files to be shared across multiple compiler invocations regardless of prior existent paths in 'external-contents'. This global value is overridable on a per-file basis. This adds the parsing and write test part, but use by VFS comes next. Differential Revision: https://reviews.llvm.org/D23422 rdar://problem/27531549 llvm-svn: 278456
* [Diag] Fix idiom in comment: "on the lam", not "on the lamb".Justin Lebar2016-08-101-3/+3
| | | | llvm-svn: 278192
* [OpenCL][AMDGPU] Add support for -cl-denorms-are-zeroYaxun Liu2016-08-091-2/+27
| | | | | | | | | | | | Adjust target features for amdgcn target when -cl-denorms-are-zero is set. Denormal support is controlled by feature strings fp32-denormals fp64-denormals in amdgcn target. If -cl-denorms-are-zero is not set and the command line does not set fp32/64-denormals feature string, +fp32-denormals +fp64-denormals will be on for GPU's supporting them. A new virtual function virtual void TargetInfo::adjustTargetOptions(const CodeGenOptions &CGOpts, TargetOptions &TargetOpts) const is introduced to allow adjusting target option by codegen option. Differential Revision: https://reviews.llvm.org/D22815 llvm-svn: 278151
* [OpenMP] Sema and parsing for 'teams distribute' pragmaKelvin Li2016-08-051-4/+22
| | | | | | | | This patch is to implement sema and parsing for 'teams distribute' pragma. Differential Revision: https://reviews.llvm.org/D23189 llvm-svn: 277818
* [OpenCL] Fix size of image typeYaxun Liu2016-08-031-0/+4
| | | | | | | | | | The size of image type is reported incorrectly as size of a pointer to address space 0, which causes error when casting image type to pointers by __builtin_astype. The fix is to get image address space from TargetInfo then report the size accordingly. Differential Revision: https://reviews.llvm.org/D22927 llvm-svn: 277647
* [OpenCL] Add extension cl_khr_mipmap_image to clangYaxun Liu2016-07-291-0/+1
| | | | | | | | | | Adding extension cl_khr_mipmap_image to clang's OpenCL Extensions and initiated inside AMDGPU Target. Patch by Aaron En Ye Shi. Differential Revision: https://reviews.llvm.org/D22637 llvm-svn: 277181
* [AArch64] Using AArch64TargetParser in Clang.Zijiao Ma2016-07-281-13/+3
| | | | | | | | | | This resubmit r270688 which broke some specific buildbots.That's because there is incorrect indexing problem in the targetparser,and the problem is fixed in r276957. Differential Revision: https://reviews.llvm.org/D21277 llvm-svn: 276958
* Basic/Targets.cpp: Reformat aarch64 CPU list.Matthias Braun2016-07-271-8/+11
| | | | | | | Having 1 entry per line and an alphabetical order is clearer and reduces the risk of invalid merges. llvm-svn: 276931
* Adjust coercion of aggregates on RenderScriptPirama Arumuga Nainar2016-07-272-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In RenderScript, the size of the argument or return value emitted in the IR is expected to be the same as the size of corresponding qualified type. For ARM and AArch64, the coercion performed by Clang can change the parameter or return value to a type whose size is different (usually larger) than the original aggregate type. Specifically, this can happen in the following cases: - Aggregate parameters of size <= 64 bytes and return values smaller than 4 bytes on ARM - Aggregate parameters and return values smaller than bytes on AArch64 This patch coerces the cases above to an integer array that is the same size and alignment as the original aggregate. A new field is added to TargetInfo to detect a RenderScript target and limit this coercion just to that case. Tests added to test/CodeGen/renderscript.c Reviewers: rsmith Subscribers: aemerson, srhines, llvm-commits Differential Revision: https://reviews.llvm.org/D22822 llvm-svn: 276904
* [Myriad]: better compatibility with vendor sourceDouglas Katzman2016-07-251-13/+29
| | | | | | | | - Accept ma{2100,2150,2150} for -mcpu - Define more preprocessor macros - Don't append "le/" to little-endian lib dirs llvm-svn: 276646
* Add -fmodules-ts flag to cc1 for the provisional C++ modules TS, and markRichard Smith2016-07-231-2/+4
| | | | | | 'module' and 'import' as keywords when the flag is specified. llvm-svn: 276508
* Move some IntrusiveRefCntPtrs instead of copying.Benjamin Kramer2016-07-211-4/+6
| | | | | | No functionality change intended. llvm-svn: 276292
* [OpenMP] Sema and parsing for 'target simd' pragmaKelvin Li2016-07-201-3/+13
| | | | | | | | This patch is to implement sema and parsing for 'target simd' pragma. Differential Revision: https://reviews.llvm.org/D22479 llvm-svn: 276203
* [mips] Correct label prefixes for N32 and N64.Daniel Sanders2016-07-191-2/+2
| | | | | | | | | | | | | | | | | Summary: N32 and N64 follow the standard ELF conventions (.L) whereas O32 uses its own ($). This fixes the majority of object differences between -fintegrated-as and -fno-integrated-as. Reviewers: sdardis Subscribers: dsanders, sdardis, llvm-commits Differential Revision: https://reviews.llvm.org/D22412 llvm-svn: 275967
* Allow iOS and tvOS version numbers with 2-digit major version numbers.Bob Wilson2016-07-181-8/+19
| | | | | | rdar://problem/26921601 llvm-svn: 275905
* [NFC] Header cleanupMehdi Amini2016-07-184-6/+1
| | | | | | | | | | Summary: Removed unused headers, replaced some headers with forward class declarations Patch by: Eugene <claprix@yandex.ru> Differential Revision: https://reviews.llvm.org/D20100 llvm-svn: 275882
* [OpenMP] Sema and parsing for 'target parallel for simd' pragmaKelvin Li2016-07-141-4/+18
| | | | | | | | This patch is to implement sema and parsing for 'target parallel for simd' pragma. Differential Revision: http://reviews.llvm.org/D22096 llvm-svn: 275365
* [PCH/preamble] Make sure that if the preamble/PCH was serialized with errors ↵Argyrios Kyrtzidis2016-07-131-1/+1
| | | | | | | | | | that we set diagnostic engine state appropriately. Otherwise there can be a crash with CFG analysis warnings doing work on invalid AST. Fixes crash of rdar://26224134 llvm-svn: 275313
* [OpenMP] Initial implementation of parse+sema for OpenMP clause ↵Carlo Bertolli2016-07-131-0/+2
| | | | | | | | 'is_device_ptr' of target http://reviews.llvm.org/D22070 llvm-svn: 275282
* [OpenMP] Initial implementation of parse+sema for clause use_device_ptr of ↵Carlo Bertolli2016-07-131-0/+2
| | | | | | | | | | | | | | 'target data' http://reviews.llvm.org/D21904 This patch is similar to the implementation of 'private' clause: it adds a list of private pointers to be used within the target data region to store the device pointers returned by the runtime. Please refer to the following document for a full description of what the runtime witll return in this case (page 10 and 11): https://github.com/clang-omp/OffloadingDesign I am happy to answer any question related to the runtime interface to help reviewing this patch. llvm-svn: 275271
* Update switch statement to match coding standards.Simon Pilgrim2016-07-071-1/+2
| | | | llvm-svn: 274799
* [AArch64] Change the preferred alignment for char and short.Chad Rosier2016-07-071-2/+2
| | | | | | | | This reinstates commits r273280 and r273289. Original Review: http://reviews.llvm.org/D21414. llvm-svn: 274791
* Revert "[AArch64] Change the preferred alignment for char and short to word ↵Chad Rosier2016-07-071-2/+2
| | | | | | | | alignment" This reverts commit r273280 as the change was not properly approved. llvm-svn: 274766
* Fix "not all control paths return a value" warning on MSVCSimon Pilgrim2016-07-071-3/+1
| | | | | | This time without causing a 'all enums handled' warning on other compilers. llvm-svn: 274748
* 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
OpenPOWER on IntegriCloud