platform/upstream/llvm.git
4 years agoadd tests that debug mode catches nullptr->string_view conversions in comparison...
Eric Fiselier [Wed, 25 Sep 2019 18:43:40 +0000 (18:43 +0000)]
add tests that debug mode catches nullptr->string_view conversions in comparison operators

llvm-svn: 372907

4 years ago[AMDGPU] gfx10 v_fmac_f16 operand folding
Stanislav Mekhanoshin [Wed, 25 Sep 2019 18:40:20 +0000 (18:40 +0000)]
[AMDGPU] gfx10 v_fmac_f16 operand folding

Fold immediates into v_fmac_f16.

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

llvm-svn: 372906

4 years ago[lldb] Excludes private headers from SWIG dependency.
Haibo Huang [Wed, 25 Sep 2019 18:17:45 +0000 (18:17 +0000)]
[lldb] Excludes private headers from SWIG dependency.

Reviewers: xiaobai

Subscribers: mgorny, lldb-commits

Tags: #lldb

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

llvm-svn: 372905

4 years ago[emacs] simplify and improve keyword highlighting in tablegen-mode.el
Bob Haarman [Wed, 25 Sep 2019 18:16:02 +0000 (18:16 +0000)]
[emacs] simplify and improve keyword highlighting in tablegen-mode.el

Summary:
The keyword and type keyword matchers in tablegen-mode.el checked
for space, newline, tab, or open paren after the regular expression
that matches keywords (or type keywords, respectively). This is
unnecessary, because those regular expressions already include word
boundaries. This change removes the extra check. This also causes
"def" in "def:" to be highlighted as a keyword, which was missed
before.

Reviewers: lattner, MaskRay

Reviewed By: MaskRay

Subscribers: llvm-commits

Tags: #llvm

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

llvm-svn: 372904

4 years ago[Mangle] Add flag to asm labels to disable '\01' prefixing
Vedant Kumar [Wed, 25 Sep 2019 18:00:31 +0000 (18:00 +0000)]
[Mangle] Add flag to asm labels to disable '\01' prefixing

LLDB synthesizes decls using asm labels. These decls cannot have a mangle
different than the one specified in the label name. I.e., the '\01' prefix
should not be added.

Fixes an expression evaluation failure in lldb's TestVirtual.py on iOS.

rdar://45827323

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

llvm-svn: 372903

4 years ago[NFC] Add { } to silence compiler warning [-Wmissing-braces].
Huihui Zhang [Wed, 25 Sep 2019 17:32:20 +0000 (17:32 +0000)]
[NFC] Add { } to silence compiler warning [-Wmissing-braces].

llvm-project/llvm/unittests/ADT/ArrayRefTest.cpp:254:25: warning: suggest braces around initialization of subobject [-Wmissing-braces]
  std::array<int, 5> A1{42, -5, 0, 1000000, -1000000};
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
                        {                           }

llvm-svn: 372902

4 years ago[CMake] Add the system debugserver to lldb-test-deps.
Jonas Devlieghere [Wed, 25 Sep 2019 17:13:02 +0000 (17:13 +0000)]
[CMake] Add the system debugserver to lldb-test-deps.

When using the system debugserver we create a target to copy it over.
This target has to be added to lldb-test-deps.

llvm-svn: 372901

4 years ago[CMake] Run the lldb-server tests with system debugserver.
Jonas Devlieghere [Wed, 25 Sep 2019 17:12:59 +0000 (17:12 +0000)]
[CMake] Run the lldb-server tests with system debugserver.

Now that we no longer build debugserver when LLDB_USE_SYSTEM_DEBUGSERVER
is set, we have to change the logic for testing lldb-server.

llvm-svn: 372900

4 years ago[InstCombine] Limit FMul constant folding for fma simplifications.
Florian Hahn [Wed, 25 Sep 2019 17:03:20 +0000 (17:03 +0000)]
[InstCombine] Limit FMul constant folding for fma simplifications.

As @reames pointed out post-commit, rL371518 adds additional rounding
in some cases, when doing constant folding of the multiplication.
This breaks a guarantee llvm.fma makes and must be avoided.

This patch reapplies rL371518, but splits off the simplifications not
requiring rounding from SimplifFMulInst as SimplifyFMAFMul.

Reviewers: spatel, lebedev.ri, reames, scanon

Reviewed By: reames

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

llvm-svn: 372899

4 years ago[CUDA][HIP] Enable kernel function return type deduction.
Michael Liao [Wed, 25 Sep 2019 16:51:45 +0000 (16:51 +0000)]
[CUDA][HIP] Enable kernel function return type deduction.

Summary:
- Even though only `void` is still accepted as the deduced return type,
  enabling deduction/instantiation on the return type allows more
  consistent coding.

Reviewers: tra, jlebar

Subscribers: cfe-commits, yaxunl

Tags: #clang

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

llvm-svn: 372898

4 years ago[AArch64][GlobalISel] Choose CCAssignFns per-argument for tail call lowering
Jessica Paquette [Wed, 25 Sep 2019 16:45:35 +0000 (16:45 +0000)]
[AArch64][GlobalISel] Choose CCAssignFns per-argument for tail call lowering

When checking for tail call eligibility, we should use the correct CCAssignFn
for each argument, rather than just checking if the caller/callee is varargs or
not.

This is important for tail call lowering with varargs. If we don't check it,
then basically any varargs callee with parameters cannot be tail called on
Darwin, for one thing. If the parameters are all guaranteed to be in registers,
this should be entirely safe.

On top of that, not checking for this could potentially make it so that we have
the wrong stack offsets when checking for tail call eligibility.

Also refactor some of the stuff for CCAssignFnForCall and pull it out into a
helper function.

Update call-translator-tail-call.ll to show that we can now correctly tail call
on Darwin. Also add two extra tail call checks. The first verifies that we still
respect the caller's stack size, and the second verifies that we still don't
tail call when a varargs function has a memory argument.

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

llvm-svn: 372897

4 years agoAdd a missing default parameter to regex::assign. This is LWG3296; reviewed as https...
Marshall Clow [Wed, 25 Sep 2019 16:40:30 +0000 (16:40 +0000)]
Add a missing default parameter to regex::assign. This is LWG3296; reviewed as https://reviews.llvm.org/D67944

llvm-svn: 372896

4 years ago[lldb] Move swig call from python code to cmake
Haibo Huang [Wed, 25 Sep 2019 16:37:11 +0000 (16:37 +0000)]
[lldb] Move swig call from python code to cmake

Summary: Elimiates lots of unused code.

Reviewers: labath, mgorny

Subscribers: lldb-commits

Tags: #lldb

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

llvm-svn: 372895

