summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* hwasan: Align n_namesz and n_descsz to 4 when reading notes.Peter Collingbourne2019-08-231-2/+2
| | | | | | | | | | There is no requirement for the producer of a note to include the note alignment in these fields. As a result we can end up missing the HWASAN note if one of the other notes in the binary has the alignment missing. Differential Revision: https://reviews.llvm.org/D66692 llvm-svn: 369826
* [GWP-ASan] Split options_parser and backtrace_sanitizer_common.Mitch Phillips2019-08-236-19/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: optional/options_parser and optional/backtrace_sanitizer_common are logically separate components. They both use sanitizer-common to power their functionality, but there was an unstated implicit dependency that in order for backtrace_sanitizer_common to function correctly, one had to also use options_parser. This was because options_parser called __sanitizer::InitialiseCommonFlags. This is a requirement for backtrace_sanitizer_common to work, as the sanitizer unwinder uses the sanitizer_common flags and will SEGV on a null page if they're not initialised correctly. This patch removes this hidden dependency. You can now use backtrace_sanitizer_common without the requirements of options_parser. This patch also makes the GWP-ASan unit tests only have a soft dependency on sanitizer-common. The unit tests previously explicitly used __sanitizer::Printf, which is now provided under tests/optional/printf_sanitizer_common. This allows Android to build the unit tests using their own signal-safe printf(). Reviewers: eugenis Reviewed By: eugenis Subscribers: srhines, mgorny, #sanitizers, llvm-commits, vlad.tsyrklevich, morehouse Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D66684 llvm-svn: 369825
* [LLVM][NFC] Removing unused functionsGuillaume Chatelet2019-08-234-24/+1
| | | | | | | | | | | | | | Summary: Removes a not so useful function from DataLayout and cleans up Support/MathExtras.h Reviewers: courbet Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66691 llvm-svn: 369824
* Fix stack_trace_compressor builds for Clang < 6.0Mitch Phillips2019-08-231-3/+9
| | | | | | | | | | | | | | | | | | | | | | Summary: Clang 4.* doesn't supply -fsanitize=fuzzer, and Clang 5.* doesn't supply -fsanitize=fuzzer-no-link. Generally, in LLVM, fuzz targets are added through the add_llvm_fuzzer build rule, which can't be used in compiler-rt (as it has to be able to be standalone built). Instead of adding tooling to add a dummy main (which kind of defeats the purpose of these fuzz targets), we instead build the fuzz target only when the Clang version is >= 6.*. Reviewers: tejohnson Subscribers: mgorny, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D66682 llvm-svn: 369823
* [libclang][index][NFC] Fix test for skipping already parsed function bodiesJan Korous2019-08-231-1/+1
| | | | llvm-svn: 369822
* Skip tail call frame tests when dwarf_version < 4Vedant Kumar2019-08-239-8/+17
| | | | | | rdar://problem/54656572 llvm-svn: 369821
* Fix a test to test what the name suggest.Gabor Horvath2019-08-231-1/+1
| | | | llvm-svn: 369820
* [AMDGPU] Check for immediate SrcC in mfma in AsmParserStanislav Mekhanoshin2019-08-233-480/+481
| | | | | | Differential Revision: https://reviews.llvm.org/D66674 llvm-svn: 369819
* [AMDGPU] w/a for gfx908 mfma SrcC literal HW bugStanislav Mekhanoshin2019-08-231-3/+9
| | | | | | | | gfx908 ignores an mfma if SrcC is a literal. Differential Revision: https://reviews.llvm.org/D66670 llvm-svn: 369818
* [LifetimeAnalysis] Make it possible to disable the new warningsGabor Horvath2019-08-234-40/+97
| | | | llvm-svn: 369817
* [AMDGPU] w/a for gfx908 mfma SrcC literal HW bugStanislav Mekhanoshin2019-08-238-11/+48
| | | | | | | | gfx908 ignores an mfma if SrcC is a literal. Differential Revision: https://reviews.llvm.org/D66670 llvm-svn: 369816
* hwasan: Fix use of uninitialized memory.Peter Collingbourne2019-08-231-11/+12
| | | | | | | Reported by e.g. http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/23071/steps/build%20with%20ninja/logs/stdio llvm-svn: 369815
* Upstream support for macCatalyst Mach-O binaries.Adrian Prantl2019-08-233-146/+237
| | | | | | | | | | | | On macOS one Mach-O slice can contain multiple load commands: One load command for being loaded into a macOS process and one load command for being loaded into a macCatalyst process. This patch adds support for the new load command and makes sure ObjectFileMachO returns the Architecture that matches the Module. Differential Revision: https://reviews.llvm.org/D66626 llvm-svn: 369814
* Move a break into the correct place. NFCI.Peter Collingbourne2019-08-231-1/+1
| | | | | | Should silence new C fallthrough warning. llvm-svn: 369813
* [x86] add tests for bt/test; NFCSanjay Patel2019-08-231-0/+110
| | | | llvm-svn: 369812
* [clang-doc] Bump BitcodeWriter max line number to 32UJulie Hockett2019-08-231-1/+1
| | | | | | | | | PR43039 reports hitting the assert on a very large file, so bumping this to allow for larger files. Differential Revision: https://reviews.llvm.org/D66681 llvm-svn: 369811
* [LLVM][NFC] remove unused fieldsGuillaume Chatelet2019-08-233-35/+0
| | | | | | | | | | | | | | | | | | | Summary: Here is the commit introducing the fields https://github.com/llvm/llvm-project/commit/cf6749e4c091 It dates back from 2006 and was used by AArch64 backend. There is no more reference to these fields in the whole codebase so I think it's fine. Reviewers: courbet Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66683 llvm-svn: 369810
* [ORC] Remove query dependencies when symbols are resolved.Lang Hames2019-08-232-1/+26
| | | | | | | | | | If the dependencies are not removed then a late failure (one symbol covered by the query failing after others have already been resolved) can result in an attempt to detach the query from already finalized symbol, resulting in an assert/crash. This patch fixes the issue by removing query dependencies in JITDylib::resolve for symbols that meet the required state. llvm-svn: 369809
* [ORC] Fix a FIXME: Propagate errors to dependencies.Lang Hames2019-08-238-164/+629
| | | | | | | | | | | | | When symbols are failed (via MaterializationResponsibility::failMaterialization) any symbols depending on them will now be moved to an error state. Attempting to resolve or emit a symbol in the error state (via the notifyResolved or notifyEmitted methods on MaterializationResponsibility) will result in an error. If notifyResolved or notifyEmitted return an error due to failure of a dependence then the caller should log or discard the error and call failMaterialization to propagate the failure to any queries waiting on the symbols being resolved/emitted (plus their dependencies). llvm-svn: 369808
* [ORC] Fix an incorrect comment.Lang Hames2019-08-231-2/+1
| | | | llvm-svn: 369807
* [AArch64][GlobalISel] Import XRO load/store patterns instead of custom selectionJessica Paquette2019-08-235-68/+336
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using custom C++ in `earlySelect` for loads and stores, just import the patterns. Remove `earlySelectLoad`, since we can just import the work it's doing. Some minor changes to how `ComplexRendererFns` are returned for the XRO addressing modes. If you add immediates in two steps, sometimes they are not imported properly and you only end up with one immediate. I'm not sure if this is intentional. - Update load-addressing-modes.mir to include the instructions we can now import. - Add a similar test, store-addressing-modes.mir to show which store opcodes we currently import, and show that we can pull in shifts etc. - Update arm64-fastisel-gep-promote-before-add.ll to use FastISel instead of GISel. This test failed with GISel because GISel folds the gep into the load. The test checks that FastISel doesn't fold non-pointer-width adds into loads. GISel on the other hand, produces a G_CONSTANT of -128 for the add, and then a G_GEP, which must be pointer-width. Note that we don't get STRBRoX right now. It seems like the importer can't handle `FPR8Op:{ *:[Untyped] }:$Rt` source operands. So, those are not currently supported. Differential Revision: https://reviews.llvm.org/D66679 llvm-svn: 369806
* [GlobalISel] Legalizer: Retry combining illegal artifacts as long as there ↵Volkan Keles2019-08-2328-542/+1013
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | new artifacts Summary: Currently, Legalizer aborts if it’s unable to legalize artifacts. However, it’s possible to combine them after processing the rest of the instruction because the legalization is likely to generate more artifacts that allow ArtifactCombiner to combine away them. Instead, move illegal artifacts to another list called RetryList and wait until all of the instruction in InstList are legalized. After that, check if there is any new artifacts and try to combine them again if that’s the case. If not, abort. The idea is similar to D59339, but the approach is a bit different. This patch fixes the issue described above, but the legalizer still may be unable to handle some cases depending on when to legalize artifacts. So, in the long run, we probably need a different legalization strategy that handles this dependency in a better way. Reviewers: dsanders, aditya_nandakumar, qcolombet, arsenm, aemerson, paquette Reviewed By: dsanders Subscribers: jvesely, wdng, nhaehnle, rovka, javed.absar, hiraditya, Petar.Avramovic, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65894 llvm-svn: 369805
* [Attributor] Manifest alignment in load and store instructionsJohannes Doerfert2019-08-232-0/+105
| | | | | | | | | | | | | | | | Summary: We can now manifest alignment information in load/store instructions if the pointer is known to have a better alignment. Reviewers: uenoku, sstefan1, lebedev.ri Subscribers: hiraditya, bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66567 llvm-svn: 369804
* Do a sweep of symbol internalization. NFC.Benjamin Kramer2019-08-2320-40/+49
| | | | llvm-svn: 369803
* [X86] Move a transform out of combineConcatVectorOps so we don't prematurely ↵Craig Topper2019-08-231-9/+13
| | | | | | | | | | | | turn CONCAT_VECTORS into INSERT_SUBVECTORS. CONCAT_VECTORS and INSERT_SUBVECTORS can both call combineConcatVectorOps, but we shouldn't produce INSERT_SUBVECTORS from there. We should keep CONCAT_VECTORS until vector legalization. Noticed while looking at the madd_quad_reduction test from madd.ll llvm-svn: 369802
* [OPENMP5]Use nonmonotonic modifier by default for non-static andAlexey Bataev2019-08-232-13/+33
| | | | | | | | | | non-ordered loops. According to OpenMP 5.0, 2.9.2 Worksharing-Loop Construct, Desription, If the static schedule kind is specified or if the ordered clause is specified, and if the nonmonotonic modifier is not specified, the effect is as if the monotonic modifier is specified. Otherwise, unless the monotonic modifier is specified, the effect is as if the nonmonotonic modifier is specified. The first part of this requirement is implemented in runtime. Patch adds support for the second, nonmonotonic, part of this requirement. llvm-svn: 369801
* [libc++] Fix typo in documentation for LIBCXX_HERMETIC_STATIC_LIBRARYLouis Dionne2019-08-231-1/+1
| | | | | | | Thanks to Yichen Yan for the patch. Differential Revision: https://reviews.llvm.org/D66675 llvm-svn: 369800
* Fix some warnings introduced by r369798.Wei Mi2019-08-232-5/+5
| | | | llvm-svn: 369799
* [SampleFDO] Add ExtBinary format to support extension of binary profile.Wei Mi2019-08-2310-66/+441
| | | | | | | | | | | | This is a patch split from https://reviews.llvm.org/D66374. It tries to add a new format of profile called ExtBinary. The format adds a section header table to the profile and organize the profile in sections, so the future extension like adding a new section or extending an existing section will be easier while keeping backward compatiblity feasible. Differential Revision: https://reviews.llvm.org/D66513 llvm-svn: 369798
* [PowerPC] Expand v1i128 sminRoland Froese2019-08-232-4/+60
| | | | | | | | | The smin opcode and friends for v1i128 are incorrectly marked as legal for PPC. Change them to expand. Differential Revision: https://reviews.llvm.org/D64960 llvm-svn: 369797
* [OPENMP][NVPTX]Use __syncwarp() to reconverge the threads.Alexey Bataev2019-08-232-10/+19
| | | | | | | | | | | | | | | | | | | | | | | Summary: In Cuda 9.0 it is not guaranteed that threads in the warps are convergent. We need to use __syncwarp() function to reconverge the threads and to guarantee the memory ordering among threads in the warps. This is the first patch to fix the problem with the test libomptarget/deviceRTLs/nvptx/src/sync.cu on Cuda9+. This patch just replaces calls to __shfl_sync() function with the call of __syncwarp() function where we need to reconverge the threads when we try to modify the value of the parallel level counter. Reviewers: grokos Subscribers: guansong, jfb, jdoerfert, caomhin, kkwli0, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D65013 llvm-svn: 369796
* Fix a bug in just submitted rL369789Philip Reames2019-08-232-1/+30
| | | | | | | | Started implementing the vector case and realized the scalar case hadn't handled the GEP producing a different type than the base correctly. It's entertaining seeing what slips through review when we're focused on the 'hard' parts. :( Also adding an extra vector test as it happened to be in workspace and wasn't worth separating. llvm-svn: 369795
* RegScavenger: Use RegisterMatt Arsenault2019-08-232-29/+29
| | | | llvm-svn: 369794
* [X86] Automatically generate load-local-v3i1.ll . NFCAmaury Sechet2019-08-231-35/+97
| | | | llvm-svn: 369793
* [X86] Mark VPDPWSSD and VPDPWSSDS as commutable. Add stack folding tests.Craig Topper2019-08-234-11/+161
| | | | llvm-svn: 369792
* [Sema] Don't warn on printf('%hd', [char]) (PR41467)Nathan Huckleberry2019-08-236-11/+25
| | | | | | | | | | | | | | | | Summary: Link: https://bugs.llvm.org/show_bug.cgi?id=41467 Reviewers: rsmith, nickdesaulniers, aaron.ballman, lebedev.ri Reviewed By: nickdesaulniers, aaron.ballman, lebedev.ri Subscribers: lebedev.ri, nickdesaulniers, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66186 llvm-svn: 369791
* Revert r369233.Manoj Gupta2019-08-238-90/+170
| | | | | | | | This breaks building of some projects like libfuse and alsa-lib that now fail when linking. Error details in PR43092. llvm-svn: 369790
* [InstCombine] icmp eq/ne (gep inbounds P, Idx..), null -> icmp eq/ne P, nullPhilip Reames2019-08-232-0/+205
| | | | | | | | | | This generalizes the isGEPKnownNonNull rule from ValueTracking to apply when we do not know if the base is non-null, and thus need to replace one condition with another. The core notion is that since an inbounds GEP can only form null if the base pointer is null and the offset is zero. However, if the offset is non-zero, the the "inbounds" marker makes the result poison. Thus, we're free to ignore the case where the offset is non-zero. Similarly, there's no case under which a non-null base can result in a null result without generating poison. Differential Revision: https://reviews.llvm.org/D66608 llvm-svn: 369789
* Windows: explicitly cast constants to `DWORD`Saleem Abdulrasool2019-08-231-2/+2
| | | | | | | | | | STATUS_SINGLE_STEP and STATUS_BREAKPOINT are defined as 0x8------ which is negative and thus can't be implicitly narrowed to a DWORD which is unsigned. The value is defined differently across winnt.h and ntstatus.h. Patch by Gwen Mittertreiner! llvm-svn: 369788
* [AMDGPU] Automatically generate various tests. NFCAmaury Sechet2019-08-236-748/+2521
| | | | llvm-svn: 369787
* [BasicAA] Use dereferenceability to reason about aliasingJohannes Doerfert2019-08-232-4/+175
| | | | | | | | | | | | | | | | | | | | | Summary: We already use the fact that an object with known size X does not alias another objection of size Y > X before. With this commit, we use dereferenceability information to determine a lower bound for Y and not only rely on the user provided query size. The result for @global_and_deref_arg_2() and @local_and_deref_ret_2() in test/Analysis/BasicAA/dereferenceable.ll improved with this patch. Reviewers: asbirlea, chandlerc, hfinkel, sanjoy Subscribers: hiraditya, bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66157 llvm-svn: 369786
* [Attributor] Manifest constant return valuesJohannes Doerfert2019-08-232-1/+34
| | | | | | | | | | | | | | | | Summary: If the unique return value is a constant we now replace call uses with that constant. Reviewers: sstefan1, uenoku Subscribers: hiraditya, bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66551 llvm-svn: 369785
* [Attributor] Deal with shrinking dereferenceability in a loopJohannes Doerfert2019-08-232-8/+50
| | | | | | | | | | | | | | | | | | Summary: If we have a loop in which the dereferenceability of a pointer decreases we did slowly decrease it iteration by iteration, leading to a timeout. With this patch we detect such circular reasoning and indicate a fixpoint early. Reviewers: uenoku, sstefan1 Subscribers: hiraditya, bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66558 llvm-svn: 369784
* Fix clang-tidy warning in clang-tidyBenjamin Kramer2019-08-231-1/+1
| | | | | | | | argument name 'FixDescription' in comment does not match parameter name 'Description' Patch by Nils Barth! llvm-svn: 369783
* Allow Compiler.h to be included in C files and fix fallthrough warningsNathan Huckleberry2019-08-232-23/+29
| | | | | | | | | | | | | | | | | | | | | Summary: Since clang does not support comment style fallthrough annotations these should be switched to macros defined in Compiler.h. This requires some fixing to Compiler.h. Original patch: https://reviews.llvm.org/D66487 Reviewers: nickdesaulniers, aaron.ballman, xbolva00, rsmith Reviewed By: nickdesaulniers, aaron.ballman, rsmith Subscribers: rsmith, sfertile, ormris, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66609 llvm-svn: 369782
* Debug Info: Support for DW_AT_export_symbols for anonymous structsShafik Yaghmour2019-08-234-2/+45
| | | | | | | | | | | | | | | | | | | | | | This implements the DWARF 5 feature described in: http://dwarfstd.org/ShowIssue.php?issue=141212.1 To support recognizing anonymous structs: struct A { struct { // Anonymous struct int y; }; } a; This patch adds a new (DI)flag to LLVM metadata: ExportSymbols Differential Revision: https://reviews.llvm.org/D66352 llvm-svn: 369781
* [SelectionDAG][X86] Enable iX SimplifyDemandedBits to vXi1 ↵Craig Topper2019-08-232-3/+21
| | | | | | | | | | | | | | | | SimplifyDemandedVectorElts simplification. Add a hack to X86 to avoid a regression Patch showing the effect of enabling bool vector oversimplification. Non-VLX builds can simplify a kshift shuffle, but VLX builds simplify: insert_subvector v8i zeroinitializer, v2i --> insert_subvector v8i undef, v2i Preventing the removal of the AND to clear the upper bits of result Differential Revision: https://reviews.llvm.org/D53022 llvm-svn: 369780
* [OpenCL] Renamed value of std flag in C++ mode.Anastasia Stulova2019-08-232-2/+2
| | | | | | | | Clang should accept -std=clc++ (not -std=c++!) for OpenCL. This was forgotten in r367008. llvm-svn: 369779
* [DebugInfo] Remove invalidated locations during LiveDebugValuesJeremy Morse2019-08-234-5/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | LiveDebugValues gives variable locations to blocks, but it should also take away. There are various circumstances where a variable location is known until a loop backedge with a different location is detected. In those circumstances, where there's no agreement on the variable location, it should be undef / removed, otherwise we end up picking a location that's valid on some loop iterations but not others. However, LiveDebugValues doesn't currently do this, see the new testcase attached. Without this patch, the location of !3 is assumed to be %bar through the loop. Once it's added to the In-Locations list, it's never removed, even though the later dbg.value(0... of !3 makes the location un-knowable. This patch checks during block-location-joining to see whether any previously-present locations have been removed in a predecessor. If they have, the live-ins have changed, and the block needs reprocessing. Similarly, in transferTerminator, assign rather than |= the Out-Locations after processing a block, as we may have deleted some previously valid locations. This will mean that LiveDebugValues performs more propagation -- but that's necessary for it being correct. Differential Revision: https://reviews.llvm.org/D66599 llvm-svn: 369778
* Fixed a typo.Artem Belevich2019-08-231-1/+1
| | | | llvm-svn: 369777
OpenPOWER on IntegriCloud