platform/upstream/llvm.git
4 years agoRevert "[NFC] SimplifyCFG: refactor/deduplicate command-line settings override handling"
Roman Lebedev [Thu, 16 Jul 2020 11:26:32 +0000 (14:26 +0300)]
Revert "[NFC] SimplifyCFG: refactor/deduplicate command-line settings override handling"

Seems to be breaking the bots.
This reverts commit 740a1da108ab9097268b509c85ed9ede7f4d5df5.

4 years ago[yaml2obj] - Fix an issue with NoHeaders key.
Georgii Rymar [Thu, 16 Jul 2020 10:33:01 +0000 (13:33 +0300)]
[yaml2obj] - Fix an issue with NoHeaders key.

When setting the NoHeaders to false,
the e_shnum field wasn't set correctly.

This patch fixes this bug.

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

4 years ago[clang] Fix printing of lambdas with capture expressions
Ilya Golovenko [Thu, 16 Jul 2020 10:47:44 +0000 (12:47 +0200)]
[clang] Fix printing of lambdas with capture expressions

Patch by @walrus !

Reviewers: lattner, kadircet

Reviewed By: kadircet

Subscribers: riccibruno, cfe-commits

Tags: #clang

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

4 years ago[NFC] SimplifyCFG: refactor/deduplicate command-line settings override handling
Roman Lebedev [Thu, 16 Jul 2020 10:25:44 +0000 (13:25 +0300)]
[NFC] SimplifyCFG: refactor/deduplicate command-line settings override handling

4 years ago[NFC] SimplifyCFGPass::SimplifyCFGPass(): use default SimplifyCFGOptions - we aren...
Roman Lebedev [Thu, 16 Jul 2020 10:24:12 +0000 (13:24 +0300)]
[NFC] SimplifyCFGPass::SimplifyCFGPass(): use default SimplifyCFGOptions - we aren't deviating from them here

4 years agoReland "[NFC] SimplifyCFGOptions: drop multi-parameter ctor, use default member-init"
Roman Lebedev [Thu, 16 Jul 2020 10:18:45 +0000 (13:18 +0300)]
Reland "[NFC] SimplifyCFGOptions: drop multi-parameter ctor, use default member-init"

This reverts commit 5831e86190966d58385678eb74b26aefacbfd101,
which reverted commit 90c1b0442a031d6cad686fdc4e5d3db03c3603a6
in preparation for reverting
commit b2018198c32a0535bb1f5bb5b40fbcf50d8d47b7 in
commit 1067d3e176ea7b0b1942c163bf8c6c90107768c1 due to the introducton
of a dependency cycle.

Now that the other revert is reverted with a fix, this can be relanded.

4 years agoReland "[NFCI] createCFGSimplificationPass(): migrate to also take SimplifyCFGOptions"
Roman Lebedev [Thu, 16 Jul 2020 09:52:55 +0000 (12:52 +0300)]
Reland "[NFCI] createCFGSimplificationPass(): migrate to also take SimplifyCFGOptions"

This reverts commit 1067d3e176ea7b0b1942c163bf8c6c90107768c1,
which reverted commit b2018198c32a0535bb1f5bb5b40fbcf50d8d47b7,
because it introduced a Dependency Cycle between Transforms/Scalar and
Transforms/Utils.

So let's just move SimplifyCFGOptions.h into Utils/, thus avoiding
the cycle.

4 years ago[clangd] Always retrieve ProjectInfo from Base in OverlayCDB
Kadir Cetinkaya [Thu, 16 Jul 2020 09:27:31 +0000 (11:27 +0200)]
[clangd] Always retrieve ProjectInfo from Base in OverlayCDB

Summary:
Clangd is returning current working directory for overriden commands.
This can cause inconsistencies between:
- header and the main files, as OverlayCDB only contains entries for the main
  files it direct any queries for the headers to the base, creating a
  discrepancy between the two.
- different clangd instances, as the results will be different depending on the
  timing of execution of the query and override of the command. hence clangd
  might see two different project infos for the same file between different
  invocations.
- editors and the way user has invoked it, as current working directory of
  clangd will depend on those, hence even when there's no underlying base CWD
  might change depending on the editor, or the directory user has started the
  editor in.

This patch gets rid of that discrepency by always directing queries to base or
returning llvm::None in absence of it.

For a sample bug see https://reviews.llvm.org/D83099#2154185.

Reviewers: sammccall

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

Tags: #clang

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

4 years ago[ARM] VBIT/VBIF support added.
Pavel Iliin [Tue, 14 Jul 2020 18:36:56 +0000 (19:36 +0100)]
[ARM] VBIT/VBIF support added.

Vector bitwise selects are matched by pseudo VBSP instruction
and expanded to VBSL/VBIT/VBIF after register allocation
depend on operands registers to minimize extra copies.

4 years agoFollow up of 2b3c505d0f6e: fixed a typo, and added some more formatting. NFC.
Sjoerd Meijer [Thu, 16 Jul 2020 10:05:02 +0000 (11:05 +0100)]
Follow up of 2b3c505d0f6e: fixed a typo, and added some more formatting. NFC.

4 years ago[ARM] CSEL generation
David Green [Tue, 14 Jul 2020 09:04:55 +0000 (10:04 +0100)]
[ARM] CSEL generation

This adds a peephole optimisation to turn a t2MOVccr that could not be
folded into any other instruction into a CSEL on 8.1-m. The t2MOVccr
would usually be expanded into a conditional mov, that becomes an IT;
MOV pair. We can instead generate a CSEL instruction, which can
potentially be smaller and allows better register allocation freedom,
which can help reduce codesize. Performance is more variable and may
depend on the micrarchitecture details, but initial results look good.
If we need to control this per-cpu, we can add a subtarget feature as we
need it.

Original patch by David Penry.

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

4 years ago[SVE][CodeGen] Legalisation of masked loads and stores
Kerry McLaughlin [Thu, 16 Jul 2020 09:12:41 +0000 (10:12 +0100)]
[SVE][CodeGen] Legalisation of masked loads and stores

Summary:
This patch modifies IncrementMemoryAddress to use a vscale
when calculating the new address if the data type is scalable.

Also adds tablegen patterns which match an extract_subvector
of a legal predicate type with zip1/zip2 instructions

Reviewers: sdesmalen, efriedma, david-arm

Reviewed By: efriedma, david-arm