4 years ago[Docs] Document forwarding arguments with lit
Jonas Devlieghere [Wed, 25 Sep 2019 16:14:26 +0000 (16:14 +0000)]
[Docs] Document forwarding arguments with lit

Explain how to forward arguments to dotest.py from lit.

llvm-svn: 372894

4 years ago[CodeGen] Replace -max-jump-table-size with -max-jump-table-targets
Evandro Menezes [Wed, 25 Sep 2019 16:10:20 +0000 (16:10 +0000)]
[CodeGen] Replace -max-jump-table-size with -max-jump-table-targets

Modern processors predict the targets of an indirect branch regardless of
the size of any jump table used to glean its target address.  Moreover,
branch predictors typically use resources limited by the number of actual
targets that occur at run time.

This patch changes the semantics of the option `-max-jump-table-size` to limit
the number of different targets instead of the number of entries in a jump
table.  Thus, it is now renamed to `-max-jump-table-targets`.

Before, when `-max-jump-table-size` was specified, it could happen that
cluster jump tables could have targets used repeatedly, but each one was
counted and typically resulted in tables with the same number of entries.
With this patch, when specifying `-max-jump-table-targets`, tables may have
different lengths, since the number of unique targets is counted towards the
limit, but the number of unique targets in tables is the same, but for the
last one containing the balance of targets.

Differential revision: https://reviews.llvm.org/D60295

llvm-svn: 372893

4 years ago[LangRef] Clarify absence of rounding guarantees for fmuladd.
Florian Hahn [Wed, 25 Sep 2019 16:09:24 +0000 (16:09 +0000)]
[LangRef] Clarify absence of rounding guarantees for fmuladd.

During the review of D67434, it was recommended to make fmuladd's
behavior more explicit. D67434 depends on this interpretation.

Reviewers: efriedma, jfb, reames, scanon, lebedev.ri, spatel

Reviewed By: spatel

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

llvm-svn: 372892

4 years ago[Dwarf] Make dw_tag_t a typedef for llvm::dwarf::Tag instead of uint16_t.
Jonas Devlieghere [Wed, 25 Sep 2019 16:04:38 +0000 (16:04 +0000)]
[Dwarf] Make dw_tag_t a typedef for llvm::dwarf::Tag instead of uint16_t.

Currently dw_tag_t is a typedef for uint16_t. This patch changes makes
dw_tag_t a typedef for llvm::dwarf::Tag. This enables us to use the full
power of the DWARF utilities in LLVM without having to do the cast every
time. With this approach, we only have to do the cast when reading the
ULEB value.

Differential revision: https://reviews.llvm.org/D68005

llvm-svn: 372891

4 years agoModernize Makefile.
Adrian Prantl [Wed, 25 Sep 2019 15:48:30 +0000 (15:48 +0000)]
Modernize Makefile.

llvm-svn: 372890

4 years agoRe-land r372863: [AST] Extract Decl::printNestedNameSpecifier helper from Decl::print...
Ilya Biryukov [Wed, 25 Sep 2019 15:46:04 +0000 (15:46 +0000)]
Re-land r372863: [AST] Extract Decl::printNestedNameSpecifier helper from Decl::printQualifiedName

Reverted in r372880 due to the test failure.
Also contains a fix that adjusts printQualifiedName to return the same results as before in
case of anonymous function locals and parameters.

llvm-svn: 372889

4 years ago[clangd] Change constness of parameters to findExplicitRefs
Kadir Cetinkaya [Wed, 25 Sep 2019 15:44:26 +0000 (15:44 +0000)]
[clangd] Change constness of parameters to findExplicitRefs

Summary:
Recursive AST requires non-const ast nodes, but it doesn't really
mutate them. In addition to that, in clangd we mostly have const ast nodes. So
it makes sense to move the const_cast into callee rather than having it at every
caller in the future.

Reviewers: ilya-biryukov

Subscribers: MaskRay, jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

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

llvm-svn: 372888

4 years agofixed test: eliminated race condition which might cause deadlock
Andrey Churbanov [Wed, 25 Sep 2019 15:25:52 +0000 (15:25 +0000)]
fixed test: eliminated race condition which might cause deadlock

llvm-svn: 372887

4 years ago[DAGCombiner] add one-use restriction to vector transform with cheap extract
Sanjay Patel [Wed, 25 Sep 2019 15:08:33 +0000 (15:08 +0000)]
[DAGCombiner] add one-use restriction to vector transform with cheap extract

We might be able to do better on the example in the test,
but in general, we should not scalarize a splatted vector
binop if there are other uses of the binop. Otherwise, we
can end up with code as we had - a scalar op that is
redundant with a vector op.

llvm-svn: 372886

4 years ago[PatternMatch] Make m_Br more flexible, add matchers for BB values.
Florian Hahn [Wed, 25 Sep 2019 15:05:08 +0000 (15:05 +0000)]
[PatternMatch] Make m_Br more flexible, add matchers for BB values.

Currently m_Br only takes references to BasicBlock*, which limits its
flexibility. For example, you have to declare a variable, even if you
ignore the result or you have to have additional checks to make sure the
matched BB matches an expected one.

This patch adds m_BasicBlock and m_SpecificBB matchers, which can be
used like the existing matchers for constants or values.

I also had a look at the existing uses and updated a few. IMO it makes
the code a bit more explicit.

Reviewers: spatel, craig.topper, RKSimon, majnemer, lebedev.ri

Reviewed By: lebedev.ri

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

llvm-svn: 372885

4 years ago[NFC] Fix typo in `getPreviousDecl` comment.
Yitzhak Mandelbaum [Wed, 25 Sep 2019 14:58:39 +0000 (14:58 +0000)]
[NFC] Fix typo in `getPreviousDecl` comment.

llvm-svn: 372884

4 years ago[x86] add test for multi-use scalarization of vector binop; NFC
Sanjay Patel [Wed, 25 Sep 2019 14:57:45 +0000 (14:57 +0000)]
[x86] add test for multi-use scalarization of vector binop; NFC

llvm-svn: 372883

4 years ago[TargetInstrInfo] Let findCommutedOpIndices take const MachineInstr&
Simon Pilgrim [Wed, 25 Sep 2019 14:55:57 +0000 (14:55 +0000)]
[TargetInstrInfo] Let findCommutedOpIndices take const MachineInstr&

Neither the base implementation of findCommutedOpIndices nor any in-tree target modifies the instruction passed in and there is no reason why they would in the future.

Committed on behalf of @hvdijk (Harald van Dijk)

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

llvm-svn: 372882

