platform/upstream/llvm.git
4 years agoAMDGPU: Fix verifier error on killed spill of partially undef register
Matt Arsenault [Wed, 14 Oct 2020 22:10:54 +0000 (18:10 -0400)]
AMDGPU: Fix verifier error on killed spill of partially undef register

This does unfortunately end up with extra waitcnts getting inserted
that were avoided before. Ideally we would avoid the spills of these
undef components in the first place.

4 years ago[InstCombine] visitXor - refactor ((X^C1)>>C2)^C3 -> (X>>C2)^((C1>>C2)^C3) fold....
Simon Pilgrim [Thu, 15 Oct 2020 13:16:35 +0000 (14:16 +0100)]
[InstCombine] visitXor - refactor ((X^C1)>>C2)^C3 -> (X>>C2)^((C1>>C2)^C3) fold. NFCI.

This is still ConstantInt-only (scalar) but is refactored to use PatternMatch to make adding vector support in the future relatively trivial.

4 years ago[AMDGPU] Minimize number of s_mov generated by copyPhysReg
Carl Ritson [Thu, 15 Oct 2020 09:40:46 +0000 (18:40 +0900)]
[AMDGPU] Minimize number of s_mov generated by copyPhysReg

Generate the minimal set of s_mov instructions required when
expanding a SGPR copy operation in copyPhysReg.

Reviewed By: foad

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

4 years ago[SVE]Fix implicit TypeSize casts in EmitCheckValue
Caroline Concatto [Tue, 13 Oct 2020 12:41:54 +0000 (13:41 +0100)]
[SVE]Fix implicit TypeSize casts in EmitCheckValue

Using TypeSize::getFixedSize() instead of relying upon the implicit
TypeSize->uint64_cast as the type is always fixed width.

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

4 years ago[Statepoints] Remove MI limit on number of tied operands.
Denis Antrushin [Tue, 13 Oct 2020 18:27:14 +0000 (01:27 +0700)]
[Statepoints] Remove MI limit on number of tied operands.

After D87915 statepoint can have more than 15 tied operands.
Remove this restriction from statepoint lowering code.

4 years ago[LLD][ELF] Improve ICF for relocations to ineligible sections via "aliases"
Andrew Ng [Wed, 23 Sep 2020 14:07:35 +0000 (15:07 +0100)]
[LLD][ELF] Improve ICF for relocations to ineligible sections via "aliases"

ICF was not able to merge equivalent sections because of relocations to
sections ineligible for ICF that use alternative symbols, e.g. symbol
aliases or section relative relocations.

Merging in this scenario has been enabled by giving the sections that
are ineligible for ICF a unique ID, i.e. an equivalence class of their
own. This approach also provides another benefit as it improves the
hashing that is used to perform the initial equivalance grouping for
ICF. This is because the ICF ineligible sections can now contribute a
unique value towards the hashes instead of the same value of zero. This
has been seen to reduce link time with ICF by ~68% for objects compiled
with -fprofile-instr-generate.

In order to facilitate this use of a unique ID, the existing
inconsistent approach to the setting of the InputSection eqClass in ICF
has been changed so that there is a clear distinction between the
eqClass values of ICF eligible sections and those of the ineligible
sections that have a unique ID. This inconsistency could have caused
incorrect equivalence class equality in the past, although it appears
that no issues were encountered in actual use.

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

4 years ago[flang] Fix build with BUILD_SHARED_LIBS=ON and FLANG_BUILD_NEW_DRIVER=ON
Serge Guelton [Thu, 15 Oct 2020 08:46:02 +0000 (04:46 -0400)]
[flang] Fix build with BUILD_SHARED_LIBS=ON and FLANG_BUILD_NEW_DRIVER=ON

As usual, it's difficult to handle all different configuration in the first row,
but this one has been extensively tested

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

4 years agoFix unused variable warning when compiling with asserts disabled.
Adrian Kuegel [Thu, 15 Oct 2020 10:48:35 +0000 (12:48 +0200)]
Fix unused variable warning when compiling with asserts disabled.

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

4 years ago[DebugInstrRef] Support recording of instruction reference substitutions
Jeremy Morse [Thu, 15 Oct 2020 10:20:29 +0000 (11:20 +0100)]
[DebugInstrRef] Support recording of instruction reference substitutions

Add a table recording "substitutions" between pairs of <instruction,
operand> numbers, from old pairs to new pairs. Post-isel optimizations are
able to record the outcome of an optimization in this way. For example, if
there were a divide instruction that generated the quotient and remainder,
and it were replaced by one that only generated the quotient:

  $rax, $rcx = DIV-AND-REMAINDER $rdx, $rsi, debug-instr-num 1
  DBG_INSTR_REF 1, 0
  DBG_INSTR_REF 1, 1

Became:

  $rax = DIV $rdx, $rsi, debug-instr-num 2
  DBG_INSTR_REF 1, 0
  DBG_INSTR_REF 1, 1

We could enter a substitution from <1, 0> to <2, 0>, and no substitution
for <1, 1> as it's no longer generated.

This approach means that if an instruction or value is deleted once we've
left SSA form, all variables that used the value implicitly become
"optimized out", something that isn't true of the current DBG_VALUE
approach.

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

4 years ago[AggressiveInstCombine] foldAnyOrAllBitsSet - add uniform vector support
Simon Pilgrim [Thu, 15 Oct 2020 10:02:35 +0000 (11:02 +0100)]
[AggressiveInstCombine] foldAnyOrAllBitsSet - add uniform vector support

Replace m_ConstantInt with m_APInt to support uniform vectors (with no undef elements)

Adding non-undef support would involve some refactoring of the MaskOps struct but this might still be worth it.

4 years ago[AggressiveInstCombine] foldAnyOrAllBitsSet - add uniform vector tests
Simon Pilgrim [Thu, 15 Oct 2020 09:48:24 +0000 (10:48 +0100)]
[AggressiveInstCombine] foldAnyOrAllBitsSet - add uniform vector tests

4 years ago[CodeGen][X86] Emit fshl/fshr ir intrinsics for shiftleft128/shiftright128 ms intrinsics
Simon Pilgrim [Thu, 15 Oct 2020 09:22:23 +0000 (10:22 +0100)]
[CodeGen][X86] Emit fshl/fshr ir intrinsics for shiftleft128/shiftright128 ms intrinsics

