Commit Graph

330765 Commits

Author SHA1 Message Date
Jonas Devlieghere f8a92af893 [LLDB] Remove incorrect dotest.py invocation
The invocation shown by dotest.py to re-run a single test is misleading:
it ranges from missing arguments (best case scenario) to being totally
wrong (worst case scenario).

In the past I've tried to get it right, but given the dotest
architecture this is harder than it looks. Furthermore, we have pretty
good documentation on the website [1] for most use cases.

This patch removes the rerun invocation.

[1] https://lldb.llvm.org/resources/test.html
2019-10-28 13:24:07 -07:00
Francis Visoiu Mistrih f5094e1829 [Remarks] Fix Sphinx formatting 2019-10-28 13:13:39 -07:00
Francis Visoiu Mistrih 025166cf48 [Remarks] Add bitstream to the list of supported formats in clang 2019-10-28 13:08:05 -07:00
Hiroshi Yamauchi 75f72f6b73 [PGO][PGSO] SizeOpts changes.
Summary:
(Split of off D67120)

SizeOpts/MachineSizeOpts changes for profile guided size optimization.

(A second try after previously committed as r375254 and reverted as r375375.)

Subscribers: mgorny, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69409
2019-10-28 12:57:26 -07:00
Francis Visoiu Mistrih c7557dd692 [Remarks] Remove references to ELF support
There is no ELF support at the moment.

Remove all the references to the `.remarks` section.
2019-10-28 12:50:46 -07:00
Francis Visoiu Mistrih 209d5a12c5 [Remarks] Emit the remarks section by default for certain formats
Emit a remarks section by default for the following formats:

* bitstream
* yaml-strtab

while still providing -remarks-section=<bool> to override the defaults.
2019-10-28 12:50:46 -07:00
Puyan Lotfi a51fc8ddf8 [MachineOuliner][NFC] Refactoring code to make outline rerunning a cleaner diff.
I want to add the ability to rerun the outliner in certain cases, and I
thought this could be an NFC change that could make a subsequent change
that allows for rerunning the outliner a cleaner diff.

Differential Revision: https://reviews.llvm.org/D69482
2019-10-28 15:13:45 -04:00
David Tellenbach e3a45a24d1 [ARM][Thumb2InstrInfo] Fix default `0` opcode when rewriting frame indices
The static functions `positiveOffsetOpcode`, `negativeOffsetOpcode` and
`immediateOffsetOpcode` (lib/Target/ARM/Thumb2InstrInfo.cpp) currently can
return `0` as default opcode which is meaningless in this situation.

This patch replaces this default value by llvm_unreachable.

Reviewers: t.p.northover, tellenbach

Reviewed By: tellenbach

Subscribers: tellenbach, kristof.beyls, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69432

Patch By: Lorenzo Casalino <lorenzo.casalino93@gmail.com>
2019-10-28 18:58:45 +00:00
Nico Weber e59f7488c7 Convert files added in d157a9bc8b to unix line endings.
Ran:
    git show  --diff-filter=A --stat d157a9bc8b | grep '|' | \
    awk '{ print $1 }' | xargs dos2unix