4 years ago[PatternMatch] Generalize brc_match (NFC).
Florian Hahn [Wed, 25 Sep 2019 14:53:06 +0000 (14:53 +0000)]
[PatternMatch] Generalize brc_match (NFC).

Preparation for D68013.

llvm-svn: 372881

4 years agoRevert r372863: [AST] Extract Decl::printNestedNameSpecifier helper from Decl::printQ...
Ilya Biryukov [Wed, 25 Sep 2019 14:50:12 +0000 (14:50 +0000)]
Revert r372863: [AST] Extract Decl::printNestedNameSpecifier helper from Decl::printQualifiedName

Reason: causes a test failure, will investigate and re-land with a fix.
llvm-svn: 372880

4 years agoEnable tasks dependencies hashmaps resizing.
Andrey Churbanov [Wed, 25 Sep 2019 14:40:19 +0000 (14:40 +0000)]
Enable tasks dependencies hashmaps resizing.

Patch by viroulep (Philippe Virouleau)

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

llvm-svn: 372879

4 years ago[IR] allow fast-math-flags on phi of FP values (2nd try)
Sanjay Patel [Wed, 25 Sep 2019 14:35:02 +0000 (14:35 +0000)]
[IR] allow fast-math-flags on phi of FP values (2nd try)

The changes here are based on the corresponding diffs for allowing FMF on 'select':
D61917 <https://reviews.llvm.org/D61917>

As discussed there, we want to have fast-math-flags be a property of an FP value
because the alternative (having them on things like fcmp) leads to logical
inconsistency such as:
https://bugs.llvm.org/show_bug.cgi?id=38086

The earlier patch for select made almost no practical difference because most
unoptimized conditional code begins life as a phi (based on what I see in clang).
Similarly, I don't expect this patch to do much on its own either because
SimplifyCFG promptly drops the flags when converting to select on a minimal
example like:
https://bugs.llvm.org/show_bug.cgi?id=39535

But once we have this plumbing in place, we should be able to wire up the FMF
propagation and start solving cases like that.

The change to RecurrenceDescriptor::AddReductionVar() is required to prevent a
regression in a LoopVectorize test. We are intersecting the FMF of any
FPMathOperator there, so if a phi is not properly annotated, new math
instructions may not be either. Once we fix the propagation in SimplifyCFG, it
may be safe to remove that hack.

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

llvm-svn: 372878

4 years agoFix analyzer TypeAttributeImpl::anchor() override.
Simon Pilgrim [Wed, 25 Sep 2019 14:23:25 +0000 (14:23 +0000)]
Fix analyzer TypeAttributeImpl::anchor() override.

TypeAttributeImpl inherits from EnumAttributeImpl which already defines anchor() as a virtual, so we should override this instead of redeclaring it.

llvm-svn: 372877

4 years ago[gn build] Fix Python DeprecationWarning
Marco Antognini [Wed, 25 Sep 2019 14:15:34 +0000 (14:15 +0000)]
[gn build] Fix Python DeprecationWarning

