platform/upstream/llvm.git
5 years ago[CodeComplete] Filter override completions by function name
Ilya Biryukov [Fri, 24 May 2019 10:18:39 +0000 (10:18 +0000)]
[CodeComplete] Filter override completions by function name

Summary:
We put only part of the signature starting with a function name into "typed text"
chunks now, previously the whole signature was "typed text".

This leads to meaningful fuzzy match scores, giving better signals to
compare with other completion items.

Ideally, we would not display the result type to the user, but that requires adding
a new kind of completion chunk.

Reviewers: kadircet

Reviewed By: kadircet

Subscribers: jkorous, arphaman, cfe-commits

Tags: #clang

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

llvm-svn: 361623

5 years ago[AArch64][SVE2] Asm: support SVE2 Accumulate Group
Cullen Rhodes [Fri, 24 May 2019 10:10:34 +0000 (10:10 +0000)]
[AArch64][SVE2] Asm: support SVE2 Accumulate Group

Summary:
Patch adds support for the following instructions:

SVE2 bitwise shift and insert:
    * SRI, SLI

SVE2 bitwise shift right and accumulate:
    * SSRA, USRA, SRSRA, URSRA

SVE2 complex integer add:
    * CADD, SQCADD

SVE2 integer absolute difference and accumulate:
    * SABA, UABA

SVE2 integer absolute difference and accumulate long:
    * SABALB, SABALT, UABALB, UABALT

SVE2 integer add/subtract long with carry:
    * ADCLB, ADCLT, SBCLB, SBCLT

The specification can be found here:
https://developer.arm.com/docs/ddi0602/latest

Reviewed By: SjoerdMeijer

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

llvm-svn: 361622

5 years ago[llvm-objdump][test] Fix for spurious matches against file paths
James Henderson [Fri, 24 May 2019 10:07:24 +0000 (10:07 +0000)]
[llvm-objdump][test] Fix for spurious matches against file paths

r361479 added tests that did --implicit-check-not=main, but a user found
that they failed on his machine, due to it having 'main' in a file path
printed earlier in the output. This test fixes this issue by making the
check pattern more explicit.

llvm-svn: 361621

5 years ago[SelectionDAG] computeKnownBits - support constant pool values from target
Simon Pilgrim [Fri, 24 May 2019 10:03:11 +0000 (10:03 +0000)]
[SelectionDAG] computeKnownBits - support constant pool values from target

This patch adds the overridable TargetLowering::getTargetConstantFromLoad function which allows targets to return any constant value loaded by a LoadSDNode node - only X86 makes use of this so far but everything should be in place for other targets.

computeKnownBits then uses this function to improve codegen, notably vector code after legalization.

A future commit will do the same for ComputeNumSignBits but computeKnownBits sees the bigger benefit.

This required a couple of fixes:
* SimplifyDemandedBits must early-out for getTargetConstantFromLoad cases to prevent infinite loops of constant regeneration (similar to what we already do for BUILD_VECTOR).
* Fix a DAGCombiner::visitTRUNCATE issue as we had trunc(shl(v8i32),v8i16) <-> shl(trunc(v8i16),v8i32) infinite loops after legalization on AVX512 targets.

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

llvm-svn: 361620

5 years ago[AArch64][SVE2] Asm: add PMULLB/PMULLT instructions
Cullen Rhodes [Fri, 24 May 2019 09:56:23 +0000 (09:56 +0000)]
[AArch64][SVE2] Asm: add PMULLB/PMULLT instructions

Summary:
This patch adds support for the polynomial multiplication instructions
PMULLB/PMULLT. The 64-bit source and 128-bit destination element
variants are enabled with crypto extensions (+sve2-aes), similar to the
NEON PMULL2 instruction. All other variants are enabled with +sve2.

The specification can be found here:
https://developer.arm.com/docs/ddi0602/latest

Reviewed By: SjoerdMeijer

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

llvm-svn: 361619

5 years ago[FuncUnwinders] Use "symbol file" unwind plans for unwinding
Pavel Labath [Fri, 24 May 2019 09:54:39 +0000 (09:54 +0000)]
[FuncUnwinders] Use "symbol file" unwind plans for unwinding

Summary:
Previous patch (r360409) introduced the "symbol file unwind plan"
concept, but that plan wasn't used for unwinding yet. With this patch,
we start to consider the new plan as a possible strategy for both
synchronous and asynchronous unwinding. I also add a test that asserts
that unwinding via breakpad STACK CFI info works end-to-end.

Reviewers: jasonmolenda, clayborg

Subscribers: lldb-commits, amccarth, markmentovai

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

llvm-svn: 361618

5 years ago[ELF] Fix a doc typo. NFC
Fangrui Song [Fri, 24 May 2019 09:53:25 +0000 (09:53 +0000)]
[ELF] Fix a doc typo. NFC

llvm-svn: 361617

5 years agoFix sphinx "Malformed option description" warning
Simon Pilgrim [Fri, 24 May 2019 09:31:32 +0000 (09:31 +0000)]
Fix sphinx "Malformed option description" warning

llvm-svn: 361616

5 years ago[AArch64][SVE2] Asm: add integer add/sub long/wide instructions
Cullen Rhodes [Fri, 24 May 2019 09:28:27 +0000 (09:28 +0000)]
[AArch64][SVE2] Asm: add integer add/sub long/wide instructions

Summary:
Patch adds support for the following instructions:

SVE2 integer add/subtract long:
    * SADDLB, SADDLT, UADDLB, UADDLT, SSUBLB, SSUBLT, USUBLB, USUBLT,
      SABDLB, SABDLT, UABDLB, UABDLT

SVE2 integer add/subtract wide:
    * SADDWB, SADDWT, UADDWB, UADDWT, SSUBWB, SSUBWT, USUBWB, USUBWT

The specification can be found here:
https://developer.arm.com/docs/ddi0602/latest

Reviewed By: SjoerdMeijer

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

llvm-svn: 361615

5 years ago[ELF] Deleted unused forward declarations. NFC
Fangrui Song [Fri, 24 May 2019 09:25:47 +0000 (09:25 +0000)]
[ELF] Deleted unused forward declarations. NFC

llvm-svn: 361614

5 years agoUse the DataLayout::typeSizeEqualsStoreSize helper. NFC
Bjorn Pettersson [Fri, 24 May 2019 09:20:20 +0000 (09:20 +0000)]
Use the DataLayout::typeSizeEqualsStoreSize helper. NFC

