summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [GuardWidening] Widen guards with conditions of frequently taken dominated ↵Max Kazantsev2018-08-062-34/+461
| | | | | | | | | | | | | | | | | | | | | | | | | | branches If there is a frequently taken branch dominated by a guard, and its condition is available at the point of the guard, we can widen guard with condition of this branch and convert the branch into unconditional: guard(cond1) if (cond2) { // taken in 99.9% cases // do something } else { // do something else } Converts to guard(cond1 && cond2) // do something Differential Revision: https://reviews.llvm.org/D49974 Reviewed By: reames llvm-svn: 338988
* [NFC] Fix typoXin Tong2018-08-061-1/+1
| | | | llvm-svn: 338987
* [NFC] Fixed unused function warningDavid Bolvansky2018-08-061-0/+2
| | | | llvm-svn: 338986
* [DebugInfo] Use DbgVariableIntrinsic as the base class of variables.Hsiangkai Wang2018-08-061-1/+1
| | | | | | | | | | | | | After refactoring DbgInfoIntrinsic class hierarchy, we use DbgVariableIntrinsic as the base class of variable debug info. In resolveTopLevelMetadata() in CGVTables.cpp, we only care about dbg.value, so we try to cast the instructions to DbgVariableIntrinsic before resolving variables. Differential Revision: https://reviews.llvm.org/D50226 llvm-svn: 338985
* [DebugInfo] Refactor DbgInfoIntrinsic class hierarchy.Hsiangkai Wang2018-08-0615-87/+102
| | | | | | | | | | | | | | | | In the past, DbgInfoIntrinsic has a strong assumption that these intrinsics all have variables and expressions attached to them. However, it is too strong to derive the class for other debug entities. Now, it has problems for debug labels. In order to make DbgInfoIntrinsic as a base class for 'debug info', I create a class for 'variable debug info', DbgVariableIntrinsic. DbgDeclareInst, DbgAddrIntrinsic, and DbgValueInst will be derived from it. Differential Revision: https://reviews.llvm.org/D50220 llvm-svn: 338984
* [docs] Switch debug info metadata blocks to use `text` instead of `llvm`Chandler Carruth2018-08-061-9/+9
| | | | | | | | | | | | | | | highlighting syntax. Most of them already were like this, and the Sphinx runs on the docs build bot seems to be substantially more picky and/or not have support for a bunch of the syntax here. Hopefully this will let it progress past this. My previous attempt to fix the syntax made the `opt` tool happy, but no idea what the Sphinx stuff is really looking for, and the fact that other blocks already just use `text` led me to this solution. llvm-svn: 338983
* [docs] Correct the basic syntax structure of the DISubrange example.Chandler Carruth2018-08-061-4/+4
| | | | | | | | | | | | Notably, just close two of the debug info metadata nodes early rather than leaving them open with `...` which won't ever lex correctly. And add the missing `:` on the count labels. Slowly progressing through all of the warnings on the documentation build bot. Sorry to do this one commit at a time, but despite my best efforts I can't trigger these errors locally. llvm-svn: 338982
* [docs] Remove an example that isn't well formed LLVM IR and trips up theChandler Carruth2018-08-061-9/+1
| | | | | | | | | | | Sphinx syntax highlighter. This example also doesn't really make sense. There is no control flow or clarification of what the `Safe:` block exists to do... If we want examples here, we should make them much more clear in addition to making them well formed IR sequences. llvm-svn: 338981
* [docs] Fix an LLVM-syntax code block to actually be valid LLVM synatx.Chandler Carruth2018-08-061-2/+2
| | | | | | Hopefully fixes an issue on the docs build bot. llvm-svn: 338980
* [docs] Don't use the `asm` syntax highlighting (which our docs builderChandler Carruth2018-08-061-9/+9
| | | | | | | | | errors on) and clean up the formattting. This isn't actualy assembly anyways, so dropping the highlighting is probably for the best. llvm-svn: 338979
* [docs] Turn of `nasm` highlighting for a code block.Chandler Carruth2018-08-061-1/+1
| | | | | | | | This appears to produce a warning on the docs build bot. It doesn't reproduce for me, likely because I have a newer (or more full featured) pygments install. llvm-svn: 338978
* [docs] Reinstate r337730 - Add support for Markdown documentation inChandler Carruth2018-08-063-1/+165
| | | | | | | | | | | | | Sphinx. We think the bot is updated now, so trying this again. I'm landing it (with permission) as Michael is at a con at the moment. Actual patch largely by Michael Spencer. Differential Revision: https://reviews.llvm.org/D44910 llvm-svn: 338977
* Remove duplicated code in CommandObjectQuitRaphael Isemann2018-08-061-7/+0
| | | | | | | | | | | | Summary: We already have the same check directly before, so this code can never be reached (as seen in the test coverage). Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D50317 llvm-svn: 338976
* [ORC] Remove an incorrect use of 'cantFail'.Lang Hames2018-08-051-2/+4
| | | | | | | | This code was moved out from BasicObjectLayerMaterializationUnit, which required the supplied object to be well formed. The getObjectSymbolFlags function does not require a well-formed object, so we have to propagate the error here. llvm-svn: 338975
* [ORC] Change JITSymbolFlags debug output, add a function for getting a symbolLang Hames2018-08-053-33/+50
| | | | | | flags map from a buffer representing an object file. llvm-svn: 338974
* [NFC] Fixed inliner tests - 2David Bolvansky2018-08-051-1/+1
| | | | llvm-svn: 338973
* [NFC] Fixed inliner testsDavid Bolvansky2018-08-051-4/+4
| | | | llvm-svn: 338972
* Fix tests for changed opt remarks formatDavid Bolvansky2018-08-052-5/+6
| | | | | | | | | | | | | | | | | Summary: Optimization remark format is slightly changed by LLVM patch D49412. Two tests are fixed with expected messages changed. Frankly speaking I have not tested this change yet. I will test when manage to setup the project. Reviewers: xbolva00 Reviewed By: xbolva00 Subscribers: mehdi_amini, eraman, steven_wu, dexonsmith Differential Revision: https://reviews.llvm.org/D50241 llvm-svn: 338971
* Fix one test for changed opt remarks formatDavid Bolvansky2018-08-051-4/+6
| | | | | | | | | | | | | | | | | Summary: Optimization remark format is slightly changed by LLVM patch D49412. One test is fixed with expected messages changed. Frankly speaking I have not tested this change yet. I will test when manage to setup the project. Reviewers: xbolva00, espindola Reviewed By: xbolva00 Subscribers: emaste, arichardson, steven_wu, dexonsmith Differential Revision: https://reviews.llvm.org/D50242 llvm-svn: 338970
* Enrich inline messagesDavid Bolvansky2018-08-0520-162/+244
| | | | | | | | | | | | | | | | | | | | | | Summary: This patch improves Inliner to provide causes/reasons for negative inline decisions. 1. It adds one new message field to InlineCost to report causes for Always and Never instances. All Never and Always instantiations must provide a simple message. 2. Several functions that used to return the inlining results as boolean are changed to return InlineResult which carries the cause for negative decision. 3. Changed remark priniting and debug output messages to provide the additional messages and related inline cost. 4. Adjusted tests for changed printing. Patch by: yrouban (Yevgeny Rouban) Reviewers: craig.topper, sammccall, sgraenitz, NutshellySima, shchenz, chandlerc, apilipenko, javed.absar, tejohnson, dblaikie, sanjoy, eraman, xbolva00 Reviewed By: tejohnson, xbolva00 Subscribers: xbolva00, llvm-commits, arsenm, mehdi_amini, eraman, haicheng, steven_wu, dexonsmith Differential Revision: https://reviews.llvm.org/D49412 llvm-svn: 338969
* Revert "Add a warning if someone attempts to add extra section flags to ↵Eric Christopher2018-08-052-48/+16
| | | | | | | | | | | sections" There are a bunch of edge cases and inconsistencies in how we're emitting sections cause this warning to fire and it needs more work. This reverts commit r335558. llvm-svn: 338968
* [NFC][InstCombine] Add tests for sinking 'not' into 'xor' (PR38446)Roman Lebedev2018-08-051-0/+170
| | | | | | | | | | | https://rise4fun.com/Alive/IT3 Comes up in the [most ugliest] signed int -> signed char case of -fsanitize=implicit-conversion (https://reviews.llvm.org/D50250) Not sure if we want to do it always, or only when it is free to invert. llvm-svn: 338967
* [AST][NFC] Remove unneeded forward declarations in Type.hBruno Ricci2018-08-051-16/+1
| | | | | | | | These forward declarations for various classes in the Type hierarchy are not needed since they are all forward declared systematically a few lines below. llvm-svn: 338966
* [NFC][InstCombine] Regenerate set.ll testRoman Lebedev2018-08-051-20/+20
| | | | llvm-svn: 338965
* [X86] Remove stale comments from a test. NFCCraig Topper2018-08-051-18/+0
| | | | | | The 16-bit case was recently fixed so this comment no longer applies. llvm-svn: 338964
* [InstCombine] [NFC] Tests for strcmp to memcmp transformationDavid Bolvansky2018-08-051-0/+545
| | | | llvm-svn: 338963
* Use Optional instead of unique_ptr; NFCGeorge Burgess IV2018-08-051-3/+3
| | | | | | | | Looks like the only reason we use a unique_ptr here is so that we can conditionally construct a LogicalErrorHandler. It's a small type, and Optional can do the same thing with 100% fewer heap allocations. llvm-svn: 338962
* Added unit test for StringListRaphael Isemann2018-08-042-0/+513
| | | | | | | | | | | | Reviewers: labath Reviewed By: labath Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D50293 llvm-svn: 338961
* [LLD][ELD] - Revert r338959 "[LLD][ELF] - Added file name and a test for ↵George Rimar2018-08-042-19/+1
| | | | | | | | | | case when we fail to write the output." It broke BB: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/34382/steps/test/logs/stdio http://lab.llvm.org:8011/builders/lld-x86_64-freebsd/builds/21932/steps/test_lld/logs/stdio llvm-svn: 338960
* [LLD][ELF] - Added file name and a test for case when we fail to write the ↵George Rimar2018-08-042-1/+19
| | | | | | | | output. We did not report the file name and had no test for that case. llvm-svn: 338959
* [LLD][ELF] - Remove excessive requirement from the test.George Rimar2018-08-041-1/+1
| | | | | | It feels "shell" is excessive. Lets try without it. llvm-svn: 338958
* [LLD][ELF] - Removed dead code from rangeToString(). NFC.George Rimar2018-08-041-5/+3
| | | | | | | This change removes the dead code and makes cosmetic change showing why it was dead. llvm-svn: 338957
* [LLD][ELF] - Fix bug when reporting memory intersections.George Rimar2018-08-042-3/+3
| | | | | | | rangeToString() takes addres and length, previously it was called incorrectly. llvm-svn: 338956
* [ADT] Add an early-increment iterator-like type and range adaptor.Chandler Carruth2018-08-042-0/+135
| | | | | | | | | | | | | | This allows us to model the common LLVM idiom of incrementing immediately after dereferencing so that we can remove or update the entity w/o losing our ability to reach the "next". However, these are not real or proper iterators. They are just enough to allow range based for loops and very simple range algorithms to work, but should not be considered full general. Differential Revision: https://reviews.llvm.org/D49956 llvm-svn: 338955
* [TailCallElim] Preserve DT and PDTChijun Sima2018-08-0416-42/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously, in the NewPM pipeline, TailCallElim recalculates the DomTree when it modifies any instruction in the Function. For example, ``` CallInst *CI = dyn_cast<CallInst>(&I); ... CI->setTailCall(); Modified = true; ... if (!Modified || ...) return PreservedAnalyses::all(); ``` After applying this patch, the DomTree only recalculates if needed (plus an extra insertEdge() + an extra deleteEdge() call). When optimizing SQLite with `-passes="default<O3>"` pipeline of the newPM, the number of DomTree recalculation decreases by 6.2%, the number of nodes visited by DFS decreases by 2.9%. The time used by DomTree will decrease approximately 1%~2.5% after applying the patch. Statistics: ``` Before the patch: 23010 dom-tree-stats - Number of DomTree recalculations 489264 dom-tree-stats - Number of nodes visited by DFS -- DomTree After the patch: 21581 dom-tree-stats - Number of DomTree recalculations 475088 dom-tree-stats - Number of nodes visited by DFS -- DomTree ``` Reviewers: kuhar, dmgreen, brzycki, grosser, davide Reviewed By: kuhar, brzycki Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D49982 llvm-svn: 338954
* [ELF] - Refactor readCallGraph().George Rimar2018-08-041-21/+16
| | | | | | | | | | | This simplifies the code a bit. It is NFC except that it removes early exit for Count == 0 which does not seem to be useful (we have no such tests either). Differential revision: https://reviews.llvm.org/D49136 llvm-svn: 338953
* Fixed header of StringLexer.hRaphael Isemann2018-08-041-2/+1
| | | | llvm-svn: 338952
* [llvm-objdump] Remove continue after report_error which is unreachableFangrui Song2018-08-041-2/+0
| | | | llvm-svn: 338951
* [ADCE] Remove the need of DomTreeChijun Sima2018-08-042-9/+11
| | | | | | | | | | | | | | Summary: ADCE doesn't need to query domtree. Reviewers: kuhar, brzycki, dmgreen, davide, grosser Reviewed By: kuhar Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D49988 llvm-svn: 338950
* Fix a bug in VMRangeLeonard Mosescu2018-08-042-22/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I noticed a suspicious failure: [ RUN ] VMRange.CollectionContains llvm/src/tools/lldb/unittests/Utility/VMRangeTest.cpp:146: Failure Value of: VMRange::ContainsRange(collection, VMRange(0x100, 0x104)) Actual: false Expected: true Looking at the code, it is a very real bug: class RangeInRangeUnaryPredicate { public: RangeInRangeUnaryPredicate(VMRange range) : _range(range) {} // note that _range binds to a temporary! bool operator()(const VMRange &range) const { return range.Contains(_range); } const VMRange &_range; }; This change fixes the bug. Differential Revision: https://reviews.llvm.org/D50290 llvm-svn: 338949
* Reverted r338825 and all the following tries to fix issues introduced by ↵Galina Kistanova2018-08-045-730/+0
| | | | | | | | that commit (r338826, r338827, r338829, r338880). This commit has broken build bots and has been left unattended for too long. llvm-svn: 338948
* [clangd] Fix fuzzer build.Matt Morehouse2018-08-041-1/+2
| | | | llvm-svn: 338947
* [clang-fuzzer] Remove unused typedef.Matt Morehouse2018-08-041-2/+1
| | | | llvm-svn: 338946
* Avoid creating conditional cleanup blocks that contain only ↵Richard Smith2018-08-043-15/+238
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | @llvm.lifetime.end calls When a non-extended temporary object is created in a conditional branch, the lifetime of that temporary ends outside the conditional (at the end of the full-expression). If we're inserting lifetime markers, this means we could end up generating if (some_cond) { lifetime.start(&tmp); Tmp::Tmp(&tmp); } // ... if (some_cond) { lifetime.end(&tmp); } ... for a full-expression containing a subexpression of the form `some_cond ? Tmp().x : 0`. This patch moves the lifetime start for such a temporary out of the conditional branch so that we don't need to generate an additional basic block to hold the lifetime end marker. This is disabled if we want precise lifetime markers (for asan's stack-use-after-scope checks) or of the temporary has a non-trivial destructor (in which case we'd generate an extra basic block anyway to hold the destructor call). Differential Revision: https://reviews.llvm.org/D50286 llvm-svn: 338945
* [GISel]: Add Opcodes for CTLZ/CTTZ/CTPOPAditya Nandakumar2018-08-048-17/+127
| | | | | | | | https://reviews.llvm.org/D48600 Added IRTranslator support to translate these known intrinsics into GISel opcodes. llvm-svn: 338944
* LLVM Proto Fuzzer - Run Functions on Suite of InputsEmmett Neyman2018-08-043-15/+149
| | | | | | | | | | | | | | | | Summary: Added corpus of arrays to use as inputs for the functions. Check that the two functions modify the inputted arrays in the same way. Reviewers: kcc, morehouse Reviewed By: morehouse Subscribers: mgorny, cfe-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D50194 llvm-svn: 338943
* [www] Update cxx_status and cxx_dr_status now that Clang 7 has branched.Richard Smith2018-08-043-12/+15
| | | | llvm-svn: 338942
* [constexpr] Support for constant evaluation of __builtin_memcpy andRichard Smith2018-08-045-54/+387
| | | | | | | | | | | | | | | | | | __builtin_memmove (in non-type-punning cases). This is intended to permit libc++ to make std::copy etc constexpr without sacrificing the optimization that uses memcpy on trivially-copyable types. __builtin_strcpy and __builtin_wcscpy are not handled by this change. They'd be straightforward to add, but we haven't encountered a need for them just yet. This reinstates r338455, reverted in r338602, with a fix to avoid trying to constant-evaluate a memcpy call if either pointer operand has an invalid designator. llvm-svn: 338941
* Fix buildbot breakage.Rui Ueyama2018-08-041-2/+1
| | | | llvm-svn: 338940
* Use the same constants as zlib to represent compression level.Rui Ueyama2018-08-043-26/+10
| | | | | | | | | | This change allows users pass compression level that was not listed in the enum. Also, I think using different values than zlib's compression levels was just confusing. Differential Revision: https://reviews.llvm.org/D50196 llvm-svn: 338939
OpenPOWER on IntegriCloud