summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [X86] Add a DAG combine to turn (and (bitcast (vXi1 (concat_vectors (vYi1 ↵Craig Topper2019-10-286-48/+88
| | | | | | | | | | setcc), undef,))), C) into (bitcast (vXi1 (concat_vectors (vYi1 setcc), zero,))) The legalization of v2i1->i2 or v4i1->i4 bitcasts followed by a setcc can create an and after the bitcast. If we're lucky enough that the input to the bitcast is a concat_vectors where the first operand is a setcc that can natively 0 all the upper bits of ak-register, then we should replace the other operands of the concat_vectors with zero in order to remove the AND. With the AND removed we might be able to use a kortest on the result. Differential Revision: https://reviews.llvm.org/D69205
* gn build: (manually) merge d157a9bcNico Weber2019-10-285-0/+16
| | | | While here, also merge r335850 / r366396.
* [Docs] Update source code link to GithubJonas Devlieghere2019-10-281-1/+1
|
* [lit] Remove redundant comments from main functionJulian Lettner2019-10-281-19/+9
| | | | | Hopefully the functionality is now clear due to the use of small, well-named helper functions.
* [IR] Use UnaryOperator::CreateFNeg in NoFolder::createFNegCraig Topper2019-10-281-1/+1
| | | | | | If IRBuilder is constructed using the NoFolder constant folder, we should use the Unary FNeg to match the non-constant part of IRBuilder. Differential Revision: https://reviews.llvm.org/D69396
* Reland [AArch64][DebugInfo] Do not recompute CalleeSavedStackSize (Take 2)Sander de Smalen2019-10-2811-10/+183
| | | | | Fixed up test/DebugInfo/MIR/Mips/live-debug-values-reg-copy.mir that broke r375425.
* [LV] Interleaving should not exceed estimated loop trip count.Craig Topper2019-10-282-13/+13
| | | | | | | | | | Currently we may do iterleaving by more than estimated trip count coming from the profile or computed maximum trip count. The solution is to use "best known" trip count instead of exact one in interleaving analysis. Patch by Evgeniy Brevnov. Differential Revision: https://reviews.llvm.org/D67948
* Add missing lld checks in sanitizer tests.Evgenii Stepanov2019-10-283-3/+3
| | | | | | Do not add an lld dependency when this target does not exist. In this case the system installation of lld is used (or whatever is detected with -fuse-ld=lld by default).
* [OPENMP]Fix PR43771: Do not capture contexprs variables.Alexey Bataev2019-10-282-1/+26
| | | | If the variable is a constexpr variable, it should not be captured in the OpenMP region.
* [utils] InlineFunction: fix for debug info affecting optimizationsBjorn Pettersson2019-10-282-0/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Debug info affects output from "opt -inline", InlineFunction could not handle the llvm.dbg.value when it exist between alloca instructions. Problem was that the first alloca in a sequence of allocas was handled differently from the subsequence alloca instructions. Now all static alloca instructions are treated the same (being removed if the have no uses). So it does not matter if there are dbg instructions (or any other instructions) in between. Fix the issue: https://bugs.llvm.org/show_bug.cgi?id=43291k Patch by: yechunliang (Chris Ye) Reviewers: bjope, jmorse, vsk, probinson, jdoerfert, mtrofin, aprantl, fhahn Reviewed By: bjope Subscribers: uabelho, ormris, aprantl, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68633
* AMDGPU: Avoid overwriting saved PCAustin Kerbow2019-10-282-6/+73
| | | | | | | | | | | | | | | | Summary: An outstanding load with same destination sgpr as call could cause PC to be updated with junk value on return. Reviewers: arsenm, rampitec Reviewed By: arsenm Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69474
* [lit] Make main.py a pure Python moduleJulian Lettner2019-10-282-9/+3
| | | | Running it directly as a tool, that is what lit.py is for.
* [Docs] Disable Python docs when LLDB_DISABLE_PYTHON is setJonas Devlieghere2019-10-281-34/+36
| | | | | | | This leads to a configuration error because we're trying to get a property that doesn't exist: get_target_property() called with non-existent target "swig_wrapper"
* [AIX] Refactor AIX Call Lowering to use CCState. NFCI.Sean Fertile2019-10-285-94/+176
| | | | | | | | | | | | | This patch reworks the AIX call lowering to use CCState. Some defensive errors are added in this patch to protect from emitting bad code for calling convention logic that has not been implemented by design. The use of CCState follows the precedent of other targets and enables the reuse of calling convention logic in LowerFormalArguments, which will be rewritten to also use CCState in a late patch. Patch by Chris Bowler. Differential Revision: https://reviews.llvm.org/D69101
* [scudo][standalone] Consolidate listsKostya Kortchinsky2019-10-2810-186/+243
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is a clean patch using the last diff of D69265, but using git instead of svn, since svn went ro and arc was making my life harded than it needed to be. I was going to introduce a couple more lists and realized that our lists are currently a bit all over the place. While we have a singly linked list type relatively well defined, we are using doubly linked lists defined on the fly for the stats and for the secondary blocks. This CL adds a doubly linked list object, reorganizing the singly list one to extract as much of the common code as possible. We use this new type in the stats and the secondary. We also reorganize the list tests to benefit from this consolidation. There are a few side effect changes such as using for iterator loops that are, in my opinion, cleaner in a couple of places. Reviewers: hctim, morehouse, pcc, cferris Reviewed By: hctim Subscribers: jfb, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D69516
* Remove extra ';'. NFCI.Simon Pilgrim2019-10-281-1/+1
|
* [clang] Add no_builtin attributeGuillaume Chatelet2019-10-2810-4/+269
| | | | | | | | | | | | | | Summary: This is a follow up on https://reviews.llvm.org/D61634 This patch is simpler and only adds the no_builtin attribute. Reviewers: tejohnson, courbet, theraven, t.p.northover, jdoerfert Subscribers: mgrang, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68028
* [NFC] Comment endif to test commit access--global2019-10-281-1/+1
|
* [LiveIntervalUnion] Expose extraction of last index in map for external usersMarcello Maggioni2019-10-281-0/+1
| | | | Differential Revision: https://reviews.llvm.org/D69515
* [InstCombine] Extra combine for uadd_satDavid Green2019-10-282-8/+11
| | | | | | | This is an extra fold for a canonical form of uadd_sat, as shown in D68651. It essentially selects uadd from an add and a select. Differential Revision: https://reviews.llvm.org/D69244
* Add Windows Control Flow Guard checks (/guard:cf).Andrew Paverd2019-10-2877-62/+1514
| | | | | | | | | | | | | | | | | | | Summary: A new function pass (Transforms/CFGuard/CFGuard.cpp) inserts CFGuard checks on indirect function calls, using either the check mechanism (X86, ARM, AArch64) or or the dispatch mechanism (X86-64). The check mechanism requires a new calling convention for the supported targets. The dispatch mechanism adds the target as an operand bundle, which is processed by SelectionDAG. Another pass (CodeGen/CFGuardLongjmp.cpp) identifies and emits valid longjmp targets, as required by /guard:cf. This feature is enabled using the `cfguard` CC1 option. Reviewers: thakis, rnk, theraven, pcc Subscribers: ychen, hans, metalcanine, dmajor, tomrittervg, alex, mehdi_amini, mgorny, javed.absar, kristof.beyls, hiraditya, steven_wu, dexonsmith, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D65761
* [AArch64] Fix unannotated fall-through between switch labelsJinsong Ji2019-10-281-0/+1
| | | | | | This is breaking buildbot with -Werror,-Wimplicit-fallthrough on. eg: http://lab.llvm.org:8011/builders/ppc64le-lld-multistage-test/builds/6881
* Precommit AArch64 test for -consider-local-interval-costSanne Wouda2019-10-281-0/+393
| | | | | | | | | | | | | | Summary: Precommitting this test makes it more obvious what the delta is of enabling -consider-local-interval-cost in D69437. Reviewers: dmgreen Subscribers: kristof.beyls, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69512
* [LIBOMPTARGET]Fix build, NFC.Alexey Bataev2019-10-281-1/+1
| | | | | Need to include nvptx_interface.h in target_impl.h, otherwise the build is failed because of missing __kmpc_impl_lanemask_t type.
* lld/COFF: Simplify getOutputPath() using sys::path functions.Nico Weber2019-10-282-5/+4
| | | | | | | | | | Also mention "basename" and "dirname" in Path.h since I tried to find these functions by looking for these strings. It might help others find them faster if the comments contain these strings. No behavior change. Differential Revision: https://reviews.llvm.org/D69458
* [DebugInfo] MachineSink: find more DBG_VALUEs to sinkJeremy Morse2019-10-282-15/+191
| | | | | | | | | | | | | | | In the Pre-RA machine sinker, previously we were relying on all DBG_VALUEs being immediately after the instruction that defined their operands. This isn't a valid assumption, as a variable location change doesn't necessarily correspond to where the value is computed. In this patch, we collect DBG_VALUEs that might need sinking as we walk through a block, and sink all of them if their defining instruction is sunk. This patch adds some copy propagation too, so that if we sink a copy inst, the now non-dominated paths can use the copy source for the variable location. Differential Revision: https://reviews.llvm.org/D58386
* [DAGCombiner] widen any_ext of popcount based on target supportSanjay Patel2019-10-283-19/+36
| | | | | | | | | This enhances D69127 (rGe6c145e0548e3b3de6eab27e44e1504387cf6b53) to handle the looser "any_extend" cast in addition to zext. This is a prerequisite step for canonicalizing in the other direction (narrow the popcount) in IR - PR43688: https://bugs.llvm.org/show_bug.cgi?id=43688
* [AArch64][Builtins] Avoid unnecessary cache cleaningBryan Chan2019-10-281-13/+23
| | | | | | | | | | | | Use new control bits CTR_EL0.DIC and CTR_EL0.IDC to discover the d-cache cleaning and i-cache invalidation requirements for instruction-to-data coherence. This matches the behavior in the latest libgcc. Author: Shaokun Zhang <zhangshaokun@hisilicon.com> Reviewed By: peter.smith Differential Revision: https://reviews.llvm.org/D69247
* [InstCombine][NFC] Tests for uadd.sat and sadd.sat canonicalisation.David Green2019-10-282-0/+778
|
* [clangd] Do not report anonymous entities in findExplicitReferencesIlya Biryukov2019-10-282-9/+24
| | | | | | | | | | | | | | | | | | | Summary: Otherwise every client dealing with name location should handle anonymous names in a special manner. This seems too error-prone, clients can probably handle anonymous entities they care about differently. Reviewers: hokein Reviewed By: hokein Subscribers: MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69511
* [CVP] prevent propagating poison when substituting edge values into a phi ↵Sanjay Patel2019-10-282-3/+9
| | | | | | | | | | | | | | | | | (PR43802) This phi simplification transform was added with: D45448 However as shown in PR43802: https://bugs.llvm.org/show_bug.cgi?id=43802 ...we must be careful not to propagate poison when we do the substitution. There might be some more complicated analysis possible to retain the overflow flag, but it should always be safe and easy to drop flags (we have similar behavior in instcombine and other passes). Differential Revision: https://reviews.llvm.org/D69442
* [DebugInfo] MachineSink: Insert undef DBG_VALUEs when sinking instructionsJeremy Morse2019-10-283-3/+158
| | | | | | | | | | | When we sink DBG_VALUEs between blocks, we simply move the DBG_VALUE instruction to below the sunk instruction. However, we should also mark the variable as being undef at the original location, to terminate any earlier variable location. This patch does that -- plus, if the instruction being sunk is a copy, it attempts to propagate the copy through the DBG_VALUE, replacing the destination with the source. Differential Revision: https://reviews.llvm.org/D58238
* [AMDGPU][MC][GFX10] Added v_interp_[p1/p2/mov]_f32_e64Dmitry Preobrazhensky2019-10-283-2/+270
| | | | | | | | See https://bugs.llvm.org/show_bug.cgi?id=43747 Reviewers: arsenm, rampitec Differential Revision: https://reviews.llvm.org/D69348
* [Codegen][ARM] Add float softening for cbrtDavid Green2019-10-284-0/+60
| | | | | | | We would previously have no soft-float softening for cbrt, so could hit a crash failing to select. This fills in what appears to be missing. Differential Revision: https://reviews.llvm.org/D69345
* minor doc typo fix / testing github commitRafael Stahl2019-10-281-1/+1
|
* [ARM][AArch64] Implement __cls, __clsl and __clsll intrinsics from ACLEvhscampos2019-10-2813-0/+193
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Writing support for three ACLE functions: unsigned int __cls(uint32_t x) unsigned int __clsl(unsigned long x) unsigned int __clsll(uint64_t x) CLS stands for "Count number of leading sign bits". In AArch64, these two intrinsics can be translated into the 'cls' instruction directly. In AArch32, on the other hand, this functionality is achieved by implementing it in terms of clz (count number of leading zeros). Reviewers: compnerd Reviewed By: compnerd Subscribers: kristof.beyls, hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D69250
* [clangd] Flush streams when printing HoverInfo Name and DefinitionKadir Cetinkaya2019-10-281-0/+2
| | | | Summary: Fixes some windows breakages when compiled via msvc.
* [clangd] Do not highlight keywords in semantic highlightingIlya Biryukov2019-10-284-91/+88
| | | | | | | | | | | | | | | | | | Summary: Editors are good at highlightings the keywords themselves. Note that this only affects highlightings of builtin types spelled out as keywords in the source code. Highlightings of typedefs to builtin types are unchanged. Reviewers: hokein Reviewed By: hokein Subscribers: merge_guards_bot, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69431
* [ARM][AArch64] Implement __arm_rsrf, __arm_rsrf64, __arm_wsrf & __arm_wsrf64vhscampos2019-10-282-0/+53
| | | | | | | | | | | | | | | | | Summary: Adding support for ACLE intrinsics. Patch by Michael Platings. Reviewers: chill, t.p.northover, efriedma Reviewed By: chill Subscribers: kristof.beyls, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69297
* [AArch64][SVE] Implement masked load intrinsicsKerry McLaughlin2019-10-2814-11/+389
| | | | | | | | | | | | | | | | Summary: Adds support for codegen of masked loads, with non-extending, zero-extending and sign-extending variants. Reviewers: huntergr, rovka, greened, dmgreen Reviewed By: dmgreen Subscribers: dmgreen, samparker, tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, cfe-commits, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68877
* [RISCV] Lower llvm.trap and llvm.debugtrapSam Elliott2019-10-283-0/+51
| | | | | | | | | | | | | | | | | | | | Summary: Until this commit, these have lowered to a call to abort(). `llvm.trap()` now lowers to `unimp`, which should trap on all systems. `llvm.debugtrap()` now lowers to `ebreak`, which is exactly what this instruction is for. Reviewers: asb, luismarques Reviewed By: asb Subscribers: hiraditya, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, pzheng, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69390
* Fix https://bugs.llvm.org/show_bug.cgi?id=43791Guillaume Chatelet2019-10-281-1/+1
|
* [clangd] Do not insert parentheses when completing a using declarationIlya Biryukov2019-10-288-37/+98
| | | | | | | | | | | | | | | | | | Summary: Would be nice to also fix this in clang, but that looks like more work if we want to preserve signatures in informative chunks. Fixes https://github.com/clangd/clangd/issues/118 Reviewers: kadircet Reviewed By: kadircet Subscribers: merge_guards_bot, MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69382
* [llvm-objcopy][MachO] Implement --only-sectionSeiya Nuta2019-10-286-5/+186
| | | | | | | | | | | | Reviewers: alexshap, rupprecht, jdoerfert, jhenderson Reviewed By: alexshap, rupprecht, jhenderson Subscribers: mgorny, jakehehrlich, abrachet, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65541
* [clangd] Reland Store Index in Tweak::SelectionKadir Cetinkaya2019-10-285-9/+20
| | | | | | | | | | | | | | | | Summary: Incoming define out-of-line tweak requires access to index. This patch simply propogates the index in ClangdServer to Tweak::Selection while passing the AST. Also updates TweakTest to accommodate this change. Reviewers: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69165
* [clangd] Reland DefineInline action apply logic with fully qualified namesKadir Cetinkaya2019-10-284-15/+759
| | | | | | | | | | | | Summary: Initial version of DefineInline action that will fully qualify every name inside function body. Reviewers: sammccall, ilya-biryukov, hokein Tags: #clang Differential Revision: https://reviews.llvm.org/D66647
* [X86] Fix 48/96 byte memcmp code genDavid Zarzycki2019-10-282-704/+64
| | | | | | | Detect scalar ISD::ZERO_EXTEND generated by memcmp lowering and convert it to ISD::INSERT_SUBVECTOR. https://reviews.llvm.org/D69464
* gn build: Merge 5ab9a850f6bLLVM GN Syncbot2019-10-281-0/+1
|
* [clangd] Reland DefineInline action availability checksKadir Cetinkaya2019-10-285-3/+395
| | | | | | | | | | | | | | | | Summary: Introduces DefineInline action and initial version of availability checks. Reviewers: sammccall, ilya-biryukov, hokein Reviewed By: hokein Subscribers: thakis, usaxena95, mgorny, ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65433
* [c++20] Enforce rule that a union-like class or class with referenceRichard Smith2019-10-274-3/+122
| | | | members cannot have defaulted comparisons.
OpenPOWER on IntegriCloud