Just a minor refactoring to use the new helper method
DataLayout::typeSizeEqualsStoreSize(). This is done when
checking if getTypeSizeInBits is equal/non-equal to
getTypeStoreSizeInBits.

llvm-svn: 361613

5 years ago[AArch64][SVE2] Asm: add various bitwise shift instructions
Cullen Rhodes [Fri, 24 May 2019 09:17:23 +0000 (09:17 +0000)]
[AArch64][SVE2] Asm: add various bitwise shift instructions

Summary:
This patch adds support for the SVE2 saturating/rounding bitwise shift
left (predicated) group of instructions:

    * SRSHL, URSHL, SRSHLR, URSHLR, SQSHL, UQSHL, SQRSHL, UQRSHL,
      SQSHLR, UQSHLR, SQRSHLR, UQRSHLR

Immediate forms of the SQSHL and UQSHL instructions are also added to
the existing SVE bitwise shift by immediate (predicated) group, as well
as three new instructions SRSHR/URSHR/SQSHLU. The new instructions in
this group are encoded similarly and are implemented using the same
TableGen class with a minimal change (1 bit in encoding).

The specification can be found here:
https://developer.arm.com/docs/ddi0602/latest

Reviewed By: SjoerdMeijer

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

llvm-svn: 361612

5 years ago[AArch64][SVE2] Asm: add saturating add/sub instructions
Cullen Rhodes [Fri, 24 May 2019 09:06:37 +0000 (09:06 +0000)]
[AArch64][SVE2] Asm: add saturating add/sub instructions

Summary:
Patch adds support for the following instructions:

    * SQADD, UQADD, SUQADD, USQADD
    * SQSUB, UQSUB, SQSUBR, UQSUBR

The specification can be found here:
https://developer.arm.com/docs/ddi0602/latest

Reviewed By: chill

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

llvm-svn: 361611

5 years agoStructurizeCFG: Relax uniformity checks.
Neil Henning [Fri, 24 May 2019 08:59:17 +0000 (08:59 +0000)]
StructurizeCFG: Relax uniformity checks.

This change relaxes the checks for hasOnlyUniformBranches such that our
region is uniform if:

1. All conditional branches that are direct children are uniform.
2. And either:
  a. All sub-regions are uniform.
  b. There is one or less conditional branches among the direct
     children.

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

llvm-svn: 361610

5 years ago[AArch64][SVE2] Asm: fix overlapping bit
Cullen Rhodes [Fri, 24 May 2019 08:45:37 +0000 (08:45 +0000)]
[AArch64][SVE2] Asm: fix overlapping bit

Summary:
Bit 20 in sve2_int_arith_pred TableGen class was overlapping. The
encodings are not affected as bit 20 is defined by the opc bits
and this was overwriting the earlier error of setting bit 20 to 0.

Raised by Momchil: https://reviews.llvm.org/D62130

Reviewed By: chill

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

llvm-svn: 361609

5 years agoGlobalISel: support swifterror attribute on AArch64.
Tim Northover [Fri, 24 May 2019 08:40:13 +0000 (08:40 +0000)]
GlobalISel: support swifterror attribute on AArch64.

swifterror marks an argument as a register pretending to be a pointer, so we
need a guaranteed mem2reg-like analysis of its uses. Fortunately most of the
infrastructure can be reused from the DAG world.

llvm-svn: 361608

5 years agoCodeGen: factor out swifterror value tracking.
Tim Northover [Fri, 24 May 2019 08:39:43 +0000 (08:39 +0000)]
CodeGen: factor out swifterror value tracking.

llvm-svn: 361607

5 years ago[mips] Always check that `shift and add` optimization is efficient.
Simon Atanasyan [Fri, 24 May 2019 08:39:40 +0000 (08:39 +0000)]
[mips] Always check that `shift and add` optimization is efficient.

The D45316 introduced the `shouldTransformMulToShiftsAddsSubs` function
to check that breaking down constant multiplications into a series
of shifts, adds, and subs is efficient. Unfortunately, this function
does not check maximum number of steps on all paths of the algorithm.
This patch fixes this bug.

Fix for PR41929.

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

llvm-svn: 361606

5 years ago[DSE] Bugfix to avoid PartialStoreMerging involving non byte-sized stores
Bjorn Pettersson [Fri, 24 May 2019 08:32:02 +0000 (08:32 +0000)]
[DSE] Bugfix to avoid PartialStoreMerging involving non byte-sized stores

Summary:
The DeadStoreElimination pass now skips doing
PartialStoreMerging when stores overlap according to
OW_PartialEarlierWithFullLater and at least one of
the stores is having a store size that is different
from the size of the type being stored.

This solves problems seen in
  https://bugs.llvm.org/show_bug.cgi?id=41949
for which we in the past could end up with
mis-compiles or assertions.

The content and location of the padding bits is not
formally described (or undefined) in the LangRef
at the moment. So the solution is chosen based on
that we cannot assume anything about the padding bits
when having a store that clobbers more memory than
indicated by the type of the value that is stored
(such as storing an i6 using an 8-bit store instruction).

Fixes: https://bugs.llvm.org/show_bug.cgi?id=41949

Reviewers: spatel, efriedma, fhahn

Reviewed By: efriedma

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 361605

5 years ago[ARM] ARMExpandPseudoInsts: add debug messages
Sjoerd Meijer [Fri, 24 May 2019 08:25:02 +0000 (08:25 +0000)]
[ARM] ARMExpandPseudoInsts: add debug messages

This pass wasn't printing any messages at all, which I find really inconvenient
while debugging/tracing things. It now dumps the before and after of expanded
instructions. It doesn't do this yet for all instructions, but this is a good
start I guess.

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

llvm-svn: 361604

5 years agoDWARF: Implement DW_AT_signature lookup for type unit support
Pavel Labath [Fri, 24 May 2019 08:11:12 +0000 (08:11 +0000)]
DWARF: Implement DW_AT_signature lookup for type unit support

Summary:
This patch implements the main feature of type units. When completing a
type, if we encounter a DW_AT_signature attribute, we use it's value to
lookup the complete definition of the type in the relevant type unit.

To enable this lookup, we build up a map of all type units in a symbol
file when parsing the units. Then we consult this map when resolving the
DW_AT_signature attribute.