2019-10-28 14:39:45 -04:00
Jay Foad 843c0adf0f [ConstantFold] Fold extractelement of getelementptr
Summary:
Getelementptr has vector type if any of its operands are vectors
(the scalar operands being implicitly broadcast to all vector elements).
Extractelement applied to a vector getelementptr can be folded by
applying the extractelement in turn to all of the vector operands.

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69379
2019-10-28 18:32:39 +00:00
Simon Pilgrim f2132070d9 Lexer::ReadToEndOfLine - fix Token uninitialised value warnings. NFCI.
Use Token::startToken to initialize Token.
2019-10-28 18:28:18 +00:00
Craig Topper 3da269a248 [X86] Add a DAG combine to turn (and (bitcast (vXi1 (concat_vectors (vYi1 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
2019-10-28 11:27:01 -07:00
Nico Weber 8aa0a785c4 gn build: (manually) merge d157a9bc
While here, also merge r335850 / r366396.
2019-10-28 14:18:56 -04:00
Jonas Devlieghere da2a4c234d [Docs] Update source code link to Github 2019-10-28 11:14:59 -07:00
Julian Lettner e6102dc5ef [lit] Remove redundant comments from main function
Hopefully the functionality is now clear due to the use of small,
well-named helper functions.
2019-10-28 11:10:07 -07:00
Craig Topper 6d63bf9194 [IR] Use UnaryOperator::CreateFNeg in NoFolder::createFNeg
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
2019-10-28 11:08:28 -07:00
Sander de Smalen 70f5aecede Reland [AArch64][DebugInfo] Do not recompute CalleeSavedStackSize (Take 2)
Fixed up test/DebugInfo/MIR/Mips/live-debug-values-reg-copy.mir that
broke r375425.
2019-10-28 18:05:19 +00:00
Craig Topper 18824d25d8 [LV] Interleaving should not exceed estimated loop trip count.
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
2019-10-28 10:58:22 -07:00
Evgenii Stepanov 3f345732b4 Add missing lld checks in sanitizer tests.
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).
2019-10-28 10:32:46 -07:00
Alexey Bataev 7c86069820 [OPENMP]Fix PR43771: Do not capture contexprs variables.
If the variable is a constexpr variable, it should not be captured in the OpenMP region.
2019-10-28 13:29:02 -04:00
Bjorn Pettersson 80cb2cecc6 [utils] InlineFunction: fix for debug info affecting optimizations
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
2019-10-28 18:19:07 +01:00
Austin Kerbow d11b93ec6a AMDGPU: Avoid overwriting saved PC
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
2019-10-28 10:02:22 -07:00
Julian Lettner 2ddd1564a9 [lit] Make main.py a pure Python module
Running it directly as a tool, that is what lit.py is for.
2019-10-28 09:56:37 -07:00
Jonas Devlieghere 6336317e0a [Docs] Disable Python docs when LLDB_DISABLE_PYTHON is set
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"
2019-10-28 09:53:58 -07:00
Sean Fertile 582e3c09d4 [AIX] Refactor AIX Call Lowering to use CCState. NFCI.
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
2019-10-28 12:44:22 -04:00
Kostya Kortchinsky 6f2de9cbb3 [scudo][standalone] Consolidate lists
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
2019-10-28 09:34:36 -07:00
Simon Pilgrim 93a3128a67 Remove extra ';'. NFCI. 2019-10-28 16:32:02 +00:00
Guillaume Chatelet bd87916109 [clang] Add no_builtin attribute
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
2019-10-28 17:30:11 +01:00
--global a062856bcf [NFC] Comment endif to test commit access 2019-10-28 09:19:08 -07:00
Marcello Maggioni e4d6f1300f [LiveIntervalUnion] Expose extraction of last index in map for external users
Differential Revision: https://reviews.llvm.org/D69515
2019-10-28 09:15:52 -07:00
David Green bf21f0d489 [InstCombine] Extra combine for uadd_sat
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
2019-10-28 15:21:16 +00:00
Andrew Paverd d157a9bc8b Add Windows Control Flow Guard checks (/guard:cf).
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
2019-10-28 15:19:39 +00:00
Jinsong Ji a233e7d7cb [AArch64] Fix unannotated fall-through between switch labels
This is breaking buildbot with -Werror,-Wimplicit-fallthrough on.
eg:
http://lab.llvm.org:8011/builders/ppc64le-lld-multistage-test/builds/6881
2019-10-28 15:18:50 +00:00
Sanne Wouda 265ddc5757 Precommit AArch64 test for -consider-local-interval-cost
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
2019-10-28 15:00:22 +00:00
Alexey Bataev d7941a6ab9 [LIBOMPTARGET]Fix build, NFC.
Need to include nvptx_interface.h in target_impl.h, otherwise the build
is failed because of missing __kmpc_impl_lanemask_t type.
2019-10-28 10:43:00 -04:00
Nico Weber b911d2db5d lld/COFF: Simplify getOutputPath() using sys::path functions.
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
2019-10-28 10:38:32 -04:00
Jeremy Morse f5e1b718a6 [DebugInfo] MachineSink: find more DBG_VALUEs to sink
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
2019-10-28 14:32:50 +00:00
Sanjay Patel 1ebd4a2e3a [DAGCombiner] widen any_ext of popcount based on target support
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
2019-10-28 10:07:12 -04:00
Bryan Chan 35cb3ee4ca [AArch64][Builtins] Avoid unnecessary cache cleaning
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
2019-10-28 09:56:39 -04:00
David Green d2ec416c7b [InstCombine][NFC] Tests for uadd.sat and sadd.sat canonicalisation. 2019-10-28 13:47:09 +00:00
Ilya Biryukov 4c430a7c6f [clangd] Do not report anonymous entities in findExplicitReferences
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
2019-10-28 14:41:34 +01:00
Sanjay Patel f2e93d10fe [CVP] prevent propagating poison when substituting edge values into a phi (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
2019-10-28 08:58:28 -04:00
Jeremy Morse ee50590e16 [DebugInfo] MachineSink: Insert undef DBG_VALUEs when sinking instructions
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
2019-10-28 12:17:56 +00:00
Dmitry Preobrazhensky b8042dbe2b [AMDGPU][MC][GFX10] Added v_interp_[p1/p2/mov]_f32_e64
See https://bugs.llvm.org/show_bug.cgi?id=43747

Reviewers: arsenm, rampitec

Differential Revision: https://reviews.llvm.org/D69348
2019-10-28 15:03:43 +03:00
David Green ba2c625531 [Codegen][ARM] Add float softening for cbrt
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
2019-10-28 11:08:55 +00:00
Rafael Stahl a483302fbe minor doc typo fix / testing github commit 2019-10-28 12:08:40 +01:00
vhscampos f6e11a36c4 [ARM][AArch64] Implement __cls, __clsl and __clsll intrinsics from ACLE
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
2019-10-28 11:06:58 +00:00
Kadir Cetinkaya 3cb5764f90
[clangd] Flush streams when printing HoverInfo Name and Definition
Summary: Fixes some windows breakages when compiled via msvc.
2019-10-28 12:05:03 +01:00
Ilya Biryukov c814f4c459 [clangd] Do not highlight keywords in semantic highlighting
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
2019-10-28 12:03:09 +01:00
vhscampos 5d35b7d9e1 [ARM][AArch64] Implement __arm_rsrf, __arm_rsrf64, __arm_wsrf & __arm_wsrf64
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
2019-10-28 10:59:18 +00:00