Now that funnel shift handling is pretty good, we can use the intrinsics directly and avoid a lot of zext/trunc issues.

https://godbolt.org/z/YqhnnM

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

4 years ago[lldb] Explicitly test the template argument SB API
Raphael Isemann [Thu, 15 Oct 2020 07:56:53 +0000 (09:56 +0200)]
[lldb] Explicitly test the template argument SB API

4 years ago[AMDGPU] Add objdump invalid metadata testcase
Sebastian Neubauer [Wed, 14 Oct 2020 09:14:20 +0000 (11:14 +0200)]
[AMDGPU] Add objdump invalid metadata testcase

Checks that metadata and invalid message are printed.

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

4 years ago[Statepoints] Unlimited tied operands.
Denis Antrushin [Fri, 18 Sep 2020 16:09:52 +0000 (23:09 +0700)]
[Statepoints] Unlimited tied operands.

Current limit on amount of tied operands (15) sometimes is too low
for statepoint. We may get couple dozens of gc pointer operands on
statepoint.
Review D87154 changed format of statepoint to list every gc pointer
only once, which makes it trivial to find tiedness relation between
statepoint operands: defs are mapped 1-1 to gc pointer operands passed
on registers.

Reviewed By: skatkov

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

4 years ago[NFC] Correct name of profile function to Profile in APValue
Tyker [Thu, 15 Oct 2020 07:56:53 +0000 (09:56 +0200)]
[NFC] Correct name of profile function to Profile in APValue

Capitalize the profile function of APValue such that it can be used by FoldingSetNodeID

Reviewed By: rsmith

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

4 years ago[yaml2obj] - Allow specifying no tags to create empty sections in few cases.
Georgii Rymar [Wed, 14 Oct 2020 11:46:21 +0000 (14:46 +0300)]
[yaml2obj] - Allow specifying no tags to create empty sections in few cases.

Currently we have a few sections that
does not support specifying no keys for them. E.g. it is required that one
of "Content", "Size" or "Entries" key is present. There is no reason to
have this restriction. We can allow this and emit an empty section instead.

This opens road for a simplification and generalization of the code in `validate()`
that is discussed in the D89039 thread.

Depends on D89039.

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

4 years ago[libc][NFC] Add probability distributions for memory function sizes
Guillaume Chatelet [Thu, 15 Oct 2020 08:01:26 +0000 (08:01 +0000)]
[libc][NFC] Add probability distributions for memory function sizes

This patch adds memory function size distributions sampled from different applications running in production.
This will be used to benchmark and compare memory functions implementations.

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

4 years ago[yaml2obj/obj2yaml] - Add support of 'Size' and 'Content' keys for all sections.
Georgii Rymar [Tue, 6 Oct 2020 12:48:15 +0000 (15:48 +0300)]
[yaml2obj/obj2yaml] - Add support of 'Size' and 'Content' keys for all sections.

Many sections either do not have a support of `Size`/`Content` or support just a
one of them, e.g only `Content`.

`Section` is the base class for sections. This patch adds `Content` and `Size` members
to it and removes similar members from derived classes. This allows to cleanup and
generalize the code and adds a support of these keys for all sections (`SHT_MIPS_ABIFLAGS`
is a only exception, it requires unrelated specific changes to be done).

I had to update/add many tests to test the new functionality properly.

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

4 years ago[TargetLowering] Replace Log2_32_Ceil with Log2_32 in SimplifySetCC ctpop combine.
Craig Topper [Wed, 14 Oct 2020 17:52:21 +0000 (10:52 -0700)]
[TargetLowering] Replace Log2_32_Ceil with Log2_32 in SimplifySetCC ctpop combine.

This combine can look through (trunc (ctpop X)). When doing this
it tries to make sure the trunc doesn't lose any information
from the ctpop. It does this by checking that the truncated type
has more bits that Log2_32_Ceil of the ctpop type. The Ceil is
unnecessary and pessimizes non-power of 2 types.

For example, ctpop of i256 requires 9 bits to represent the max
value of 256. But ctpop of i255 only requires 8 bits to represent
the max result of 255. Log2_32_Ceil of 256 and 255 both return 8
while Log2_32 returns 8 for 256 and 7 for 255

The code with popcnt enabled is a regression for this test case,
but it does match what already happens with i256 truncated to i9.
Since power of 2 is more likely, I don't think it should block
this change.

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

4 years ago[SVE][NFC] Replace some TypeSize comparisons in non-AArch64 Targets
David Sherwood [Fri, 9 Oct 2020 08:02:47 +0000 (09:02 +0100)]
[SVE][NFC] Replace some TypeSize comparisons in non-AArch64 Targets

In most of lib/Target we know that we are not dealing with scalable
types so it's perfectly fine to replace TypeSize comparison operators
with their fixed width equivalents, making use of getFixedSize()
and so on.

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

4 years agoIncrease timeout to find a dSYM in macos DownloadObjectAndSymbolFile
Jason Molenda [Thu, 15 Oct 2020 07:57:23 +0000 (00:57 -0700)]
Increase timeout to find a dSYM in macos DownloadObjectAndSymbolFile

With a large dSYM over a slow home connection, the two minute timeout
would sometimes be exceeded, and we haven't seen instances of a
long timeout causing people any problems, so we're bumping it up.

640 seconds ought to be enough for anyone.

<rdar://problem/67759526>

4 years ago[LLD] Set alignment as part of Characteristics in TLS table.
Luqman Aden [Thu, 15 Oct 2020 07:06:46 +0000 (00:06 -0700)]
[LLD] Set alignment as part of Characteristics in TLS table.

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

LLD wasn't previously specifying any specific alignment in the TLS table's Characteristics field so the loader would just assume the default value (16 bytes). This works most of the time except if you have thread locals that want specific higher alignments (e.g. 32 as in the bug) *even* if they specify an alignment on the thread local. This change updates LLD to take the max alignment from tls section.

Reviewed By: rnk

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

4 years agoRevert "[LLD] Set alignment as part of Characteristics in TLS table."
Luqman Aden [Thu, 15 Oct 2020 06:57:57 +0000 (23:57 -0700)]
Revert "[LLD] Set alignment as part of Characteristics in TLS table."

Revert individual wip commits and will instead follow up with a
single commit with all the changes. Makes cherry-picking easier
and will contain all the right tags.