I include add a couple of tests which exercise the type lookup feature,
including one that ensure we do something reasonable in case we fail to
lookup the type.

A lot of the ideas in this patch have been taken from D32167 and D61505.

Reviewers: clayborg, JDevlieghere, aprantl, alexshap

Subscribers: mgrang, lldb-commits

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

llvm-svn: 361603

5 years agoDWARFContext: Make loading of sections thread-safe
Pavel Labath [Fri, 24 May 2019 08:04:03 +0000 (08:04 +0000)]
DWARFContext: Make loading of sections thread-safe

Summary:
SymbolFileDWARF used to load debug sections in a thread-safe manner.
When we moved to DWARFContext, we dropped the thread-safe part, because
we thought it was not necessary.

It turns out this was only mostly correct.

The "mostly" part is there because this is a problem only if we use the
manual index, as that is the only source of intra-module paralelism.
Also, this only seems to occur for extremely simple files (like the ones
I've been creating for tests lately), where we've managed to start
indexing before loading the debug_str section. Then, two threads start
to load the section simultaneously and produce wrong results.

On more complex files, something seems to be loading the debug_str section
before we start indexing, as I haven't been able to reproduce this
there, but I have not investigated what it is.

I've tried to come up with a test for this, but I haven't been able to
reproduce the problem reliably. Still, while doing so, I created a way
to generate many compile units on demand. Given that most of our tests
work with only one or two compile units, it seems like this could be
useful anyway.

Reviewers: aprantl, JDevlieghere, clayborg

Subscribers: arphaman, lldb-commits

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

llvm-svn: 361602

5 years ago[clang-tidy] Add option "LiteralInitializers" to cppcoreguidelines-pro-type-member...
Matthias Gehre [Fri, 24 May 2019 05:46:57 +0000 (05:46 +0000)]
[clang-tidy] Add option "LiteralInitializers" to cppcoreguidelines-pro-type-member-init

Differential Revision: D24892

llvm-svn: 361601

5 years ago[Power9] Add a specific heuristic to schedule the addi before the load
QingShan Zhang [Fri, 24 May 2019 05:30:09 +0000 (05:30 +0000)]
[Power9] Add a specific heuristic to schedule the addi before the load
 When we are scheduling the load and addi, if all other heuristic didn't take effect,
 we will try to schedule the addi before the load, to hide the latency, and avoid the
 true dependency added by RA. And this only take effects for Power9.

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

llvm-svn: 361600

5 years ago[X86] Add test case that was supposed to go with r360102.
Craig Topper [Fri, 24 May 2019 04:46:56 +0000 (04:46 +0000)]
[X86] Add test case that was supposed to go with r360102.

Found in my working area. Guess I forgot 'git add' before committing.

llvm-svn: 361599

5 years agoDo not resolve directory junctions for `-fdiagnostics-absolute-paths` on Windows.
Igor Kudrin [Fri, 24 May 2019 04:46:22 +0000 (04:46 +0000)]
Do not resolve directory junctions for `-fdiagnostics-absolute-paths` on Windows.

If the source file path contains directory junctions, and we resolve them when
printing diagnostic messages, these paths look independent for an IDE.
For example, both Visual Studio and Visual Studio Code open separate editors
for such paths, which is not only inconvenient but might even result in losing
changes made in one of them.

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

llvm-svn: 361598

5 years ago[Utility] Small improvements to the Broadcaster class (NFC)
Jonas Devlieghere [Fri, 24 May 2019 04:41:47 +0000 (04:41 +0000)]
[Utility] Small improvements to the Broadcaster class (NFC)

I touched the Broadcaster class earlier today (r361544) and noticed a
few things that could be improved. This patch includes variety of small
fixes: use early returns, use LLDB_LOG macro, use doxygen comments and
finally format the class.

llvm-svn: 361597

5 years ago[NFC] SwitchInst: Introduce wrapper for prof branch_weights handling
Yevgeny Rouban [Fri, 24 May 2019 04:34:23 +0000 (04:34 +0000)]
[NFC] SwitchInst: Introduce wrapper for prof branch_weights handling

This patch introduces a wrapper class that re-implements
several mutator methods of SwitchInst to handle changes
of prof branch_weights metadata along with remove/add
switch case methods.
Subsequent patches will use this wrapper to implement
prof branch_weights metadata handling for SwitchInst.

Reviewers: davidx, eraman, reames, chandlerc
Reviewed By: davidx
Differential Revision: https://reviews.llvm.org/D62122

llvm-svn: 361596

5 years ago[llvm-nm] Fix Bug 41353 - unique symbols printed as D instead of u
Jordan Rupprecht [Fri, 24 May 2019 04:02:05 +0000 (04:02 +0000)]
[llvm-nm] Fix Bug 41353 - unique symbols printed as D instead of u

Summary:
https://bugs.llvm.org/show_bug.cgi?id=41353

I'm new to LLVM and C++ so please do not hesitate to iterate with me on this fix.

Patch by Mike Pozulp!

Reviewers: rupprecht, zbrid, grimar, jhenderson

Reviewed By: rupprecht, jhenderson

Subscribers: jhenderson, chrisjackson, MaskRay, llvm-commits

Tags: #llvm

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

llvm-svn: 361595

5 years agofix test for older clang versions
Eric Fiselier [Fri, 24 May 2019 03:15:32 +0000 (03:15 +0000)]
fix test for older clang versions

llvm-svn: 361594

5 years agofix destroying delete test with older apple compilers
Eric Fiselier [Fri, 24 May 2019 02:46:34 +0000 (02:46 +0000)]
fix destroying delete test with older apple compilers

llvm-svn: 361593

5 years ago[analyzer] NFC: Prevent multi-file plist test from spamming up the build folder.
Artem Dergachev [Fri, 24 May 2019 02:29:18 +0000 (02:29 +0000)]
[analyzer] NFC: Prevent multi-file plist test from spamming up the build folder.

It was producing an HTML report with a random name on every tests run
and never cleaned those up.

llvm-svn: 361592

5 years agoFix BUILD_SHARED_LIBS builds after r361567
Daniel Sanders [Fri, 24 May 2019 02:15:27 +0000 (02:15 +0000)]
Fix BUILD_SHARED_LIBS builds after r361567

Also fixed a comment I noticed while debugging this build

llvm-svn: 361591

5 years agoClarify how musttail can be used to create forwarding thunks
Reid Kleckner [Fri, 24 May 2019 01:45:47 +0000 (01:45 +0000)]
Clarify how musttail can be used to create forwarding thunks

llvm-svn: 361590

5 years agodwarfdump: Deterministically... determine whether parsing a DWARF32 or DWARF64 str_of...
David Blaikie [Fri, 24 May 2019 01:41:58 +0000 (01:41 +0000)]
dwarfdump: Deterministically... determine whether parsing a DWARF32 or DWARF64 str_offsets header

Rather than trying one and then the other - use the kind of the CU to
select which kind of header to parse.

llvm-svn: 361589

5 years agoFactor out repeated code to build 'this' expressions and mark them
Richard Smith [Fri, 24 May 2019 01:35:07 +0000 (01:35 +0000)]
Factor out repeated code to build 'this' expressions and mark them
referenced.

llvm-svn: 361588

5 years ago[CFG] NFC: Modernize a test file for constructor initializer CFGs.
Artem Dergachev [Fri, 24 May 2019 01:34:26 +0000 (01:34 +0000)]
[CFG] NFC: Modernize a test file for constructor initializer CFGs.

Move FileCheck directives around so that it was easy to understand
what tests what and what effect do changes have.

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

llvm-svn: 361587

5 years ago[CFG] NFC: Remove implicit conversion from CFGTerminator to Stmt *.
Artem Dergachev [Fri, 24 May 2019 01:34:22 +0000 (01:34 +0000)]
[CFG] NFC: Remove implicit conversion from CFGTerminator to Stmt *.

Turn it into a variant class instead. This conversion does indeed save some code
but there's a plan to add support for more kinds of terminators that aren't
necessarily based on statements, and with those in mind it becomes more and more
confusing to have CFGTerminators implicitly convertible to a Stmt *.

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

llvm-svn: 361586

5 years ago[AArch64] Preserve X8 for thunks ending in variadic musttail calls
Reid Kleckner [Fri, 24 May 2019 01:27:20 +0000 (01:27 +0000)]
[AArch64] Preserve X8 for thunks ending in variadic musttail calls

Summary:
On Windows, X8 may be used to pass in the address of an aggregate that
is returned indirectly. Therefore, it should be forwarded to variadic
musttail calls and preserved in thunks.

Fixes PR41997

Reviewers: mgrang, efriedma

Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 361585

5 years ago[AArch64] Add nvcast patterns for v2f32 -> v1f64
Serge Pavlov [Fri, 24 May 2019 01:20:34 +0000 (01:20 +0000)]
[AArch64] Add nvcast patterns for v2f32 -> v1f64

Summary: Constant stores of f32 values can create such NvCast nodes.

Reviewers: t.p.northover

Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 361584

5 years agoRevert "[lldb] followup fix for https://reviews.llvm.org/D62305"
Jonas Devlieghere [Fri, 24 May 2019 01:08:54 +0000 (01:08 +0000)]
Revert "[lldb] followup fix for https://reviews.llvm.org/D62305"

This fails on the Windows bot:

cannot convert from 'initializer list' to 'lldb::thread_result_t'

llvm-svn: 361583

5 years agodwarfdump: Add a bit more DWARF64 support
David Blaikie [Fri, 24 May 2019 01:05:52 +0000 (01:05 +0000)]
dwarfdump: Add a bit more DWARF64 support

This test case was incorrect because it mixed DWARF32 and DWARF64 for a
single unit (DWARF32 unit referencing a DWARF64 str_offsets section). So
fix enough of the unit parsing for DWARF64 and make the test valid.

(not sure if anyone needs DWARF64 support though - support in
libDebugInfoDWARF has been added piecemeal and LLVM doesn't produce it
at all)

llvm-svn: 361582

5 years agoRevert r361460
Eli Friedman [Fri, 24 May 2019 01:03:51 +0000 (01:03 +0000)]
Revert r361460

It regresses https://bugs.llvm.org/show_bug.cgi?id=38309 (represented
by the testcase test/Transforms/GlobalOpt/globalsra-multigep.ll).