Subscribers: tschuett, hiraditya, psnobl, llvm-commits

Tags: #llvm

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

4 years ago[Matrix] Also run lowering during -O0.
Florian Hahn [Thu, 16 Jul 2020 08:55:34 +0000 (09:55 +0100)]
[Matrix] Also run lowering during -O0.

Currently the backends cannot lower the matrix intrinsics directly and
rely on the lowering to vector instructions happening in the middle-end.
At the moment, this means the backend crashes when matrix types
extension code is compiled with -O0, e.g.
http://green.lab.llvm.org/green/job/test-suite-verify-machineinstrs-aarch64-O0-g/7902/

This patch enables also runs the lowering with -O0 in the middle-end as
a temporary solution. Long term, a lightweight version of the lowering
should run in the backend, on demand.

4 years ago[Test] Add test that shows how SimplifyCFG may insert redunant Phi
Max Kazantsev [Thu, 16 Jul 2020 09:21:01 +0000 (16:21 +0700)]
[Test] Add test that shows how SimplifyCFG may insert redunant Phi

It happens when a block cannot be threaded because of a convergent function.

4 years ago[flang] Fix shared library builds for lib/Lower.
David Truby [Tue, 14 Jul 2020 14:04:38 +0000 (15:04 +0100)]
[flang] Fix shared library builds for lib/Lower.

Summary:
This adds missing definitions for functions in the Lower directory
that were causing failures in shared library builds.
The definitions for these are taken from the fir-dev branch on github.

Reviewers: sscalpone, schweitz, jeanPerier, klausler

Reviewed By: schweitz

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

4 years agoAMDGPU/GlobalISel: Select G_FREEZE
Petar Avramovic [Thu, 16 Jul 2020 09:09:35 +0000 (11:09 +0200)]
AMDGPU/GlobalISel: Select G_FREEZE

Select G_FREEZE in the same way that COPY is selected.

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

4 years agoRe-enable "[InstCombine] Simplify boolean Phis with const inputs using CFG"
Max Kazantsev [Thu, 16 Jul 2020 06:29:16 +0000 (13:29 +0700)]
Re-enable "[InstCombine] Simplify boolean Phis with const inputs using CFG"

This reverts commit b893822e32ffe3c1dcf4d5ac0571a282582d72b2.

+ Clang test fixes
+ Insertion point fix for landing pads

4 years agoRevert "[NFCI] createCFGSimplificationPass(): migrate to also take SimplifyCFGOptions"
Adrian Kuegel [Thu, 16 Jul 2020 08:54:10 +0000 (10:54 +0200)]
Revert "[NFCI] createCFGSimplificationPass(): migrate to also take SimplifyCFGOptions"

This reverts commit b2018198c32a0535bb1f5bb5b40fbcf50d8d47b7.
This commit introduced a Dependency Cycle between Transforms/Scalar and
Transforms/Utils. Transforms/Scalar already depends on Transforms/Utils,
so if SimplifyCFGOptions.h is moved to Scalar, and Utils/Local.h still
depends on it, we have a cycle.

4 years agoRevert "[NFC] SimplifyCFGOptions: drop multi-parameter ctor, use default member-init"
Adrian Kuegel [Thu, 16 Jul 2020 08:32:50 +0000 (10:32 +0200)]
Revert "[NFC] SimplifyCFGOptions: drop multi-parameter ctor, use default member-init"

This reverts commit 90c1b0442a031d6cad686fdc4e5d3db03c3603a6.
This is based on another commit which also needs to be reverted.
The other commit introduced a Dependency Cycle between Transforms/Scalar
and TransformUtils. Scalar already depends (in many ways) on
TransformUtils, so making TransformUtils depend on Scalar should be
avoided.

4 years ago[clangd] Fix a few gcc warnings [NFC]
Mikael Holmen [Thu, 16 Jul 2020 07:28:34 +0000 (09:28 +0200)]
[clangd] Fix a few gcc warnings [NFC]

4 years ago[MasmParser] Remove unused method emitStructValue to silence warning
Mikael Holmen [Thu, 16 Jul 2020 07:27:26 +0000 (09:27 +0200)]
[MasmParser] Remove unused method emitStructValue to silence warning

The method was added in bc8e262afe83 and has been unused ever since so
remove it to silence a gcc warning.

4 years ago[lldb] Desugar template specializations
Jaroslav Sevcik [Wed, 15 Jul 2020 07:18:20 +0000 (09:18 +0200)]
[lldb] Desugar template specializations

Template specializations are not handled in many of the
TypeSystemClang methods. For example, GetNumChildren does not handle
the TemplateSpecialization type class, so template specializations
always look like empty objects.

This patch just desugars template specializations in the existing
RemoveWrappingTypes desugaring helper.

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

4 years ago[X86] Allow lsl/lar to be parsed with a GR16, GR32, or GR64 as source register.
Craig Topper [Thu, 16 Jul 2020 06:50:29 +0000 (23:50 -0700)]
[X86] Allow lsl/lar to be parsed with a GR16, GR32, or GR64 as source register.

This matches GNU assembler behavior. Operand size is determined
only from the destination register.

4 years agoRevert "[InstCombine] Simplify boolean Phis with const inputs using CFG"
Max Kazantsev [Thu, 16 Jul 2020 05:58:39 +0000 (12:58 +0700)]
Revert "[InstCombine] Simplify boolean Phis with const inputs using CFG"

This reverts commit 00472067c34ccbceb2fad4b905524f3c780bb7d5.

Need to fix failing clang tests.

4 years ago[PowerPC][Power10] Fix VINS* (vector insert byte/half/word) instructions to have...
Amy Kwan [Thu, 16 Jul 2020 05:10:54 +0000 (00:10 -0500)]
[PowerPC][Power10] Fix VINS* (vector insert byte/half/word) instructions to have i32 arguments.

Previously, the vins* intrinsic was incorrectly defined to have its second and
third argument arguments as an i64. This patch fixes the second and third
argument of the vins* instruction and intrinsic to have i32s instead.

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

4 years ago[InstCombine] Simplify boolean Phis with const inputs using CFG
Max Kazantsev [Thu, 16 Jul 2020 05:04:01 +0000 (12:04 +0700)]
[InstCombine] Simplify boolean Phis with const inputs using CFG