This reverts commit 32a4ad3b6ce6028a371b028cf06fa5feff9534bf.
This reverts commit 7fe13af676678815989a6d0ece684687953245e7.
This reverts commit 51fbc1bef657bb0f5808986555ec3517a84768c4.
This reverts commit f80950a8bb985c082b26534b0e157447bf803935.
This reverts commit 0778cad9f325df4d7b32b22f3dba201a16a0b8fe.
This reverts commit 8b70d527d7ec1c8b9e921177119a0d906ffad4f0.

4 years agoFix llvm-symbolizer assembly-based test to require x86 and specify x86 when assembling
David Blaikie [Thu, 15 Oct 2020 07:01:43 +0000 (00:01 -0700)]
Fix llvm-symbolizer assembly-based test to require x86 and specify x86 when assembling

4 years agollvm-symbolizer: Exit non-zero when DWARF parsing errors have been rendered
David Blaikie [Thu, 15 Oct 2020 06:23:33 +0000 (23:23 -0700)]
llvm-symbolizer: Exit non-zero when DWARF parsing errors have been rendered

4 years agoFix typeo in attach failed error message.
Jason Molenda [Thu, 15 Oct 2020 06:30:42 +0000 (23:30 -0700)]
Fix typeo in attach failed error message.
<rdar://problem/70296751>

4 years ago[AMDGPU] Pre-commit test for D89187
Carl Ritson [Thu, 15 Oct 2020 04:27:50 +0000 (13:27 +0900)]
[AMDGPU] Pre-commit test for D89187

4 years agollvm-symbolizer: Ensure non-zero exit when an error is printed
David Blaikie [Thu, 15 Oct 2020 05:47:36 +0000 (22:47 -0700)]
llvm-symbolizer: Ensure non-zero exit when an error is printed

(this doesn't cover all cases - libDebugInfoDWARF has a default error
handler that prints errors without any exit code handling - I'll be
following up with a patch for that after this)

4 years ago[mlir][SPIRV] Adding an attribute to capture configuration for cooperative matrix...
MaheshRavishankar [Thu, 15 Oct 2020 05:32:52 +0000 (22:32 -0700)]
[mlir][SPIRV] Adding an attribute to capture configuration for cooperative matrix operations.

Each hardware that supports SPV_C_CooperativeMatrixNV has a list of
configurations that are supported natively. Add an attribute to
specify the configurations supported to the `spv.target_env`.

Reviewed By: antiagainst, ThomasRaoux

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

4 years agollvm-dwarfdump: Exit non-zero on an error path
David Blaikie [Thu, 15 Oct 2020 05:10:18 +0000 (22:10 -0700)]
llvm-dwarfdump: Exit non-zero on an error path

4 years agoPerform lvalue conversions on the left of a pseudo-destructor call 'p->~T()'.
Richard Smith [Thu, 15 Oct 2020 05:05:30 +0000 (22:05 -0700)]
Perform lvalue conversions on the left of a pseudo-destructor call 'p->~T()'.

Previously we failed to convert 'p' from array/function to pointer type,
and to represent the load of 'p' in the AST. The latter causes problems
for constant evaluation.

4 years agoclang-{tools,unittests}: Stop using SourceManager::getBuffer, NFC
Duncan P. N. Exon Smith [Wed, 14 Oct 2020 18:36:00 +0000 (14:36 -0400)]
clang-{tools,unittests}: Stop using SourceManager::getBuffer, NFC

Update clang-tools-extra, clang/tools, clang/unittests to migrate from
`SourceManager::getBuffer`, which returns an always dereferenceable
`MemoryBuffer*`, to `getBufferOrNone` or `getBufferOrFake`, both of
which return a `MemoryBufferRef`, depending on whether the call site was
checking for validity of the buffer. No functionality change intended.

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

4 years agoclang/StaticAnalyzer: Stop using SourceManager::getBuffer
Duncan P. N. Exon Smith [Wed, 14 Oct 2020 18:06:37 +0000 (14:06 -0400)]
clang/StaticAnalyzer: Stop using SourceManager::getBuffer

Update clang/lib/StaticAnalyzer to stop relying on a `MemoryBuffer*`,
using the `MemoryBufferRef` from `getBufferOrNone` or the
`Optional<MemoryBufferRef>` from `getBufferOrFake`, depending on whether
there's logic for checking validity of the buffer. The change to
clang/lib/StaticAnalyzer/Core/IssueHash.cpp is potentially a
functionality change, since the logic was wrong (it checked for
`nullptr`, which was never returned by the old API), but if that was
reachable the new behaviour should be better.

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

4 years ago[AArch64] Combine UADDVs to generate vector add
Vinay Madhusudan [Thu, 15 Oct 2020 03:25:51 +0000 (08:55 +0530)]
[AArch64] Combine UADDVs to generate vector add

ADD(UADDV a, UADDV b) --> UADDV(ADD a, b)

This partially solves the bug: https://bugs.llvm.org/show_bug.cgi?id=46888
Meta ticket: https://bugs.llvm.org/show_bug.cgi?id=46929

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

4 years agoclang/CodeGen: Stop using SourceManager::getBuffer, NFC
Duncan P. N. Exon Smith [Wed, 14 Oct 2020 17:48:52 +0000 (13:48 -0400)]
clang/CodeGen: Stop using SourceManager::getBuffer, NFC

Update `clang/lib/CodeGen` to use a `MemoryBufferRef` from
`getBufferOrNone` instead of `MemoryBuffer*` from `getBuffer`. No
functionality change here.

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

4 years agoclang/Frontend: Mostly stop using SourceManager::getBuffer, NFC
Duncan P. N. Exon Smith [Wed, 14 Oct 2020 17:28:34 +0000 (13:28 -0400)]
clang/Frontend: Mostly stop using SourceManager::getBuffer, NFC

Update clang/lib/Frontend to use a `MemoryBufferRef` from
`getBufferOrFake` instead of `MemoryBuffer*` from `getBuffer`, with the
exception of `FrontendInputFile`, which I'm leaving for later.

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

4 years ago[dsymutil] Fix handling of aliases to private external symbols
Jonas Devlieghere [Thu, 15 Oct 2020 03:10:55 +0000 (20:10 -0700)]
[dsymutil] Fix handling of aliases to private external symbols

dsymutil was incorrectly ignoring aliases to private extern symbols in
the MachODebugMapParser. This resulted in spurious warnings about not
being able to find symbols.

rdar://49652389

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