llvm-svn: 361581

5 years agoFix integer literals which are cast to bool
Jonas Devlieghere [Fri, 24 May 2019 00:44:33 +0000 (00:44 +0000)]
Fix integer literals which are cast to bool

This change replaces built-in types that are implicitly converted to
booleans.

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

llvm-svn: 361580

5 years ago[libFuzzer] when using data-flow-trace (DFT) only load the DFT for the files present...
Kostya Serebryany [Fri, 24 May 2019 00:43:52 +0000 (00:43 +0000)]
[libFuzzer] when using data-flow-trace (DFT) only load the DFT for the files present in the corpus

llvm-svn: 361579

5 years agollvm-objcopy: Change sectionWithinSegment() to use virtual addresses instead of file...
Peter Collingbourne [Fri, 24 May 2019 00:21:46 +0000 (00:21 +0000)]
llvm-objcopy: Change sectionWithinSegment() to use virtual addresses instead of file offsets for SHT_NOBITS sections.

Without this, sectionWithinSegment() will return the wrong answer for bss
sections. This doesn't seem to matter now (for non-broken ELF files), but
it will matter with a change that I'm working on.

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

llvm-svn: 361578

5 years ago[WebAssembly] Expand more SIMD float ops
Thomas Lively [Fri, 24 May 2019 00:15:04 +0000 (00:15 +0000)]
[WebAssembly] Expand more SIMD float ops

Summary: These were previously causing ISel failures.

Reviewers: aheejin

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

Tags: #llvm

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

llvm-svn: 361577

5 years ago[InstSimplify] fold insertelement-of-extractelement
Sanjay Patel [Fri, 24 May 2019 00:13:58 +0000 (00:13 +0000)]
[InstSimplify] fold insertelement-of-extractelement

This was partly handled in InstCombine (only the constant
index case), so delete that and zap it more generally in
InstSimplify.

llvm-svn: 361576

5 years ago[InstSimplify] add tests for insert-of-extract; NFC
Sanjay Patel [Fri, 24 May 2019 00:11:23 +0000 (00:11 +0000)]
[InstSimplify] add tests for insert-of-extract; NFC

llvm-svn: 361575

5 years agoUpdate C++2a status for destroying delete
Eric Fiselier [Fri, 24 May 2019 00:10:33 +0000 (00:10 +0000)]
Update C++2a status for destroying delete

