summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [SelectionDAGISel] Suppress a -Wunused-but-set-variable warning in release ↵Craig Topper2018-10-311-0/+1
| | | | | | builds. NFC llvm-svn: 345761
* [ASTImporter][Structural Eq] Check for isBeingDefinedGabor Marton2018-10-312-1/+46
| | | | | | | | | | | | | | Summary: If one definition is currently being defined, we do not compare for equality and we assume that the decls are equal. Reviewers: a_sidorin Subscribers: rnkovacs, dkrupp, Szelethus, cfe-commits Differential Revision: https://reviews.llvm.org/D53697 llvm-svn: 345760
* [NFC] Mark "Splicing Maps and Sets" as done in LLVM 8.0Louis Dionne2018-10-311-1/+1
| | | | llvm-svn: 345759
* Fix comment typo. NFCI.Simon Pilgrim2018-10-311-1/+1
| | | | llvm-svn: 345758
* [InstCombine] regenerate test checks; NFCSanjay Patel2018-10-311-32/+32
| | | | llvm-svn: 345757
* [SelectionDAG] SelectionDAGLegalize::ExpandBITREVERSE - ensure we use ShiftTySimon Pilgrim2018-10-311-6/+6
| | | | | | We should be using the getShiftAmountTy value type for shift amounts. llvm-svn: 345756
* [NFC] Fixed -Wsign-compare warningDavid Bolvansky2018-10-311-1/+1
| | | | llvm-svn: 345755
* [globalisel][irtranslator] Fix test from r345743 on non-asserts builds.Daniel Sanders2018-10-311-0/+2
| | | | llvm-svn: 345754
* [clang-format] tweaked another case of lambda formattingKrasimir Georgiev2018-10-315-18/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is done in order to improve cases where the lambda's body is moved too far to the right. Consider the following snippet with column limit set to 79: ``` void f() { leader::MakeThisCallHere(&leader_service_, cq_.get(), [this, liveness](const leader::ReadRecordReq& req, std::function<void()> done) { logger_->HandleReadRecord( req, resp, std::move(done)); }); leader::MakeAnother(&leader_service_, cq_.get(), [this, liveness](const leader::ReadRecordReq& req, std::function<void()> done) { logger_->HandleReadRecord( req, resp, std::move(done), a); }); } ``` The tool favors extra indentation for the lambda body and so the code incurs extra wrapping and adjacent calls are indented to a different level. I find this behavior annoying and I'd like the tool to favor new lines and, thus, use the extra width. The fix, reduced, brings the following formatting. Before: function(1, [] { DoStuff(); // }, 1); After: function( 1, [] { DoStuff(); // }, 1); Refer to the new tests in FormatTest.cpp Contributed by oleg.smolsky! Reviewers: djasper, klimek, krasimir Subscribers: cfe-commits, owenpan Tags: #clang Differential Revision: https://reviews.llvm.org/D52676 llvm-svn: 345753
* [InstCombine] add tests for fcmp with -0.0; NFCSanjay Patel2018-10-311-0/+57
| | | | | | From IEEE754: "Comparisons shall ignore the sign of zero (so +0 = −0)." llvm-svn: 345752
* [InstCombine] Combine nested min/max intrinsics with constantsVolkan Keles2018-10-315-49/+59
| | | | | | | | | | | | Reviewers: arsenm, spatel Reviewed By: spatel Subscribers: lebedev.ri, wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D53774 llvm-svn: 345751
* [llvm-mca] Remove the verb 'assemble' from a few options in help. NFC.Matt Davis2018-10-311-17/+17
| | | | | | | * MCA does not assemble anything. * Ran clang-format. llvm-svn: 345750
* TableGen: Fix ASAN errorNicolai Haehnle2018-10-311-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: As a bonus, this arguably improves the code by making it simpler. gcc 8 on Ubuntu 18.10 reports the following: ==39667==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7fffffff8ae0 at pc 0x555555dbfc68 bp 0x7fffffff8760 sp 0x7fffffff8750 WRITE of size 8 at 0x7fffffff8ae0 thread T0 #0 0x555555dbfc67 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Alloc_hider::_Alloc_hider(char*, std::allocator<char>&&) /usr/include/c++/8/bits/basic_string.h:149 #1 0x555555dbfc67 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&) /usr/include/c++/8/bits/basic_string.h:542 #2 0x555555dbfc67 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > std::operator+<char, std::char_traits<char>, std::allocator<char> >(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&) /usr/include/c++/8/bits/basic_string.h:6009 #3 0x555555dbfc67 in searchableFieldType /home/nha/amd/build/san/llvm-src/utils/TableGen/SearchableTableEmitter.cpp:168 (...) Address 0x7fffffff8ae0 is located in stack of thread T0 at offset 864 in frame #0 0x555555dbef3f in searchableFieldType /home/nha/amd/build/san/llvm-src/utils/TableGen/SearchableTableEmitter.cpp:148 Reviewers: fhahn, simon_tatham, kparzysz Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D53931 llvm-svn: 345749
* Re-land r345676 "[Win64] Handle passing i128 by value"Reid Kleckner2018-10-312-11/+49
| | | | | | | Fix the unintended switch/case fallthrough to avoid changing long double behavior. llvm-svn: 345748
* [analyzer] Re-add custom OSIterator rule for RetainCountCheckerGeorge Karpenkov2018-10-312-4/+19
| | | | | | | | Turns out the rule is quite ubiquitous. Revert of https://reviews.llvm.org/D53628 llvm-svn: 345747
* [analyzer] RetainCountChecker: for now, do not trust the summaries of ↵George Karpenkov2018-10-313-37/+46
| | | | | | | | | | | | | | | | inlined code Trusting summaries of inlined code would require a more thorough work, as the current approach was causing too many false positives, as the new example in test. The culprit lies in the fact that we currently escape all variables written into a field (but not passed off to unknown functions!), which can result in inconsistent behavior. rdar://45655344 Differential Revision: https://reviews.llvm.org/D53902 llvm-svn: 345746
* [analyzer] Enable retain count checking for OSObject by defaGeorge Karpenkov2018-10-312-2/+2
| | | | | | | | The FP rate seems to be good enough now. Differential Revision: https://reviews.llvm.org/D53849 llvm-svn: 345745
* Second half of C++17's splicing maps and setsErik Pilkington2018-10-3116-68/+1874
| | | | | | | | | | This commit adds a merge member function to all the map and set containers, which splices nodes from the source container. This completes support for P0083r3. Differential revision: https://reviews.llvm.org/D48896 llvm-svn: 345744
* [globalisel][irtranslator] Verify that DILocations aren't lost in translationDaniel Sanders2018-10-312-23/+120
| | | | | | | | | | | | | | | | Summary: Also fix a couple bugs where DILocations are lost. EntryBuilder wasn't passing on debug locations for PHI's, constants, GLOBAL_VALUE, etc. Reviewers: aprantl, vsk, bogner, aditya_nandakumar, volkan, rtereshin, aemerson Reviewed By: aemerson Subscribers: aemerson, rovka, kristof.beyls, javed.absar, llvm-commits Differential Revision: https://reviews.llvm.org/D53740 llvm-svn: 345743
* [clang-tidy] add missing '--' in RUN-line, unbreak buildbotJonas Toth2018-10-311-1/+1
| | | | llvm-svn: 345742
* [Lex] Make MacroDirective::findDirectiveAtLoc take const SourceManagerKristof Umann2018-10-312-2/+4
| | | | | | | | | I'm currently working on including macro expansions in the Static Analyzer's plist output, where I can only access a const SourceManager. Differential Revision: https://reviews.llvm.org/D53940 llvm-svn: 345741
* MachineModuleInfo: Initialize DbgInfoAvailable depending on debug_cus existingMatthias Braun2018-10-314-3/+34
| | | | | | | | | | | | | | | | Before this patch DbgInfoAvailable was set to true in DwarfDebug::beginModule() or CodeViewDebug::CodeViewDebug(). This made MIR testing weird since passes would suddenly stop dealing with debug info just because we stopped the pipeline before the debug printers. This patch changes the logic to initialize DbgInfoAvailable based on the fact that debug_compile_units exist in the llvm Module. The debug printers may then override it with false in case of debug printing being disabled. Differential Revision: https://reviews.llvm.org/D53885 llvm-svn: 345740
* [clang-tidy] add -fexceptions to failing unit-test, unbreak buildbotJonas Toth2018-10-311-1/+1
| | | | llvm-svn: 345738
* [clang] try-fix broken documentation builderJonas Toth2018-10-311-0/+1
| | | | llvm-svn: 345737
* [clang-tools-extra] fix broken link in release notesJonas Toth2018-10-311-1/+1
| | | | llvm-svn: 345736
* [clang-tidy] new check 'readability-isolate-declaration'Jonas Toth2018-10-3113-0/+1139
| | | | | | | | | | | | | | | | | | | | | Summary: This patch introduces a new clang-tidy check that matches on all `declStmt` that declare more then one variable and transform them into one statement per declaration if possible. It currently only focusses on variable declarations but should be extended to cover more kinds of declarations in the future. It is related to https://reviews.llvm.org/D27621 and does use it's extensive test-suite. Thank you to firolino for his work! Reviewers: rsmith, aaron.ballman, alexfh, hokein, kbobyrev Reviewed By: aaron.ballman Subscribers: ZaMaZaN4iK, mgehre, nemanjai, kbarton, lebedev.ri, Eugene.Zelenko, mgorny, xazax.hun, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D51949 llvm-svn: 345735
* [InstCombine] refactor fabs+fcmp fold; NFCSanjay Patel2018-10-312-199/+105
| | | | | | | Also, remove/replace/minimize/enhance the tests for this fold. The code drops FMF, so it needs more tests and at least 1 fix. llvm-svn: 345734
* [LLDB] - Regroup the switch entries in DWARFFormValue::ExtractValue. NFC.George Rimar2018-10-311-60/+26
| | | | | | | | This is NFC to clean up the `DWARFFormValue::ExtractValue`. It groups similar `DW_FORM_*` and removes an excessive assignment of `ref_addr_size` (it was assigned right after in any case). llvm-svn: 345733
* [Hexagon] Make sure not to use GP-relative addressing with PICKrzysztof Parzyszek2018-10-314-4/+47
| | | | | | | Make sure that -relocation-model=pic prevents use of GP-relative addressing modes. llvm-svn: 345731
* [llvm-mca] Remove namespace prefixes made redundant by r345612. NFCAndrea Di Biagio2018-10-3118-149/+129
| | | | llvm-svn: 345730
* Delete dependency on config.hKadir Cetinkaya2018-10-311-3/+2
| | | | | | | | | | | | | | | | Summary: Since llvm/Config/config.h is not available on standalone builds, use __USE_POSIX instead of HAVE_PTHREAD_H and get rid of the include. Reviewers: sammccall Reviewed By: sammccall Subscribers: lebedev.ri, krytarowski, ilya-biryukov, ioeric, jkorous, arphaman, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D53935 llvm-svn: 345729
* [InstSimplify] fold 'fcmp nnan ult X, 0.0' when X is not negativeSanjay Patel2018-10-312-13/+8
| | | | | | This is the inverted case for the transform added with D53874 / rL345725. llvm-svn: 345728
* [InstCombine] add assertion that InstSimplify has folded a fabs+fcmp; NFCSanjay Patel2018-10-311-2/+5
| | | | | | | | The 'OLT' case was updated at rL266175, so I assume it was just an oversight that 'UGE' was not included because that patch handled both predicates in InstSimplify. llvm-svn: 345727
* Update ioctl(2) operations for NetBSD 8.99.25Kamil Rytarowski2018-10-313-42/+66
| | | | | | | | | | | | Eliminate dropped operations, add new operations. Update included headers for newer need. Add a fallback definition of nvlist_ref_t, becaue this type is internal to libnpf and the kernel, not exported into public headers. llvm-svn: 345726
* [InstSimplify] fold 'fcmp nnan oge X, 0.0' when X is not negativeSanjay Patel2018-10-313-14/+11
| | | | | | | | | | | | | | This re-raises some of the open questions about how to apply and use fast-math-flags in IR from PR38086: https://bugs.llvm.org/show_bug.cgi?id=38086 ...but given the current implementation (no FMF on casts), this is likely the only way to predicate the transform. This is part of solving PR39475: https://bugs.llvm.org/show_bug.cgi?id=39475 Differential Revision: https://reviews.llvm.org/D53874 llvm-svn: 345725
* [analyzer][PlistMacroExpansion] Part 1.: New expand-macros flagKristof Umann2018-10-316-15/+506
| | | | | | | | | | | | | This is the first part of the implementation of the inclusion of macro expansions into the plist output. It adds a new flag that adds a new "macro_expansions" entry to each report that has PathDiagnosticPieces that were expanded from a macro. While there's an entry for each macro expansion, both the name of the macro and what it expands to is missing, and will be implemented in followup patches. Differential Revision: https://reviews.llvm.org/D52742 llvm-svn: 345724
* [LoopUnroll] allow customization for new-pass-manager version of LoopUnrollFedor Sergeev2018-10-316-16/+104
| | | | | | | | | | | | | | | | | Unlike its legacy counterpart new pass manager's LoopUnrollPass does not provide any means to select which flavors of unroll to run (runtime, peeling, partial), relying on global defaults. In some cases having ability to run a restricted LoopUnroll that does more than LoopFullUnroll is needed. Introduced LoopUnrollOptions to select optional unroll behaviors. Added 'unroll<peeling>' to PassRegistry mainly for the sake of testing. Reviewers: chandlerc, tejohnson Differential Revision: https://reviews.llvm.org/D53440 llvm-svn: 345723
* [InstSimplify] add tests for fcmp and known positive; NFCSanjay Patel2018-10-311-20/+100
| | | | llvm-svn: 345722
* [DAGCombiner] Fold 0 div/rem X to 0David Bolvansky2018-10-315-277/+24
| | | | | | | | | | | | Reviewers: RKSimon, spatel, javed.absar, craig.topper, t.p.northover Reviewed By: RKSimon Subscribers: craig.topper, llvm-commits Differential Revision: https://reviews.llvm.org/D52504 llvm-svn: 345721
* [LLDB] - Removed unused variable. NFC.George Rimar2018-10-311-4/+1
| | | | | | | | Introduced in r344119. Thanks to Dávid Bolvanský fo reporting. llvm-svn: 345720
* AMDGPU: Rewrite SILowerI1Copies to always stay on SALUNicolai Haehnle2018-10-3121-330/+1013
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Instead of writing boolean values temporarily into 32-bit VGPRs if they are involved in PHIs or are observed from outside a loop, we use bitwise masking operations to combine lane masks in a way that is consistent with wave control flow. Move SIFixSGPRCopies to before this pass, since that pass incorrectly attempts to move SGPR phis to VGPRs. This should recover most of the code quality that was lost with the bug fix in "AMDGPU: Remove PHI loop condition optimization". There are still some relevant cases where code quality could be improved, in particular: - We often introduce redundant masks with EXEC. Ideally, we'd have a generic computeKnownBits-like analysis to determine whether masks are already masked by EXEC, so we can avoid this masking both here and when lowering uniform control flow. - The criterion we use to determine whether a def is observed from outside a loop is conservative: it doesn't check whether (loop) branch conditions are uniform. Change-Id: Ibabdb373a7510e426b90deef00f5e16c5d56e64b Reviewers: arsenm, rampitec, tpr Subscribers: kzhuravl, jvesely, wdng, mgorny, yaxunl, dstuttard, t-tye, eraman, llvm-commits Differential Revision: https://reviews.llvm.org/D53496 llvm-svn: 345719
* AMDGPU: Remove PHI loop condition optimizationNicolai Haehnle2018-10-3110-225/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The optimization to early break out of loops if all threads are dead was never fully implemented. But the PHI node analyzing is actually causing a number of problems, so remove all the extra code for it. (This does actually regress code quality in a few places because it ends up relying more heavily on phi's of i1, which we don't do a great job with. However, since it fixes real bugs in the wild, we should take this change. I have some prototype changes to improve i1 lowering in general -- not just for control flow -- which should help recover the code quality, I just need to make those changes fit for general consumption. -- Nicolai) Change-Id: I6fc6c6c8961857ac6009fcfb9f7e5e48dc23fbb1 Patch-by: Christian König <christian.koenig@amd.com> Reviewers: arsenm, rampitec, tpr Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D53359 llvm-svn: 345718
* [InstSimplify] fold icmp based on range of abs/nabsSanjay Patel2018-10-312-75/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a fix for PR39475: https://bugs.llvm.org/show_bug.cgi?id=39475 We managed to get some of these patterns using computeKnownBits in D47041, but that can't be used for nabs(). Instead, put in some range-based logic, so we can fold both abs/nabs with icmp with a constant value. Alive proofs: https://rise4fun.com/Alive/21r Name: abs_nsw_is_positive %cmp = icmp slt i32 %x, 0 %negx = sub nsw i32 0, %x %abs = select i1 %cmp, i32 %negx, i32 %x %r = icmp sgt i32 %abs, -1 => %r = i1 true Name: abs_nsw_is_not_negative %cmp = icmp slt i32 %x, 0 %negx = sub nsw i32 0, %x %abs = select i1 %cmp, i32 %negx, i32 %x %r = icmp slt i32 %abs, 0 => %r = i1 false Name: nabs_is_negative_or_0 %cmp = icmp slt i32 %x, 0 %negx = sub i32 0, %x %nabs = select i1 %cmp, i32 %x, i32 %negx %r = icmp slt i32 %nabs, 1 => %r = i1 true Name: nabs_is_not_over_0 %cmp = icmp slt i32 %x, 0 %negx = sub i32 0, %x %nabs = select i1 %cmp, i32 %x, i32 %negx %r = icmp sgt i32 %nabs, 0 => %r = i1 false Differential Revision: https://reviews.llvm.org/D53844 llvm-svn: 345717
* [clang-tidy] Remove false decoupling in ClangTidyContext. NFCSam McCall2018-10-313-21/+4
| | | | | | | These getters/setters don't encapsulate any behavior, and can only be called by friends. llvm-svn: 345716
* Update generate_netbsd_ioctls.awk for NetBSD 8.99.25Kamil Rytarowski2018-10-311-127/+9
| | | | | | | Add dynamic detection of header files in /usr/include. Handle "nvlist_ref_t" needed by npf(4) ioctl(2) operations. llvm-svn: 345715
* [tblgen][PredicateExpander] Add the ability to describe more complex ↵Andrea Di Biagio2018-10-316-24/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | constraints on instruction operands. Before this patch, class PredicateExpander only knew how to expand simple predicates that performed checks on instruction operands. In particular, the new scheduling predicate syntax was not rich enough to express checks like this one: Foo(MI->getOperand(0).getImm()) == ExpectedVal; Here, the immediate operand value at index zero is passed in input to function Foo, and ExpectedVal is compared against the value returned by function Foo. While this predicate pattern doesn't show up in any X86 model, it shows up in other upstream targets. So, being able to support those predicates is fundamental if we want to be able to modernize all the scheduling models upstream. With this patch, we allow users to specify if a register/immediate operand value needs to be passed in input to a function as part of the predicate check. Now, register/immediate operand checks all derive from base class CheckOperandBase. This patch also changes where TIIPredicate definitions are expanded by the instructon info emitter. Before, definitions were expanded in class XXXGenInstrInfo (where XXX is a target name). With the introduction of this new syntax, we may want to have TIIPredicates expanded directly in XXXInstrInfo. That is because functions used by the new operand predicates may only exist in the derived class (i.e. XXXInstrInfo). This patch is a non functional change for the existing scheduling models. In future, we will be able to use this richer syntax to better describe complex scheduling predicates, and expose them to llvm-mca. Differential Revision: https://reviews.llvm.org/D53880 llvm-svn: 345714
* [NFC] Add tests for loop-simplifycfg for further developmentMax Kazantsev2018-10-311-0/+1408
| | | | llvm-svn: 345713
* [ADT] Remove illegal comparison of singular iterators from SmallSetTestFlorian Hahn2018-10-311-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the assertion that a copy of a moved-from SmallSetIterator equals the original, which is illegal due to SmallSetIterator including an instance of a standard `std::set` iterator. C++ [iterator.requirements.general] states that comparing singular iterators has undefined result: > Iterators can also have singular values that are not associated with > any sequence. [...] Results of most expressions are undefined for > singular values; the only exceptions are destroying an iterator that > holds a singular value, the assignment of a non-singular value to an > iterator that holds a singular value, and, for iterators that satisfy > the Cpp17DefaultConstructible requirements, using a value-initialized > iterator as the source of a copy or move operation. This assertion triggers the following error in the GNU C++ Library in debug mode under EXPENSIVE_CHECKS: /usr/include/c++/8.2.1/debug/safe_iterator.h:518: Error: attempt to compare a singular iterator to a singular iterator. Objects involved in the operation: iterator "lhs" @ 0x0x7fff86420670 { state = singular; } iterator "rhs" @ 0x0x7fff86420640 { state = singular; } Patch by Eugene Sharygin. Reviewers: fhahn, dblaikie, chandlerc Reviewed By: fhahn, dblaikie Differential Revision: https://reviews.llvm.org/D53793 llvm-svn: 345712
* [lldb] Fix race condition in framework installationShoaib Meenai2018-10-311-1/+1
| | | | | | | | | | | | | We need the install-liblldb-stripped target to depend on the lldb-framework target in order for the installation to be guaranteed to behave correctly, otherwise it's possible for the lldb-framework and install-liblldb-stripped targets to run in parallel, resulting in temporary or partially processed files being copied into the framework. install-liblldb already depends on lldb-framework for this reason. Differential Revision: https://reviews.llvm.org/D53917 llvm-svn: 345711
* [AMDGPU] support image load/store a16Neil Henning2018-10-317-2/+1146
| | | | | | | | | | | | Our a16 support was only enabled for sample/gather and buffer load/store, but not for image load/store operations (which take an i16 as the pixel index rather than a half). Fix our isel lowering and add test cases to prove it out. Differential Revision: https://reviews.llvm.org/D53750 llvm-svn: 345710
OpenPOWER on IntegriCloud