4 years agoclang/Basic: Stop using SourceManager::getBuffer, NFC
Duncan P. N. Exon Smith [Wed, 14 Oct 2020 14:32:00 +0000 (10:32 -0400)]
clang/Basic: Stop using SourceManager::getBuffer, NFC

Update clang/lib/Basic to stop relying on a `MemoryBuffer*`, using the
`MemoryBufferRef` from `getBufferOrNone` or `getBufferOrFake` instead of
`getBuffer`.

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

4 years ago[LLD] Set alignment as part of Characteristics in TLS table.
Luqman Aden [Thu, 15 Oct 2020 02:39:08 +0000 (19:39 -0700)]
[LLD] Set alignment as part of Characteristics in TLS table.

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

LLD wasn't previously specifying any specific alignment in the TLS table's Characteristics field so the loader would just assume the default value (16 bytes). This works most of the time except if you have thread locals that want specific higher alignments (e.g. 32 as in the bug) *even* if they specify an alignment on the thread local. This change updates LLD to take the max alignment from tls section.

Reviewed By: rnk

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

4 years agoNit: Use early return to reduce indentation.
Luqman Aden [Thu, 15 Oct 2020 02:26:07 +0000 (19:26 -0700)]
Nit: Use early return to reduce indentation.

4 years agoMask out existing alignment bits.
Luqman Aden [Wed, 14 Oct 2020 05:53:49 +0000 (22:53 -0700)]
Mask out existing alignment bits.

4 years agoUpdate tests.
Luqman Aden [Wed, 7 Oct 2020 02:46:37 +0000 (19:46 -0700)]
Update tests.

4 years agoFix style warnings.
Luqman Aden [Thu, 1 Oct 2020 13:44:36 +0000 (06:44 -0700)]
Fix style warnings.

4 years ago[LLD] Set alignment as part of Characteristics in TLS table.
Luqman Aden [Thu, 1 Oct 2020 08:07:43 +0000 (01:07 -0700)]
[LLD] Set alignment as part of Characteristics in TLS table.

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

4 years ago[AMDGPU] Correct typos in SIMemoryLegalizer.cpp comments
Tony [Thu, 15 Oct 2020 02:07:56 +0000 (02:07 +0000)]
[AMDGPU] Correct typos in SIMemoryLegalizer.cpp comments

4 years agoRevert "[CMake] Avoid accidental C++ standard library dependency in sanitizers"
Petr Hosek [Thu, 15 Oct 2020 01:44:09 +0000 (18:44 -0700)]
Revert "[CMake] Avoid accidental C++ standard library dependency in sanitizers"

This reverts commit 287c318690f19fcbe337211278798d97ccf7884e which broke
sanitizer tests that use C++ standard library.

4 years ago[CMake] Avoid accidental C++ standard library dependency in sanitizers
Petr Hosek [Tue, 6 Oct 2020 19:26:55 +0000 (12:26 -0700)]
[CMake] Avoid accidental C++ standard library dependency in sanitizers

While sanitizers don't use C++ standard library, we could still end
up accidentally including or linking it just by the virtue of using
the C++ compiler. Pass -nostdinc++ and -nostdlib++ to avoid these
accidental dependencies.

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

4 years agoPR47805: Use a single object for a function parameter in the caller and
Richard Smith [Tue, 13 Oct 2020 17:03:02 +0000 (10:03 -0700)]
PR47805: Use a single object for a function parameter in the caller and
callee in constant evaluation.

We previously made a deep copy of function parameters of class type when
passing them, resulting in the destructor for the parameter applying to
the original argument value, ignoring any modifications made in the
function body. This also meant that the 'this' pointer of the function
parameter could be observed changing between the caller and the callee.

This change completely reimplements how we model function parameters
during constant evaluation. We now model them roughly as if they were
variables living in the caller, albeit with an artificially reduced
scope that covers only the duration of the function call, instead of
modeling them as temporaries in the caller that we partially "reparent"
into the callee at the point of the call. This brings some minor
diagnostic improvements, as well as significantly reduced stack usage
during constant evaluation.

4 years ago[VE] Add vector load/store instructions
Kazushi (Jam) Marukawa [Sat, 10 Oct 2020 06:15:14 +0000 (15:15 +0900)]
[VE] Add vector load/store instructions

Add vector registers and vector load/store instructions.  Add
regression tests for vector load/store instructions too.

Reviewed By: simoll

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

4 years agoRevert "[ASTImporter] Fix crash caused by unset AttributeSpellingListIndex"
Dave Lee [Thu, 15 Oct 2020 00:19:22 +0000 (17:19 -0700)]
Revert "[ASTImporter] Fix crash caused by unset AttributeSpellingListIndex"

This broke the GreenDragon build, due to the following error while running
TestImportBuiltinFileID:

```
Ignored/unknown shouldn't get here
UNREACHABLE executed at tools/clang/include/clang/Sema/AttrSpellingListIndex.inc:13!
```

See http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/24213/

This reverts commit 73c6beb2f7053fe8b5150072c2b5cd930de38a22.
This reverts https://reviews.llvm.org/D89318

4 years ago[VE] Change to expand SHL_PARTS/SRA_PARTS/SRL_PARTS
Kazushi (Jam) Marukawa [Wed, 14 Oct 2020 14:54:29 +0000 (23:54 +0900)]
[VE] Change to expand SHL_PARTS/SRA_PARTS/SRL_PARTS

VE doesn't have SHL_PARTS/SRA_PARTS/SRL_PARTS instructions, so need
to expand them.  Add regression tests too.

Reviewed By: simoll

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

4 years ago[AArch64][GlobalISel] Don't use explicit zero registers for compare results.
Amara Emerson [Wed, 14 Oct 2020 19:32:33 +0000 (12:32 -0700)]
[AArch64][GlobalISel] Don't use explicit zero registers for compare results.

These cause problems for later optimizations, just using an unused vreg like
SelectionDAG generates better code in the end, and obviates the need for some
GISel specific flag optimizations.

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

4 years ago[ADT] Use alignas + sizeof for inline storage, NFC
Reid Kleckner [Thu, 27 Feb 2020 22:55:13 +0000 (14:55 -0800)]
[ADT] Use alignas + sizeof for inline storage, NFC

AlignedCharArrayUnion is really only needed to handle the "union" case
when we need memory of suitable size and alignment for multiple types.
SmallVector only needs storage for one type, so use that directly.

