summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
Commit message (Collapse)AuthorAgeFilesLines
...
* Reverse commit 281375 (breaks building Chromium)Albert Gutowski2016-09-131-2/+0
| | | | llvm-svn: 281399
* Add some MS aliases for existing intrinsicsAlbert Gutowski2016-09-131-0/+2
| | | | | | | | | | Reviewers: thakis, compnerd, majnemer, rsmith, rnk Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D24330 llvm-svn: 281375
* AMDGPU: Fix target options fp32/64-denormalsYaxun Liu2016-09-131-10/+6
| | | | | | | | | | | | | | Fix target options for fp32/64-denormals so that +fp64-denormals is set if fp64 is supported -fp32-denormals if fp32 denormals is not supported, or -cl-denorms-are-zero is set +fp32-denormals if fp32 denormals is supported and -cl-denorms-are-zero is not set If target feature fp32/64-denormals is explicitly set, they will override default options and options deduced from -cl-denorms-are-zero. Differential Revision: https://reviews.llvm.org/D24512 llvm-svn: 281357
* [CUDA] Make __GCC_ATOMIC_XXX_LOCK_FREE macros the same on host/device.Justin Lebar2016-09-091-0/+6
| | | | | | | | | | | | | | | | | | | | | Summary: This fixes a bug where we were unable to compile the following CUDA file with libstdc++ (didn't try libc++): #include <future> void foo() { std::shared_future<int> x; } The problem is that <future> only defines std::shared_future if __GCC_ATOMIC_INT_LOCK_FREE > 1. When we compiled this file for device, the macro was set to 1, and then the class didn't exist at all. Reviewers: tra Subscribers: cfe-commits, jhen Differential Revision: https://reviews.llvm.org/D24407 llvm-svn: 281089
* OpenCL: Defining __ENDIAN_LITTLE__ and fix target endiannessMatt Arsenault2016-09-072-22/+4
| | | | | | | | | OpenCL requires __ENDIAN_LITTLE__ be set for little endian targets. The default for targets was also apparently big endian, so AMDGPU was incorrectly reported as big endian. Set this from the triple so targets don't have another place to set the endianness. llvm-svn: 280787
* Add support for targeting armv6-unknown-cloudabi-eabihf.Ed Schouten2016-09-051-0/+2
| | | | | | | I'm in the progress of adding ARMv6 support to CloudABI. On the compiler side, everything seems to work properly with this tiny change applied. llvm-svn: 280672
* [Modules] Add 'freestanding' to the 'requires-declaration' feature-list.Elad Cohen2016-09-041-0/+1
| | | | | | | | | This adds support for modules that require (non-)freestanding environment, such as the compiler builtin mm_malloc submodule. Differential Revision: https://reviews.llvm.org/D23871 llvm-svn: 280613
* Replace the Radeon GCN GPU family names by more descriptive onesNiels Ole Salscheider2016-09-031-25/+25
| | | | | | Differential Revision: https://reviews.llvm.org/D23957 llvm-svn: 280587
* [WebAssembly] Change wasm SizeType to match asmjsDerek Schuff2016-09-011-0/+6
| | | | | | | | | | | | | | | | Summary: We want wasm and asmjs to have matching ABIs, and right now asmjs uses unsigned int for its size_t. This causes exported symbols in libcxx to not match and can cause weird breakage where libcxx doesn't get linked as a result. Long-term we probably want wasm32, wasm64, and asmjs to all use unsigned long, but that would cause unnecessary ABI churn for asmjs so defer that until we can make all the ABI changes at once. Patch by Jacob Gravelle Differential Revision: https://reviews.llvm.org/D24134 llvm-svn: 280420
* [Modules] Add 'gnuinlineasm' to the 'requires-declaration' feature-list.Bruno Cardoso Lopes2016-08-301-0/+1
| | | | | | | | | | | | | This adds support for modules that require (no-)gnu-inline-asm environment, such as the compiler builtin cpuid submodule. This is the gnu-inline-asm variant of https://reviews.llvm.org/D23871 Differential Revision: https://reviews.llvm.org/D23905 rdar://problem/26931199 llvm-svn: 280159
* Basic/Targets.cpp: Add polaris10 and polaris11 gpusNiels Ole Salscheider2016-08-301-15/+17
| | | | | | Differential Revision: https://reviews.llvm.org/D23746 llvm-svn: 280120
* [Hexagon] Use handleTargetFeaturesGroup to process target-specific featuresKrzysztof Parzyszek2016-08-301-9/+26
| | | | llvm-svn: 280093
* Handle -mlong-calls on HexagonKrzysztof Parzyszek2016-08-301-1/+7
| | | | | | Differential Revision:://reviews.llvm.org/D22766 llvm-svn: 280089
* Re-commit [OpenCL] AMDGCN: Fix size_t typeYaxun Liu2016-08-192-2/+7
| | | | | | There was a premature cast to pointer type in emitPointerArithmetic which caused assertion in tests with assertion enabled. llvm-svn: 279206
* Revert [OpenCL] AMDGCN: Fix size_t typeYaxun Liu2016-08-182-7/+2
| | | | | | due to regressions in test/CodeGen/exprs.c on certain platforms. llvm-svn: 279127
* [OpenCL] AMDGCN: Fix size_t typeYaxun Liu2016-08-182-2/+7
| | | | | | | | Pointers of certain GPUs in AMDGCN target in private address space is 32 bit but pointers in other address spaces are 64 bit. size_t type should be defined as 64 bit for these GPUs so that it could hold pointers in all address spaces. Also fixed issues in pointer arithmetic codegen by using pointer specific intptr type. Differential Revision: https://reviews.llvm.org/D23361 llvm-svn: 279121
* Revert "[OpenMP] Sema and parsing for 'teams distribute simd’ pragma"Diana Picus2016-08-181-18/+5
| | | | | | | | | | | | | | | | | This reverts commit r279003 as it breaks some of our buildbots (e.g. clang-cmake-aarch64-quick, clang-x86_64-linux-selfhost-modules). The error is in OpenMP/teams_distribute_simd_ast_print.cpp: clang: /home/buildslave/buildslave/clang-cmake-aarch64-quick/llvm/include/llvm/ADT/DenseMap.h:527: bool llvm::DenseMapBase<DerivedT, KeyT, ValueT, KeyInfoT, BucketT>::LookupBucketFor(const LookupKeyT&, const BucketT*&) const [with LookupKeyT = clang::Stmt*; DerivedT = llvm::DenseMap<clang::Stmt*, long unsigned int>; KeyT = clang::Stmt*; ValueT = long unsigned int; KeyInfoT = llvm::DenseMapInfo<clang::Stmt*>; BucketT = llvm::detail::DenseMapPair<clang::Stmt*, long unsigned int>]: Assertion `!KeyInfoT::isEqual(Val, EmptyKey) && !KeyInfoT::isEqual(Val, TombstoneKey) && "Empty/Tombstone value shouldn't be inserted into map!"' failed. llvm-svn: 279045
* 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
OpenPOWER on IntegriCloud