llvm-svn: 361574

5 years ago[COFF] Remove finalizeContents virtual method from Chunk, NFC
Reid Kleckner [Fri, 24 May 2019 00:02:00 +0000 (00:02 +0000)]
[COFF] Remove finalizeContents virtual method from Chunk, NFC

This only needs to be done for MergeChunks, so just do that in a
separate pass in the Writer.

This is one small step towards eliminating the vtable in Chunk.

llvm-svn: 361573

5 years agoP0722R3: Implement library support for destroying delete
Eric Fiselier [Thu, 23 May 2019 23:46:44 +0000 (23:46 +0000)]
P0722R3:  Implement library support for destroying delete

Summary:
This provides the `std::destroying_delete_t` declaration in C++2a and after. (Even when the compiler doesn't support the language feature).

However, the feature test macro `__cpp_lib_destroying_delete` is only defined when we have both language support and  C++2a.

Reviewers: ldionne, ckennelly, serge-sans-paille, EricWF

Reviewed By: EricWF

Subscribers: dexonsmith, riccibruno, christof, jwakely, jdoerfert, mclow.lists, ldionne, libcxx-commits

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

llvm-svn: 361572

5 years agoFix hang during constant evaluation of union assignment.
Eric Fiselier [Thu, 23 May 2019 23:34:43 +0000 (23:34 +0000)]
Fix hang during constant evaluation of union assignment.

HandleUnionActiveMemberChange forgot to walk over a nop implicit
conversion node and got stuck in the process.

As a cleanup I changed the declaration of `E` so it can't
be accidentally accessed after the loop.

llvm-svn: 361571

5 years ago[InstCombine] remove redundant fold for extractelement; NFC
Sanjay Patel [Thu, 23 May 2019 23:33:38 +0000 (23:33 +0000)]
[InstCombine] remove redundant fold for extractelement; NFC

The out-of-bounds index pattern is handled by InstSimplify,
so the extractelement should be eliminated next time it is
visited.

llvm-svn: 361570

5 years ago[InstCombine] remove redundant fold for insertelement; NFC
Sanjay Patel [Thu, 23 May 2019 23:33:34 +0000 (23:33 +0000)]
[InstCombine] remove redundant fold for insertelement; NFC

The out-of-bounds index pattern is handled by InstSimplify.

llvm-svn: 361569

5 years agoBreak false dependencies on target libraries
Daniel Sanders [Thu, 23 May 2019 23:02:56 +0000 (23:02 +0000)]
Break false dependencies on target libraries

Summary:
For the most part this consists of replacing ${LLVM_TARGETS_TO_BUILD} with
some combination of AllTargets* so that they depend on specific components
of a target backend rather than all of it. The overall effect of this is
that, for example, tools like opt no longer falsely depend on the
disassembler, while tools like llvm-ar no longer depend on the code
generator.

There's a couple quirks to point out here:
* AllTargetsCodeGens is a bit more prevalent than expected. Tools like dsymutil
  seem to need it which I was surprised by.
* llvm-xray linked to all the backends but doesn't seem to need any of them.
  It builds and passes the tests so that seems to be correct.
* I left gold out as it's not built when binutils is not available so I'm
  unable to test it

Reviewers: bogner, JDevlieghere

Reviewed By: bogner

Subscribers: mehdi_amini, mgorny, steven_wu, dexonsmith, rupprecht, llvm-commits

Tags: #llvm

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

llvm-svn: 361567

5 years ago[analyzer] List checker/plugin options in 3 categories: released, alpha, developer
Kristof Umann [Thu, 23 May 2019 22:52:09 +0000 (22:52 +0000)]
[analyzer] List checker/plugin options in 3 categories: released, alpha, developer

Same patch as D62093, but for checker/plugin options, the only
difference being that options for alpha checkers are implicitly marked
as alpha.

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

llvm-svn: 361566

5 years ago[lldb] followup fix for https://reviews.llvm.org/D62305
Konrad Kleine [Thu, 23 May 2019 22:39:13 +0000 (22:39 +0000)]
[lldb] followup fix for https://reviews.llvm.org/D62305

Summary:
Fixing this error on windows build bot:

```
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(21): error C2440: 'initializing': cannot convert from 'nullptr' to 'lldb::thread_result_t'
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(21): note: A native nullptr can only be converted to bool or, using reinterpret_cast, to an integral type
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(21): error C2439: 'lldb_private::HostNativeThreadBase::m_result': member could not be initialized
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\include\lldb/Host/HostNativeThreadBase.h(48): note: see declaration of 'lldb_private::HostNativeThreadBase::m_result'
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(24): error C2440: 'initializing': cannot convert from 'nullptr' to 'lldb::thread_result_t'
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(24): note: A native nullptr can only be converted to bool or, using reinterpret_cast, to an integral type
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(24): error C2439: 'lldb_private::HostNativeThreadBase::m_result': member could not be initialized
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\include\lldb/Host/HostNativeThreadBase.h(48): note: see declaration of 'lldb_private::HostNativeThreadBase::m_result'
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(40): error C2440: '=': cannot convert from 'nullptr' to 'lldb::thread_result_t'
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(40): note: A native nullptr can only be converted to bool or, using reinterpret_cast, to an integral type
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(50): error C2440: '=': cannot convert from 'nullptr' to 'lldb::thread_result_t'
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(50): note: A native nullptr can only be converted to bool or, using reinterpret_cast, to an integral type
```

see http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/5050/steps/build/logs/stdio

Reviewers: stella.stamenova, JDevlieghere

Reviewed By: JDevlieghere

Subscribers: lldb-commits

Tags: #lldb

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

llvm-svn: 361565

5 years ago[OPENMP]Do not crash for const firstprivates.
Alexey Bataev [Thu, 23 May 2019 22:30:43 +0000 (22:30 +0000)]
[OPENMP]Do not crash for const firstprivates.

If the variable is a firstprivate variable and it was not emitted beause
this a constant variable with the constant initializer, we can use the
initial value instead of the variable itself. It also fixes the problem
with the compiler crash in this case.

llvm-svn: 361564

5 years agofix accidental implicit matches in elf-disassemble-symbol-labels-rel.test
Bob Haarman [Thu, 23 May 2019 22:28:18 +0000 (22:28 +0000)]
fix accidental implicit matches in elf-disassemble-symbol-labels-rel.test

llvm/test/tools/llvm-objdump/X86/elf-disassemble-symbol-labels-rel.test
uses --implicit-check-not to verify that certain patterns do not occur
in llvm-objdump's output, except in places where they are explicitly
checked. Unfortunately, the patterns are generic enough that they may
be part of the file name which is also output by llvm-objdump. This
change matches the line with the filename explicitly so that the
implicit patterns are not applied to it.

llvm-svn: 361563

5 years agoUse clang_cc1 instead of clang in CodeGen test.
Alina Sbirlea [Thu, 23 May 2019 22:07:37 +0000 (22:07 +0000)]
Use clang_cc1 instead of clang in CodeGen test.

llvm-svn: 361562

5 years ago[analyzer] Hide developer-only checker/package options by default
Kristof Umann [Thu, 23 May 2019 22:07:16 +0000 (22:07 +0000)]
[analyzer] Hide developer-only checker/package options by default

These options are now only visible under
-analyzer-checker-option-help-developer.

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

llvm-svn: 361561

5 years ago[NewPassManager] Add tuning option: ForgetAllSCEVInLoopUnroll [NFC].
Alina Sbirlea [Thu, 23 May 2019 21:52:59 +0000 (21:52 +0000)]
[NewPassManager] Add tuning option: ForgetAllSCEVInLoopUnroll [NFC].

Summary: Mirror tuning option from old pass manager in new pass manager.

Reviewers: chandlerc

Subscribers: mehdi_amini, jlebar, zzheng, dmgreen, llvm-commits

Tags: #llvm

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

llvm-svn: 361560

5 years ago[InstSimplify] insertelement V, undef, ? --> V
Sanjay Patel [Thu, 23 May 2019 21:49:47 +0000 (21:49 +0000)]
[InstSimplify] insertelement V, undef, ? --> V

This was part of InstCombine, but it's better placed in
InstSimplify. InstCombine also had an unreachable but weaker
fold for insertelement with undef index, so that is deleted.

llvm-svn: 361559

5 years ago[analyzer] List checkers in 3 categories: released, alpha, developer
Kristof Umann [Thu, 23 May 2019 21:46:51 +0000 (21:46 +0000)]
[analyzer] List checkers in 3 categories: released, alpha, developer

Previously, the only way to display the list of available checkers was
to invoke the analyzer with -analyzer-checker-help frontend flag. This
however wasn't really great from a maintainer standpoint: users came
across checkers meant strictly for development purposes that weren't to
be tinkered with, or those that were still in development. This patch
creates a clearer division in between these categories.

From now on, we'll have 3 flags to display the list checkers. These
lists are mutually exclusive and can be used in any combination (for
example to display both stable and alpha checkers).

-analyzer-checker-help: Displays the list for stable, production ready
                        checkers.

-analyzer-checker-help-alpha: Displays the list for in development
                              checkers. Enabling is discouraged
                              for non-development purposes.

-analyzer-checker-help-developer: Modeling and debug checkers. Modeling
                                  checkers shouldn't be enabled/disabled
                                  by hand, and debug checkers shouldn't
                                  be touched by users.

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

llvm-svn: 361558

5 years ago[X86] Split multi-line chained assignments into single lines to avoid making clang...
Craig Topper [Thu, 23 May 2019 21:34:36 +0000 (21:34 +0000)]
[X86] Split multi-line chained assignments into single lines to avoid making clang-format create triangle shaped indentation. Simplify one if statement to remove a bunch of string matches. NFCI

We had an if statement that checked over every avx512* feature to see if it should enabled avx512f. Since they are all prefixed with avx512 just check for that instead.

llvm-svn: 361557

5 years agoELF: Remove a comparison against In.EhFrame. NFCI.
Peter Collingbourne [Thu, 23 May 2019 21:30:30 +0000 (21:30 +0000)]
ELF: Remove a comparison against In.EhFrame. NFCI.

This won't work once we have multiple .eh_frame sections.

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

llvm-svn: 361556

5 years ago[NFC] Add blank line (test commit)
J. Ryan Stinnett [Thu, 23 May 2019 21:13:50 +0000 (21:13 +0000)]
[NFC] Add blank line (test commit)

llvm-svn: 361555

5 years ago[TTI] Fix some typos in comments. NFC
Craig Topper [Thu, 23 May 2019 21:04:01 +0000 (21:04 +0000)]
[TTI] Fix some typos in comments. NFC

'implementaion' -> 'implementation'
'non-unform' -> 'non-uniform'
'mimimum' -> 'minimum'

Patch by Pavel Samolysov

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

llvm-svn: 361554

5 years agoRevert [LOOPINFO] Extend Loop object to add utilities to get the loop bounds...
Kit Barton [Thu, 23 May 2019 20:53:05 +0000 (20:53 +0000)]
Revert     [LOOPINFO] Extend Loop object to add utilities to get the loop bounds, step, induction variable, and guard branch.

This reverts r361517 (git commit 2049e4dd8f61100f88f14db33bd95d197bcbfbbc)

llvm-svn: 361553

5 years ago[analyzer] Add a new frontend flag to display all checker options
Kristof Umann [Thu, 23 May 2019 20:47:28 +0000 (20:47 +0000)]
[analyzer] Add a new frontend flag to display all checker options

Add the new frontend flag -analyzer-checker-option-help to display all
checker/package options.

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

llvm-svn: 361552

5 years ago[clang-tidy]: Add cert-oop54-cpp alias for bugprone-unhandled-self-assignment
Tamas Zolnai [Thu, 23 May 2019 20:29:04 +0000 (20:29 +0000)]
[clang-tidy]: Add cert-oop54-cpp alias for bugprone-unhandled-self-assignment

Summary:
Added WarnOnlyIfThisHasSuspiciousField option to allow
to catch any copy assignment operator independently from
the container class's fields.
Added the cert alias using this option.

Reviewers: aaron.ballman

Reviewed By: aaron.ballman

Subscribers: mgorny, Eugene.Zelenko, xazax.hun, cfe-commits

Tags: #clang

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

llvm-svn: 361550

5 years ago[COFF] Move KeepUnique bit from Chunk to SectionChunk, NFC
Reid Kleckner [Thu, 23 May 2019 20:26:41 +0000 (20:26 +0000)]
[COFF] Move KeepUnique bit from Chunk to SectionChunk, NFC

The KeepUnique bit is used during ICF, which only operates on
SectionChunks, so only SectionChunks need it. This frees up a byte in
Chunk, which I plan to use in a follow-up change.

llvm-svn: 361549

5 years ago[Process] Fix another thread_result_t & nullptr incompatibility.
Jonas Devlieghere [Thu, 23 May 2019 20:25:49 +0000 (20:25 +0000)]
[Process] Fix another thread_result_t & nullptr incompatibility.

llvm-svn: 361548

5 years ago[DAGCombiner] make folds of binops safe for opcodes that produce >1 value
Sanjay Patel [Thu, 23 May 2019 20:17:25 +0000 (20:17 +0000)]
[DAGCombiner] make folds of binops safe for opcodes that produce >1 value

This is no-functional-change-intended currently because the definition
of isBinOp() only includes opcodes that produce 1 value. But if we
share that implementation with isCommutativeBinOp() as proposed in
D62191, then we need to make sure that the callers bail out for
opcodes that they are not prepared to handle correctly.

llvm-svn: 361547

5 years ago[lldb] Make sure RegularExpression constructors always initialize member variables
Jorge Gorbe Moya [Thu, 23 May 2019 20:11:17 +0000 (20:11 +0000)]
[lldb] Make sure RegularExpression constructors always initialize member variables

The copy constructor of RegularExpression doesn't initialize m_comp_err. This causes an use-of-initialized-value error when a RegularExpression is copied: the copy constructor calls Compile, which calls Free to free the existing regex if needed, which in turn reads m_comp_err to check if there's any regex to be freed.

This change calls the default constructor from the other constructors to make sure members are always initialized with sensible values. This also avoids duplicating init logic, like the RegularExpression(llvm:StringRef) constructor does, which is error prone.

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

llvm-svn: 361546

5 years agoFix sphinx unknown document error
Simon Pilgrim [Thu, 23 May 2019 20:07:27 +0000 (20:07 +0000)]
Fix sphinx unknown document error

llvm-svn: 361545

5 years ago[Utility] Avoid a few unnecessary copies (NFC)
Jonas Devlieghere [Thu, 23 May 2019 20:05:21 +0000 (20:05 +0000)]
[Utility] Avoid a few unnecessary copies (NFC)

Avoid unnecessary copies by either passing by const-reference or moving
the argument.

llvm-svn: 361544

5 years agoUpdateTestChecks: ppc32 triple support
Roman Lebedev [Thu, 23 May 2019 19:54:41 +0000 (19:54 +0000)]
UpdateTestChecks: ppc32 triple support

Summary:
Appears identical to powerpc64{,le}.
Regenerate test that is being affected by upcoming patch.

Reviewers: RKSimon

Reviewed By: RKSimon

Subscribers: nemanjai, jsji, llvm-commits

Tags: #llvm

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

llvm-svn: 361543

5 years agoUpdate breaking test.
Alina Sbirlea [Thu, 23 May 2019 19:51:16 +0000 (19:51 +0000)]
Update breaking test.

llvm-svn: 361542

5 years agoAMDGPU: Correct maximum possible private allocation size
Matt Arsenault [Thu, 23 May 2019 19:38:14 +0000 (19:38 +0000)]
AMDGPU: Correct maximum possible private allocation size

We were assuming a much larger possible per-wave visible stack
allocation than is possible:

https://github.com/RadeonOpenCompute/ROCR-Runtime/blob/faa3ae51388517353afcdaf9c16621f879ef0a59/src/core/runtime/amd_gpu_agent.cpp#L70

Based on this, we can assume the high 15 bits of a frame index or sret
are 0. The frame index value is the per-lane offset, so the maximum
frame index value is MAX_WAVE_SCRATCH / wavesize.

Remove the corresponding subtarget feature and option that made
this configurable.

llvm-svn: 361541

5 years ago[NewPassManager] Add tuning option: LoopUnrolling [NFC].
Alina Sbirlea [Thu, 23 May 2019 19:35:40 +0000 (19:35 +0000)]
[NewPassManager] Add tuning option: LoopUnrolling [NFC].

Summary: Mirror tuning option from old pass manager in new pass manager.

Reviewers: chandlerc

Subscribers: jlebar, dmgreen, llvm-commits

Tags: #llvm

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

llvm-svn: 361540

5 years ago[gdb-remote] Fix more issues with thread_result_t
Jonas Devlieghere [Thu, 23 May 2019 19:32:46 +0000 (19:32 +0000)]
[gdb-remote] Fix more issues with thread_result_t

More fixes needed to un-break the Windows bot.

llvm-svn: 361539

5 years ago[NFC] UpdateTestChecks: asm.py: fix whitespace issue
Roman Lebedev [Thu, 23 May 2019 19:15:05 +0000 (19:15 +0000)]
[NFC] UpdateTestChecks: asm.py: fix whitespace issue

llvm-svn: 361538

5 years ago[SLPVectorizer] Set flag to previous default.
Alina Sbirlea [Thu, 23 May 2019 19:07:41 +0000 (19:07 +0000)]
[SLPVectorizer] Set flag to previous default.

Summary:
The refactoring in r360276 moved the `RunSLPVectorization` flag and added the default explicitly. The default should have been `false`, as before.

The new pass manager used to have SLPVectorization on by default, now it's off in opt, and needs D61617 checked in to enable it in clang.

Reviewers: chandlerc

Subscribers: mehdi_amini, jlebar, eraman, steven_wu, dexonsmith, llvm-commits

Tags: #llvm

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

llvm-svn: 361537

5 years agoFix unresolved symbols when linking tools/clang/unittests/Tooling/ToolingTests
Thomas Lively [Thu, 23 May 2019 18:55:00 +0000 (18:55 +0000)]
Fix unresolved symbols when linking tools/clang/unittests/Tooling/ToolingTests

Summary: Add correct cmake dependencies so that `ToolingTests` link
successfully.

Patch by Guanzhong Chen

Reviewers: tlively, aheejin

Reviewed By: tlively

Subscribers: mgorny, cfe-commits

Tags: #clang

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

llvm-svn: 361536

5 years ago[CMake] Fixing errors in r361513
Chris Bieneman [Thu, 23 May 2019 18:51:52 +0000 (18:51 +0000)]
[CMake] Fixing errors in r361513

Summary:
I somehow messed this up. libcxx appends the subdirectories itself, so we don't need to add them here.

Also, r361513 broke the "projects" build of libcxx because it always included the extra targets.

Reviewers: lebedev.ri, mclow.lists

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

llvm-svn: 361535

5 years ago[NewPassManager] Add tuning option: SLPVectorization [clang-change]
Alina Sbirlea [Thu, 23 May 2019 18:51:02 +0000 (18:51 +0000)]
[NewPassManager] Add tuning option: SLPVectorization [clang-change]

Summary:
NewPassManager is not using CodeGenOpts values before this patch.
[to be coupled with D61616]

Reviewers: chandlerc

Subscribers: jlebar, cfe-commits, llvm-commits

Tags: #clang

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

llvm-svn: 361534

5 years ago[InstCombine] be more careful when transforming a shuffle mask
Sanjay Patel [Thu, 23 May 2019 18:46:03 +0000 (18:46 +0000)]
[InstCombine] be more careful when transforming a shuffle mask

This is reduced from a fuzzer test:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14890

Usually, demanded elements should be able to simplify shuffle
mask elements that are pointing to undef elements of its source
operands, but that doesn't happen in the test case.

llvm-svn: 361533

5 years ago[git] Be more specific when looking for llvm-svn
Jordan Rupprecht [Thu, 23 May 2019 18:43:19 +0000 (18:43 +0000)]
[git] Be more specific when looking for llvm-svn

Summary:
A commit may, for some reason, have `llvm-svn:` in it multiple times. It may even take up the whole line and look identical to what gets added automatically when svn commits land in github.

To workaround this, make changes to both lookups:

1) When doing the git -> svn lookup, make sure to go through the whole message, and:
 a) Only look for llvm-svn starting at the beginning of the line (excluding the whitespace that `git log` adds).
 b) Take the last one (at the end of the commit message), if there are multiple matches.