4 years ago[clang][NFC] Change diagnostic to start with lowercase letter
Leonard Chan [Wed, 14 Oct 2020 22:48:29 +0000 (15:48 -0700)]
[clang][NFC] Change diagnostic to start with lowercase letter

4 years ago[Format/ObjC] Add NS_SWIFT_NAME() and CF_SWIFT_NAME() to WhitespaceSensitiveMacros
Ben Hamilton [Wed, 14 Oct 2020 20:26:14 +0000 (14:26 -0600)]
[Format/ObjC] Add NS_SWIFT_NAME() and CF_SWIFT_NAME() to WhitespaceSensitiveMacros

The argument passed to the preprocessor macros `NS_SWIFT_NAME(x)` and
`CF_SWIFT_NAME(x)` is stringified before passing to
`__attribute__((swift_name("x")))`.

ClangFormat didn't know about this stringification, so its custom parser
tried to parse the argument(s) passed to the macro as if they were
normal function arguments.

That means ClangFormat currently incorrectly inserts whitespace
between `NS_SWIFT_NAME` arguments with colons and dots, so:

```
extern UIWindow *MainWindow(void) NS_SWIFT_NAME(getter:MyHelper.mainWindow());
```

becomes:

```
extern UIWindow *MainWindow(void) NS_SWIFT_NAME(getter : MyHelper.mainWindow());
```

which clang treats as a parser error:

```
error: 'swift_name' attribute has invalid identifier for context name [-Werror,-Wswift-name-attribute]
```

Thankfully, D82620 recently added the ability to treat specific macros
as "whitespace sensitive", meaning their arguments are implicitly
treated as strings (so whitespace is not added anywhere inside).

This diff adds `NS_SWIFT_NAME` and `CF_SWIFT_NAME` to
`WhitespaceSensitiveMacros` so their arguments are implicitly treated
as whitespace-sensitive.

Test Plan:
  New tests added. Ran tests with:
  % ninja FormatTests && ./tools/clang/unittests/Format/FormatTests

Reviewed By: sammccall

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

4 years agoRegister TargetCXXABI.def as a textual header
Adrian Prantl [Wed, 14 Oct 2020 21:20:39 +0000 (14:20 -0700)]
Register TargetCXXABI.def as a textual header

4 years ago[mlir][Linalg] Rethink fusion of linalg ops with reshape ops.
MaheshRavishankar [Wed, 14 Oct 2020 20:34:53 +0000 (13:34 -0700)]
[mlir][Linalg] Rethink fusion of linalg ops with reshape ops.

The current fusion on tensors fuses reshape ops with generic ops by
linearizing the indexing maps of the fused tensor in the generic
op. This has some limitations
- It only works for static shapes
- The resulting indexing map has a linearization that would be
  potentially prevent fusion later on (for ex. tile + fuse).

Instead, try to fuse the reshape consumer (producer) with generic op
producer (consumer) by expanding the dimensionality of the generic op
when the reshape is expanding (folding).  This approach conflicts with
the linearization approach. The expansion method is used instead of
the linearization method.

Further refactoring that changes the fusion on tensors to be a
collection of patterns.

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

4 years agoMake header self-contained. NFC.
Benjamin Kramer [Wed, 14 Oct 2020 20:03:19 +0000 (22:03 +0200)]
Make header self-contained. NFC.

4 years agoclang/Basic: Replace ContentCache::getBuffer with Optional semantics
Duncan P. N. Exon Smith [Tue, 13 Oct 2020 22:09:47 +0000 (18:09 -0400)]
clang/Basic: Replace ContentCache::getBuffer with Optional semantics

Remove `ContentCache::getBuffer`, which always returned a
dereferenceable `MemoryBuffer*` and had a `bool*Invalid` out parameter,
and replace it with:

- `ContentCache::getBufferOrNone`, which returns
  `Optional<MemoryBufferRef>`. This is the new API that consumers should
  use. Later it could be renamed to `getBuffer`, but intentionally using
  a different name to root out any unexpected callers.
- `ContentCache::getBufferPointer`, which returns `MemoryBuffer*` with
  "optional" semantics. This is `private` to avoid growing callers and
  `SourceManager` has temporarily been made a `friend` to access it.
  Later paches will update the transitive callers to not need a raw
  pointer, and eventually this will be deleted.

No functionality change intended here.

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

4 years ago[llvm] Update default cutoff threshold for machine function splitter.
Snehasish Kumar [Fri, 9 Oct 2020 00:36:13 +0000 (17:36 -0700)]
[llvm] Update default cutoff threshold for machine function splitter.

Based on internal testing at Google we found that setting the profile
summary cutoff threshold to 999950 yields the best results in terms of
itlb and icache metrics (as observed on Intel CPUs).

*default* = Split out code if no profile count available for block
*size-%*  = The fraction of bytes split out of .text and .text.hot
*itlb*    = Misses per kilo instructions (MPKI) for itlb
*icache*  = Misses per kilo instructions (MPKI) for L1 icache

Search1

| cutoff  | size-%  | itlb      | icache  |
|---------|---------|-----------|---------|
| default | 42.5861 | 0.0822151 | 2.46363 |
|  999999 | 44.9350 | 0.0767194 | 2.44416 |
|  999950 | 50.0660 |  0.075744 |  2.4091 |
|  999500 | 56.9158 |  0.082564 |  2.4188 |
|  995000 | 63.8625 | 0.0814927 | 2.42832 |
|  990000 | 71.7314 |  0.106906 | 2.57785 |

Search2

| cutoff  | size-% | itlb     | icache  |
|---------|--------|----------|---------|
| default | 2.8845 | 0.626712 | 4.73245 |
|  999999 | 3.3291 | 0.602309 | 4.70045 |
|  999950 | 3.8577 | 0.587842 | 4.71632 |
|  999500 | 4.4170 |  0.63577 | 4.68351 |
|  995000 | 5.1020 | 0.657969 | 4.82272 |
|  990000 | 5.7153 | 0.719122 | 5.39496 |

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

4 years ago[mlir] Fix some style comments from D89268
Sean Silva [Mon, 12 Oct 2020 21:47:31 +0000 (14:47 -0700)]
[mlir] Fix some style comments from D89268

That change was a pure move, so split out the stylistic changes into
this patch.

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

4 years ago[mlir][bufferize] Rename BufferAssignment* to Bufferize*
Sean Silva [Mon, 12 Oct 2020 21:32:38 +0000 (14:32 -0700)]
[mlir][bufferize] Rename BufferAssignment* to Bufferize*