This patch adds simplification for pattern:
```
  if (cond)
  /       \
 ...      ...
  \       /
p = phi [true] [false]
...
br p, succ_1, succ_2
```
If we can prove that top block's branches dominate respective
inputs of a block that has a Phi with constant inputs, we can
use the branch condition (maybe inverted) instead of Phi.
This will make proofs of implication for further jump threading
more transparent.

Differential Revision: https://reviews.llvm.org/D81375
Reviewed By: xbolva00

4 years agoRevert "[InstSimplify] Remove select ?, undef, X -> X and select ?, X, undef -> X...
Craig Topper [Thu, 16 Jul 2020 03:15:30 +0000 (20:15 -0700)]
Revert "[InstSimplify] Remove select ?, undef, X -> X and select ?, X, undef -> X transforms" and subsequent patches

This reverts most of the following patches due to reports of miscompiles.
I've left the added test cases with comments updated to be FIXMEs.

1cf6f210a2e [IR] Disable select ? C : undef -> C fold in ConstantFoldSelectInstruction unless we know C isn't poison.
469da663f2d [InstSimplify] Re-enable select ?, undef, X -> X transform when X is provably not poison
122b0640fc9 [InstSimplify] Don't fold vectors of partial undef in SimplifySelectInst if the non-undef element value might produce poison
ac0af12ed2f [InstSimplify] Add test cases for opportunities to fold select ?, X, undef -> X when we can prove X isn't poison
9b1e95329af [InstSimplify] Remove select ?, undef, X -> X and select ?, X, undef -> X transforms

4 years ago[flang][OpenMP] Enhance parser support for taskwait construct to OpenMP 5.0
Kiran Kumar T P [Thu, 16 Jul 2020 04:40:59 +0000 (10:10 +0530)]
[flang][OpenMP] Enhance parser support for taskwait construct to OpenMP 5.0

Summary:
This patch enhances parser support for taskwait construct to OpenMP 5.0.

2.17.5 taskwait Construct
        !$omp taskwait [clause[ [,] clause] ... ]
                where clause is one of the following:
                depend([depend-modifier,]dependence-type : locator-list)

The patch includes code changes and testcase modifications.

Reviewed By: Valentin Clement, Kiran Chandramohan

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

