summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* fix shadowing warnings in new testsEric Fiselier2017-10-171-3/+3
| | | | llvm-svn: 315997
* [CMake][OpenMP] Customize default offloading archJonas Hahnfeld2017-10-174-21/+19
| | | | | | | | | For the shuffle instructions in reductions we need at least sm_30 but the user may want to customize the default architecture. Differential Revision: https://reviews.llvm.org/D38883 llvm-svn: 315996
* Refactor _LIBCPP_<LITTLE|BIG>_ENDIANEric Fiselier2017-10-172-35/+22
| | | | | | | | | | Previously this macro used 0/1 to indicate if it was set. This is unlike all other libc++ configuration macros which use ifdef/ifndef. This patch makes this macro consistent with everything else. llvm-svn: 315995
* [libc++] Fix PR34898 - vector iterator constructors and assign method ↵Eric Fiselier2017-10-1712-74/+795
| | | | | | | | | | | | | | | | | | | | | | | perform push_back instead of emplace_back. Summary: The constructors `vector(Iter, Iter, Alloc = Alloc{})` and `assign(Iter, Iter)` don't correctly perform EmplaceConstruction from the result of dereferencing the iterator. This results in them performing an additional and unneeded copy. This patch addresses the issue by correctly using `emplace_back` in C++11 and newer. There are also some bugs in our `insert` implementation, but those will be handled separately. @mclow.lists We should probably merge this into 5.1, agreed? Reviewers: mclow.lists, dlj, EricWF Reviewed By: mclow.lists, EricWF Subscribers: cfe-commits, mclow.lists Differential Revision: https://reviews.llvm.org/D38757 llvm-svn: 315994
* [ELF] - Removed unused class from Options.td. NFC.George Rimar2017-10-171-1/+0
| | | | llvm-svn: 315993
* Improve clamp recognition in ValueTracking.Nikolai Bozhenov2017-10-172-22/+43
| | | | | | | | | | | | | | | | | | | Summary: ValueTracking was recognizing not all variations of clamp. Swapping of true value and false value of select was added to fix this problem. This change breaks the canonical form of cmp inside the matchMinMax function, that is why additional checks for compare predicates is needed. Added corresponding test cases. Reviewers: spatel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38531 Patch by: Artur Gainullin <artur.gainullin@intel.com> llvm-svn: 315992
* Fix implicit null check with negative offsetYichao Yu2017-10-173-3/+56
| | | | | | | | | | | | | | | | | | | | Summary: It seems that negative offset was accidentally allowed in D17967. AFAICT small negative offset should be valid (always raise segfault) on all archs that I'm aware of (especially x86, which is the only one with this optimization enabled) and such case can be useful when loading hiden metadata from an object. However, like the positive side, it should only be done within a certain limit. For now, use the same limit on the positive side for the negative side. A separate option can be added if needs appear. Reviewers: mcrosier, skatkov Reviewed By: skatkov Subscribers: sanjoy, llvm-commits Differential Revision: https://reviews.llvm.org/D38925 llvm-svn: 315991
* Fix `FaultMaps` crash when the out streamer is reusedYichao Yu2017-10-172-0/+4
| | | | | | | | | | | | | | | | | | | Summary: Make sure the map is cleared before processing a new module. Similar to what is done on `StackMaps`. This issue is similar to D38588, though this time for FaultMaps (on x86) rather than ARM/AArch64. Other than possible mixing of information between modules, the crash is caused by the pointers values in the map that was allocated by the bump pointer allocator that is unwinded when emitting the next file. This issue has been around since 3.8. This issue is likely much harder to write a test for since AFAICT it requires emitting something much more compilcated (and possibly real code) instead of just some random bytes. Reviewers: skatkov, sanjoy Reviewed By: skatkov, sanjoy Subscribers: sanjoy, aemerson, llvm-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D38924 llvm-svn: 315990
* [CodeGen] Refine generation of TBAA info for bit-field lvaluesIvan A. Kosarev2017-10-171-63/+51
| | | | | | | | | | | | | | | | | The main change is that now we generate TBAA info before constructing the resulting lvalue instead of constructing lvalue with some default TBAA info and fixing it as necessary afterwards. We also keep the TBAA info close to lvalue base info, which is supposed to simplify their future merging. This patch should not bring in any functional changes. This is part of D38126 reworked to be a separate patch to simplify review. Differential Revision: https://reviews.llvm.org/D38947 llvm-svn: 315989
* Fix shared build of liblldCommon.so on LinuxAlexander Richardson2017-10-171-0/+3
| | | | llvm-svn: 315988
* [XRay][compiler-rt] Always place the CPU record first for every bufferDean Michael Berris2017-10-172-9/+16
| | | | | | | | | | | | | | | | | | | | | Summary: In FDR Mode, when we set up a new buffer for a thread that's just overflowed, we must place the CPU identifier with the TSC record as the first record. This is so that we can reconstruct all the function entry/exit with deltas rooted on a TSC record for the CPU at the beginning of the buffer. Without doing this, the tools are rejecting the log for cases when we've overflown and have different buffers that don't have the CPU and TSC records as the first entry in the buffers. Reviewers: pelikan Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38995 llvm-svn: 315987
* [CodeGen] Pass TBAA info along with lvalue base info everywhereIvan A. Kosarev2017-10-175-55/+43
| | | | | | | | | | | | | | This patch addresses the rest of the cases where we pass lvalue base info, but do not provide corresponding TBAA info. This patch should not bring in any functional changes. This is part of D38126 reworked to be a separate patch to make reviewing easier. Differential Revision: https://reviews.llvm.org/D38945 llvm-svn: 315986
* [X86][Skylake] fixed/updated regression test mmx-schedule.ll which failed ↵Gadi Haber2017-10-171-274/+274
| | | | | | | after r315978. Change-Id: I60cd7e03ea6c3d9a3dc661a882458e83feca66e3 llvm-svn: 315985
* [CodeGen] EmitPointerWithAlignment() to generate TBAA info along with LValue ↵Ivan A. Kosarev2017-10-178-42/+114
| | | | | | | | base info Differential Revision: https://reviews.llvm.org/D38796 llvm-svn: 315984
* More tests with x86 prefixes which work after rL315899 commitAndrew V. Tischenko2017-10-172-0/+125
| | | | llvm-svn: 315983
* [Coverage] Discard deferred region in closing if-elseVedant Kumar2017-10-172-8/+44
| | | | | | | | | | | | | | | | A trailing deferred region isn't necessary in a function that ends with this pattern: ... else { ... return; } Special-case this pattern so that the closing curly brace of the function isn't marked as uncovered. This issue came up in PR34962. llvm-svn: 315982
* [Coverage] Explicitly mark the l.h.s of && and || (fixes PR33465)Vedant Kumar2017-10-173-11/+20
| | | | | | | | | | This makes it possible to view sub-line region counts for the l.h.s of && and || expressions in coverage reports. It also fixes PR33465, which shows an example of incorrect coverage output for an assignment statement containing '||'. llvm-svn: 315979
* [X86][SKL] Updated scheduling information for the SkylakeClient targetGadi Haber2017-10-1719-4534/+4835
| | | | | | | | | | | | | | Updated the scheduling information for the SkylakeClient target with the following changes: 1. regrouped the instructions after adding load and store latencies. 2. regrouped the instructions after adding identified missing ports in several groups. The changes were made after revisiting the latencies impact of all the load and store uOps. Reviewers: zvi, RKSimon, craig.topper Differential Revision: https://reviews.llvm.org/D38727 Change-Id: I778a308cc11e490e8fa5e27e2047412a1dca029f llvm-svn: 315978
* Remove a test after revert of rL315440Max Kazantsev2017-10-171-146/+0
| | | | llvm-svn: 315977
* [NFC] Add test from bug 34937Max Kazantsev2017-10-171-0/+32
| | | | llvm-svn: 315976
* Revert 315440 on behalf of mkazantsevPhilip Reames2017-10-173-112/+0
| | | | | | | | | | | This patch reverts rL315440 because of the bug described at https://bugs.llvm.org/show_bug.cgi?id=34937 The fix for the bug is on review as D38944, but not yet ready. Given this is a regression reverting until a fix is ready is called for. Max would have done the revert himself, but is having trouble doing a build of fresh LLVM for some reason. I did the build and test to ensure the revert worked as expected on his behalf. llvm-svn: 315974
* [globalisel][tablegen] Add a GIM_CheckIsSameOperand test where OtherInsnID ↵Daniel Sanders2017-10-171-0/+61
| | | | | | and OtherOpIdx differ llvm-svn: 315972
* [X86] Add masked palignr tests to vector-shuffle-masked.llCraig Topper2017-10-171-0/+75
| | | | llvm-svn: 315971
* [X86] Add AVX512BW to the vector-shuffle-masked test to prepare for an ↵Craig Topper2017-10-171-133/+133
| | | | | | upcoming commit. llvm-svn: 315970
* [X86] Fix typo in comment. NFCCraig Topper2017-10-171-1/+1
| | | | llvm-svn: 315969
* Basic: make the nan family pureSaleem Abdulrasool2017-10-172-15/+11
| | | | | | | | | | The nan family of math routines do not rely on global state. They do however depend on their parameter. This fits the description of pure: Functions which have no effects except the return value and their return value depends only on the parameters and/or global variables. Mark the family as `readonly`. llvm-svn: 315968
* Reverting r315966 - it caused a build failure on an ubuntu x android bot.Jason Molenda2017-10-1710-302/+21
| | | | llvm-svn: 315967
* Committing this for Larry D'Anna:Jason Molenda2017-10-1710-21/+302
| | | | | | | | | | | This patch adds support for passing an arbitrary python stream (anything inheriting from IOBase) to SetOutputFileHandle or SetErrorFileHandle. Differential revision: https://reviews.llvm.org/D38829 <rdar://problem/34870417> llvm-svn: 315966
* FuzzMutate: Fix arch parsing in FuzzerCLIJustin Bogner2017-10-171-1/+1
| | | | | | | | The right way to parse arch names is by creating a triple. This was using getArchTypeForLLVMName before, which doesn't really do the right thing here. llvm-svn: 315965
* [ExecutionEngine] Correct the size of a write in a COFF i386 relocationShoaib Meenai2017-10-172-8/+12
| | | | | | | | | | | We want to be writing a 32bit value, so we should be writing 4 bytes instead of 2. Patch by Alex Langford <apl@fb.com>. Differential Revision: https://reviews.llvm.org/D38872 llvm-svn: 315964
* [llvm-cov] Add one correction to r315960 (PR34962)Vedant Kumar2017-10-172-8/+7
| | | | | | | | | In r315960, I accidentally assumed that the first line segment is guaranteed to be the non-gap region entry segment (given that one is present). It can actually be any segment on the line, and the test I checked in demonstrates that. llvm-svn: 315963
* Revert "[SCEV] Maintain and use a loop->loop invalidation dependency"Sanjoy Das2017-10-173-140/+118
| | | | | | | | | This reverts commit r315713. It causes PR34968. I think I know what the problem is, but I don't think I'll have time to fix it this week. llvm-svn: 315962
* Try to make crlf portable to other printf implementationsReid Kleckner2017-10-172-1/+3
| | | | llvm-svn: 315961
* [llvm-cov] Remove workaround in line execution count calculation (PR34962)Vedant Kumar2017-10-164-15/+20
| | | | | | | | | | | | | Gap areas make it possible to correctly determine when to use counts from deferred regions. Before gap areas were introduced, llvm-cov needed to use a heuristic to do this: it ignored counts from segments that start, but do not end, on a line. This heuristic breaks down on a simple example (see PR34962). This patch removes the heuristic and picks counts from any region entry segment which isn't a gap area. llvm-svn: 315960
* [libclang] Add support for querying cursor availabilityJonathan Coe2017-10-162-0/+58
| | | | | | | | | | | | | | | | | | | | Summary: This patch allows checking the availability of cursors through libclang and clang.cindex (Python). This e.g. allows to check whether a C++ member function has been marked as deleted. Reviewers: arphaman, jbcoe Reviewed By: jbcoe Subscribers: cfe-commits Tags: #clang Patch by jklaehn (Johann Klähn) Differential Revision: https://reviews.llvm.org/D36973 llvm-svn: 315959
* [libclang] Visit attributes for function and class templatesJonathan Coe2017-10-163-2/+36
| | | | | | | | | | | | | | | | | | Summary: Previously, `VisitAttributes` was not called for function and class templates and thus their attributes were not accessible using libclang. Reviewers: bkramer, arphaman, rsmith, jbcoe Reviewed By: jbcoe Subscribers: cfe-commits Tags: #clang Patch by jklaehn (Johann Klähn) Differential Revision: https://reviews.llvm.org/D36955 llvm-svn: 315958
* Use the return value of UpdateNodeOperands(); in some cases, ↵Mark Searles2017-10-163-3/+97
| | | | | | | | UpdateNodeOperands() modifies the node in-place and using the return value isn’t strictly necessary. However, it does not necessarily modify the node, but may return a resultant node if it already exists in the DAG. See comments in UpdateNodeOperands(). In that case, the return value must be used to avoid such scenarios as an infinite loop (node is assumed to have been updated, so added back to the worklist, and re-processed; however, node hasn’t changed so it is once again passed to UpdateNodeOperands(), assumed modified, added back to worklist; cycle infinitely repeats). Differential Revision: https://reviews.llvm.org/D38466 llvm-svn: 315957
* Fix usage in TableGen of getValueAsStringErich Keane2017-10-161-28/+27
| | | | | | | | | | | | | | | Record::getValueAsString returns a stringref to an interned string (apparently had been changed since most of tablegen was written). In this patch, I audited the usage of getValueAsString to find places where we can trivially stop storing 'std::string' and instead keep the stringref. There was one instance where an unnecessary 'stringstream' was being used, so that has been removed as well to unblock the stringref replacing string fix. Differential Revision: https://reviews.llvm.org/D38979 llvm-svn: 315956
* [X86][AVX] Add v4x64 vector shuffle test for <0,2,1,3> maskSimon Pilgrim2017-10-161-0/+42
| | | | llvm-svn: 315955
* COFF: Add resource files to linkrepro instead of the cvtres object file.Peter Collingbourne2017-10-164-23/+35
| | | | | | | | | Now that we have our own implementation of cvtres, we can add resource files directly to the linkrepro. Differential Revision: https://reviews.llvm.org/D38974 llvm-svn: 315954
* Don't print end-of-directive tokens in -E outputReid Kleckner2017-10-162-0/+22
| | | | | | | | | | This comes up when pre-processing standalone .s files containing hash-prefixed comments. The pre-processor should skip the unknown directive and not emit an extra newline as we were doing. Fixes PR34950 llvm-svn: 315953
* cmake: BSD: Mark /usr/local/include as system include directoryMatthias Braun2017-10-161-1/+1
| | | | | | | | | | | | | | | We add /usr/local/include to the include directory list for some BSD systems. We should mark this as a system directory to avoid files from /usr/local/include getting picked over files shipping with llvm. This typically manifested as gtest headers installed with the system getting picked over the ones shipping with llvm. Patch by Petr Penzin <penzin.dev@gmail.com> Differential Revision: https://reviews.llvm.org/D37415 llvm-svn: 315952
* Make __builtin_types_compatible_p more like GCC'sGeorge Burgess IV2017-10-162-3/+24
| | | | | | | | | | | GCC ignore qualifiers on array types. Since we seem to have this function primarily for GCC compatibility, we should try to match that behavior. This also adds a few more test-cases __builtin_types_compatible_p, which were inspired by GCC's documentation on the builtin. llvm-svn: 315951
* Replace usage of std::stringstream with raw_string_ostreamErich Keane2017-10-161-2/+3
| | | | | | | | Typically we don't use the stringstream, so instead use raw_string_stream. Additionally, the dependent function changed to use raw_ostream. llvm-svn: 315950
* COFF: Give manifest resource file a name.Peter Collingbourne2017-10-161-1/+2
| | | | | | | | | | | Without this, /linkrepro would create an invalid tar file. No tests because this requires Windows and the linkrepro tests require not-Windows. Differential Revision: https://reviews.llvm.org/D38973 llvm-svn: 315948
* Re-apply [AArch64][RegisterBankInfo] Use the statically computed mappings ↵Quentin Colombet2017-10-162-4/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for COPY This reverts commit r315823, thus re-applying r315781. Also make sure we don't use G_BITCAST mapping for non-generic registers. Non-generic registers don't have a type but do have a reg bank. Something the COPY mapping now how to deal with but the G_BITCAST mapping don't. -- Original Commit Message -- We use to resort on the generic implementation to get the mappings for COPYs. The generic implementation resorts on table lookup and dynamically allocated objects to get the valid mappings. Given we already know how to map G_BITCAST and have the static mappings for them, use that code path for COPY as well. This is much more efficient. Improve the compile time of RegBankSelect by up to 20%. Note: When we eventually generate all the mappings via TableGen, we wouldn't have to do that dance to shave compile time. The intent of this change was to make sure that moving to static structure really pays off. NFC. llvm-svn: 315947
* [AArch64][RegisterBankInfo] Add mapping support for G_BITCAST of s128Quentin Colombet2017-10-162-2/+29
| | | | | | Anything bigger than 64-bit just map to FPR. llvm-svn: 315946
* [AArch64][LegalizerInfo] Mark s128 G_BITCAST legalQuentin Colombet2017-10-162-1/+29
| | | | | | | We used to mark all G_BITCAST of 128-bit legal but only for vector types. Scalars of this size are just fine as well. llvm-svn: 315945
* Add !callees metadataMatthew Simpson2017-10-166-2/+37
| | | | | | | | | This patch adds a new kind of metadata that indicates the possible callees of indirect calls. Differential Revision: https://reviews.llvm.org/D37354 llvm-svn: 315944
* [MC] Lex CRLF as one tokenReid Kleckner2017-10-162-1/+14
| | | | | | | | | | This will prevent doubling of line endings when parsing assembly and emitting assembly. Otherwise we'd parse the directive, consume the end of statement, hit the next end of statement, and emit a fresh newline. llvm-svn: 315943
OpenPOWER on IntegriCloud