2) When doing the svn -> git lookup, look through a sizeable but still reasonably small number of git commits (10k, about 4-5 months right now), and:
 a) Only consider commits with the '^llvm-svn: NNNNNN' we expect, and
 b) Only consider those that also follow the same git -> svn matching above. (Error if it's not exactly one commit).

Reviewers: jyknight

Reviewed By: jyknight

Subscribers: llvm-commits

Tags: #llvm

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

llvm-svn: 361532

5 years agoTest commit access by removing a empty line
Antonio Afonso [Thu, 23 May 2019 18:35:54 +0000 (18:35 +0000)]
Test commit access by removing a empty line

llvm-svn: 361531

5 years ago[Driver] Move the "-o OUT -x TYPE SRC.c" flags to the end of -cc1
Reid Kleckner [Thu, 23 May 2019 18:35:43 +0000 (18:35 +0000)]
[Driver] Move the "-o OUT -x TYPE SRC.c" flags to the end of -cc1

New -cc1 arguments, such as -faddrsig, have started appearing after the
input name. I personally find it convenient for the input to be the last
argument to the compile command line, since I often need to edit it when
running crash reproduction scripts.

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

llvm-svn: 361530

5 years ago[OPENMP]Simplify codegen for the outlined regions.
Alexey Bataev [Thu, 23 May 2019 18:19:54 +0000 (18:19 +0000)]
[OPENMP]Simplify codegen for the outlined regions.

Simplified codegen for the outlined regions, excluding duplication code
for handling variables with the reference types.

llvm-svn: 361529

5 years ago[HostNativeThreadBase] Undo nullptr changes
Jonas Devlieghere [Thu, 23 May 2019 18:15:43 +0000 (18:15 +0000)]
[HostNativeThreadBase] Undo nullptr changes

The thread result type is an unsigned instead of a pointer on windows,
so we shouldn't replace 0 with nullptr here.

llvm-svn: 361528

5 years agoResubmit r360436 "[X86] Avoid SFB - Fix inconsistent codegen with/without debug info"
Robert Lougher [Thu, 23 May 2019 18:15:12 +0000 (18:15 +0000)]
Resubmit r360436 "[X86] Avoid SFB - Fix inconsistent codegen with/without debug info"

Fixes https://bugs.llvm.org/show_bug.cgi?id=40969

The functions findPotentiallyBlockedCopies and buildCopy are currently not
accounting for the presence of debug instructions. In the former this results
in the optimization not being trigerred, and in the latter results in
inconsistent codegen.

This patch enables the optimization to be performed in a debug build and
ensures the codegen is consistent with non-debug builds.

Patch by Chris Dawson.

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

llvm-svn: 361527

5 years ago[WebAssembly] Implement ReplaceNodeResults to fix a SIMD crash
Thomas Lively [Thu, 23 May 2019 18:09:26 +0000 (18:09 +0000)]
[WebAssembly] Implement ReplaceNodeResults to fix a SIMD crash

Reviewers: aheejin

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

Tags: #llvm

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

llvm-svn: 361526

5 years ago[NFC][PPC] Autogenerate vec_add_sub_quadword.ll test
Roman Lebedev [Thu, 23 May 2019 18:08:26 +0000 (18:08 +0000)]
[NFC][PPC] Autogenerate vec_add_sub_quadword.ll test

Being affected by (sub %x, C) -> add %X, (sub 0, C) 'for vectors' patch.

llvm-svn: 361525

5 years ago[NFC][PPC] Autogenerate vec_add_sub_doubleword.ll test
Roman Lebedev [Thu, 23 May 2019 18:08:21 +0000 (18:08 +0000)]
[NFC][PPC] Autogenerate vec_add_sub_doubleword.ll test

Being affected by (sub %x, C) -> add %X, (sub 0, C) 'for vectors' patch.

llvm-svn: 361524

5 years ago[NFC][Mips] Autogenerate msa/i5-s.ll test
Roman Lebedev [Thu, 23 May 2019 18:08:17 +0000 (18:08 +0000)]
[NFC][Mips] Autogenerate msa/i5-s.ll test

Being affected by (sub %x, C) -> add %X, (sub 0, C) 'for vectors' patch.

llvm-svn: 361523

5 years ago[NFC][Mips] Autogenerate msa/arithmetic.ll test
Roman Lebedev [Thu, 23 May 2019 18:08:13 +0000 (18:08 +0000)]
[NFC][Mips] Autogenerate msa/arithmetic.ll test

Being affected by (sub %x, C) -> add %X, (sub 0, C) 'for vectors' patch.

llvm-svn: 361522