4 years agoStandardize `linalg.generic` on `args_in`/`args_out` instead of `inputCount`/`outputC...
Aden Grue [Thu, 16 Jul 2020 03:46:08 +0000 (03:46 +0000)]
Standardize `linalg.generic` on `args_in`/`args_out` instead of `inputCount`/`outputCount`

 This also fixes the outdated use of `n_views` in the documentation.

Reviewed By: nicolasvasilache

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

4 years agoFix lit test related to declare mapper patch D67833.
George Rokos [Thu, 16 Jul 2020 03:30:34 +0000 (20:30 -0700)]
Fix lit test related to declare mapper patch D67833.

4 years ago[AMDGPU] Update VMEM scalar write hazard mitigation sequence
Carl Ritson [Thu, 16 Jul 2020 02:07:26 +0000 (11:07 +0900)]
[AMDGPU] Update VMEM scalar write hazard mitigation sequence

Using s_waitcnt_depctr 0xffe3 is potentially faster than v_nop.

Reviewed By: rampitec, foad

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

4 years ago[libunwind] Fix getSLEB128 on large values
Ryan Prichard [Tue, 14 Jul 2020 05:06:47 +0000 (22:06 -0700)]
[libunwind] Fix getSLEB128 on large values

Previously, for large-enough values, getSLEB128 would attempt to shift
a signed int in the range [0..0x7f] by 28, 35, 42... bits, which is
undefined behavior and likely to fail.

Avoid shifting (-1ULL) by 70 for large values. e.g. For INT64_MAX, the
last two bytes will be:
 - 0x7f [bit==56]
 - 0x00 [bit==63]

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

4 years ago[libunwind] Fix CIE v1 return address parsing
Ryan Prichard [Tue, 14 Jul 2020 05:06:22 +0000 (22:06 -0700)]
[libunwind] Fix CIE v1 return address parsing

 - For CIE version 1 (e.g. in DWARF 2.0.0), the return_address_register
   field is a ubyte [0..255].

 - For CIE version 3 (e.g. in DWARF 3), the field is instead a ULEB128
   constant.

Previously, libunwind accepted a CIE version of 1 or 3, but always
parsed the field as ULEB128.

Clang always outputs CIE version 1 into .eh_frame. (It can output CIE
version 3 or 4, but only into .debug_frame.)

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

4 years ago[OpenMP 5.0] Codegen support to pass user-defined mapper functions to runtime
George Rokos [Thu, 16 Jul 2020 01:10:57 +0000 (18:10 -0700)]
[OpenMP 5.0] Codegen support to pass user-defined mapper functions to runtime

This patch implements the code generation to use OpenMP 5.0 declare mapper (a.k.a. user-defined mapper) constructs.
Patch written by Lingda Li.

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

4 years ago[OpenMP][Offload] Declare mapper runtime implementation
George Rokos [Wed, 15 Jul 2020 20:24:03 +0000 (13:24 -0700)]
[OpenMP][Offload] Declare mapper runtime implementation

Libomptarget patch adding runtime support for "declare mapper".
Patch co-developed by Lingda Li and George Rokos.

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

4 years ago[CalcSpillWeights] Propagate the fact that a live-interval is not spillable
Quentin Colombet [Thu, 16 Jul 2020 00:26:37 +0000 (17:26 -0700)]
[CalcSpillWeights] Propagate the fact that a live-interval is not spillable

When we calculate the weight of a live-interval, add some code to
check if the original live-interval was markied as not spillable and
if so, progagate that information down to the new interval.

Previously we would just recompute a weight for the new interval,
thus, we could in theory just spill live-intervals marked as not
spillable by just splitting them. That goes against the spirit of
a non-spillable live-interval.

E.g., previously we could do:
v1 =  // v1 must not be spilled
...
= v1

Split:
v1 = // v1 must not be spilled
...
v2 = v1 // v2 can be spilled
...
v3 = v2 // v3 can be spilled
= v3

There's no test case for that one as we would need to split a
non-spillable live-interval without using LiveRangeEdit to see this
happening.
RegAlloc inserts non-spillable intervals only as part of the spilling
mechanism, thus at this point the intervals are not splittable anymore.
On top of that, RegAlloc uses the LiveRangeEdit API, which already
properly propagate that information.

In other words, this could only happen if a target was to mark
a live-interval as not spillable before register allocation and
split it without using LRE, e.g., through
LiveIntervals::splitSeparateComponent.

4 years ago[AMDGPU][CostModel] Improve cost estimation for fused {fadd|fsub}(a,fmul(b,c))
dfukalov [Wed, 15 Jul 2020 23:25:01 +0000 (02:25 +0300)]
[AMDGPU][CostModel] Improve cost estimation for fused {fadd|fsub}(a,fmul(b,c))

Summary:
If result of fmul(b,c) has one use, in almost all cases (except denormals are
IEEE) the pair of operations will be fused in one fma/mad/mac/etc.

Reviewers: rampitec

Reviewed By: rampitec

Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits, kerbowa

Tags: #llvm

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

4 years ago[NFC] SimplifyCFGOptions: drop multi-parameter ctor, use default member-init
Roman Lebedev [Wed, 15 Jul 2020 22:39:37 +0000 (01:39 +0300)]
[NFC] SimplifyCFGOptions: drop multi-parameter ctor, use default member-init

Likewise, just use the builder pattern.
Taking multiple params is unmaintainable.

4 years ago[lldb/Test] Skip async process connect tests with reproducers
Jonas Devlieghere [Wed, 15 Jul 2020 22:39:24 +0000 (15:39 -0700)]
[lldb/Test] Skip async process connect tests with reproducers

Reproducers only support synchronous mode.

4 years agoAdd missing include
Adrian Prantl [Wed, 15 Jul 2020 22:25:50 +0000 (15:25 -0700)]
Add missing include

4 years ago[LLDB] Disable lldb-vscode test_terminate_commands test on Arm
Muhammad Omair Javaid [Wed, 15 Jul 2020 22:06:53 +0000 (03:06 +0500)]
[LLDB] Disable lldb-vscode test_terminate_commands test on Arm

Summary:
test_terminate_commands is flaky on LLDB Arm buildbot as well. It was already
being skipped for aarch64. I am going to mark it skipped for Arm too.

Tags: #lldb

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

4 years ago[NFCI] createCFGSimplificationPass(): migrate to also take SimplifyCFGOptions
Roman Lebedev [Wed, 15 Jul 2020 22:19:17 +0000 (01:19 +0300)]
[NFCI] createCFGSimplificationPass(): migrate to also take SimplifyCFGOptions

Taking so many parameters is simply unmaintainable.

We don't want to include the entire llvm/Transforms/Utils/Local.h into
llvm/Transforms/Scalar.h so i've split SimplifyCFGOptions into
it's own header.

4 years ago[NFCI] CFGSimplifyPass: change (the only) constructor to take SimplifyCFGOptions
Roman Lebedev [Wed, 15 Jul 2020 21:48:36 +0000 (00:48 +0300)]
[NFCI] CFGSimplifyPass: change (the only) constructor to take SimplifyCFGOptions

Taking that long list of parameters is already simply unmaintainable.

4 years ago[X86] Teach assembler parser to accept lsl and lar with a 64 or 32 source register...
Craig Topper [Wed, 15 Jul 2020 22:14:46 +0000 (15:14 -0700)]
[X86] Teach assembler parser to accept lsl and lar with a 64 or 32 source register when the destination is a 64 register.

Previously we only accepted a 32-bit source with a 64-bit dest.

Accepting 64-bit as well is more consistent with gas behavior. I
think maybe we should accept 16 bit register as well, but I'm not
sure.

4 years ago[flang] Don't use-associate intrinsics
Tim Keith [Wed, 15 Jul 2020 22:08:07 +0000 (15:08 -0700)]
[flang] Don't use-associate intrinsics

When an intrinsic is referenced in a module scope, a symbol for it is
added. When that module is USEd, the intrinsic should not be included.
Otherwise we can get ambiguous reference errors with the same intrinsic
coming from two difference modules.

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

4 years ago[CodeGen] Emit a call instruction instead of an invoke if the called
Akira Hatanaka [Wed, 15 Jul 2020 21:47:45 +0000 (14:47 -0700)]
[CodeGen] Emit a call instruction instead of an invoke if the called
llvm function is marked nounwind

This fixes cases where an invoke is emitted, despite the called llvm
function being marked nounwind, because ConstructAttributeList failed to
add the attribute to the attribute list. llvm optimization passes turn
invokes into calls and optimize away the exception handling code, but
it's better to avoid emitting the code in the front-end if the called
function is known not to raise an exception.

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

4 years ago[NFC][SimplifyCFG] HoistThenElseCodeToIf(): after hoisting terminator, do return...
Roman Lebedev [Wed, 15 Jul 2020 21:27:36 +0000 (00:27 +0300)]
[NFC][SimplifyCFG] HoistThenElseCodeToIf(): after hoisting terminator, do return Changed, not just true

Otherwise, if Changed was still false before that,
we would not account for that hoist in NumHoistCommonCode statistic.

4 years ago[MLIR] Add RegionKindInterface
Stephen Neuendorffer [Fri, 15 May 2020 17:33:13 +0000 (10:33 -0700)]
[MLIR] Add RegionKindInterface

Some dialects have semantics which is not well represented by common
SSA structures with dominance constraints.  This patch allows
operations to declare the 'kind' of their contained regions.
Currently, two kinds are allowed: "SSACFG" and "Graph".  The only
difference between them at the moment is that SSACFG regions are
required to have dominance, while Graph regions are not required to
have dominance.  The intention is that this Interface would be
generated by ODS for existing operations, although this has not yet
been implemented. Presumably, if someone were interested in code
generation, we might also have a "CFG" dialect, which defines control
flow, but does not require SSA.

The new behavior is mostly identical to the previous behavior, since
registered operations without a RegionKindInterface are assumed to
contain SSACFG regions.  However, the behavior has changed for
unregistered operations.  Previously, these were checked for
dominance, however the new behavior allows dominance violations, in
order to allow the processing of unregistered dialects with Graph
regions.  One implication of this is that regions in unregistered
operations with more than one op are no longer CSE'd (since it
requires dominance info).

I've also reorganized the LangRef documentation to remove assertions
about "sequential execution", "SSA Values", and "Dominance".  Instead,
the core IR is simply "ordered" (i.e. totally ordered) and consists of
"Values".  I've also clarified some things about how control flow
passes between blocks in an SSACFG region. Control Flow must enter a
region at the entry block and follow terminator operation successors
or be returned to the containing op.  Graph regions do not define a
notion of control flow.

see discussion here:
https://llvm.discourse.group/t/rfc-allowing-dialects-to-relax-the-ssa-dominance-condition/833/53

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

4 years ago[NFC][SimplifyCFG] HoistThenElseCodeToIf(): count number of common instruction "block...
Roman Lebedev [Wed, 15 Jul 2020 21:10:20 +0000 (00:10 +0300)]
[NFC][SimplifyCFG] HoistThenElseCodeToIf(): count number of common instruction "blocks" hoisted

I.e. out of all the times HoistThenElseCodeToIf() was called,
how many times did it actually hoist something?

4 years ago[NFC][SimplifyCFG] HoistThenElseCodeToIf(): count number of common instructions hoisted
Roman Lebedev [Wed, 15 Jul 2020 21:05:25 +0000 (00:05 +0300)]
[NFC][SimplifyCFG] HoistThenElseCodeToIf(): count number of common instructions hoisted

4 years ago[NFC][SimplifyCFG] SinkCommonCodeFromPredecessors(): count number of instruction...
Roman Lebedev [Wed, 15 Jul 2020 20:55:15 +0000 (23:55 +0300)]
[NFC][SimplifyCFG] SinkCommonCodeFromPredecessors(): count number of instruction "blocks" actually sunk

Out of all the times the function was called,
how many times did we actually sink anything?

4 years ago[NFC][SimplifyCFG] SinkCommonCodeFromPredecessors(): add debug output when failing...
Roman Lebedev [Wed, 15 Jul 2020 20:48:31 +0000 (23:48 +0300)]
[NFC][SimplifyCFG] SinkCommonCodeFromPredecessors(): add debug output when failing to actually sink instr

4 years ago[NFC][SimplifyCFG] SinkCommonCodeFromPredecessors(): early return if nothing to sink
Roman Lebedev [Wed, 15 Jul 2020 20:46:35 +0000 (23:46 +0300)]
[NFC][SimplifyCFG] SinkCommonCodeFromPredecessors(): early return if nothing to sink

If we can't sink even one instruction, early return, to increase readability.

4 years ago[NFC][SimplifyCFG] Rename statistic NumSinkCommons into NumSinkCommonInstrs
Roman Lebedev [Wed, 15 Jul 2020 20:42:40 +0000 (23:42 +0300)]
[NFC][SimplifyCFG] Rename statistic NumSinkCommons into NumSinkCommonInstrs

It really counts instructions added into common block,
not number of instruction groups sunk.

4 years ago[NFC][LoopRotate] Add a statistic for how many times rotation failed due to the heade...
Roman Lebedev [Wed, 15 Jul 2020 20:38:43 +0000 (23:38 +0300)]
[NFC][LoopRotate] Add a statistic for how many times rotation failed due to the header size

4 years ago[jitlink] Adding support for PCRel32GOTLoad in ELF x86 for the jitlinker
Jared Wyles [Tue, 14 Jul 2020 06:57:59 +0000 (16:57 +1000)]
[jitlink] Adding support for PCRel32GOTLoad in ELF x86 for the jitlinker

Summary: This adds the basic support for GOT in elf x86.
Was able to just get away using the macho code by generalising the edges.
There will be a follow up patch to turn that into a generic utility for both of the x86 and Mach-O code.

This patch also lands support for relocations relative to symbol.

Reviewers: lhames

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

4 years agoDocument the testing of Analyses in the LLVM testing guide (NFC)
Mehdi Amini [Wed, 15 Jul 2020 21:11:39 +0000 (21:11 +0000)]
Document the testing of Analyses in the LLVM testing guide (NFC)

This came up in a recent review, someone was wondering were was
this all documented and I couldn't find a reference to provide.

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

4 years agoClarify a bit the guideline on omitting braces, including more examples (NFC)
Mehdi Amini [Wed, 15 Jul 2020 21:11:30 +0000 (21:11 +0000)]
Clarify a bit the guideline on omitting braces, including more examples (NFC)

Like most readability rules, it isn't absolute and there is a matter of taste
to it. I think more recent part of the project may be more consistent in the
current application of the guideline. I suspect sources like
mlir/lib/Dialect/StandardOps/IR/Ops.cpp may be examples of this at the moment.

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

4 years ago[lldb/Test] Remove custom tearDownHooks from GDB Remote tests
Jonas Devlieghere [Wed, 15 Jul 2020 16:59:54 +0000 (09:59 -0700)]
[lldb/Test] Remove custom tearDownHooks from GDB Remote tests

Remove custom tearDownHooks from GDB Remote tests as we now cleanup
subprocesses unconditionally. This also changes the termination order to
be the reverse of the creation order. I don't think anything is relying
on that right now, but it better fits the setup/teardown paradigm.

4 years ago[NFC] [AIX] [z/OS] Fix build failure on AIX and z/OS
Abhina Sreeskantharajan [Wed, 15 Jul 2020 18:00:57 +0000 (14:00 -0400)]
[NFC] [AIX] [z/OS] Fix build failure on AIX and z/OS

Summary: This PR contains a build failure fix that occurs on both AIX and z/OS as a result of this commit https://reviews.llvm.org/rG670915094462d831e3733e5b01a76471b8cf6dd8.

Reviewers: uweigand, Kai, hubert.reinterpretcast, daltenty, lhames

Reviewed By: Kai, hubert.reinterpretcast, daltenty

Subscribers: SeanP, hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[flang] Fix erroneous application of SAVE statement
Tim Keith [Wed, 15 Jul 2020 20:02:32 +0000 (13:02 -0700)]
[flang] Fix erroneous application of SAVE statement

A SAVE statement with no entity list applies the SAVE attribute only to
the entities that it is allowed on. We were applying it to automatic
data objects and reporting an error that they can't have SAVE.

The fix is to change `DeclarationVisitor::CheckSaveAttr` to check for
automatic objects. That controls both checking and setting the
attribute. This allows us to remove the check from `CheckSpecExpr`
(along with `symbolBeingChecked_`). Also, it was only called on constant
objects so the non-const overload can be eliminated.

The check in `CheckSpecExpr` is replaced by an explicit check for
automatic objects in modules. This caught an error in modfile03.f90 so
that part of the test was eliminated.

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

4 years ago[LoopUnroll] Update branch weight for remainder loop
Hongtao Yu [Sun, 5 Jul 2020 03:24:11 +0000 (20:24 -0700)]
[LoopUnroll] Update branch weight for remainder loop

Unrolling a loop with compile-time unknown trip count results in a remainder loop. The remainder loop executes the remaining iterations of the original loop when the original trip count is not a multiple of the unroll factor. For better profile counts maintenance throughout the optimization pipeline, I'm assigning an artificial weight to the latch branch of the remainder loop.

A remainder loop runs up to as many times as the unroll factor subtracted by 1. Therefore I'm assigning the maximum possible trip count as the back edge weight. This should be more accurate than the default non-profile weight, which assumes the back edge runs much more frequently than the exit edge.

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

4 years ago[OPENMP]Fix PR46593: Reduction initializer missing construnctor call.
Alexey Bataev [Tue, 7 Jul 2020 18:52:45 +0000 (14:52 -0400)]
[OPENMP]Fix PR46593: Reduction initializer missing construnctor call.

Summary:
If user-defined reductions with the initializer are used with classes,
the compiler misses the constructor call when trying to create a private
copy of the reduction variable.

Reviewers: jdoerfert

Subscribers: cfe-commits, yaxunl, guansong, caomhin

Tags: #clang

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

4 years ago[NFC] Fixed typo in tests parameters
dfukalov [Wed, 15 Jul 2020 15:55:56 +0000 (18:55 +0300)]
[NFC] Fixed typo in tests parameters

Summary:
llc reports `fp32-denormals` is not recognized. I guess it was intended to be
`-denormal-fp-math-f32={preserve-sign|ieee} -mattr=+mad-mac-f32-insts`

Reviewers: rampitec

Reviewed By: rampitec

Subscribers: jvesely, nhaehnle, llvm-commits, kerbowa

Tags: #llvm

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

4 years ago[MLIR][NFC] Fix clang tidy warnings in misc utilities
Uday Bondhugula [Wed, 15 Jul 2020 10:41:08 +0000 (16:11 +0530)]
[MLIR][NFC] Fix clang tidy warnings in misc utilities

Fix clang tidy warnings in misc utilities - missing const or a star in
declaration.

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

4 years ago[OPENMP]Fix PR46688: cast the type of the allocated variable to the initial one.
Alexey Bataev [Mon, 13 Jul 2020 16:56:18 +0000 (12:56 -0400)]
[OPENMP]Fix PR46688: cast the type of the allocated variable to the initial one.

Summary:
If the original variable is marked for allocation in the different
address space using #pragma omp allocate, need to cast the allocated
variable to its original type with the original address space.
Otherwise, the compiler may crash trying to bitcast the type of the new
allocated variable to the original type in some cases, like passing this
variable as an argument in function calls.

Reviewers: jdoerfert

Subscribers: jholewinski, cfe-commits, yaxunl, guansong, caomhin

Tags: #clang

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

4 years ago[PGO][PGSO] Add profile guided size optimization to loop vectorization legality.
Hiroshi Yamauchi [Tue, 7 Jul 2020 18:26:25 +0000 (11:26 -0700)]
[PGO][PGSO] Add profile guided size optimization to loop vectorization legality.

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

4 years ago[lldb][NFC] Add 'override' where missing in source/ and tools/
Logan Smith [Wed, 15 Jul 2020 18:33:15 +0000 (11:33 -0700)]
[lldb][NFC] Add 'override' where missing in source/ and tools/

These were found by Clang's new -Wsuggest-override.

This patch doesn't touch any code in unittests/, since much of it intentionally doesn't use override to avoid massive warning spam from -Winconsistent-missing-override due to the use of MOCK_*** macros.

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

4 years agoFix "unused variable" warning from recent GCC.
Richard Smith [Wed, 15 Jul 2020 18:33:07 +0000 (11:33 -0700)]
Fix "unused variable" warning from recent GCC.

4 years ago[MLIR] Add type checking capability to RegionBranchOpInterface
Rahul Joshi [Wed, 15 Jul 2020 18:12:38 +0000 (11:12 -0700)]
[MLIR] Add type checking capability to RegionBranchOpInterface

- Add function `verifyTypes` that Op's can call to do type checking verification
  along the control flow edges described the Op's RegionBranchOpInterface.
- We cannot rely on the verify methods on the OpInterface because the interface
  functions assume valid Ops, so they may crash if invoked on unverified Ops.
  (For example, scf.for getSuccessorRegions() calls getRegionIterArgs(), which
  dereferences getBody() block. If the scf.for is invalid with no body, this
  can lead to a segfault). `verifyTypes` can be called post op-verification to
  avoid this.

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

4 years ago[InstCombine] prevent infinite looping in or-icmp fold (PR46712)
Sanjay Patel [Wed, 15 Jul 2020 18:09:46 +0000 (14:09 -0400)]
[InstCombine] prevent infinite looping in or-icmp fold (PR46712)

I'm not sure if the test is truly minimal, but we need to
induce a situation where a value becomes a constant but is
not immediately folded before getting to the 'or' transform.

4 years ago[InstCombine] update datalayout in test file; NFC
Sanjay Patel [Wed, 15 Jul 2020 17:32:59 +0000 (13:32 -0400)]
[InstCombine] update datalayout in test file; NFC

We need to specify legal integer widths to trigger PR46712,
so add those here. This doesn't appear to affect any existing
tests, and it's not clear why a datalayout would not include
any legal integer widths.

While here, change some variable names that include 'tmp' to
avoid warnings from the auto-generating script for CHECK lines.

4 years ago[gn build] Port 4a539faf74b
LLVM GN Syncbot [Wed, 15 Jul 2020 17:53:38 +0000 (17:53 +0000)]
[gn build] Port 4a539faf74b

4 years ago[PGO] Extend the value profile buckets for mem op sizes.
Hiroshi Yamauchi [Thu, 25 Jun 2020 19:19:30 +0000 (12:19 -0700)]
[PGO] Extend the value profile buckets for mem op sizes.

Extend the memop value profile buckets to be more flexible (could accommodate a
mix of individual values and ranges) and to cover more value ranges (from 11 to
22 buckets).

Disabled behind a flag (to be enabled separately) and the existing code to be
removed later.

4 years ago[PGO][PGSO] Add profile guided size optimization to LegalizeDAG.
Hiroshi Yamauchi [Tue, 7 Jul 2020 18:13:55 +0000 (11:13 -0700)]
[PGO][PGSO] Add profile guided size optimization to LegalizeDAG.

Reviewers: davidxl

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[mlir][shape] Fold shape.broadcast with one scalar operand
Stephan Herhut [Wed, 15 Jul 2020 07:25:39 +0000 (09:25 +0200)]
[mlir][shape] Fold shape.broadcast with one scalar operand

This folds shape.broadcast where at least one operand is a scalar to the
other operand.

Also add an assemblyFormat for shape.broadcast and shape.concat.

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

4 years ago[AMDGPU][MC] Corrected MTBUF parsing and decoding
Dmitry Preobrazhensky [Wed, 15 Jul 2020 16:44:07 +0000 (19:44 +0300)]
[AMDGPU][MC] Corrected MTBUF parsing and decoding

MTBUF implementation has many issues and this change addresses most of these:
- refactored duplicated code;
- hardcoded constants moved out of high-level code;
- fixed a decoding error when nfmt or dfmt are zero (bug 36932);
- corrected parsing of operand separators (bug 46403);
- corrected handling of missing operands (bug 46404);
- corrected handling of out-of-range modifiers (bug 46421);
- corrected default value (bug 46467).

Reviewers: arsenm, rampitec, vpykhtin, artem.tamazov, kzhuravl

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

4 years ago[NPM][IVUsers] Rename ivusers -> iv-users
Arthur Eubanks [Wed, 15 Jul 2020 16:34:44 +0000 (09:34 -0700)]
[NPM][IVUsers] Rename ivusers -> iv-users

 LPM passes were named iv-users, which seems nicer than ivusers.

Reviewed By: hans

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

4 years ago[mlir][shape] Mark some operations as commutative
Stephan Herhut [Wed, 15 Jul 2020 07:31:48 +0000 (09:31 +0200)]
[mlir][shape] Mark some operations as commutative

Summary:
This makes sure that their constant arguments are sorted to the back
and hence eases the specification of rewrite patterns.

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

4 years ago[CMake][runtimes] Pass the CMAKE_ARGS to runtimes build correctly
Petr Hosek [Wed, 15 Jul 2020 02:24:22 +0000 (19:24 -0700)]
[CMake][runtimes] Pass the CMAKE_ARGS to runtimes build correctly

We were relying on CMAKE_ARGS argument to be passed to subbuild, but
this argument was never properly defined. This patch addresses that.

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

4 years ago[lldb][test] Prevent infinite loop while looking for use_lldb_suite_root.py.
Jordan Rupprecht [Wed, 15 Jul 2020 16:16:30 +0000 (09:16 -0700)]
[lldb][test] Prevent infinite loop while looking for use_lldb_suite_root.py.

Several scripts (two copies of use_lldb_suite.py, and an __init__.py) look for use_lldb_suite_root.py by checking parent directories. If for some reason it doesn't exist, it keeps checking parent directories until it finds it.

However, this only breaks when the parent directory is None, but at least on Linux, dirname('/') == '/', so this will never be None.

This changes the lookup to stop if the dirname(lldb_root) is unchanged. This was previously fixed in 67f6d842fab6d3ac8c949721be8e131cf6b17578, but only in one copy of this script.

Additionally, this makes the failure mode more visible -- if the root is not found, it complains loudly instead of silently failing, and having later modules that need lldb_root fail.

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

4 years ago[MLIR][Standard] Update `assert` documentation post commit
Frederik Gossen [Wed, 15 Jul 2020 16:13:10 +0000 (16:13 +0000)]
[MLIR][Standard] Update `assert` documentation post commit

Update line wrapping.

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

4 years ago[NFC] Add float aggregate ABI test for PowerPC
Qiu Chaofan [Wed, 15 Jul 2020 16:05:25 +0000 (00:05 +0800)]
[NFC] Add float aggregate ABI test for PowerPC

4c5a93bd landed adjustment to handle C++20 no_unique_address attribute
correctly, clang treats empty members in aggregate type differently if
having this attribute. This commit adds necessary test for PowerPC
target to reflect this change.

4 years ago[Legalize] Hoist invariant condition in ExpandVectorBuildThroughStack(...)
Cameron McInally [Wed, 15 Jul 2020 16:04:22 +0000 (11:04 -0500)]
[Legalize] Hoist invariant condition in ExpandVectorBuildThroughStack(...)

The operands of a BUILD_VECTOR must all have the same type, so we can hoist this invariant condition out of the loop.

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

4 years ago[lldb/Test] Remove support for forking a subprocess from the test suite.
Jonas Devlieghere [Wed, 15 Jul 2020 15:51:24 +0000 (08:51 -0700)]
[lldb/Test] Remove support for forking a subprocess from the test suite.

Remove the forkSubprocess method and its bookkeeping.
TestCreateAfterAttach is the only test using the fork method and I'm not
convinced it adds enough to warrant the maintenance. Pavel suggested the
same thing in D83815.

4 years agoRevert "[TSan] Optimize handling of racy address"
Joachim Protze [Wed, 15 Jul 2020 15:39:30 +0000 (17:39 +0200)]
Revert "[TSan] Optimize handling of racy address"

This reverts commit 00e3a1ddec95c0b48ce216220d7e3481dab3bc78.
The commit broke most build bots, investigating.

4 years ago[MLIR][Shape] Fix `shape_of` lowering to `scf`
Frederik Gossen [Wed, 15 Jul 2020 15:37:13 +0000 (15:37 +0000)]
[MLIR][Shape] Fix `shape_of` lowering to `scf`

The use of the `scf.for` callback builder does not allow for a rollback of the
emitted conversions. Instead, we populate the loop body through the conversion
rewriter directly.

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

4 years ago[HardwareLoops] Add sibling loop test.
David Green [Wed, 15 Jul 2020 13:49:57 +0000 (14:49 +0100)]
[HardwareLoops] Add sibling loop test.

This missed being part of 9e03547cab69.

4 years ago[OpenMP][Docs] Update `present` map type modifier status
Joel E. Denny [Wed, 15 Jul 2020 15:17:00 +0000 (11:17 -0400)]
[OpenMP][Docs] Update `present` map type modifier status

4 years ago[TSan] Optimize handling of racy address
Joachim Protze [Wed, 15 Jul 2020 14:45:27 +0000 (16:45 +0200)]
[TSan] Optimize handling of racy address

This patch splits the handling of racy address and racy stack into separate
functions. If a race was already reported for the address, we can avoid the
cost for collecting the involved stacks.

This patch also removes the race condition in storing the racy address / racy
stack. This race condition allowed all threads to report the race.

This patch changes the transitive suppression of reports. Previously
suppression could transitively chain memory location and racy stacks.
Now racy memory and racy stack are separate suppressions.

Reviewed by: dvyukov

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

4 years agoRevert "[lldb] Use the basename of the Python test for the log name instead of the...
Raphael Isemann [Wed, 15 Jul 2020 14:26:37 +0000 (16:26 +0200)]
Revert "[lldb] Use the basename of the Python test for the log name instead of the class name"

This reverts commit 29aab9b5c748b28b231e2ca0f9b95453638ade1a.

It seems on Windows the file name is just always "lldbsuite.test.lldbtest" for
all tests and that breaks pretty much everything. Reverting until we have
a better solution.

4 years agoCodeGenPrep: remove AssertingVH references before deleting dead instructions.
Tim Northover [Wed, 15 Jul 2020 08:49:49 +0000 (09:49 +0100)]
CodeGenPrep: remove AssertingVH references before deleting dead instructions.

CodeGenPrepare keeps fairly close track of various instructions it's
seen, particularly GEPs, in maps and vectors. However, sometimes those
instructions become dead and get removed while it's still executing.
This triggers AssertingVH references to them in an asserts build and
could lead to miscompiles in a release build (I've only seen a later
segfault though).

So this patch adds a callback to
RecursivelyDeleteTriviallyDeadInstructions which can make sure the
instruction about to be deleted is removed from CodeGenPrepare's data
structures.

4 years ago[lldb/test] Remove JOIN_CMD from Makefile.rules
Pavel Labath [Wed, 15 Jul 2020 13:42:00 +0000 (15:42 +0200)]
[lldb/test] Remove JOIN_CMD from Makefile.rules

It's possible to achieve the same effect by providing multi-step recipe
instead of a single-step recipe where the step happens to contain
multiple commands.

4 years ago[lldb] Delete useless assertion
Pavel Labath [Wed, 15 Jul 2020 13:42:53 +0000 (15:42 +0200)]
[lldb] Delete useless assertion

It served a puprose while we were using the test name to provide a name
for the created file. Now that the files are created in memory, we don't
need that.

4 years ago[clangd] Use llvm::errs() instead of outs() for errors
Kirill Bobyrev [Wed, 15 Jul 2020 12:34:23 +0000 (14:34 +0200)]
[clangd] Use llvm::errs() instead of outs() for errors

Summary: errs() is more appropriate for error messages in dexp and clangd-index-server.

Reviewers: sammccall

Reviewed By: sammccall

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

Tags: #clang

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

4 years ago[lldb] Make expect_expr fall back to the dummy target if no target is selected
Raphael Isemann [Wed, 15 Jul 2020 11:55:32 +0000 (13:55 +0200)]
[lldb] Make expect_expr fall back to the dummy target if no target is selected

Summary:

Currently expect_expr will not run the expression if no target is selected. This
patch changes this behavior so that expect_expr will instead fall back to the
dummy target similar to what the `expression` command is doing. This way we
don't have to compile an empty executable to be able to use `expect_expr` (which
is a waste of resources for tests that just test generic type system features).

As a test I modernized the TestTypeOfDeclTypeExpr into a Python test +
expect_expr (as it relied on the dummy target fallback of the expression
command).

Reviewers: labath, JDevlieghere

Reviewed By: labath

Subscribers: abidh

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

4 years ago[lldb] Use the basename of the Python test for the log name instead of the class...
Raphael Isemann [Wed, 15 Jul 2020 11:53:44 +0000 (13:53 +0200)]
[lldb] Use the basename of the Python test for the log name instead of the class name

Summary:

From what I know we already have the restriction that every test in the test
suite needs to have a unique file name as that's used for generating the unique
build directory for a test. It seems there is also a restriction that every test
case class in the test suite needs to have a unique name as that's used to
generate the unique log file name for the test run.

This changes the log file format to use the basename of the test file instead so
that we only have to keep worrying about the 'unique file name' restriction from
now on.

This came up because I started naming the test classes "TestCase" (as repeating
the file name in the test class seems like redudant information that just makes
renaming tests a pain).

Reviewers: labath, JDevlieghere

Reviewed By: labath

Subscribers: mgorny, abidh

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

4 years ago[mips] Rename FeatureMadd4 to FeatureNoMadd4. NFC
YunQiang Su [Wed, 15 Jul 2020 09:11:36 +0000 (12:11 +0300)]
[mips] Rename FeatureMadd4 to FeatureNoMadd4. NFC

`FeatureMadd4` is used to disable `madd4`, and the corresponding feature
option is `(+-)nomadd4`. Renaming to the `FeatureNoMadd4` makes its
purpose clear.

Patch by YunQiang Su.

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

4 years ago[RISCV] Add matching of codegen patterns to RISCV Bit Manipulation Zbt asm instructions
lewis-revill [Wed, 15 Jul 2020 10:59:47 +0000 (11:59 +0100)]
[RISCV] Add matching of codegen patterns to RISCV Bit Manipulation Zbt asm instructions

This patch provides optimization of bit manipulation operations by
enabling the +experimental-b target feature.
It adds matching of single block patterns of instructions to specific
bit-manip instructions from the ternary subset (zbt subextension) of the
experimental B extension of RISC-V.
It adds also the correspondent codegen tests.

This patch is based on Claire Wolf's proposal for the bit manipulation
extension of RISCV:
https://github.com/riscv/riscv-bitmanip/blob/master/bitmanip-0.92.pdf

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

4 years ago[RISCV] Add matching of codegen patterns to RISCV Bit Manipulation Zbs asm instructions
lewis-revill [Wed, 15 Jul 2020 10:57:29 +0000 (11:57 +0100)]
[RISCV] Add matching of codegen patterns to RISCV Bit Manipulation Zbs asm instructions

This patch provides optimization of bit manipulation operations by
enabling the +experimental-b target feature.
It adds matching of single block patterns of instructions to specific
bit-manip instructions from the single-bit subset (zbs subextension) of
the experimental B extension of RISC-V.
It adds also the correspondent codegen tests.

This patch is based on Claire Wolf's proposal for the bit manipulation
extension of RISCV:
https://github.com/riscv/riscv-bitmanip/blob/master/bitmanip-0.92.pdf

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