summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Revert r373034Nicholas Allegra2019-09-274-64/+24
| | | | | | It breaks the build on MSVC. llvm-svn: 373039
* Speculative fix for gcc build.Peter Collingbourne2019-09-271-2/+4
| | | | llvm-svn: 373038
* For P0784R7: add support for new (std::nothrow).Richard Smith2019-09-275-13/+62
| | | | llvm-svn: 373037
* For P0784R7: Add support for dynamic allocation with new / delete duringRichard Smith2019-09-2710-73/+901
| | | | | | constant evaluation. llvm-svn: 373036
* hwasan: Compatibility fixes for short granules.Peter Collingbourne2019-09-2712-137/+245
| | | | | | | | | | | | | | | | | | | | | | | | | We can't use short granules with stack instrumentation when targeting older API levels because the rest of the system won't understand the short granule tags stored in shadow memory. Moreover, we need to be able to let old binaries (which won't understand short granule tags) run on a new system that supports short granule tags. Such binaries will call the __hwasan_tag_mismatch function when their outlined checks fail. We can compensate for the binary's lack of support for short granules by implementing the short granule part of the check in the __hwasan_tag_mismatch function. Unfortunately we can't do anything about inline checks, but I don't believe that we can generate these by default on aarch64, nor did we do so when the ABI was fixed. A new function, __hwasan_tag_mismatch_v2, is introduced that lets code targeting the new runtime avoid redoing the short granule check. Because tag mismatches are rare this isn't important from a performance perspective; the main benefit is that it introduces a symbol dependency that prevents binaries targeting the new runtime from running on older (i.e. incompatible) runtimes. Differential Revision: https://reviews.llvm.org/D68059 llvm-svn: 373035
* [Consumed][NFC] Refactor handleCall to take function argument list.Nicholas Allegra2019-09-264-24/+64
| | | | | | Differential Revision: https://reviews.llvm.org/D67569 llvm-svn: 373034
* Revert "gn build: (manually) merge r373028"Dmitri Gribenko2019-09-264-21/+0
| | | | | | This reverts commit r373029, which depends on r373028, which I reverted. llvm-svn: 373033
* Revert "[clang-tidy] New check to warn when storing dispatch_once_t in ↵Dmitri Gribenko2019-09-2613-235/+0
| | | | | | | | non-static, non-global storage" This reverts commit r373028, because the new test fails on Linux. llvm-svn: 373032
* [X86] Remove CodeGenOnly instructions added in r373021, but keep the isel ↵Craig Topper2019-09-261-16/+10
| | | | | | patterns and add COPY_TO_REGCLASS to them. llvm-svn: 373031
* gn build: (manually) merge r373028Nico Weber2019-09-264-0/+21
| | | | llvm-svn: 373029
* [clang-tidy] New check to warn when storing dispatch_once_t in non-static, ↵Stephane Moore2019-09-2613-0/+235
| | | | | | | | | | | | | | | | | | | | | | | non-global storage Summary: Creates a new darwin ClangTidy module and adds the darwin-dispatch-once-nonstatic check that warns about dispatch_once_t variables not in static or global storage. This catches a missing static for local variables in e.g. singleton initialization behavior, and also warns on storing dispatch_once_t values in Objective-C instance variables. C/C++ struct/class instances may potentially live in static/global storage, and are ignored for this check. The osx.API static analysis checker can find the non-static storage use of dispatch_once_t; I thought it useful to also catch this issue in clang-tidy when possible. Contributed By: mwyman Reviewers: benhamilton, hokein, stephanemoore, aaron.ballman, gribozavr Reviewed By: stephanemoore, gribozavr Subscribers: jkorous, arphaman, kadircet, usaxena95, NoQ, xazax.hun, lebedev.ri, mgorny, cfe-commits Tags: #clang, #clang-tools-extra Differential Revision: https://reviews.llvm.org/D67567 llvm-svn: 373028
* [X86] Remove unused arguments from a tablegen multiclass. NFCCraig Topper2019-09-261-13/+13
| | | | llvm-svn: 373026
* [X86] Add VMOVSSZrrk/VMOVSDZrrk/VMOVSSZrrkz/VMOVSDZrrkz to getUndefRegClearance.Craig Topper2019-09-2611-64/+73
| | | | | | | | | We have isel patterns that can put an IMPLICIT_DEF on one of the sources for these instructions. So we should make sure we break any dependencies there. This should be done by just using one of the other sources. llvm-svn: 373025
* Remove the AliasAnalysis argument in function areMemAccessesTriviallyDisjointChangpeng Fang2019-09-2615-27/+15
| | | | | | | | | | Reviewers: arsenm Differential Revision: https://reviews.llvm.org/D58360 llvm-svn: 373024
* [OpenMP 5.0] Fix user-defined mapper lookup in semaMichael Kruse2019-09-263-9/+33
| | | | | | | | | | | | This patches fixes the case when a user-defined mapper is attached to the elements of an array, and to report error when a mapper is used for types other than struct, class, and union. Patch by Lingda Li <lildmh@gmail.com> Differential Revision: https://reviews.llvm.org/D67978 llvm-svn: 373023
* Always rebuild a DeclRefExpr if its FoundDecl would change.Richard Smith2019-09-262-0/+17
| | | | | | Fixes a regression introduced by r369999. llvm-svn: 373022
* [X86] Add CodeGenOnly instructions for (f32 (X86selects $mask, (loadf32 ↵Craig Topper2019-09-264-7/+26
| | | | | | | | | | | | addr), fp32imm0) to use masked MOVSS from memory. Similar for f64 and having a non-zero passthru value. We were previously not trying to fold the load at all. Using a CodeGenOnly instruction allows us to use FR32X/FR64X as the register class to avoid a bunch of COPY_TO_REGCLASS. llvm-svn: 373021
* Revert [SLP] Fix for PR31847: Assertion failed: ↵Jordan Rupprecht2019-09-2622-379/+1334
| | | | | | | | (isLoopInvariant(Operands[i], L) && "SCEVAddRecExpr operand is not loop-invariant!") This reverts r372626 (git commit 6a278d9073bdc158d31d4f4b15bbe34238f22c18) llvm-svn: 373019
* [LoopFusion] Add ability to fuse guarded loopsKit Barton2019-09-262-24/+477
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch extends the current capabilities in loop fusion to fuse guarded loops (as defined in https://reviews.llvm.org/D63885). The patch adds the necessary safety checks to ensure that it safe to fuse the guarded loops (control flow equivalent, no intervening code, and same guard conditions). It also provides an alternative method to perform the actual fusion of guarded loops. The mechanics to fuse guarded loops are slightly different then fusing non-guarded loops, so I opted to keep them separate methods. I will be cleaning this up in later patches, and hope to converge on a single method to fuse both guarded and non-guarded loops, but for now I think the review will be easier to keep them separate. Reviewers: jdoerfert, Meinersbur, dmgreen, etiotto, Whitney Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65464 llvm-svn: 373018
* [Unroll] Do NOT unroll a loop with small runtime upperboundZhaoshi Zheng2019-09-264-24/+111
| | | | | | | | | | | | | | | | For a runtime loop if we can compute its trip count upperbound: Don't unroll if: 1. loop is not guaranteed to run either zero or upperbound iterations; and 2. trip count upperbound is less than UnrollMaxUpperBound Unless user or TTI asked to do so. If unrolling, limit unroll factor to loop's trip count upperbound. Differential Revision: https://reviews.llvm.org/D62989 Change-Id: I6083c46a9d98b2e22cd855e60523fdc5a4929c73 llvm-svn: 373017
* [lldb-vscode] correctly handle multiple sourceMap entriesAlex Langford2019-09-261-2/+2
| | | | | | | | | | | | | | Summary: `lldb-vscode` concatenates a string of sourceMap entries specified in the config, but fails to put a space between each entry, which causes the settings command to fail. This patch adds a space between each mapping. Patch by Richard Howell Differential Revision: https://reviews.llvm.org/D67569 llvm-svn: 373016
* [AMDGPU] copy OtherPredicates from pseudo to VOP3_RealStanislav Mekhanoshin2019-09-261-0/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D68102 llvm-svn: 373015
* [DAGCombine][X86][AArch64][NFC] Add tests for shift-by-signextRoman Lebedev2019-09-262-0/+270
| | | | llvm-svn: 373014
* [InstCombine][NFC] Add tests for shift-by-signextRoman Lebedev2019-09-261-0/+105
| | | | llvm-svn: 373013
* [InstCombine][NFC] Regenerate load-cmp.ll testRoman Lebedev2019-09-261-25/+25
| | | | llvm-svn: 373012
* [LOOPGUARD] Disable loop with multiple loop exiting blocks.Whitney Tsang2019-09-262-8/+126
| | | | | | | | | | | | | | | | | | | | Summary: As discussed in the loop group meeting. With the current definition of loop guard, we should not allow multiple loop exiting blocks. For loops that has multiple loop exiting blocks, we can simply unable to find the loop guard. When getUniqueExitBlock() obtains a vector size not equals to one, that means there is either no exit blocks or there exists more than one unique block the loop exit to. If we don't disallow loop with multiple loop exit blocks, then with our current implementation, there can exist exit blocks don't post dominated by the non pre-header successor of the guard block. Reviewer: reames, Meinersbur, kbarton, etiotto, bmahjour Reviewed By: Meinersbur, kbarton Subscribers: fhahn, hiraditya, llvm-commits Tag: LLVM Differential Revision: https://reviews.llvm.org/D66529 llvm-svn: 373011
* [OPENMP50]Emit warnings if the functions was defined/used before markedAlexey Bataev2019-09-265-13/+22
| | | | | | | | | declare variant. We can use the original function if it was used/emitted already. So, just use warnings for these cases, not errors. llvm-svn: 373010
* [AIX]Emit function descriptor csect in assemblyXiangling Liao2019-09-2615-15/+244
| | | | | | | | | This patch emits the function descriptor csect for functions with definitions under both 32-bit/64-bit mode on AIX. Differential Revision: https://reviews.llvm.org/D66724 llvm-svn: 373009
* [NFC][emacs] remove out-of-date comment from tablegen-mode.elBob Haarman2019-09-261-2/+0
| | | | | | | | | | | | | | | | | | | | Summary: The syntax table was originally based on and attributed to jasmin.el, but was rewritten in r45192, so the comment that says the code comes from jasmin.el is no longer accurate. This change removes the comment, shortening the code a bit. Reviewers: MaskRay, lattner Reviewed By: MaskRay Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68042 llvm-svn: 373008
* [clang-scan-deps] Allow continuation line backslashes followed by whitespaceAlex Lorenz2019-09-262-15/+37
| | | | | | | | | | | | in the dependency source minimizer Clang allows continuations that have whitespace between the backslash and the newline. This patch ensures that the dependency source minimizer can handle the whitespace between the backslash and the newline when looking for a line continuation. Differential Revision: https://reviews.llvm.org/D68052 llvm-svn: 373007
* [NFC] Precommit tests for D68089David Bolvansky2019-09-261-0/+79
| | | | llvm-svn: 373006
* Revert "[analyzer] A speculative attempt to avoid gcc-7 crashes..."Artem Dergachev2019-09-261-5/+2
| | | | | | This reverts commit r372940 which was an overreaction to a flaky buildbot. llvm-svn: 373005
* Only pass -coverage-notes-file when emitting coverageReid Kleckner2019-09-262-36/+52
| | | | | | | | | | | | | | | | The only functional change here is that -coverage-notes-file is not passed to -cc1 in some situations. This code appears to be trying to put the gcno and gcda output next to the final object file, but it's doing that in a really convoluted way that needs to be re-examined. It looks for -c or -S in the original command, and then looks at the -o argument if present in order to handle the -fno-integrated-as case. However, this doesn't work if this is a link command with multiple inputs. I looked into fixing this, but the check-profile test suite has a lot of dependencies on this behavior, so I left it all alone. llvm-svn: 373004
* Convert FileSystem::Open() to return Expected<FileUP>Lawrence D'Anna2019-09-2626-208/+278
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch converts FileSystem::Open from this prototype: Status Open(File &File, const FileSpec &file_spec, ...); to this one: llvm::Expected<std::unique_ptr<File>> Open(const FileSpec &file_spec, ...); This is beneficial on its own, as llvm::Expected is a more modern and recommended error type than Status. It is also a necessary step towards https://reviews.llvm.org/D67891, and further developments for lldb_private::File. Reviewers: JDevlieghere, jasonmolenda, labath Reviewed By: labath Subscribers: mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67996 llvm-svn: 373003
* Document requirement of function attributes with constrained floatingKevin P. Neal2019-09-261-1/+13
| | | | | | | | | | point. Reviewed by: andrew.w.kaylor, uweigand, efriedma Approved by: andrew.w.kaylor Differential Revision: https://reviews.llvm.org/D67839 llvm-svn: 373002
* DAGISelMatcherOpt - TGParser::ParseOperation - silence static analyzer ↵Simon Pilgrim2019-09-261-4/+5
| | | | | | | | cast_or_null<CheckTypeMatcher> null dereference warning. NFCI. The static analyzer is warning about a potential null dereference, replace with an null/isa assertion and cast<CheckTypeMatcher>. llvm-svn: 373001
* [InstCombine] Use m_Zero instead of isNullValue() when checking if a GEP ↵Craig Topper2019-09-262-1/+18
| | | | | | | | | | | | index is all zeroes to prevent an infinite loop. The test case here previously infinite looped. Only one element from the GEP is used so SimplifyDemandedVectorElts would replace the other lanes in each index with undef leading to the first index being <0, undef, undef, undef>. But there's a GEP transform that tries to replace an index into a 0 sized type with a zero index. But the zero index check only works on ConstantInt 0 or ConstantAggregateZero so it would turn the index back to zeroinitializer. Resulting in a loop. The fix is to use m_Zero() to allow a vector of zeroes and undefs. Differential Revision: https://reviews.llvm.org/D67977 llvm-svn: 373000
* Move normalization of `\` in #includes from -fms-compatibility to ↵Reid Kleckner2019-09-263-23/+27
| | | | | | | | | -fms-extensions Handling backslashes in include paths in the implementation isn't non-conforming. llvm-svn: 372999
* SystemInitializer: Define macros for experimental targets tooPavel Labath2019-09-262-0/+4
| | | | llvm-svn: 372998
* TGParser::ParseOperation - silence static analyzer dyn_cast<TypedInit> null ↵Simon Pilgrim2019-09-261-5/+5
| | | | | | | | | | dereference warning. NFCI. The static analyzer is warning about a potential null dereference, but we should be able to use cast<TypedInit> directly and if not assert will fire for us. I've also pulled out the repeated getType() call which was the only user of the pointer. llvm-svn: 372997
* [ELF] Set SectionBase::partition in processSectionCommandsFangrui Song2019-09-262-3/+12
| | | | | | | | | | | | | | | | | Fixes PR43461 (regression caused by D67504) The partition field of a SECTIONS-specified section is not set after D67504. The 0 value affects findSection() which checks if the partition field is 1. So `Out::initArray = findSection(".init_array")` is null, and DT_INIT_ARRAYSZ is not set. Reviewed By: peter.smith Differential Revision: https://reviews.llvm.org/D68087 llvm-svn: 372996
* [lld][mach-o] Avoid segfaulting when handling an empty section list.Matt Davis2019-09-262-6/+17
| | | | | | | | | | | | | | | | | Summary: The following patch avoids segfaulting if the section list is empty when writing a mach-o MH_OBJECT. I ran into this case from a more complicated example trying to dead_strip while using '-r' in lld. I'm not sure if having empty sections is a legal mach-o, but it does seem that other llvm-binutils tools can ingest such a boring object with out issue. Would it be better to emit an error, emit a warning, or do nothing? It seems that adding a warning diagnostic might be helpful to users, as I did not expect to have a section-less object when the linker was done. Reviewers: kledzik, ruiu Subscribers: llvm-commits, jrm Tags: #lld, #llvm Differential Revision: https://reviews.llvm.org/D67735 llvm-svn: 372995
* Un-XFAIL coverage_no_integrated_as.c test on WindowsReid Kleckner2019-09-261-7/+6
| | | | | | | | | | | You can't use -fno-integrated-as for *-msvc triples because no usable standalone assembler exists. Perhaps we could teach clang to emit a .s and then reinvoke itself, but that's a bit silly. Anyway, fix the test by using an Itanium ABI triple, which will become mingw, which will assume gnu as is a usable assembler. llvm-svn: 372994
* ConstantFold - silence static analyzer dyn_cast<ExtractValueInst> null ↵Simon Pilgrim2019-09-261-1/+1
| | | | | | | | dereference warning. NFCI. The static analyzer is warning about a potential null dereference, but we should be able to use cast<ExtractValueInst> directly and if not assert will fire for us. llvm-svn: 372993
* ARMBaseInstrInfo getOperandLatency - silence static analyzer dyn_cast<> null ↵Simon Pilgrim2019-09-261-2/+2
| | | | | | | | dereference warnings. NFCI. The static analyzer is warning about potential null dereferences, but we should be able to use cast<> directly and if not assert will fire for us. llvm-svn: 372992
* [PowerPC] Fix typo in rL372985Jinsong Ji2019-09-261-1/+1
| | | | llvm-svn: 372991
* [LoopInfo] Limit the iterations to check whether a loop has dedicated exitsWei Mi2019-09-264-2/+124
| | | | | | | | | | | | | | for extreme large case. We had a case that a single loop which has 4000 exits and the average number of predecessors of each exit is > 1000, and we found compiling the case spent a significant amount of time on checking whether a loop has dedicated exits. This patch adds a limit for the iterations to the check. With the patch, the time to compile our testcase reduced from 1000s to 200s (clang release build). Differential Revision: https://reviews.llvm.org/D67359 llvm-svn: 372990
* Handle successor's PHI node correctly when flattening CFG merges two if-regionsJakub Kuderski2019-09-262-1/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: FlattenCFG merges two 'if' basicblocks by inserting one basicblock to another basicblock. The inserted basicblock can have a successor that contains a PHI node whoes incoming basicblock is the inserted basicblock. Since the existing code does not handle it, it becomes a badref. if (cond1) statement if (cond2) statement successor - contains PHI node whose predecessor is cond2 --> if (cond1 || cond2) statement (BB for cond2 was deleted) successor - contains PHI node whose predecessor is cond2 --> bad ref! Author: Jaebaek Seo Reviewers: asbirlea, kuhar, tstellar, chandlerc, davide, dexonsmith Reviewed By: kuhar Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68032 llvm-svn: 372989
* Fix typoMatt Arsenault2019-09-261-2/+2
| | | | llvm-svn: 372988
* [NFC] Rearrange Value::getPointerAlignmentGuillaume Chatelet2019-09-261-21/+23
| | | | | | | | | | | | Reviewers: courbet Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67918 llvm-svn: 372987
OpenPOWER on IntegriCloud