Summary:
This fixes two issues:
 - DeprecationWarning: invalid escape sequence \`
 - ResourceWarning: unclosed file

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

llvm-svn: 372876

4 years ago[clangd] Fix parseNamespaceEvents to parse the last token
Kadir Cetinkaya [Wed, 25 Sep 2019 14:12:05 +0000 (14:12 +0000)]
[clangd] Fix parseNamespaceEvents to parse the last token

Reviewers: hokein, ilya-biryukov

Subscribers: MaskRay, jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

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

llvm-svn: 372875

4 years ago[Dominators][AMDGPU] Don't use virtual exit node in findNearestCommonDominator. Clean...
Jakub Kuderski [Wed, 25 Sep 2019 14:04:36 +0000 (14:04 +0000)]
[Dominators][AMDGPU] Don't use virtual exit node in findNearestCommonDominator. Cleanup MachinePostDominators.

Summary:
This patch fixes a bug that originated from passing a virtual exit block (nullptr) to `MachinePostDominatorTee::findNearestCommonDominator` and resulted in assertion failures inside its callee. It also applies a small cleanup to the class.

The patch introduces a new function in PDT that given a list of `MachineBasicBlock`s finds their NCD. The new overload of `findNearestCommonDominator` handles virtual root correctly.

Note that similar handling of virtual root nodes is not necessary in (forward) `DominatorTree`s, as right now they don't use virtual roots.

Reviewers: tstellar, tpr, nhaehnle, arsenm, NutshellySima, grosser, hliao

Reviewed By: hliao

Subscribers: hliao, kzhuravl, jvesely, wdng, yaxunl, dstuttard, t-tye, hiraditya, llvm-commits

Tags: #amdgpu, #llvm

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

llvm-svn: 372874

4 years ago[SystemZ] Improve emitSelect()
Jonas Paulsson [Wed, 25 Sep 2019 14:00:33 +0000 (14:00 +0000)]
[SystemZ]  Improve emitSelect()

Merge more Select pseudo instructions in emitSelect() by allowing other
instructions between them as long as they do not clobber CC.

Debug value instructions are now moved down to below the new PHIs instead of
erasing them.

Review: Ulrich Weigand
https://reviews.llvm.org/D67619

llvm-svn: 372873

4 years agoFix cppcheck variable shadow warning. NFCI.
Simon Pilgrim [Wed, 25 Sep 2019 13:45:36 +0000 (13:45 +0000)]
Fix cppcheck variable shadow warning. NFCI.

llvm-svn: 372872

4 years agoAdd missing ExplicitTy default initialization to ConstantExprKeyType constructors.
Simon Pilgrim [Wed, 25 Sep 2019 13:38:54 +0000 (13:38 +0000)]
Add missing ExplicitTy default initialization to ConstantExprKeyType constructors.

Fixes cppcheck uninitialized variable warnings

llvm-svn: 372871

4 years ago[libTooling] Introduce the MatchConsumer abstraction
Yitzhak Mandelbaum [Wed, 25 Sep 2019 13:34:04 +0000 (13:34 +0000)]
[libTooling] Introduce the MatchConsumer abstraction

Summary:
This revision introduces a separate (small) library for the `MatchConsumer`
abstraction: computations over AST match results.  This abstraction is central
to the Transformer framework, and there deserves being defined explicitly.

Reviewers: gribozavr

Subscribers: cfe-commits

Tags: #clang

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

llvm-svn: 372870

4 years ago[lldb][modern-type-lookup] Add two basic tests for modern-type-lookup
Raphael Isemann [Wed, 25 Sep 2019 13:33:50 +0000 (13:33 +0000)]
[lldb][modern-type-lookup] Add two basic tests for modern-type-lookup

The story so far: LLDB's modern type lookup mode has no (as in, 0%) test
coverage. It was supposed to be tested by hardcoding the default to 'true' and then running
the normal LLDB tests, but to my knowledge no one is doing that. As a around 130 tests
seem to fail with this mode enabled, we also can't just enable it globally for now.

As we touch the surrounding code all the time and also want to refactor parts of it, we
should be a bit more ambitious with our testing efforts.

So this patch adds two basic tests that enable this mode and do some
basic expression parsing which should hopefully be basic enough to not
break anywhere but still lets us know if this mode works at all (i.e. setting up the
ExternalASTMerger in LLDB, using its basic import functionality to move declarations
around and do some lookups).

llvm-svn: 372869

4 years agoRevert [IR] allow fast-math-flags on phi of FP values
Sanjay Patel [Wed, 25 Sep 2019 13:29:09 +0000 (13:29 +0000)]
Revert [IR] allow fast-math-flags on phi of FP values

This reverts r372866 (git commit dec03223a97af0e4dfcb23da55c0f7f8c9b62d00)

llvm-svn: 372868

4 years ago[llvm-readobj/llvm-readelf] - .stack_sizes: demangle symbol names in warnings reported.
George Rimar [Wed, 25 Sep 2019 13:16:43 +0000 (13:16 +0000)]
[llvm-readobj/llvm-readelf] - .stack_sizes: demangle symbol names in warnings reported.

I started this patch as a refactoring, tried to make a helper for
getting symbol names, similar to how we get section names
used in warning messages.

So this patch cleanups the code and fixes an issue: symbol names
in warning messages were not demangled.

Differential revision: https://reviews.llvm.org/D68012

llvm-svn: 372867

4 years ago[IR] allow fast-math-flags on phi of FP values
Sanjay Patel [Wed, 25 Sep 2019 13:14:12 +0000 (13:14 +0000)]
[IR] allow fast-math-flags on phi of FP values

The changes here are based on the corresponding diffs for allowing FMF on 'select':
D61917

As discussed there, we want to have fast-math-flags be a property of an FP value
because the alternative (having them on things like fcmp) leads to logical
inconsistency such as:
https://bugs.llvm.org/show_bug.cgi?id=38086

The earlier patch for select made almost no practical difference because most
unoptimized conditional code begins life as a phi (based on what I see in clang).
Similarly, I don't expect this patch to do much on its own either because
SimplifyCFG promptly drops the flags when converting to select on a minimal
example like:
https://bugs.llvm.org/show_bug.cgi?id=39535

But once we have this plumbing in place, we should be able to wire up the FMF
propagation and start solving cases like that.

The change to RecurrenceDescriptor::AddReductionVar() is required to prevent a
regression in a LoopVectorize test. We are intersecting the FMF of any
FPMathOperator there, so if a phi is not properly annotated, new math
instructions may not be either. Once we fix the propagation in SimplifyCFG, it
may be safe to remove that hack.

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

llvm-svn: 372866

4 years ago[docs][llvm-strings] Clarify "printable character" wording
James Henderson [Wed, 25 Sep 2019 13:09:17 +0000 (13:09 +0000)]
[docs][llvm-strings] Clarify "printable character" wording

The --bytes option uses the phrase "printable ASCII characters", but the
description section used simply "printable characters". To avoid any
confusion about locale impacts etc, this change adopts the former's
phrasing in both places. It also fixes a minor grammar issue in the
description.

Reviewed by: MaskRay

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

llvm-svn: 372865

4 years ago[docs][llvm-strip] Update llvm-strip doc to better match llvm-objcopy's
James Henderson [Wed, 25 Sep 2019 13:09:12 +0000 (13:09 +0000)]
[docs][llvm-strip] Update llvm-strip doc to better match llvm-objcopy's

Main changes are mostly wording of some options, but this change also
fixes a switch reference so that a link is created and moves
--strip-sections into the ELF-specific area since it is only supported
for ELF currently.

llvm-svn: 372864

4 years ago[AST] Extract Decl::printNestedNameSpecifier helper from Decl::printQualifiedName
Ilya Biryukov [Wed, 25 Sep 2019 13:09:10 +0000 (13:09 +0000)]
[AST] Extract Decl::printNestedNameSpecifier helper from Decl::printQualifiedName

Summary:
To be used in clangd, e.g. in D66647.
Currently the alternative to this function is doing string manipulation on results of `printQualifiedName`, which is
hard-to-impossible to get right in presence of template arguments.

Reviewers: kadircet, aaron.ballman

Reviewed By: kadircet, aaron.ballman

Subscribers: aaron.ballman, usaxena95, cfe-commits

Tags: #clang

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

llvm-svn: 372863

4 years agoHave ABI plugins vend llvm MCRegisterInfo data
Pavel Labath [Wed, 25 Sep 2019 13:03:04 +0000 (13:03 +0000)]
Have ABI plugins vend llvm MCRegisterInfo data

Summary:
I was recently surprised to learn that there is a total of 2 (two) users
of the register info definitions contained in the ABI plugins. Yet, the
defitions themselves span nearly 10kLOC.
The two users are:
 - dwarf expression pretty printer
 - the mechanism for augmenting the register info definitions obtained
   over gdb-remote protocol (AugmentRegisterInfoViaABI)

Both of these uses need the DWARF an EH register numbers, which is
information that is already available in LLVM. This patch makes it
possible to do so.

It adds a GetMCRegisterInfo method to the ABI class, which every class
is expected to implement. Normally, it should be sufficient to obtain
the definitions from the appropriate llvm::Target object (for which I
provide a utility function), but the subclasses are free to construct it
in any way they deem fit.

We should be able to always get the MCRegisterInfo object from llvm,
with one important exception: if the relevant llvm target was disabled
at compile time. To handle this, I add a mechanism to disable the
compilation of ABI plugins based on the value of LLVM_TARGETS_TO_BUILD
cmake setting. This ensures all our existing are able to create their
MCRegisterInfo objects.

The new MCRegisterInfo api is not used yet, but the intention is to make
use of it in follow-up patches.

Reviewers: jasonmolenda, aprantl, JDevlieghere, tatyana-krasnukha

Subscribers: wuzish, nemanjai, mgorny, kbarton, atanasyan, lldb-commits

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

llvm-svn: 372862

4 years ago[lldb][NFC] Remove CompletionRequest::GetCursorArgument and GetRawLineUntilCursor
Raphael Isemann [Wed, 25 Sep 2019 12:55:30 +0000 (12:55 +0000)]
[lldb][NFC] Remove CompletionRequest::GetCursorArgument and GetRawLineUntilCursor

They both return the same result as another function (GetCursorArgumentPrefix
and GetRawLine). They were only added because the old API allowed to look
(in theory) behind the cursor position which is no longer possible.

llvm-svn: 372861

4 years ago[clangd] Add missing header guard, NFC.
Haojian Wu [Wed, 25 Sep 2019 12:54:53 +0000 (12:54 +0000)]
[clangd] Add missing header guard, NFC.

llvm-svn: 372860

4 years ago[clangd] A helper to find explicit references and their names
Ilya Biryukov [Wed, 25 Sep 2019 12:40:22 +0000 (12:40 +0000)]
[clangd] A helper to find explicit references and their names

Summary:
Allows to simplify pending code tweaks:
  - the upcoming DefineInline tweak (D66647)
  - remove using declaration (D56612)
  - qualify name under cursor (D56610)

Another potential future application is simplifying semantic highlighting.

Reviewers: kadircet

Reviewed By: kadircet

Subscribers: mgrang, jfb, MaskRay, jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

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

llvm-svn: 372859

4 years ago[lldb][NFC] Add CompletionRequest::AppendEmptyArgument
Raphael Isemann [Wed, 25 Sep 2019 12:40:01 +0000 (12:40 +0000)]
[lldb][NFC] Add CompletionRequest::AppendEmptyArgument

This is the only legitimate use we currently have for modifying
a CompletionRequest. Add a utility function for this purpose
and remove the remaining setters which go against the idea of
having an immutable CompletionRequest.

llvm-svn: 372858

4 years ago[AMDGPU][MC][DOC] Updated AMD GPU assembler description.
Dmitry Preobrazhensky [Wed, 25 Sep 2019 12:38:35 +0000 (12:38 +0000)]
[AMDGPU][MC][DOC] Updated AMD GPU assembler description.

Summary of changes:
- Updated to reflect recent changes in assembler;
- Minor bugfixing and improvements.

llvm-svn: 372857

4 years ago[DAG] Pull out minimum shift value calc into a helper function. NFCI.
Simon Pilgrim [Wed, 25 Sep 2019 12:28:56 +0000 (12:28 +0000)]
[DAG] Pull out minimum shift value calc into a helper function. NFCI.

llvm-svn: 372856

4 years ago[llvm-readobj] - Simplify stack-sizes.test test case.
George Rimar [Wed, 25 Sep 2019 12:18:45 +0000 (12:18 +0000)]
[llvm-readobj] - Simplify stack-sizes.test test case.

This is a follow-up for D67757,
which allows to describe .stack_sizes sections with a new
YAML syntax.

Differential revision: https://reviews.llvm.org/D67759

llvm-svn: 372855

4 years ago[yaml2elf] - Support describing .stack_sizes sections using unique suffixes.
George Rimar [Wed, 25 Sep 2019 12:09:30 +0000 (12:09 +0000)]
[yaml2elf] - Support describing .stack_sizes sections using unique suffixes.

Currently we can't use unique suffixes in section names to describe
stack sizes sections. E.g. '.stack_sizes [1]' will be treated as a regular section.
This happens because we recognize stack sizes section by name and
do not yet drop the suffix before the check.

The patch fixes it.

Differential revision: https://reviews.llvm.org/D68018

llvm-svn: 372853

4 years ago[LLD] Fix testcase from SVN r372843 if executed on windows
Martin Storsjo [Wed, 25 Sep 2019 12:07:50 +0000 (12:07 +0000)]
[LLD] Fix testcase from SVN r372843 if executed on windows

This should fix buildbot errors like this one:
http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/10997

llvm-svn: 372852

4 years ago[lldb][NFC] Remove useless cursor shifting in Options::HandleOptionCompletion
Raphael Isemann [Wed, 25 Sep 2019 12:04:48 +0000 (12:04 +0000)]
[lldb][NFC] Remove useless cursor shifting in Options::HandleOptionCompletion

The cursor position is always at the end of the current argument (as the
argument cut off after the cursor position). So this code is a no-op and
can be removed.

llvm-svn: 372851

4 years agogn build: (manually) merge r372843
Nico Weber [Wed, 25 Sep 2019 12:02:00 +0000 (12:02 +0000)]
gn build: (manually) merge r372843

llvm-svn: 372850

4 years agobuiltins test: Move clear_cache_test.c from a mprotect()ed global to a mmap()ed variable
Nico Weber [Wed, 25 Sep 2019 11:57:51 +0000 (11:57 +0000)]
builtins test: Move clear_cache_test.c from a mprotect()ed global to a mmap()ed variable

ld64 in the macOS 10.15 SDK gives __DATA a maxprot of 3, meaning it
can't be made executable at runtime by default.

Change clear_cache_test.c to use mmap()ed data that's mapped as writable
and executable from the beginning, instead of trying to mprotect()ing a
__DATA variable as executable. This fixes the test on macOS with the
10.15 SDK.

PR43407.

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

llvm-svn: 372849

4 years agoRevert r372788 "Host: use the platform identifiers from LLVM (NFC)"
Hans Wennborg [Wed, 25 Sep 2019 11:55:16 +0000 (11:55 +0000)]
Revert r372788 "Host: use the platform identifiers from LLVM (NFC)"

> Use symbolic constants for the platform identifiers rather than replicating them
> locally.

This broke the build of LLDB on Windows, see
http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/9182 which
fails with e.g.

  E:\build_slave\lldb-x64-windows-ninja\llvm\include\llvm/BinaryFormat/COFF.h(96): error C2059: syntax error: 'constant'
  E:\build_slave\lldb-x64-windows-ninja\llvm\include\llvm/BinaryFormat/COFF.h(96): error C3805: 'constant': unexpected token, expected either '}' or a ','
  E:\build_slave\lldb-x64-windows-ninja\llvm\include\llvm/BinaryFormat/COFF.h(128): error C2059: syntax error: 'constant'
  ...

llvm-svn: 372847

4 years agoAdd a release note for r372844
Hans Wennborg [Wed, 25 Sep 2019 11:53:17 +0000 (11:53 +0000)]
Add a release note for r372844

llvm-svn: 372846

4 years ago[yaml2obj] - Add a Size field for StackSizesSection.
George Rimar [Wed, 25 Sep 2019 11:40:11 +0000 (11:40 +0000)]
[yaml2obj] - Add a Size field for StackSizesSection.

It is a follow-up requested in the review comment
for D67757. Allows to use Content + Size or just Size
when describing .stack_sizes sections in YAML document

Differential revision: https://reviews.llvm.org/D67958

llvm-svn: 372845

4 years agoRevert r370850 "Re-commit r363191 "[MS] Pretend constexpr variable template specializ...
Hans Wennborg [Wed, 25 Sep 2019 11:09:46 +0000 (11:09 +0000)]
Revert r370850 "Re-commit r363191 "[MS] Pretend constexpr variable template specializations are inline""

This work-around was necessary to handle standard library headers in
Visual Studio 2019 16.2. Now that 16.3 has shipped to stable, we can
remove it.

> Re-commit r363191 "[MS] Pretend constexpr variable template specializations are inline"
>
> While the next Visual Studio update (16.3) will fix this issue, that hasn't
> shipped yet. Until then Clang wouldn't work with MSVC's headers which seems
> unfortunate. Let's keep this in until VS 16.3 ships. (See also PR42843.)
>
>> Fixes link errors with clang and the latest Visual C++ 14.21.27702
>> headers, which was reported as PR42027.
>>
>> I chose to intentionally make these things linkonce_odr, i.e.
>> discardable, so that we don't emit definitions of these things in every
>> translation unit that includes STL headers.
>>
>> Note that this is *not* what MSVC does: MSVC has not yet implemented C++
>> DR2387, so they emit fully specialized constexpr variable templates with
>> static / internal linkage.
>>
>> Reviewers: rsmith
>>
>> Differential Revision: https://reviews.llvm.org/D63175

llvm-svn: 372844

4 years ago[LLD] [COFF] Resolve source locations for undefined references using dwarf
Martin Storsjo [Wed, 25 Sep 2019 11:03:48 +0000 (11:03 +0000)]
[LLD] [COFF] Resolve source locations for undefined references using dwarf

This fixes PR42407.

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

llvm-svn: 372843

4 years agogn build: Merge r372841
GN Sync Bot [Wed, 25 Sep 2019 10:35:03 +0000 (10:35 +0000)]
gn build: Merge r372841

llvm-svn: 372842

4 years ago[clangd] Move the existing heder-source-switch implemenation out of clangdServer.
Haojian Wu [Wed, 25 Sep 2019 10:30:22 +0000 (10:30 +0000)]
[clangd] Move the existing heder-source-switch implemenation out of clangdServer.

Summary: This is a NFC change.

Reviewers: kadircet

Reviewed By: kadircet

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

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

llvm-svn: 372841

4 years ago[lldb] [test] Add NetBSD to XFAIL list for thread_local test
Michal Gorny [Wed, 25 Sep 2019 10:18:38 +0000 (10:18 +0000)]
[lldb] [test] Add NetBSD to XFAIL list for thread_local test

llvm-svn: 372840

4 years ago[ARM] Ensure we do not attempt to create lsll #0
David Green [Wed, 25 Sep 2019 10:16:48 +0000 (10:16 +0000)]
[ARM] Ensure we do not attempt to create lsll #0

During legalisation we can end up with some pretty strange nodes, like shifts
of 0. We need to make sure we don't try to make long shifts of these, ending up
with invalid assembly instructions. A long shift with a zero immediate actually
encodes a shift by 32.

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

llvm-svn: 372839

4 years ago[llvm-readobj] - Don't crash when dumping .stack_sizes and unable to find a relocatio...
George Rimar [Wed, 25 Sep 2019 10:14:50 +0000 (10:14 +0000)]
[llvm-readobj] - Don't crash when dumping .stack_sizes and unable to find a relocation resolver.

The crash might happen when we have either a broken or unsupported object
and trying to resolve relocations when dumping the .stack_sizes section.

For the test case I used a 32-bits ELF header and a 64-bit relocation.
In this case a null pointer is returned by the code instead of the relocation
resolver function and then we crash.

Differential revision: https://reviews.llvm.org/D67962

llvm-svn: 372838

4 years ago[lldb] Test data formatters for empty strings
Raphael Isemann [Wed, 25 Sep 2019 10:07:23 +0000 (10:07 +0000)]
[lldb] Test data formatters for empty strings

llvm-svn: 372837

4 years ago[lldb][NFC] Refactor and document *DumpToStreamOptions
Raphael Isemann [Wed, 25 Sep 2019 09:56:23 +0000 (09:56 +0000)]
[lldb][NFC] Refactor and document *DumpToStreamOptions

Those two classes were mostly copy-pasted.

llvm-svn: 372836

4 years ago[lldb] [cmake] Fix installing Python modules on systems using /usr/lib
Michal Gorny [Wed, 25 Sep 2019 09:47:35 +0000 (09:47 +0000)]
[lldb] [cmake] Fix installing Python modules on systems using /usr/lib

Fix installing Python modules on systems that use /usr/lib for Python
while installing other libraries in /usr/lib64.  Rewrite CMake logic
to query correct directories from Python, similarly to how
prepare_binding_Python.py does it.  Furthermore, change the regex used
in get_relative_lib_dir.py to allow 'lib' without suffix.

I think that the code can be further improved but I'd like to take
this enterprise in smaller steps in case one of them breaks something.

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

llvm-svn: 372835

4 years ago[lldb][NFC] Remove unused method chaining from Read[Buffer/String]AndDumpToStreamOptions
Raphael Isemann [Wed, 25 Sep 2019 09:21:00 +0000 (09:21 +0000)]
[lldb][NFC] Remove unused method chaining from Read[Buffer/String]AndDumpToStreamOptions

All this code isn't used anywhere and method chaining isn't really useful for some
option struct.

llvm-svn: 372834

4 years ago[OpenCL] Add image query builtin functions
Sven van Haastregt [Wed, 25 Sep 2019 09:12:59 +0000 (09:12 +0000)]
[OpenCL] Add image query builtin functions

Add the image query builtin functions from the OpenCL C specification.

Patch by Pierre Gondois and Sven van Haastregt.

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

llvm-svn: 372833

4 years agoRevert r372777: [libc++] Implement LWG 2510 and its follow-ups
Ilya Biryukov [Wed, 25 Sep 2019 09:10:38 +0000 (09:10 +0000)]
Revert r372777: [libc++] Implement LWG 2510 and its follow-ups

This also reverts:
 - r372778: [libc++] Implement LWG 3158
 - r372782: [libc++] Try fixing tests that fail on GCC 5 and older
 - r372787: Purge mentions of GCC 4 from the test suite

Reason: the change breaks compilation of LLVM with libc++, for details see
http://lists.llvm.org/pipermail/libcxx-dev/2019-September/000599.html

llvm-svn: 372832

4 years ago[lldb][NFC] Use default member initializers in ReadBufferAndDumpToStreamOptions
Raphael Isemann [Wed, 25 Sep 2019 08:55:55 +0000 (08:55 +0000)]
[lldb][NFC] Use default member initializers in ReadBufferAndDumpToStreamOptions

llvm-svn: 372830

4 years agoAdd tracing in pickNodeFromQueue.
Jay Foad [Wed, 25 Sep 2019 08:45:41 +0000 (08:45 +0000)]
Add tracing in pickNodeFromQueue.

This matches GenericScheduler::pickNodeFromQueue, from which this
function was mostly cut and pasted.

llvm-svn: 372829

4 years agoFix signature of overloaded operator delete.
Jay Foad [Wed, 25 Sep 2019 08:45:36 +0000 (08:45 +0000)]
Fix signature of overloaded operator delete.

This overload was left over from an operator new that was removed in
r123027. Fix it to match another operator new that was added in r248453.

llvm-svn: 372828

4 years ago[lldb] Remove -nostdlib++ flag from import-std-module/sysroot test
Raphael Isemann [Wed, 25 Sep 2019 08:32:25 +0000 (08:32 +0000)]
[lldb] Remove -nostdlib++ flag from import-std-module/sysroot test

That flag was introduced in Clang 6.0, so this made the test fail
with Clang <= 5.0. As it only influences linking builtin libraries
like -m which aren't relevant for this test, we can drop this flag.

llvm-svn: 372827

4 years ago[clangd] Fix the stale documentation about background indexing.
Haojian Wu [Wed, 25 Sep 2019 08:26:32 +0000 (08:26 +0000)]
[clangd] Fix the stale documentation about background indexing.

Reviewers: kadircet

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits

Tags: #clang

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

llvm-svn: 372825

4 years ago[AArch64] Convert neon_ushl and neon_sshl with positive constants to VSHL.
Florian Hahn [Wed, 25 Sep 2019 08:22:05 +0000 (08:22 +0000)]
[AArch64] Convert neon_ushl and neon_sshl with positive constants to VSHL.

I think we should be able to use shl instead of sshl and ushl for
positive constant shift values, unless I am missing something.

We already have the machinery in place to ensure we only replace
nodes, if the shift value is positive and <= the element width.

This is a generalization of an earlier patch rL372565.

Reviewers: t.p.northover, samparker, dmgreen, anemet

Reviewed By: anemet

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

llvm-svn: 372824

4 years ago[lldb] Fix undefined behavior when having fixits in undefined top level exprs
Raphael Isemann [Wed, 25 Sep 2019 07:34:56 +0000 (07:34 +0000)]
[lldb] Fix undefined behavior when having fixits in undefined top level exprs

In top level expressions, we don't have a m_source_code and we don't need to change
the source bounds (as no wrapping happend there). Fixes the test on the
sanitizer bot.

llvm-svn: 372817

4 years ago[lldb][NFC] Refactor TestCallBuiltinFunction
Raphael Isemann [Wed, 25 Sep 2019 07:11:37 +0000 (07:11 +0000)]
[lldb][NFC] Refactor TestCallBuiltinFunction

Using asserts doesn't print a useful error message in case this test fails.

llvm-svn: 372815

4 years ago[Driver] Always use -z separate-loadable-segments with lld on Fuchsia
Fangrui Song [Wed, 25 Sep 2019 07:06:50 +0000 (07:06 +0000)]
[Driver] Always use -z separate-loadable-segments with lld on Fuchsia

The option was added to lld in D67481/372807.

Reviewed By: phosek

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

llvm-svn: 372814

4 years ago[ADT] Add StringMap::insert_or_assign
Fangrui Song [Wed, 25 Sep 2019 04:58:02 +0000 (04:58 +0000)]
[ADT] Add StringMap::insert_or_assign

Summary: Similar to std::unordered_map::insert_or_assign

Reviewers: alexshap, bkramer, dblaikie, lhames

Subscribers: jkorous, dexonsmith, kristina, llvm-commits

Tags: #llvm

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

llvm-svn: 372813

4 years ago[AArch64][GlobalISel] Tweak legalization rule for G_BSWAP to handle widening s16.
Amara Emerson [Wed, 25 Sep 2019 04:52:42 +0000 (04:52 +0000)]
[AArch64][GlobalISel] Tweak legalization rule for G_BSWAP to handle widening s16.

llvm-svn: 372812

4 years ago[NFC] Add { } to silence compiler warning [-Wmissing-braces].
Huihui Zhang [Wed, 25 Sep 2019 04:40:07 +0000 (04:40 +0000)]
[NFC] Add { } to silence compiler warning [-Wmissing-braces].

/local/mnt/workspace/huihuiz/llvm-comm-git-2/llvm-project/llvm/lib/Object/MachOObjectFile.cpp:2731:7: warning: suggest braces around initialization of subobject [-Wmissing-braces]
      "i386",   "x86_64", "x86_64h",  "armv4t",  "arm",    "armv5e",
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      {
1 warning generated.

/local/mnt/workspace/huihuiz/llvm-comm-git-2/llvm-project/llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp:355:46: warning: suggest braces around initialization of subobject [-Wmissing-braces]
    return addMappingFromTable<1>(MI, MRI, { 0 }, Table);
                                             ^
                                             {}
1 warning generated.

/local/mnt/workspace/huihuiz/llvm-comm-git-2/llvm-project/llvm/tools/llvm-objcopy/ELF/Object.cpp:400:57: warning: suggest braces around initialization of subobject [-Wmissing-braces]
static constexpr std::array<uint8_t, 4> ZlibGnuMagic = {'Z', 'L', 'I', 'B'};
                                                        ^~~~~~~~~~~~~~~~~~
                                                        {                 }
1 warning generated.

llvm-svn: 372811

4 years ago[llvm-objcopy][test] Clean up -B tests
Fangrui Song [Wed, 25 Sep 2019 03:41:01 +0000 (03:41 +0000)]
[llvm-objcopy][test] Clean up -B tests

-B is ignored for GNU objcopy compatibility after D67215/r371914.

* Delete mentions of -B from input-output-target.test - we have enough -B tests.
* Merge binary-input-with-arch.test into binary-output-target.test.

Reviewed By: rupprecht

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

llvm-svn: 372809

4 years ago[ELF] Add -z separate-loadable-segments to complement separate-code and noseparate...
Fangrui Song [Wed, 25 Sep 2019 03:39:31 +0000 (03:39 +0000)]
[ELF] Add -z separate-loadable-segments to complement separate-code and noseparate-code

D64906 allows PT_LOAD to have overlapping p_offset ranges. In the
default R RX RW RW layout + -z noseparate-code case, we do not tail pad
segments when transiting to another segment. This can save at most
3*maxPageSize bytes.

a) Before D64906, we tail pad R, RX and the first RW.
b) With -z separate-code, we tail pad R and RX, but not the first RW (RELRO).

In some cases, b) saves one file page. In some cases, b) wastes one
virtual memory page. The waste is a concern on Fuchsia. Because it uses
compressed binaries, it doesn't benefit from the saved file page.

This patch adds -z separate-loadable-segments to restore the behavior before
D64906. It can affect section addresses and can thus be used as a
debugging mechanism (see PR43214 and ld.so partition bug in
crbug.com/998712).

Reviewed By: jakehehrlich, ruiu

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

llvm-svn: 372807

4 years ago[Powerpc][LoopPreIncPrep] NFC - refactor this pass for ds/dq form.
Chen Zheng [Wed, 25 Sep 2019 03:02:19 +0000 (03:02 +0000)]
[Powerpc][LoopPreIncPrep] NFC - refactor this pass for ds/dq form.

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

llvm-svn: 372803

4 years ago [x86] Adding support for some missing intrinsics: _castf32_u32, _castf64_u64, _castu...
Pengfei Wang [Wed, 25 Sep 2019 02:24:05 +0000 (02:24 +0000)]
 [x86] Adding support for some missing intrinsics: _castf32_u32, _castf64_u64, _castu32_f32, _castu64_f64

Summary:
Adding support for some missing intrinsics:
_castf32_u32, _castf64_u64, _castu32_f32, _castu64_f64

Reviewers: craig.topper, LuoYuanke, RKSimon, pengfei

Reviewed By: RKSimon

Subscribers: llvm-commits

Patch by yubing (Bing Yu)

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

llvm-svn: 372802

4 years ago[Make] Revert some changes from r372795.
Jonas Devlieghere [Wed, 25 Sep 2019 01:39:13 +0000 (01:39 +0000)]
[Make] Revert some changes from r372795.

These changes cause the corresponding test to fail on the Linux bots.

llvm-svn: 372801

4 years agoremove unused method ResetOutputFileHandle()
Jonas Devlieghere [Wed, 25 Sep 2019 01:29:41 +0000 (01:29 +0000)]
remove unused method ResetOutputFileHandle()

ResetOutputFileHandle() isn't being used by anything. Also it's using
FILE*, which is something we should be doing less of. Remove it.

Patch by: Lawrence D'Anna

Differential revision: https://reviews.llvm.org/D68001

llvm-svn: 372800

4 years ago[CMake] Don't modify LLVM_DISTRIBUTION_COMPONENTS if it's not set
Jonas Devlieghere [Wed, 25 Sep 2019 01:23:05 +0000 (01:23 +0000)]
[CMake] Don't modify LLVM_DISTRIBUTION_COMPONENTS if it's not set

Don't try to remove debugserver from LLVM_DISTRIBUTION_COMPONENTS if the
list is not set.

llvm-svn: 372799

4 years ago[ELF] accept thinlto options without --plugin-opt= prefix
Bob Haarman [Wed, 25 Sep 2019 01:19:48 +0000 (01:19 +0000)]
[ELF] accept thinlto options without --plugin-opt= prefix

Summary:
When support for ThinLTO was first added to lld, the options that
control it were prefixed with --plugin-opt= for compatibility with
an existing implementation as a linker plugin. This change enables
shorter versions of the options to be used, as follows:

  New                              Existing
  -thinlto-emit-imports-files      --plugin-opt=thinlto-emit-imports-files
  -thinlto-index-only              --plugin-opt=thinlto-index-only
  -thinlto-index-only=             --plugin-opt=thinlto-index-only=
  -thinlto-object-suffix-replace=  --plugin-opt=thinlto-object-suffix-replace=
  -thinlto-prefix-replace=         --plugin-opt=thinlto-prefix-replace=
  -lto-obj-path=                   --plugin-opt=obj-path=

The options with the --plugin-opt= prefix have been retained as aliases
for the shorter variants so that they continue to be accepted.

Reviewers: tejohnson, ruiu, espindola

Reviewed By: ruiu

Subscribers: emaste, arichardson, MaskRay, steven_wu, dexonsmith, arphaman, llvm-commits

Tags: #llvm

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

llvm-svn: 372798

4 years ago[Documentation] Expand on testing variants.
Jonas Devlieghere [Wed, 25 Sep 2019 00:58:39 +0000 (00:58 +0000)]
[Documentation] Expand on testing variants.

The testing documentation appears to be from an era when the only kind
of tests were the lldbsuite python tests. This patch adds a short
description of the unittests and LIT tests and how to run them.

Patch by: Lawrence D'Anna

Differential revision: https://reviews.llvm.org/D67943

llvm-svn: 372797

4 years ago[Docs] Moves Reference docs to new page
DeForest Richards [Wed, 25 Sep 2019 00:49:02 +0000 (00:49 +0000)]
[Docs] Moves Reference docs to new page

Moves Reference docs to new page. Also adds a table of contents to Getting Involved page.

llvm-svn: 372796

4 years agoCanonicalize variable usage in testsuite Makefiles
Adrian Prantl [Wed, 25 Sep 2019 00:36:00 +0000 (00:36 +0000)]
Canonicalize variable usage in testsuite Makefiles

This test streamlines our use of variables that are expected by
Makefile.rules throughout the test suite. Mostly it replaced
potentially dangerous overrides and updates of variables like CFLAGS
with safe assignments to variables reserved for this purpose like
CFLAGS_EXTRAS.

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

llvm-svn: 372795

4 years ago[CMake] Don't try to install the system debugserver.
Jonas Devlieghere [Wed, 25 Sep 2019 00:21:31 +0000 (00:21 +0000)]
[CMake] Don't try to install the system debugserver.

The custom target for the system debugserver has no install target, so
we need to remove it from the LLVM_DISTRIBUTION_COMPONENTS list.

llvm-svn: 372793

4 years ago[WebAssembly][NFC] Remove duplicate SIMD instructions and predicates
Thomas Lively [Wed, 25 Sep 2019 00:15:59 +0000 (00:15 +0000)]
[WebAssembly][NFC] Remove duplicate SIMD instructions and predicates

Summary:
Instead of having different v128.load and v128.store instructions for
each MVT, just have one of each that is reused in all the
patterns. Also removes the HasSIMD128 predicate where accompanied by
HasUnimplementedSIMD128, since the latter implies the former.

Reviewers: aheejin, dschuff

Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits

Tags: #llvm

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

llvm-svn: 372792

4 years agoUse double quotes for LDFLAGS in -DLLVM_BUILD_INSTRUMENTED_COVERAGE
Justin Bogner [Tue, 24 Sep 2019 23:56:22 +0000 (23:56 +0000)]
Use double quotes for LDFLAGS in -DLLVM_BUILD_INSTRUMENTED_COVERAGE

Mimics the changes in r372209 to handle the change of quotes in
r372226. Probably isn't sufficient for windows, but unbreaks the cmake
flag at least.

llvm-svn: 372791