Part of the refactor discussed in:
https://llvm.discourse.group/t/what-is-the-strategy-for-tensor-memref-conversion-bufferization/1938/17

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

4 years ago[mlir] Refactor code out of BufferPlacement.cpp
Sean Silva [Mon, 12 Oct 2020 21:03:09 +0000 (14:03 -0700)]
[mlir] Refactor code out of BufferPlacement.cpp

Now BufferPlacement.cpp doesn't depend on Bufferize.h.

Part of the refactor discussed in:
https://llvm.discourse.group/t/what-is-the-strategy-for-tensor-memref-conversion-bufferization/1938/17

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

4 years ago[mlir] Rename ShapeTypeConversion to ShapeBufferize
Sean Silva [Mon, 12 Oct 2020 19:23:45 +0000 (12:23 -0700)]
[mlir] Rename ShapeTypeConversion to ShapeBufferize

Once we have tensor_to_memref ops suitable for type materializations,
this pass can be split into a generic type conversion pattern.

Part of the refactor discussed in:
https://llvm.discourse.group/t/what-is-the-strategy-for-tensor-memref-conversion-bufferization/1938/17

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

4 years ago[mlir] Linalg refactor for using "bufferize" terminology.
Sean Silva [Mon, 12 Oct 2020 19:38:05 +0000 (12:38 -0700)]
[mlir] Linalg refactor for using "bufferize" terminology.

Part of the refactor discussed in:
https://llvm.discourse.group/t/what-is-the-strategy-for-tensor-memref-conversion-bufferization/1938/17

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

4 years ago[clang] Add -fc++-abi= flag for specifying which C++ ABI to use
Leonard Chan [Wed, 12 Aug 2020 01:03:07 +0000 (18:03 -0700)]
[clang] Add -fc++-abi= flag for specifying which C++ ABI to use

This implements the flag proposed in RFC http://lists.llvm.org/pipermail/cfe-dev/2020-August/066437.html.

The goal is to add a way to override the default target C++ ABI through
a compiler flag. This makes it easier to test and transition between different
C++ ABIs through compile flags rather than build flags.

In this patch:
- Store `-fc++-abi=` in a LangOpt. This isn't stored in a
  CodeGenOpt because there are instances outside of codegen where Clang
  needs to know what the ABI is (particularly through
  ASTContext::createCXXABI), and we should be able to override the
  target default if the flag is provided at that point.
- Expose the existing ABIs in TargetCXXABI as values that can be passed
  through this flag.
  - Create a .def file for these ABIs to make it easier to check flag
    values.
  - Add an error for diagnosing bad ABI flag values.

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

4 years ago[llvm] Set the default for -bbsections-cold-text-prefix to .text.split.
Snehasish Kumar [Wed, 7 Oct 2020 18:42:02 +0000 (11:42 -0700)]
[llvm] Set the default for -bbsections-cold-text-prefix to .text.split.

After using this for a while, we find that it is generally useful to
have it set to .text.split. by default, removing the need for an
additional -mllvm option.

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

4 years ago[MBP] Add whole chain to BlockFilterSet instead of individual BB
Guozhi Wei [Wed, 14 Oct 2020 18:46:11 +0000 (11:46 -0700)]
[MBP] Add whole chain to BlockFilterSet instead of individual BB

Currently we add individual BB to BlockFilterSet if its frequency satisfies

LoopFreq / Freq <= LoopToColdBlockRatio

LoopFreq is edge frequency from outside to loop header.
LoopToColdBlockRatio is a command line parameter.

It doesn't make sense since we always layout whole chain, not individual BBs.

It may also cause a tricky problem. Sometimes it is possible that the LoopFreq
of an inner loop is smaller than LoopFreq of outer loop. So a BB can be in
BlockFilterSet of inner loop, but not in BlockFilterSet of outer loop,
like .cold in the test case. So it is added to the chain of inner loop. When
work on the outer loop, .cold is not added to BlockFilterSet, so the edge to
successor .problem is not counted in UnscheduledPredecessors of .problem chain.
But other blocks in the inner loop are added BlockFilterSet, so the whole inner
loop chain can be layout, and markChainSuccessors is called to decrease
UnscheduledPredecessors of following chains. markChainSuccessors calls
markBlockSuccessors for every BB, even it is not in BlockFilterSet, like .cold,
so .problem chain's UnscheduledPredecessors is decreased, but this edge was not
counted on in fillWorkLists, so .problem chain's UnscheduledPredecessors
becomes 0 when it still has an unscheduled predecessor .pred! And it causes
problems in following various successor BB selection algorithms.

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

4 years ago[lldb] More memory allocation test fixes
Pavel Labath [Wed, 14 Oct 2020 18:41:57 +0000 (20:41 +0200)]
[lldb] More memory allocation test fixes

XFAIL nodefaultlib.cpp on darwin - the test does not pass there

XFAIL TestGdbRemoteMemoryAllocation on windows - memory is allocated
with incorrect permissions

4 years ago[flang] Fix CMake bug in the definition of flang-new
Andrzej Warzynski [Wed, 14 Oct 2020 16:40:29 +0000 (17:40 +0100)]
[flang] Fix CMake bug in the definition of flang-new

Recent patch that improved Flang's compatibility with respect to how LLVM
dynamic libraries should be linked (and specified in CMake recipes),
introduced a bug in the definition of `flang-new`:
  * https://reviews.llvm.org/D87893
More specifically, `add_flang_tool` does not support the
`LINK_COMPONENTS` CMake argument.  Instead, one should set
`LLVM_LINK_COMPONENTS` before calling `add_flang_tool`.

This patch reverts the change for `flang-new` from
https://reviews.llvm.org/D87893, and instead:
  * sets `LLVM_LINK_COMPONENTS`
  * calls `clang_target_link_libraries` to add Clang dependencies

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

4 years agoPreserve param alignment in NVPTXLowerArgs pass.
Justin Lebar [Wed, 14 Oct 2020 16:30:05 +0000 (09:30 -0700)]
Preserve param alignment in NVPTXLowerArgs pass.

