summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [ELF] PR30221 - linker script expression parser does not accept '~'Simon Atanasyan2016-09-023-0/+51
| | | | | | | | | | | The patch adds support for both '-' and '~' unary expressions. Also it brings support for signed numbers is expressions. https://llvm.org/bugs/show_bug.cgi?id=30221 Differential revision: https://reviews.llvm.org/D24128 llvm-svn: 280546
* [PowerPC] For larger offsets, when possible, fold offset into addis toc@haHal Finkel2016-09-023-6/+36
| | | | | | | | | | | | | When we have an offset into a global, etc. that is accessed relative to the TOC base pointer, and the offset is larger than the minimum alignment of the global itself and the TOC base pointer (which is 8-byte aligned), we can still fold the @toc@ha into the memory access, but we must update the addis instruction's symbol reference with the offset as the symbol addend. When there is only one use of the addi to be folded and only one use of the addis that would need its symbol's offset adjusted, then we can make the adjustment and fold the @toc@l into the memory access. llvm-svn: 280545
* [ELF] - Use std::regex instead of hand written logic in elf::globMatch()George Rimar2016-09-027-67/+93
| | | | | | | | | | Use std::regex instead of hand written matcher. Patch based on code and ideas of Rui Ueyama. Differential revision: https://reviews.llvm.org/D23829 llvm-svn: 280544
* Avoid narrowing warnings in __bitset constructorDimitry Andric2016-09-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | When <bitset> is compiled with warnings enabled, on a platform where size_t is 4 bytes, it results in errors similar to: bitset:265:16: error: non-constant-expression cannot be narrowed from type 'unsigned long long' to '__storage_type' (aka 'unsigned int') in initializer list [-Wc++11-narrowing] : __first_{__v, __v >> __bits_per_word} ^~~ bitset:676:52: note: in instantiation of member function 'std::__1::__bitset<2, 53>::__bitset' requested here bitset(unsigned long long __v) _NOEXCEPT : base(__v) {} ^ Fix these by casting the initializer list elements to __storage_type. Reviewers: mclow.lists, EricWF Differential Revision: https://reviews.llvm.org/D23960 llvm-svn: 280543
* Move function into cpp file under KMP_AFFINITY_SUPPORTED guard.Jonathan Peyton2016-09-022-28/+25
| | | | | | | | | | | | When affinity isn't supported, __kmp_affinity_compact doesn't exist. The problem is that in kmp_affinity.h there is a function which uses it without the proper KMP_AFFINITY_SUPPORTED guard around it. The compiler was smart enough to ignore it and the function __kmp_affinity_cmp_Address_child_num which relies on it, but I think it is cleaner to have it under the proper guard. Since the function is only used in the kmp_affinity.cpp file and there aren't any plans to have it elsewhere. I have moved it there. llvm-svn: 280542
* Move a test file to the right place.Rui Ueyama2016-09-021-0/+0
| | | | llvm-svn: 280541
* Remove useless file prefix.Rui Ueyama2016-09-0250-12/+12
| | | | | | Differential Revision: https://reviews.llvm.org/D24207 llvm-svn: 280540
* Remove link to clang's release notes; keeping it up-to-date is hardHans Wennborg2016-09-021-3/+1
| | | | llvm-svn: 280539
* Decouple the kmp_affin_mask_t type from determining if affinity is capableJonathan Peyton2016-09-022-4/+4
| | | | | | | the __kmp_affinity_determine_capable() functions are highly operating system specific. This change has the functions use the type they expect explicitly. llvm-svn: 280538
* [Sparc] Mark i128 shift libcalls unavailable in 32-bit mode.James Y Knight2016-09-021-0/+7
| | | | | | | | | | | Recently, llvm wants to emit calls to these functions, while it didn't seem to be an issue before. Not sure why. Nor do I know why only these three are important to disable, out of all of the i128 libcalls. Nevertheless, many other targets have this snippet of code, so, just copying it to sparc as well, to unbreak things. llvm-svn: 280537
* Use od instead of hexdump.Rui Ueyama2016-09-021-3/+3
| | | | | | | | | | od is defined by POSIX and exists since version 1 AT&T Unix. hexdump is not part of any standard as far as I know. So od is a better choice than hexdump. Differential Revision: https://reviews.llvm.org/D24205 llvm-svn: 280536
* AMDGPU/R600: EXTRACT_VECT_ELT should only bypass BUILD_VECTOR if the vectors ↵Jan Vesely2016-09-024-1/+156
| | | | | | | | | | have the same number of elements. Fixes R600 piglit regressions since r280298 Differential Revision: https://reviews.llvm.org/D24174 llvm-svn: 280535
* Setting fp trapping mode and denormal type: this an improvement ofSjoerd Meijer2016-09-021-16/+24
| | | | | | | | | r280246 and calculates compatibility of functions attributes in a better way. Differential Revision: https://reviews.llvm.org/D24070 llvm-svn: 280534
* Simplify. NFC.Rui Ueyama2016-09-021-9/+3
| | | | llvm-svn: 280533
* Do not consider subreg defs as reads when computing subrange livenessKrzysztof Parzyszek2016-09-028-11/+320
| | | | | | | | | | Subregister definitions are considered uses for the purpose of tracking liveness of the whole register. At the same time, when calculating live interval subranges, subregister defs should not be treated as uses. Differential Revision: https://reviews.llvm.org/D24190 llvm-svn: 280532
* [InstCombine] auto-generate assertions for tighter checkingSanjay Patel2016-09-021-60/+95
| | | | llvm-svn: 280531
* Replace a bad instance of __kmp_free() with KMP_CPU_FREE_ARRAY() macro.Jonathan Peyton2016-09-021-1/+1
| | | | llvm-svn: 280530
* Rename UnresolvedPolicy::Error -> UnresolvedPolicy::ReportError.Rui Ueyama2016-09-022-3/+3
| | | | | | | | "Error" looks like it is indicating a parse error. "Error" actually instructs the later process to report an error if there's an error condition. Thus the new name. llvm-svn: 280529
* Add -nostdlib.Rui Ueyama2016-09-025-1/+12
| | | | llvm-svn: 280528
* [SLP] Don't pass a global CL option as an argument. NFC.Chad Rosier2016-09-022-12/+10
| | | | | | Differential Revision: https://reviews.llvm.org/D24199 llvm-svn: 280527
* AMDGPU/R600: Expand unaligned writes to local and global ASJan Vesely2016-09-023-8/+189
| | | | | | | | | LOCAL and GLOBAL AS only PRIVATE needs special treatment Differential Revision: https://reviews.llvm.org/D23971 llvm-svn: 280526
* Implement __attribute__((require_constant_initialization)) for safe static ↵Eric Fiselier2016-09-028-27/+393
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | initialization. Summary: This attribute specifies expectations about the initialization of static and thread local variables. Specifically that the variable has a [constant initializer](http://en.cppreference.com/w/cpp/language/constant_initialization) according to the rules of [basic.start.static]. Failure to meet this expectation will result in an error. Static objects with constant initializers avoid hard-to-find bugs caused by the indeterminate order of dynamic initialization. They can also be safely used by other static constructors across translation units. This attribute acts as a compile time assertion that the requirements for constant initialization have been met. Since these requirements change between dialects and have subtle pitfalls it's important to fail fast instead of silently falling back on dynamic initialization. ```c++ // -std=c++14 #define SAFE_STATIC __attribute__((require_constant_initialization)) static struct T { constexpr T(int) {} ~T(); }; SAFE_STATIC T x = {42}; // OK. SAFE_STATIC T y = 42; // error: variable does not have a constant initializer // copy initialization is not a constant expression on a non-literal type. ``` This attribute can only be applied to objects with static or thread-local storage duration. Reviewers: majnemer, rsmith, aaron.ballman Subscribers: jroelofs, cfe-commits Differential Revision: https://reviews.llvm.org/D23385 llvm-svn: 280525
* Dispatch without hash table lookup.Rui Ueyama2016-09-021-19/+25
| | | | | | | | | | | Cmd used to be the single central place to dispatch. It is not longer the case because we have a logic for readProvideOrAssignment(). This patch removes the hash table so that evrything is in a single function. This is slightly verbose but should improve readability. Differential Revision: https://reviews.llvm.org/D24200 llvm-svn: 280524
* AMDGPU: Reorganize store testsJan Vesely2016-09-024-188/+177
| | | | | | | | | Split by AS. Merge with some prviously failing tests. Differential Revision: https://reviews.llvm.org/D23969 llvm-svn: 280523
* [codeview] Use the correct max CV record length of 0xFF00Reid Kleckner2016-09-023-12/+17
| | | | | | | | | | | Previously we were splitting our records at 0xFFFF bytes, which the Microsoft tools don't like. Should fix failure on the new Windows self-host buildbot. This length appears in microsoft-pdb/PDB/dbi/dbiimpl.h llvm-svn: 280522
* Revert r280516 since it contained accidental changes.Eric Fiselier2016-09-028-408/+42
| | | | llvm-svn: 280521
* Based on post-commit feedback over IRC with dblaikie, ideally, we should ↵Aaron Ballman2016-09-021-2/+2
| | | | | | | | have a SmallVector constructor that accepts anything which can supply a range via ADL begin()/end() calls so that we can construct the SmallVector directly from anything range-like. Since that doesn't exist right now, use a local variable instead of calling getAssocExprs() twice; NFC. llvm-svn: 280520
* Use 'critical' reduction method when 'atomic' is not available but requested.Jonathan Peyton2016-09-022-8/+16
| | | | | | | | | | | | | In case atomic reduction method is not available (the compiler can't generate it) the assertion failure occurred if KMP_FORCE_REDUCTION=atomic was specified. This change replaces the assertion with a warning and sets the reduction method to the default one - 'critical'. Patch by Olga Malysheva Differential Revision: https://reviews.llvm.org/D23990 llvm-svn: 280519
* IfConversion: Add assertions that both sides of a diamond don't pred-clobber.Kyle Butt2016-09-021-2/+3
| | | | | | | | | One side of a diamond may end with a predicate clobbering instruction. That side of the diamond has to be if-converted second. Both sides can't clobber the predicate or the ifconversion is invalid. This is checked elsewhere, but add an assert as a safety check. NFC llvm-svn: 280518
* IfConversion: Fix bug introduced by rescanning diamonds.Kyle Butt2016-09-022-1/+67
| | | | | | | Passing the wrong values for predicate-clobbering. Simple to miss. Added an assert to make this easier to catch in the future. llvm-svn: 280517
* Implement __attribute__((require_constant_initialization)) for safe static ↵Eric Fiselier2016-09-028-42/+408
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | initialization. Summary: This attribute specifies expectations about the initialization of static and thread local variables. Specifically that the variable has a [constant initializer](http://en.cppreference.com/w/cpp/language/constant_initialization) according to the rules of [basic.start.static]. Failure to meet this expectation will result in an error. Static objects with constant initializers avoid hard-to-find bugs caused by the indeterminate order of dynamic initialization. They can also be safely used by other static constructors across translation units. This attribute acts as a compile time assertion that the requirements for constant initialization have been met. Since these requirements change between dialects and have subtle pitfalls it's important to fail fast instead of silently falling back on dynamic initialization. ```c++ // -std=c++14 #define SAFE_STATIC __attribute__((require_constant_initialization)) static struct T { constexpr T(int) {} ~T(); }; SAFE_STATIC T x = {42}; // OK. SAFE_STATIC T y = 42; // error: variable does not have a constant initializer // copy initialization is not a constant expression on a non-literal type. ``` This attribute can only be applied to objects with static or thread-local storage duration. Reviewers: majnemer, rsmith, aaron.ballman Subscribers: jroelofs, cfe-commits Differential Revision: https://reviews.llvm.org/D23385 llvm-svn: 280516
* Add comments.Rui Ueyama2016-09-021-0/+4
| | | | llvm-svn: 280515
* Check for nullEnrico Granata2016-09-021-0/+7
| | | | llvm-svn: 280513
* [SE] Remove broken doc refJason Henline2016-09-021-3/+0
| | | | llvm-svn: 280512
* [SE] Doc tweaksJason Henline2016-09-025-14/+41
| | | | | | | | | | | | | | | | | | | | | Summary: * Sections on main page. * Use std algorithm for equality check in example. * Add tree view on left side. * Add extra CSS sheet to restrict content width. * Add mild background color. * Restrict alphabetic indexes to 1 column. * Round corners of content boxes. * Rename example to CUDASaxpy.cpp. * Add CUDASaxpy.cpp to "Examples" section. Reviewers: jprice Subscribers: parallel_libs-commits Differential Revision: https://reviews.llvm.org/D24198 llvm-svn: 280511
* Remove temoprary files.Rui Ueyama2016-09-021-36/+60
| | | | | | | | | | | | | | Previously, we created temporary files using llvm::sys::fs::createTemporaryFile and removed them using llvm::FileRemover. This is error-prone as it is easy to forget creating FileRemover instances after creating temporary files. There is actually a temporary file leak bug. This patch introduces a new class, TemporaryFile, to manage temporary files in the RAII style. Differential Revision: https://reviews.llvm.org/D24176 llvm-svn: 280510
* [SE] GlobalDeviceMemory owns its handleJason Henline2016-09-026-143/+123
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Final step in getting GlobalDeviceMemory to own its handle. * Make GlobalDeviceMemory movable, but no longer copyable. * Make Device::freeDeviceMemory function private and make GlobalDeviceMemoryBase a friend of Device so GlobalDeviceMemoryBase can free its memory in its destructor. * Make GlobalDeviceMemory constructor private and make Device a friend so it can construct GlobalDeviceMemory. * Remove SharedDeviceMemoryBase class because it is never used. * Remove explicit memory freeing from example code. This change just consumes any errors generated during device memory freeing. The real error handling will be added in a future patch. Reviewers: jlebar Subscribers: jprice, parallel_libs-commits Differential Revision: https://reviews.llvm.org/D24195 llvm-svn: 280509
* Fix up comment from r280442, noticed by Justin.Adam Nemet2016-09-021-3/+2
| | | | llvm-svn: 280508
* Fix potential test failures.Rui Ueyama2016-09-025-9/+11
| | | | | | | | | | | | | | | | | Windows does not allow opened files to be removed. This patch fixes two types of errors. - Output file being the same as input file. Because LLD itself holds a file descriptor of the input file, it cannot create an output file with the same name as a new file. - Removing files before releasing MemoryBuffer objects. These tests are not failing no because MemoryBuffer happens to decide not to use mmap on these files. But we shouldn't rely on that behavior. llvm-svn: 280507
* [SE] Add "install" actions to cmake buildJason Henline2016-09-022-0/+4
| | | | | | | The "install" build target will now copy the StreamExecutor library and headers to the appropriate subdirectories of CMAKE_INSTALL_PREFIX. llvm-svn: 280506
* Split the store of a wide value merged from an int-fp pair into multiple stores.Wei Mi2016-09-024-0/+191
| | | | | | | | | | | | | | For the store of a wide value merged from a pair of values, especially int-fp pair, sometimes it is more efficent to split it into separate narrow stores, which can remove the bitwise instructions or sink them to colder places. Now the feature is only enabled on x86 target, and only store of int-fp pair is splitted. It is possible that the application scope gets extended with perf evidence support in the future. Differential Revision: https://reviews.llvm.org/D22840 llvm-svn: 280505
* [InsttCombine] fold insertelement of constant into shuffle with constant ↵Sanjay Patel2016-09-022-7/+80
| | | | | | | | | | | | | | | | | operand (PR29126) The motivating case occurs with SSE/AVX scalar intrinsics, so this is a first step towards shrinking that to a single shufflevector. Note that the transform is intentionally limited to shuffles that are equivalent to vector selects to avoid creating arbitrary shuffle masks that may not lower well. This should solve PR29126: https://llvm.org/bugs/show_bug.cgi?id=29126 Differential Revision: https://reviews.llvm.org/D23886 llvm-svn: 280504
* [lib/LTO] Simplify. No functional change intended.Davide Italiano2016-09-021-11/+6
| | | | llvm-svn: 280503
* Quick fix to make LIT_PRESERVES_TMP work againReid Kleckner2016-09-021-1/+2
| | | | llvm-svn: 280502
* [lit] Clean up temporary files created by testsReid Kleckner2016-09-022-11/+28
| | | | | | | | | | | | Do this by creating a temp directory in the normal system temp directory, and cleaning it up on exit. It is still possible for this temp directory to leak if Python exits abnormally, but this is probably good enough for now. Fixes PR18335 llvm-svn: 280501
* [WebAssembly] Update known test failuresDerek Schuff2016-09-021-1/+0
| | | | | | Fixed an issue with the experimental C headers llvm-svn: 280498
* [LV] Ensure reverse interleaved group GEPs remain uniformMatthew Simpson2016-09-022-3/+19
| | | | | | | | | | | | | | For uniform instructions, we're only required to generate a scalar value for the first vector lane of each unroll iteration. Thus, if we have a reverse interleaved group, computing the member index off the scalar GEP corresponding to the last vector lane of its pointer operand technically makes the GEP non-uniform. We should compute the member index off the first scalar GEP instead. I've added the updated member index computation to the existing reverse interleaved group test. llvm-svn: 280497
* [SE] Don't pack raw device mem argsJason Henline2016-09-022-116/+40
| | | | | | | | | | | | | | | | | Summary: Step 4 of getting GlobalDeviceMemory to own its handle. Take out code to pack untyped device memory types as kernel arguments. When GlobalDeviceMemory owns its handle, users will never touch untyped device memory types, so they will never pass them as kernel args. Reviewers: jlebar Subscribers: jprice, parallel_libs-commits Differential Revision: https://reviews.llvm.org/D24177 llvm-svn: 280496
* [ELF] - Linkerscript: add support for suffixes in numbers.George Rimar2016-09-022-8/+101
| | | | | | | | | | | | | | Both bfd and gold accept: foo = 1K; bar = 1M; zed = 1H; And lowercase forms: k, m, h. Patch adds support for that. Differential revision: https://reviews.llvm.org/D24194 llvm-svn: 280494
* Fix build breakage caused by r280490Tamas Berghammer2016-09-021-2/+1
| | | | llvm-svn: 280492
OpenPOWER on IntegriCloud