NVPTXLowerArgs works as follows.

  * Create a regular alloca with alignment identical to arg.
  * Copy arg from param space (and ASC'ing it from generic AS first) to
    the alloca (it's still in generic AS).
  * Replace loads of arg with loads of alloca.

The bug here is that we did not preserve the arg's alignment when
loading from the alloca.

The impact of this bug is that sometimes param loads would be lowered as
a series of u8 loads, because we're incorrectly assuming everything has
alignment 1.

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

4 years ago[DDR] Introduce implicit equality check for the source pattern operands with the...
rdzhabarov [Wed, 14 Oct 2020 17:51:16 +0000 (10:51 -0700)]
[DDR] Introduce implicit equality check for the source pattern operands with the same name.

This CL allows user to specify the same name for the operands in the source pattern which implicitly enforces equality on operands with the same name.
E.g., Pat<(OpA $a, $b, $a) ... > would create a matching rule for checking equality for the first and the last operands. Equality of the operands is enforced at any depth, e.g., OpA ($a, $b, OpB($a, $c, OpC ($a))).

Example usage: Pat<(Reshape $arg0, (Shape $arg0)), (replaceWithValue $arg0)>

Note, this feature only covers operands but not attributes.
Current use cases are based on the operand equality and explicitly add the constraint into the pattern. Attribute equality will be worked out on the different CL.

Reviewed By: jpienaar

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

4 years ago[lldb] [Process/FreeBSDRemote] Support YMM reg via PT_*XSTATE
Michał Górny [Sat, 10 Oct 2020 08:05:02 +0000 (10:05 +0200)]
[lldb] [Process/FreeBSDRemote] Support YMM reg via PT_*XSTATE

Add a framework for reading/writing extended register sets via
PT_GETXSTATE/PT_GETXSTATE_INFO/PT_SETXSTATE, and use it to support
YMM0..YMM15.  The code is prepared to handle arbitrary XSAVE extensions,
including correct offset handling.

This fixes Shell/Register/*ymm* tests.

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

4 years ago[Hexagon] Generate better splat code on v62+
Krzysztof Parzyszek [Tue, 13 Oct 2020 20:47:56 +0000 (15:47 -0500)]
[Hexagon] Generate better splat code on v62+

4 years ago[mlir] More changes to avoid args now inserted.NFC
Jacques Pienaar [Wed, 14 Oct 2020 17:28:51 +0000 (10:28 -0700)]
[mlir] More changes to avoid args now inserted.NFC

Migrates a bit more from the old/to be deprecated form.

4 years ago[Driver]: fix compiler-rt path when printing libgcc for baremetal
Christopher Di Bella [Wed, 14 Oct 2020 17:13:32 +0000 (10:13 -0700)]
[Driver]: fix compiler-rt path when printing libgcc for baremetal

clang --target arm-none-eabi --print-libgcc-file-name --rtlib=compiler-rt
used to print `/path/to/lib/clang/version/lib/libclang_rt.builtins-arm.a`
but should print `/path/to/lib/clang/version/lib/baremetal/libclang_rt.builtins-arm.a`.
Similarly, --target armv7m-none-eabi should print libclang_rt.builtins-armv7m.a
This matches the compiler-rt file name used at link time in the
baremetal driver.

Reviewed By: manojgupta

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

4 years ago[X86] Add test case to demonstrate a Log2_32_Ceil that can just be Log2_32 in Simplif...
Craig Topper [Wed, 14 Oct 2020 17:17:37 +0000 (10:17 -0700)]
[X86] Add test case to demonstrate a Log2_32_Ceil that can just be Log2_32 in SimplifySetCC ctpop combine.

This combine can look through (trunc (ctpop X)). When doing this
it tries to make sure the trunc doesn't lose any information
from the ctpop. It does this by checking that the truncated type
has more bits that Log2_32_Ceil of the ctpop type. The Ceil is
unnecessary and pessimizes non-power of 2 types.

For example, ctpop of i256 requires 9 bits to represent the max
value of 256. But ctpop of i255 only requires 8 bits to represent
the max result of 255. Log2_32_Ceil of 256 and 255 both return 8
while Log2_32 returns 8 for 256 and 7 for 255.

4 years agoRevert rG25a97c3a43d7 - "[InstCombine] visitCallInst - retain undefs in vector funnel...
Simon Pilgrim [Wed, 14 Oct 2020 17:14:23 +0000 (18:14 +0100)]
Revert rG25a97c3a43d7 - "[InstCombine] visitCallInst - retain undefs in vector funnel shift amounts"

This reverts commit 25a97c3a43d7bc469ec67dd4e901a507b9b11116.

We have other constant folds that fold undef funnel shift amounts to 0 - so we need to be consistent.

If we end up with regressions where we lose a splat shift amount pattern we'll have to investigate other canonicalizations, but matchFunnelShift currently protects us from that.

4 years agoAMDGPU: Update AMDHSA code object version handling
Konstantin Zhuravlyov [Wed, 14 Oct 2020 17:03:37 +0000 (13:03 -0400)]
AMDGPU: Update AMDHSA code object version handling

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

4 years agoInstCombine: Fix losing load properties in copy-constant-to-alloca
Matt Arsenault [Mon, 5 Oct 2020 17:44:32 +0000 (13:44 -0400)]
InstCombine: Fix losing load properties in copy-constant-to-alloca

Preserve the alignment and metadata. Atomic loads are skipped for
this, but pass along the properties for consistency.

4 years agoInstCombine: Fix infinite loop in copy-constant-to-alloca transform
Matt Arsenault [Mon, 5 Oct 2020 17:50:17 +0000 (13:50 -0400)]
InstCombine: Fix infinite loop in copy-constant-to-alloca transform

This was broken by 16295d521e294b27106e51fac29957c1aac8ff89, when
instructions started being handled and not just constant
expressions. This was re-inserting an equivalent bitcast to the
original memcpy operand, which made a non-functional IR change on
every iteration.

This also fixes a secondary problem where it was inserting
addrspacecasts which may not have been legal (i.e. it changed the
source address space). Start visiting all pointer users and fail out
if we can't process them. Also start handling the relevant memory
intrinsic users. These cases can be dealt with by running
InferAddressSpaces separately.

4 years ago[libc++] Mark two tests as unsupported in C++03
Louis Dionne [Wed, 14 Oct 2020 16:40:59 +0000 (12:40 -0400)]
[libc++] Mark two tests as unsupported in C++03

This was dropped when I split the tests into individual source files
to make sure they would actually run (in 2908eb20ba).

4 years agoRecommit "[VPlan] Use VPValue def for VPMemoryInstructionRecipe."
Florian Hahn [Tue, 13 Oct 2020 17:47:37 +0000 (18:47 +0100)]
Recommit "[VPlan] Use VPValue def for VPMemoryInstructionRecipe."

This reverts the revert commit 710aceb645e7dba4de7053eef2c616311b9163d4
and includes a fix for a memsan failure.

Original message:

    This patch turns VPMemoryInstructionRecipe into a VPValue and uses it
    during VPlan construction and codegeneration instead of the plain IR
    reference where possible.

4 years ago[CodeGen] Move x86 specific ms intrinsic tests into x86 target subfolder. NFCI.
Simon Pilgrim [Wed, 14 Oct 2020 16:37:07 +0000 (17:37 +0100)]
[CodeGen] Move x86 specific ms intrinsic tests into x86 target subfolder. NFCI.

4 years agoPolly - specify address space when creating a pointer to a vector type
Mark Schimmel [Wed, 14 Oct 2020 15:29:17 +0000 (10:29 -0500)]
Polly - specify address space when creating a pointer to a vector type

Polly incorrectly dropped the address space specified for a load instruction when it vectorized the code.

Reviewed By: Meinersbur

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

4 years ago[clangd] clang-format TweakTests, NFC
Kadir Cetinkaya [Wed, 14 Oct 2020 16:03:57 +0000 (18:03 +0200)]
[clangd] clang-format TweakTests, NFC

4 years agoAdd Allocate Clause to MLIR Parallel Operation Definition
Irina Dobrescu [Tue, 15 Sep 2020 10:51:02 +0000 (11:51 +0100)]
Add Allocate Clause to MLIR Parallel Operation Definition

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

4 years ago[libc++] Use ADDITIONAL_COMPILE_FLAGS instead of #define for _LIBCPP_DEBUG
Louis Dionne [Wed, 14 Oct 2020 15:59:30 +0000 (11:59 -0400)]
[libc++] Use ADDITIONAL_COMPILE_FLAGS instead of #define for _LIBCPP_DEBUG

4 years ago[libc++] Split off debug tests that were missed by ce1365f8f7e into test/libcxx
Louis Dionne [Wed, 14 Oct 2020 14:54:59 +0000 (10:54 -0400)]
[libc++] Split off debug tests that were missed by ce1365f8f7e into test/libcxx

Also, some tests had multiple death tests in them, so split them into
separate tests instead. The second death test would obviously never
get run, because the first one would kill the program before.

4 years ago[AIX] Turn -fdata-sections on by default in Clang
jasonliu [Wed, 14 Oct 2020 15:55:55 +0000 (15:55 +0000)]
[AIX] Turn -fdata-sections on by default in Clang

Summary:

This patch does the following:
1. Make InitTargetOptionsFromCodeGenFlags() accepts Triple as a
 parameter, because some options' default value is triple dependant.
2. DataSections is turned on by default on AIX for llc.
3. Test cases change accordingly because of the default behaviour change.
4. Clang Driver passes in -fdata-sections by default on AIX.

Reviewed By: MaskRay, DiggerLin

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

4 years ago[InstCombine] narrowRotate - canonicalize to OR(SHL,LSHR). NFCI.
Simon Pilgrim [Wed, 14 Oct 2020 15:42:08 +0000 (16:42 +0100)]
[InstCombine] narrowRotate - canonicalize to OR(SHL,LSHR). NFCI.

Match the canonicalization code that was added to matchFunnelShift at rG02295e6d1a15

4 years ago[NFC][MC] Use MCRegister in Machine{Sink|Pipeliner}.cpp
Mircea Trofin [Tue, 13 Oct 2020 16:29:15 +0000 (09:29 -0700)]
[NFC][MC] Use MCRegister in Machine{Sink|Pipeliner}.cpp

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

4 years agoRemove Combine.td.rej file
Konstantin Zhuravlyov [Wed, 14 Oct 2020 15:38:58 +0000 (11:38 -0400)]
Remove Combine.td.rej file

4 years agoFix an apparent typo. `assert()` must not contain side-effects. NFC.
Michael Liao [Wed, 14 Oct 2020 15:26:52 +0000 (11:26 -0400)]
Fix an apparent typo. `assert()` must not contain side-effects. NFC.

4 years ago[mlir][vulkan-runner] Fix buffer usage flags
Kevin Petit [Wed, 14 Oct 2020 14:14:26 +0000 (15:14 +0100)]
[mlir][vulkan-runner] Fix buffer usage flags

The buffers are used as source or destination of transfer commands
so always add VK_BUFFER_USAGE_TRANSFER_{DST,SRC}_BIT to their usage
flags.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
4 years agoFix conjuntion of -Werror,-Wsuggest-override with google/benchmark
Guillaume Chatelet [Wed, 14 Oct 2020 15:26:17 +0000 (15:26 +0000)]
Fix conjuntion of -Werror,-Wsuggest-override with google/benchmark

4 years ago[InstCombine] Add m_SpecificIntAllowUndef pattern matcher
Simon Pilgrim [Wed, 14 Oct 2020 14:36:50 +0000 (15:36 +0100)]
[InstCombine] Add m_SpecificIntAllowUndef pattern matcher

m_SpecificInt doesn't accept undef elements in a vector splat value - tweak specific_intval to optionally allow undefs and add the m_SpecificIntAllowUndef variants.

Allows us to remove the m_APIntAllowUndef + comparison hack inside matchFunnelShift

4 years ago[profile] Remove useless msync when dumping gcda files
Calixte Denizet [Wed, 3 Jun 2020 07:44:36 +0000 (09:44 +0200)]
[profile] Remove useless msync when dumping gcda files

Summary:
According the mmap man page (https://man7.org/linux/man-pages/man2/mmap.2.html) is only required to precisely control updates, so we can safely remove it.
Since gcda files are dumped just before to call exec** functions, dump need to be fast.
On my computer, Firefox built with --coverage needs ~1min40 to display something and in removing msync it needs ~8s.

Reviewers: void

Subscribers: #sanitizers, marco-c, sylvestre.ledru

Tags: #sanitizers

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

4 years ago[lldb] Fix TestGdbRemoteMemoryAllocation on windows
Pavel Labath [Wed, 14 Oct 2020 14:46:10 +0000 (16:46 +0200)]
[lldb] Fix TestGdbRemoteMemoryAllocation on windows

It appears that memory allocation actually works on windows (but it was
not fully wired up before 2c4226f8).