OSDN Git Service

android-x86/external-llvm-project.git
4 years agoRevert "[NFC] Factor out function to detect if an attribute has an argument."
Tyker [Sun, 2 Feb 2020 14:03:06 +0000 (15:03 +0100)]
Revert "[NFC] Factor out function to detect if an attribute has an argument."

This reverts commit ff1b9add2ffd47abc649895e33b3e5c30d6f2079.

4 years ago[NFC] Factor out function to detect if an attribute has an argument.
Tyker [Sun, 2 Feb 2020 13:47:00 +0000 (14:47 +0100)]
[NFC] Factor out function to detect if an attribute has an argument.

Reviewers: jdoerfert

Reviewed By: jdoerfert

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[WIP] Build assume from call
Tyker [Sun, 2 Feb 2020 13:46:59 +0000 (14:46 +0100)]
[WIP] Build assume from call

Summary:
this is part of the implementation of http://lists.llvm.org/pipermail/llvm-dev/2019-December/137632.html

this patch gives the basis of building an assume to preserve all information from an instruction and add support for building an assume that preserve the information from a call.

Reviewers: jdoerfert

Reviewed By: jdoerfert

Subscribers: mgrang, fhahn, mgorny, hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[NFC] Refactor TableGen for attributes
Tyker [Sun, 2 Feb 2020 13:46:50 +0000 (14:46 +0100)]
[NFC] Refactor TableGen for attributes

Summary:
this patch makes tablegen generate llvm attributes in a more generic and simpler (at least to me).

changes:  make tablegen generate
...
ATTRIBUTE_ENUM(Alignment,align)
ATTRIBUTE_ENUM(AllocSize,allocsize)
...
which can be used to generate most of what was previously used and more.

Tablegen was also generating attributes from 2 identical files leading to identical output. so I removed one of them and made user use the other.

Reviewers: jdoerfert, thakis, aaron.ballman

Reviewed By: aaron.ballman

Subscribers: mgorny, hiraditya, llvm-commits

Tags: #llvm

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

4 years agoRevert "[ARM][MVE] VPT Blocks: findVCMPToFoldIntoVPS"
David Green [Sun, 2 Feb 2020 13:24:05 +0000 (13:24 +0000)]
Revert "[ARM][MVE] VPT Blocks: findVCMPToFoldIntoVPS"

This reverts commit e34801c8e6df and the followup due to multiple
problems.

I've tried to keep the tests and RDA parts where possible, as those
still seem useful.

4 years ago[Transforms] Simplify with make_early_inc_range
Fangrui Song [Sun, 2 Feb 2020 07:57:22 +0000 (23:57 -0800)]
[Transforms] Simplify with make_early_inc_range

4 years ago[DebugInfo] Merge DebugInfoFinder::{processDeclare,processValue} into processVariable
Fangrui Song [Sun, 2 Feb 2020 06:59:51 +0000 (22:59 -0800)]
[DebugInfo] Merge DebugInfoFinder::{processDeclare,processValue} into processVariable

The two functions are identical.

4 years ago[mlir] Expand shape functions in ShapeInference doc
Jacques Pienaar [Tue, 28 Jan 2020 20:05:54 +0000 (12:05 -0800)]
[mlir] Expand shape functions in ShapeInference doc

Summary:
Start filling in some requirements for the shape function descriptions
that will be used to derive shape computations. This requiement part may
later be reworked to be part of the "context" section of shape dialect. Without
examples this may be a bit too abstract but I hope not (given mappings to
existing shape functions).

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

4 years ago[PatchableFunction] Use an empty DebugLoc
Fangrui Song [Sat, 1 Feb 2020 21:28:19 +0000 (13:28 -0800)]
[PatchableFunction] Use an empty DebugLoc

The current FirstMI.getDebugLoc() is actually null in almost all cases.
If it isn't, the generated .loc will be considered initial. The .loc
will have the prologue_end flag and terminate the prologue prematurely.

Also use an overload of BuildMI that will not prepend
PATCHABLE_FUNCTION_ENTRY to a MachineInstr bundle.

4 years ago[ADT] 'PointerUnion::is' returns 'bool'
Brian Gesiak [Sat, 1 Feb 2020 20:03:54 +0000 (15:03 -0500)]
[ADT] 'PointerUnion::is' returns 'bool'

Summary:
The return type of 'PointerUnion::is' has been 'int' since it was first
added in March 2009, in SVN r67987, or
https://github.com/llvm/llvm-project/commit/a9c6de15fb3.

The only other change to this member function was a clang-format applied
in December 2015, in SVN r256513, or
https://github.com/llvm/llvm-project/commit/548a49aacc0.

However, since the return value is the result of a `==` comparison, an
implicit cast must be made converting the boolean result to an `int`.
Change the return type to `bool` to remove the need for such a cast.

Test Plan:
I ran llvm-project `check-all` under ASAN, no failures were reported
(other than obviously unrelated tests that were already failing in
ASAN buildbots).

Reviewers: gribozavr, gribozavr2, rsmith, bkramer, dblaikie

Subscribers: dexonsmith, llvm-commits

Tags: #llvm

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

4 years agoAMDGPU/GFX10: Fix NSA reassign pass when operands are undef
Nicolai Hähnle [Sat, 1 Feb 2020 14:12:24 +0000 (15:12 +0100)]
AMDGPU/GFX10: Fix NSA reassign pass when operands are undef

Summary:
Virtual registers that are undef have an empty LiveInterval at this
point, which means beginIndex() and endIndex() cannot be used. We
only need those indices to determine the range in which to scan for
affected other NSA instructions, and undef operands cannot contribute
to that range.

Reviewers: arsenm, rampitec, mareko

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

Tags: #llvm

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

4 years ago[clang][driver] Remove an unused parameter. NFC.
Michael Liao [Sat, 1 Feb 2020 21:16:17 +0000 (16:16 -0500)]
[clang][driver] Remove an unused parameter. NFC.

- Group relevant code together.

4 years ago[X86] In X86FastEmitSSESelect, fall back to SelectionDAG if the inputs to the compare...
Craig Topper [Sat, 1 Feb 2020 20:24:53 +0000 (12:24 -0800)]
[X86] In X86FastEmitSSESelect, fall back to SelectionDAG if the inputs to the compare can't be found in registers.

We were checking that the original Value * for the compare operands
were null. But that can never happen.

I believe we intended to check for 0 registers here instead.

Fixes PR44749.

4 years ago[X86] Don't exit from foldOffsetIntoAddress if the Offset is 0, but AM.Disp is non...
Craig Topper [Fri, 31 Jan 2020 05:23:05 +0000 (21:23 -0800)]
[X86] Don't exit from foldOffsetIntoAddress if the Offset is 0, but AM.Disp is non-zero.

This is an alternate fix for the issue D73606 was trying to
solve.

The main issue here is that we bailed out of
foldOffsetIntoAddress if Offset is 0. But if we just found a
symbolic displacement and AM.Disp became non-zero
earlier, we still need to validate that AM.Disp with the symbolic
displacement.

This is my second attempt at committing this after failing
build bots previously. One thing I realized about the previous
attempt is that its possible that AM.Disp is already non-zero
and the new Offset changes it back to zero. In that case my
previous attempt failed to update AM.Disp to zero. So this patch
removes the early out for 0 and appropriately handle the 0 case
in each check so we still update AM.Disp at the end.

4 years agoAdd ThinLtoJIT example
Stefan Gränitz [Sat, 11 Jan 2020 00:09:42 +0000 (01:09 +0100)]
Add ThinLtoJIT example

Summary:
Prototype of a JIT compiler that utilizes ThinLTO summaries to compile modules ahead of time. This is an implementation of the concept I presented in my "ThinLTO Summaries in JIT Compilation" talk at the 2018 Developers' Meeting: http://llvm.org/devmtg/2018-10/talk-abstracts.html#lt8

Upfront the JIT first populates the *combined ThinLTO module index*, which provides fast access to the global call-graph and module paths by function. Next, it loads the main function's module and compiles it. All functions in the module will be emitted with prolog instructions that *fire a discovery flag* once execution reaches them. In parallel, the *discovery thread* is busy-watching the existing flags. Once it detects one has fired, it uses the module index to find all functions that are reachable from it within a given number of calls and submits their defining modules to the compilation pipeline.

While execution continues, more flags are fired and further modules added. Ideally the JIT can be tuned in a way, so that in the majority of cases the code on the execution path can be compiled ahead of time. In cases where it doesn't work, the JIT has a *definition generator* in place that loads modules if missing functions are reached.

Reviewers: lhames, dblaikie, jfb, tejohnson, pree-jackie, AlexDenisov, kavon

Subscribers: mgorny, mehdi_amini, inglorion, hiraditya, steven_wu, dexonsmith, arphaman, jfb, merge_guards_bot, llvm-commits

Tags: #llvm

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

4 years ago[LegalizeTypes][X86] Add a new strategy for type legalizing f16 type that softens...
Craig Topper [Sat, 1 Feb 2020 06:42:07 +0000 (22:42 -0800)]
[LegalizeTypes][X86] Add a new strategy for type legalizing f16 type that softens it to i16, but promotes to f32 around arithmetic ops.

This is based on this llvm-dev thread http://lists.llvm.org/pipermail/llvm-dev/2019-December/137521.html

The current strategy for f16 is to promote type to float every except where the specific width is required like loads, stores, and bitcasts. This results in rounding occurring in odd places instead of immediately after arithmetic operations. This interacts in weird ways with the __fp16 type in clang which is a storage only type where arithmetic is always promoted to float. InstCombine can remove some fpext/fptruncs around such arithmetic and turn it into arithmetic on half. This wouldn't be so bad if SelectionDAG was able to put those fpext/fpround back in when it promotes.

It is also not obvious how to handle to make the existing strategy work with STRICT fp. We need to use STRICT versions of the conversions which require chain operands. But if the conversions are created for a bitcast, there is no place to get an appropriate chain from.

This patch implements a different strategy where conversions are emitted directly around arithmetic operations. And otherwise its passed around as an i16 including in arguments and return values. This can result in more conversions between arithmetic operations, but is closer to matching the IR the frontend generates for __fp16. And it will allow us to use the chain from constrained arithmetic nodes to link the STRICT_FP_TO_FP16/STRICT_FP16_TO_FP that will need to be added. I've set it up so that each target can opt into the new behavior. Converting all the targets myself was more than I was able to handle.

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

4 years ago[Sema] Remove a -Wrange warning from -Wall
Mark de Wever [Sat, 1 Feb 2020 17:40:07 +0000 (18:40 +0100)]
[Sema] Remove a -Wrange warning from -Wall

During the review of D73007 Aaron Puchert mentioned
`warn_for_range_variable_always_copy` shouldn't be part of -Wall since
some coding styles require `for(const auto &bar : bars)`. This warning
would cause false positives for these users. Based on Aaron's proposal
refactored the warnings:

* -Wrange-loop-construct warns about possibly unintended constructor
  calls. This is part of -Wall. It contains
  * warn_for_range_copy: loop variable A of type B creates a copy from
    type C
  * warn_for_range_const_reference_copy: loop variable A is initialized
    with a value of a different type resulting in a copy
* -Wrange-loop-bind-reference warns about misleading use of reference
  types. This is not part of -Wall. It contains
  * warn_for_range_variable_always_copy: loop variable A is always a copy
    because the range of type B does not return a reference

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

4 years ago[clang-format] Add option for not breaking line before ObjC params
mydeveloperday [Sat, 1 Feb 2020 17:37:25 +0000 (17:37 +0000)]
[clang-format] Add option for not breaking line before ObjC params

Summary:
From `clang-format` version 3.7.0 and up, , there is no way to keep following format of ObjectiveC block:
```
- (void)_aMethod
{
    [self.test1 t:self w:self callback:^(typeof(self) self, NSNumber *u, NSNumber *v) {
        u = c;
    }]
}
```
Regardless of the change in `.clang-format` configuration file, all parameters will be lined up so that colons will be on the same column, like following:
```
- (void)_aMethod
{
    [self.test1 t:self
                w:self
         callback:^(typeof(self) self, NSNumber *u, NSNumber *v) {
             u = c;
         }]
}
```

Considering with ObjectiveC, the first code style is cleaner & more readable for some people, I've added a config option: `ObjCDontBreakBeforeNestedBlockParam` (boolean) so that if it is enable, the first code style will be favored.

Reviewed By: MyDeveloperDay

Patch By: ghvg1313

Tags: #clang, #clang-format

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

4 years ago[mlir] Fix errors in release & no-assert
Jacques Pienaar [Sat, 1 Feb 2020 16:54:06 +0000 (08:54 -0800)]
[mlir] Fix errors in release & no-assert

Seen on gcc 8, in release mode & assertions off warnings about logger,
made all statements referencing logger inside LLVM_DEBUG blocks and
ifdef a few variables only used in debug.

This is mechanical fix to get CI green.

4 years agoDon't mark MIPS TRAP as isTerminator
Alex Richardson [Sat, 1 Feb 2020 15:49:35 +0000 (15:49 +0000)]
Don't mark MIPS TRAP as isTerminator

This was causing machine verifier errors when compiling libunwind.

Reviewed By: atanasyan
Differential Revision: https://reviews.llvm.org/D73648

4 years agoAMDGPU/GlobalISel: Use more wide vector load/stores
Matt Arsenault [Tue, 21 Jan 2020 17:20:02 +0000 (12:20 -0500)]
AMDGPU/GlobalISel: Use more wide vector load/stores

This improves the type breakdown for some large vectors. For example,
we now get a <4 x s32> and s32 store instead of 5 s32 stores for
<5 x s32>.

4 years agoAMDGPU/GlobalISel: Improve legalization of wide stores
Matt Arsenault [Mon, 20 Jan 2020 00:48:27 +0000 (19:48 -0500)]
AMDGPU/GlobalISel: Improve legalization of wide stores

This fixes legalizations of global stores > 128-bits. It seems work is
needed on how this split actually occurs. For example, we get the
right code for s160, with an s128 and s32 load, but get 5 s32 loads
for <5 x s32>.

4 years agoGlobalISel: Support widening unmerge results with pointer source
Matt Arsenault [Tue, 21 Jan 2020 16:12:36 +0000 (11:12 -0500)]
GlobalISel: Support widening unmerge results with pointer source

4 years agoMake StringRef's std::string conversion operator explicit
Sylvestre Ledru [Sat, 1 Feb 2020 14:36:51 +0000 (15:36 +0100)]
Make StringRef's std::string conversion operator explicit
The build is currenly broken when perf or ffi are enabled for llvm

Just like in https://reviews.llvm.org/rG777180a32b61070a10dd330b4f038bf24e916af1

4 years agoRemove unused function. NFCI.
Simon Pilgrim [Sat, 1 Feb 2020 13:01:58 +0000 (13:01 +0000)]
Remove unused function. NFCI.

4 years ago[ValueTracking] Add DemandedElts support to computeKnownBits/ComputeNumSignBits ...
Simon Pilgrim [Sat, 1 Feb 2020 12:45:46 +0000 (12:45 +0000)]
[ValueTracking] Add DemandedElts support to computeKnownBits/ComputeNumSignBits (PR36319)

This patch adds initial support for a DemandedElts mask to the internal computeKnownBits/ComputeNumSignBits methods, matching the SelectionDAG and GlobalISel equivalents.

So far only a couple of instructions have been setup to handle the DemandedElts, the remainder still using the existing 'all elements' default. The plan is to extend support as we have test coverage.

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

4 years ago[Frontend] Delete a redundant check of -pg for setFramePointer()
Fangrui Song [Sat, 1 Feb 2020 08:16:19 +0000 (00:16 -0800)]
[Frontend] Delete a redundant check of -pg for setFramePointer()

Driver errors if -fomit-frame-pointer is used together with -pg.
useFramePointerForTargetByDefault() returns true if -pg is specified.
=>
(!OmitFP && useFramePointerForTargetByDefault(Args, Triple)) is true
=>
We cannot get FramePointerKind::None

4 years ago[lldb] Remove LanguageRuntime::GetOverrideExprOptions
Alex Langford [Sat, 1 Feb 2020 05:59:51 +0000 (21:59 -0800)]
[lldb] Remove LanguageRuntime::GetOverrideExprOptions

LanguageRuntime::GetOverrideExprOptions is specific to clang and was
only overridden in RenderScriptRuntime. LanguageRuntime in shouldn't
have any knowledge of clang, so remove it from LanguageRuntime and leave
it only in RenderScriptRuntime.

4 years ago[ELF][Mips] Drop an unneeded config->relocatable check
Fangrui Song [Sat, 1 Feb 2020 05:00:28 +0000 (21:00 -0800)]
[ELF][Mips] Drop an unneeded config->relocatable check

4 years agoDon't assume a reference refers to at least sizeof(T) bytes.
Richard Smith [Sat, 1 Feb 2020 03:06:21 +0000 (19:06 -0800)]
Don't assume a reference refers to at least sizeof(T) bytes.

When T is a class type, only nvsize(T) bytes need be accessible through
the reference. We had matching bugs in the application of the
dereferenceable attribute and in -fsanitize=undefined.

4 years ago[mlir][Linalg] NFC - Cleanup and split input file for roundtrip.mlir
Nicolas Vasilache [Sat, 1 Feb 2020 03:01:28 +0000 (22:01 -0500)]
[mlir][Linalg] NFC - Cleanup and split input file for roundtrip.mlir

4 years ago[gn build] unbreak mac build after 133a31cef61c
Nico Weber [Sat, 1 Feb 2020 02:25:56 +0000 (21:25 -0500)]
[gn build] unbreak mac build after 133a31cef61c

4 years ago[gn build] add asan runtime on linux and mac
Nico Weber [Sat, 1 Feb 2020 02:23:43 +0000 (21:23 -0500)]
[gn build] add asan runtime on linux and mac

This produces a seemingly-working dynamic (x64-only) asan dylib on macOS
and static libraries on Linux.

I've had this sitting in a branch for a long time and wanted to get
check-asan working before landing it, but smaller patches and fewer
local branches is probably better.

4 years ago[lldb/Reproducers] Include string length in string (de)serialization.
Jonas Devlieghere [Sat, 1 Feb 2020 00:17:28 +0000 (16:17 -0800)]
[lldb/Reproducers] Include string length in string (de)serialization.

This allows us to differentiate between an empty string and a nullptr.

(cherry picked from commit 53e206284fa715886020d6a5553bf791582850a3)

4 years agoAMDGPU/GlobalISel: Fix forming G_TRUNC with vcc result
Matt Arsenault [Sat, 1 Feb 2020 00:38:31 +0000 (19:38 -0500)]
AMDGPU/GlobalISel: Fix forming G_TRUNC with vcc result

This somehow got lost when I fixed the boolean handling.

4 years agoAMDGPU: Switch some tests to use generated checks
Matt Arsenault [Fri, 31 Jan 2020 23:14:50 +0000 (18:14 -0500)]
AMDGPU: Switch some tests to use generated checks

Control flow tests are particularly annoying, and it's probably better
to be have comprehensive check lines for them.

4 years agoFix wrong devirtualization when the final overrider in one base class
Richard Smith [Sat, 1 Feb 2020 01:05:27 +0000 (17:05 -0800)]
Fix wrong devirtualization when the final overrider in one base class
overrides the final overrider in a different base class.

4 years ago[Support] Don't modify the current EH context during stack unwinding
Reid Kleckner [Fri, 31 Jan 2020 22:39:14 +0000 (14:39 -0800)]
[Support] Don't modify the current EH context during stack unwinding

Copy it instead. Otherwise, key registers (such as RBP) may get zeroed
out by the stack unwinder.

Fixes CrashRecoveryTest.DumpStackCleanup with MSVC in release builds.

Reviewed By: stella.stamenova

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

4 years agoAvoid std::tie in TypeSize.h
Reid Kleckner [Sat, 1 Feb 2020 00:55:35 +0000 (16:55 -0800)]
Avoid std::tie in TypeSize.h

std::tie isn't saving much here, just use == && ==. No numbers to
support this, but std::tie is one of the most expensive instantiations.

4 years agoMove DenseMapInfo traits to TypeSize.h
Reid Kleckner [Sat, 1 Feb 2020 00:44:07 +0000 (16:44 -0800)]
Move DenseMapInfo traits to TypeSize.h

Saves 2427 unneeded includes of TypeSize.h, which instantiates
std::tie<uint64_t, bool>, which instantiates std::tuple<uint64_t, bool>,
which is slow.

I'll remove the tie in a follow-up, since it's just for operator==.

4 years ago[libcxx] [test] Update msvc_stdlib_force_include.h.
Stephan T. Lavavej [Sat, 1 Feb 2020 00:36:18 +0000 (16:36 -0800)]
[libcxx] [test] Update msvc_stdlib_force_include.h.

Restore features that are removed in C++20.

4 years ago[lldb/TypeSystemClang] Use references in a static helper, NFC
Vedant Kumar [Wed, 22 Jan 2020 03:04:27 +0000 (19:04 -0800)]
[lldb/TypeSystemClang] Use references in a static helper, NFC

4 years ago[lldb/Value] Avoid reading more data than the host has available
Vedant Kumar [Wed, 22 Jan 2020 00:01:16 +0000 (16:01 -0800)]
[lldb/Value] Avoid reading more data than the host has available

Value::GetValueByteSize() reports the size of a Value as the size of its
underlying CompilerType. However, a host buffer that backs a Value may
be smaller than GetValueByteSize().

This situation arises when the host is only able to partially evaluate a
Value, e.g. because the expression contains DW_OP_piece.

The cleanest fix I've found to this problem is Greg's suggestion, which
is to resize the Value if (after evaluating an expression) it's found to
be too small. I've tried several alternatives which all (in one way or
the other) tried to teach the Value/ValueObjectChild system not to read
past the end of a host buffer, but this was flaky and impractical as it
isn't easy to figure out the host buffer's size (Value::GetScalar() can
point to somewhere /inside/ a host buffer, but you need to walk up the
ValueObject hierarchy to try and find its size).

This fixes an ASan error in lldb seen when debugging a clang binary.
I've added a regression test in test/functionalities/optimized_code. The
point of that test is not specifically to check that DW_OP_piece is
handled a particular way, but rather to check that lldb doesn't crash on
an input that it used to crash on.

Testing: check-lldb, and running the added tests using a sanitized lldb

--

Thanks to Jim for pointing out that an earlier version of this patch,
which simply changed the definition of Value::GetValueByteSize(), would
interact poorly with the ValueObject machinery.

Thanks also to Pavel who suggested a neat way to test this change
(which, incidentally, caught another ASan issue still present in the
original version of this patch).

rdar://58665925

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

4 years ago[lldb/MCDisasm] Simplify predicates in MCDisasmInstance, NFC
Vedant Kumar [Fri, 31 Jan 2020 23:51:01 +0000 (15:51 -0800)]
[lldb/MCDisasm] Simplify predicates in MCDisasmInstance, NFC

4 years agoDwarfDebug.cpp: Fix some indentation
David Blaikie [Fri, 31 Jan 2020 23:48:18 +0000 (15:48 -0800)]
DwarfDebug.cpp: Fix some indentation

4 years ago[CMake] compiler-rt: Add COMPILER_RT_BUILTINS_ENABLE_PIC
Petr Hosek [Fri, 31 Jan 2020 23:57:18 +0000 (15:57 -0800)]
[CMake] compiler-rt: Add COMPILER_RT_BUILTINS_ENABLE_PIC

The configuration for -fPIC in the builtins library when built standalone
is unconditional, stating that the flags would "normally be added... by
the llvm cmake step"

This is untrue, as the llvm cmake step checks LLVM_ENABLE_PIC, which allows
a client to turn off -fPIC.

I've added an option when compiler-rt builtins are configured standalone, such
as when built as part of the LLVM runtimes system, to guard the application of
-fPIC for users that want it.

Patch By: JamesNagurne

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

4 years agoDebugInfo: Split DWARF: Hash non-member function child DIEs
David Blaikie [Fri, 31 Jan 2020 18:32:28 +0000 (10:32 -0800)]
DebugInfo: Split DWARF: Hash non-member function child DIEs

Significant missing hashing - as per the comment this was only meant to
skip member functions (unspecified, but I think it's legible as member
function declarations, not definitions) but was skipping all named
subprograms (so only hashed child DIEs for member function definitions -
because they didn't have a direct name, but only a name given indirectly
in the DW_AT_specification-referenced DIE)

4 years agoDAG: Check if a value is divergent before requiresUniformRegister
Matt Arsenault [Fri, 31 Jan 2020 22:28:25 +0000 (17:28 -0500)]
DAG: Check if a value is divergent before requiresUniformRegister

This avoids a potentially expensive scan if we already know it doesn't
matter.

4 years agoMove target tests to target subdirectories
Matt Arsenault [Fri, 31 Jan 2020 18:42:18 +0000 (13:42 -0500)]
Move target tests to target subdirectories

4 years ago[lldb] Remove unused CPPLanguageRuntime dependency
Alex Langford [Fri, 31 Jan 2020 23:21:09 +0000 (15:21 -0800)]
[lldb] Remove unused CPPLanguageRuntime dependency

4 years agoNFC. Comments cleanup in DSE::memoryIsNotModifiedBetween
Artur Pilipenko [Fri, 31 Jan 2020 23:18:59 +0000 (15:18 -0800)]
NFC. Comments cleanup in DSE::memoryIsNotModifiedBetween

Separated from https://reviews.llvm.org/D68006 review.

4 years ago[mlir] Introduce bare ptr calling convention for MemRefs in LLVM dialect
Diego Caballero [Fri, 31 Jan 2020 23:18:58 +0000 (15:18 -0800)]
[mlir] Introduce bare ptr calling convention for MemRefs in LLVM dialect

Summary:
This patch introduces an alternative calling convention for
MemRef function arguments in LLVM dialect. It converts MemRef
function arguments to LLVM bare pointers to the MemRef element
type instead of creating a MemRef descriptor. Bare pointers are
then promoted to a MemRef descriptors at the beginning of the
function. This calling convention is only enabled with a flag.

Reviewers: ftynse, bondhugula, nicolasvasilache, rriddle, mehdi_amini

Reviewed By: ftynse, rriddle, mehdi_amini

Subscribers: Joonsoo, flaub, merge_guards_bot, jholewinski, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, csigg, arpith-jacob, mgester, lucyrfox, herhut, aartbik, liufengdb, llvm-commits

Tags: #llvm

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

4 years agoDon't warn about missing declarations for partial template specializations
Aaron Puchert [Fri, 31 Jan 2020 23:05:36 +0000 (00:05 +0100)]
Don't warn about missing declarations for partial template specializations

Summary: Just like templates, they are excepted from the ODR rule.

Reviewed By: aaron.ballman, rsmith

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

4 years ago[scudo][standalone] Change default Android config
Kostya Kortchinsky [Thu, 30 Jan 2020 23:26:46 +0000 (15:26 -0800)]
[scudo][standalone] Change default Android config

Summary:
This changes a couple of parameters in the default Android config to
address some performance and memory footprint issues (well to be closer
to the default Bionic allocator numbers).

Subscribers: #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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

4 years ago[lldb/Test] Fix more substr ordering issues that only repro on the bot
Jonas Devlieghere [Fri, 31 Jan 2020 22:42:41 +0000 (14:42 -0800)]
[lldb/Test] Fix more substr ordering issues that only repro on the bot

4 years ago[lldb/Test] Fix substr order in TestWatchLocationWithWatchSet.py
Jonas Devlieghere [Fri, 31 Jan 2020 22:26:27 +0000 (14:26 -0800)]
[lldb/Test] Fix substr order in TestWatchLocationWithWatchSet.py

4 years ago[lldb/Platform] Always print Kernel last
Jonas Devlieghere [Fri, 31 Jan 2020 22:23:56 +0000 (14:23 -0800)]
[lldb/Platform] Always print Kernel last

Specializations of the Platform class print the kernel after calling the
super method. By printing the kernel at the end in the super class, we
guarantee the order is the same on different platforms.

4 years agoRevert "[clang-doc] Improving Markdown Output"
Petr Hosek [Fri, 31 Jan 2020 22:30:42 +0000 (14:30 -0800)]
Revert "[clang-doc] Improving Markdown Output"

This reverts commit deae8ee6916711b9b20f73fc1a350c3a034d5b34 as it
broke the build on several bots.

4 years ago[RISCV] Implement jump pseudo-instruction
Luís Marques [Fri, 31 Jan 2020 18:52:37 +0000 (18:52 +0000)]
[RISCV] Implement jump pseudo-instruction

Summary:
Implements the jump pseudo-instruction, which is used in e.g. the Linux kernel.

Reviewers: asb, lenary
Reviewed By: lenary
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73178

4 years ago[clang-doc] Improving Markdown Output
Petr Hosek [Fri, 31 Jan 2020 03:40:38 +0000 (19:40 -0800)]
[clang-doc] Improving Markdown Output

This change has two components. The moves the generated file
for a namespace to the directory named after the namespace in
a file named 'index.<format>'. This greatly improves the browsing
experience since the index page is shown by default for a directory.

The second improves the markdown output by adding the links to the
referenced pages for children objects and the link back to the source
code.

Patch By: Clayton

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

4 years agoRevert "[lldb/Test] Make substrs argument to self.expect ordered."
Jonas Devlieghere [Fri, 31 Jan 2020 21:48:02 +0000 (13:48 -0800)]
Revert "[lldb/Test] Make substrs argument to self.expect ordered."

Temporarily revert to fix the tests that only fail on the bots because
of the newly enforced substr order.

4 years ago[diagtree] Use a different color for unimplemented GCC diagnostic flags
Richard Smith [Fri, 31 Jan 2020 21:28:56 +0000 (13:28 -0800)]
[diagtree] Use a different color for unimplemented GCC diagnostic flags
instead of the "enabled by default" color.

It may be technically correct to list unimplemented diagnostics as
"enabled by default" but it's quite misleading.

4 years ago[lldb/Test] Make substrs argument to self.expect ordered.
Jonas Devlieghere [Fri, 31 Jan 2020 21:27:15 +0000 (13:27 -0800)]
[lldb/Test] Make substrs argument to self.expect ordered.

This patch changes the behavior of the substrs argument to self.expect.
Currently, the elements of substrs are unordered and as long as the
string appears in the output, the assertion passes.

We can be more precise by requiring that the substrings be ordered in
the way they appear. My hope is that this will make it harder to
accidentally pass a check because a string appears out of order.

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

4 years ago[lldb/Test] Fix substrs order in self.expect for the remaining tests (NFC)
Jonas Devlieghere [Fri, 31 Jan 2020 21:26:51 +0000 (13:26 -0800)]
[lldb/Test] Fix substrs order in self.expect for the remaining tests (NFC)

Currently the substrs parameter takes a list of strings that need to be
found but the ordering isn't checked. D73766 might change that so this
changes a several tests so that the order of the strings in the substrs
list is in the order in which they appear in the output.

4 years ago[mlir][DialectConversion] Remove invalid NDEBUG wrapper.
River Riddle [Fri, 31 Jan 2020 21:26:49 +0000 (13:26 -0800)]
[mlir][DialectConversion] Remove invalid NDEBUG wrapper.

The functions are used, but empty when NDEBUG is set.

4 years ago[mlir][EDSC] NFC - Cleanups to builder-api-test.cpp
Nicolas Vasilache [Fri, 31 Jan 2020 21:07:53 +0000 (16:07 -0500)]
[mlir][EDSC] NFC - Cleanups to builder-api-test.cpp

This revision does the following post-commit cleanups:
1. don't use -1 magic constants,
2. drop commented out old test that does not belong here,
3. reformat and add a proper clang-format off on a CHECK directive.

4 years agoDebugInfo: Simplify debug-macinfo-split-dwarf.ll
David Blaikie [Fri, 31 Jan 2020 21:00:39 +0000 (13:00 -0800)]
DebugInfo: Simplify debug-macinfo-split-dwarf.ll

This test didn't need any local variables or parameters, and didn't need
to be checking the DWO ID or more detailed forms.

It was using -v to print the macro sections, but now that macro sections
are emitted when requested (-debug-macro) that's not needed either.

4 years agoPR44723: Trigger return type deduction for operator<=>s whose return
Richard Smith [Fri, 31 Jan 2020 21:05:07 +0000 (13:05 -0800)]
PR44723: Trigger return type deduction for operator<=>s whose return
types are needed to compute the return type of a defaulted operator<=>.

This raises the question of what to do if return type deduction fails.
The standard doesn't say, and implementations vary, so for now reject
that case eagerly to keep our options open.

4 years ago[mlir][Linalg] Adding support for linalg_matmul with tensors.
Nicolas Vasilache [Fri, 31 Jan 2020 19:42:34 +0000 (14:42 -0500)]
[mlir][Linalg] Adding support for linalg_matmul with tensors.

Summary:
This revision provides 2 versions of matmul with tensors to account for the differences in buffer vs value semantics:
1. `C(i, j) = sum_{r_k} A(i, r_k) * B(r_k, j)`
2. `D(i, j) = C(i, j) + sum_{r_k} A(i, r_k) * B(r_k, j)`

Reviewers: ftynse

Subscribers: mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, Joonsoo, llvm-commits

Tags: #llvm

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

4 years ago[lldb] [test] Skip 128-bit int tests on i386 (no __int128_t)
Michał Górny [Fri, 31 Jan 2020 20:58:43 +0000 (21:58 +0100)]
[lldb] [test] Skip 128-bit int tests on i386 (no __int128_t)

4 years agoDebugInfo: Allow dumping macinfo and macinfo.dwo from the same file
David Blaikie [Fri, 31 Jan 2020 19:45:32 +0000 (11:45 -0800)]
DebugInfo: Allow dumping macinfo and macinfo.dwo from the same file

If dumping an Split DWARF file that hasn't been split into separate
files (such as from llc - that includes the plain and .dwo sections in
the same file) allow both macinfo and macinfo.dwo sections to be dumped.

4 years ago[lldb/Test] Fix substrs order in self.expect for more tests (NFC)
Jonas Devlieghere [Fri, 31 Jan 2020 20:44:24 +0000 (12:44 -0800)]
[lldb/Test] Fix substrs order in self.expect for more tests (NFC)

Currently the substrs parameter takes a list of strings that need to be
found but the ordering isn't checked. D73766 might change that so this
changes a several tests so that the order of the strings in the substrs
list is in the order in which they appear in the output.

4 years ago[lldb] Move clang-based files out of Symbol
Alex Langford [Wed, 29 Jan 2020 19:59:28 +0000 (11:59 -0800)]
[lldb] Move clang-based files out of Symbol

Summary:
This change represents the move of ClangASTImporter, ClangASTMetadata,
ClangExternalASTSourceCallbacks, ClangUtil, CxxModuleHandler, and
TypeSystemClang from lldbSource to lldbPluginExpressionParserClang.h

This explicitly removes knowledge of clang internals from lldbSymbol,
moving towards a more generic core implementation of lldb.

Reviewers: JDevlieghere, davide, aprantl, teemperor, clayborg, labath, jingham, shafik

Subscribers: emaste, mgorny, arphaman, jfb, usaxena95, lldb-commits

Tags: #lldb

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

4 years ago[lldb/Test] Fix substrs order in self.expect for more tests (NFC)
Jonas Devlieghere [Fri, 31 Jan 2020 20:19:03 +0000 (12:19 -0800)]
[lldb/Test] Fix substrs order in self.expect for more tests (NFC)

Currently the substrs parameter takes a list of strings that need to be
found but the ordering isn't checked. D73766 might change that so this
changes a several tests so that the order of the strings in the substrs
list is in the order in which they appear in the output.

4 years ago[mlir][NFC] Refactor DialectConversion debug logging
River Riddle [Fri, 31 Jan 2020 19:46:53 +0000 (11:46 -0800)]
[mlir][NFC] Refactor DialectConversion debug logging

Summary:
This revision beefs up the debug logging within dialect conversion. Given the nature of multi-level legalization, and legalization in general, it is one of the harder pieces of infrastructure to debug. This revision adds nice formatting to make the output log easier to parse:

```
Legalizing operation : 'std.constant'(0x608000002420) {
  * Fold {
  } -> FAILURE : unable to fold

  * Pattern : 'std.constant -> ()' {
  } -> FAILURE : pattern failed to match

  * Pattern : 'std.constant -> ()' {
  } -> FAILURE : pattern failed to match

  * Pattern : 'std.constant -> (spv.constant)' {
    ** Insert  : 'spv.constant'(0x608000002c20)
    ** Replace : 'std.constant'(0x608000002420)

    //===-------------------------------------------===//
    Legalizing operation : 'spv.constant'(0x608000002c20) {
    } -> SUCCESS : operation marked legal by the target
    //===-------------------------------------------===//
  } -> SUCCESS : pattern applied successfully
} -> SUCCESS
```

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

4 years ago[InstCombine] Push negation through multiply (PR44234)
Nikita Popov [Fri, 24 Jan 2020 21:11:41 +0000 (22:11 +0100)]
[InstCombine] Push negation through multiply (PR44234)

Fixes https://bugs.llvm.org/show_bug.cgi?id=44234 by adding
multiply support to freelyNegateValue(). Only one of the operands
needs to be negatible, so this still fits within the framework.

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

4 years ago[libc] Use cpp::Array instead of cpp::ArrayRef in memory/utils_test.
Siva Chandra Reddy [Fri, 31 Jan 2020 19:39:06 +0000 (11:39 -0800)]
[libc] Use cpp::Array instead of cpp::ArrayRef in memory/utils_test.

Building with address-sanitizer shows that using ArrayRef ends up
accessing a temporary outside its scope.

4 years ago[Typo fix] RNG: Take pass name as argument instead of pass pointer.
Dominic Chen [Fri, 31 Jan 2020 19:34:49 +0000 (14:34 -0500)]
[Typo fix] RNG: Take pass name as argument instead of pass pointer.

Summary: With the new pass manager, it is not possible to obtain a pointer to the pass.

Reviewers: jfb, rinon, yln

Subscribers: hiraditya, dexonsmith, llvm-commits

Tags: #llvm

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

4 years ago[mlir] [VectorOps] fixed bug in vector.insert_strided_slice lowering
aartbik [Fri, 31 Jan 2020 18:56:22 +0000 (10:56 -0800)]
[mlir] [VectorOps] fixed bug in vector.insert_strided_slice lowering

Summary:
Rationale:
When lowering to LLVM for different rank insert (n vs k), the offset
arrays needs to drop one dimension (becomes n-1), but the strides
array needs to be preserved (remains k). With regression test.
Note that this example was actually in the documentation, so
extra important to do it right :-)

Reviewers: nicolasvasilache, andydavis1, ftynse

Reviewed By: nicolasvasilache, ftynse

Subscribers: Joonsoo, merge_guards_bot, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, arpith-jacob, mgester, lucyrfox, liufengdb, llvm-commits

Tags: #llvm

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

4 years agoRNG: Take pass name as argument instead of pass pointer.
Dominic Chen [Fri, 24 Jan 2020 22:21:14 +0000 (17:21 -0500)]
RNG: Take pass name as argument instead of pass pointer.

Summary: With the new pass manager, it is not possible to obtain a pointer to the pass.

Reviewers: jfb, rinon, yln

Subscribers: hiraditya, dexonsmith, llvm-commits

Tags: #llvm

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

4 years ago[GlobalISel] Tweak lowering of G_SMULO/G_UMULO
Jay Foad [Thu, 16 Jan 2020 14:46:36 +0000 (14:46 +0000)]
[GlobalISel] Tweak lowering of G_SMULO/G_UMULO

Summary:
Applying this cleanup:

    -      MIRBuilder.buildInstr(TargetOpcode::G_ASHR)
    -        .addDef(Shifted)
    -        .addUse(Res)
    -        .addUse(ShiftAmt);
    +      MIRBuilder.buildAShr(Shifted, Res, ShiftAmt);

caused an assertion failure here:

    llc: /home/jayfoad2/git/llvm-project/llvm/lib/CodeGen/MachineRegisterInfo.cpp:404: llvm::MachineInstr *llvm::MachineRegisterInfo::getVRegDef(unsigned int) const: Assertion `(I.atEnd() || std::next(I) == def_instr_end()) && "getVRegDef assumes a single definition or no definition"' failed.

    #4  0x00000000050a6d96 in llvm::MachineRegisterInfo::getVRegDef (this=0x74606a0, Reg=2147483650) at /home/jayfoad2/git/llvm-project/llvm/lib/CodeGen/MachineRegisterInfo.cpp:403
    #5  0x00000000066148f6 in llvm::getConstantVRegValWithLookThrough (VReg=2147483650, MRI=..., LookThroughInstrs=false, HandleFConstant=true) at /home/jayfoad2/git/llvm-project/llvm/lib/CodeGen/GlobalISel/Utils.cpp:244
    #6  0x00000000066147da in llvm::getConstantVRegVal (VReg=2147483650, MRI=...) at /home/jayfoad2/git/llvm-project/llvm/lib/CodeGen/GlobalISel/Utils.cpp:210
    #7  0x0000000006615367 in llvm::ConstantFoldBinOp (Opcode=101, Op1=2147483650, Op2=2147483656, MRI=...) at /home/jayfoad2/git/llvm-project/llvm/lib/CodeGen/GlobalISel/Utils.cpp:341
    #8  0x000000000657eee0 in llvm::CSEMIRBuilder::buildInstr (this=0x7465010, Opc=101, DstOps=..., SrcOps=..., Flag=...) at /home/jayfoad2/git/llvm-project/llvm/lib/CodeGen/GlobalISel/CSEMIRBuilder.cpp:160
    #9  0x0000000003645958 in llvm::MachineIRBuilder::buildAShr (this=0x7465010, Dst=..., Src0=..., Src1=..., Flags=...) at /home/jayfoad2/git/llvm-project/llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h:1298
    #10 0x00000000065c35b1 in llvm::LegalizerHelper::lower (this=0x7fffffffb5f8, MI=..., TypeIdx=0, Ty=...) at /home/jayfoad2/git/llvm-project/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp:2020

because at this point there are two instructions defining Res: the
original G_SMULO/G_UMULO and the new G_MUL that we built. The fix is
to modify the original mul in place, so that there is only ever one
definition of Res.

Reviewers: arsenm, aditya_nandakumar

Subscribers: wdng, rovka, hiraditya, volkan, Petar.Avramovic, llvm-commits

Tags: #llvm

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

4 years ago[AArch64][GlobalISel] Walk through G_TRUNC in getTestBitReg
Jessica Paquette [Thu, 30 Jan 2020 22:53:37 +0000 (14:53 -0800)]
[AArch64][GlobalISel] Walk through G_TRUNC in getTestBitReg

When you encounter a G_TRUNC, you are moving from a larger type to a smaller
type.

Asking for the i-th bit on a larger value is the same as asking for the i-th
bit on a smaller value.

So, we should always be able to walk through G_TRUNC when computing the bit
for a TB(N)Z.

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

4 years ago[lldb/Symbol] Use StringRef ctor to prevent incorrect overload
Jonas Devlieghere [Fri, 31 Jan 2020 18:54:41 +0000 (10:54 -0800)]
[lldb/Symbol] Use StringRef ctor to prevent incorrect overload

Use the StringRef constructor instead of toStringRef so we don't end up
with the wrong overload (llvm::toStringRef(bool)).

Fixes PR44736

4 years ago[DAG] SimplifyMultipleUseDemandedBits - peek through unused ISD::INSERT_SUBVECTOR...
Simon Pilgrim [Fri, 31 Jan 2020 18:57:10 +0000 (18:57 +0000)]
[DAG] SimplifyMultipleUseDemandedBits - peek through unused ISD::INSERT_SUBVECTOR subvectors

If we don't demand any elements of the inserted subvector then just skip it.

4 years ago[mlir] Remove the dependency of StdToLLVM on LoopToStd
Alex Zinenko [Fri, 31 Jan 2020 18:46:57 +0000 (19:46 +0100)]
[mlir] Remove the dependency of StdToLLVM on LoopToStd

This is a leftover of a temporary state where loop operations were in Standard
dialect.

4 years ago[mlir] Linalg tiling: generate code avoding out-of-bounds accesses
Alex Zinenko [Wed, 29 Jan 2020 10:33:57 +0000 (11:33 +0100)]
[mlir] Linalg tiling: generate code avoding out-of-bounds accesses

Summary:
After the `subview` operation was migrated from Linalg to Standard, it changed
semantics and does not guarantee the absence of out-of-bounds accesses through
the created view anymore. Compute the size of the subview to make sure it
always fits within the view (subviews in last iterations of the loops may be
smaller than those in other iterations).

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

4 years agoOrc: Remove an unnecessary explicit scope
David Blaikie [Fri, 31 Jan 2020 18:14:18 +0000 (10:14 -0800)]
Orc: Remove an unnecessary explicit scope

(was useful at some point in the past for scoping some error handling
that's since been tidied up a bit)

4 years ago[lldb/Test] Fix substrs order in self.expect for more tests (NFC)
Jonas Devlieghere [Fri, 31 Jan 2020 18:28:15 +0000 (10:28 -0800)]
[lldb/Test] Fix substrs order in self.expect for more tests (NFC)

Currently the substrs parameter takes a list of strings that need to be
found but the ordering isn't checked. D73766 might change that so this
changes a several tests so that the order of the strings in the substrs
list is in the order in which they appear in the output.

4 years ago[yaml2obj] Internlize DocNum. NFC
Fangrui Song [Fri, 31 Jan 2020 18:08:42 +0000 (10:08 -0800)]
[yaml2obj] Internlize DocNum. NFC

4 years agoOrc: Remove redundant std::move
David Blaikie [Fri, 31 Jan 2020 18:09:41 +0000 (10:09 -0800)]
Orc: Remove redundant std::move

4 years ago[Concepts] Fix isDeclarationSpecifier to detect type-constraints correctly
Saar Raz [Fri, 31 Jan 2020 18:05:09 +0000 (20:05 +0200)]
[Concepts] Fix isDeclarationSpecifier to detect type-constraints correctly

isDeclarationSpecifiers did not handle some cases of placeholder-type-specifiers with
type-constraints, causing parsing bugs in abbreviated constructor templates.

Add comprehensive handling of type-constraints to isDeclarationSpecifier.

4 years ago[DAG] Enable ISD::INSERT_SUBVECTOR SimplifyMultipleUseDemandedBits handling
Simon Pilgrim [Fri, 31 Jan 2020 18:02:21 +0000 (18:02 +0000)]
[DAG] Enable ISD::INSERT_SUBVECTOR SimplifyMultipleUseDemandedBits handling

This allows SimplifyDemandedBits to call SimplifyMultipleUseDemandedBits to create a simpler ISD::INSERT_SUBVECTOR, which is particularly useful for cases where we're splitting into subvectors anyhow.

4 years ago[AMDGPU] fixed divergence driven shift operations selection
alex-t [Fri, 31 Jan 2020 17:49:00 +0000 (20:49 +0300)]
[AMDGPU] fixed divergence driven shift operations selection

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

Reviewers: rampitec

4 years ago[PGO][PGSO] Handle MBFIWrapper
Hiroshi Yamauchi [Wed, 29 Jan 2020 17:36:31 +0000 (09:36 -0800)]
[PGO][PGSO] Handle MBFIWrapper

Some code gen passes use MBFIWrapper to keep track of the frequency of new
blocks. This was not taken into account and could lead to incorrect frequencies
as MBFI silently returns zero frequency for unknown/new blocks.

Add a variant for MBFIWrapper in the PGSO query interface.

Depends on D73494.

4 years ago[GlobalISel] Tidy up unnecessary calls to createGenericVirtualRegister
Jay Foad [Fri, 31 Jan 2020 12:40:31 +0000 (12:40 +0000)]
[GlobalISel] Tidy up unnecessary calls to createGenericVirtualRegister

Summary:
As a side effect some redundant copies of constant values are removed by
CSEMIRBuilder.

Reviewers: aemerson, arsenm, dsanders, aditya_nandakumar

Subscribers: sdardis, jvesely, wdng, nhaehnle, rovka, hiraditya, jrtc27, atanasyan, volkan, Petar.Avramovic, kerbowa, llvm-commits

Tags: #llvm

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

4 years ago[lldb][NFC] Fix expect calls with wrong order of 'substrs' items for D73766
Raphael Isemann [Fri, 31 Jan 2020 08:02:32 +0000 (09:02 +0100)]
[lldb][NFC] Fix expect calls with wrong order of 'substrs' items for D73766

Currently the substrs parameter takes a list of strings
that need to be found but the ordering isn't checked. D73766
might change that so this changes a several tests so that
the order of the strings in the substrs list is in the order
in which they appear in the output.

4 years ago- Update .clang-tidy to ignore parameters of main like functions for naming violation...
Nathan James [Fri, 31 Jan 2020 16:49:13 +0000 (16:49 +0000)]
- Update .clang-tidy to ignore parameters of main like functions for naming violations in clang and llvm directory

Summary: Every call to a main like function in llvm and clang lib violates the naming convention for parameters. This prevents clang-tidy warning on such breaches.

Reviewers: alexfh, hokein

Reviewed By: hokein

Subscribers: merge_guards_bot, aheejin, cfe-commits, llvm-commits

Tags: #clang, #llvm

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

4 years ago[AArch64][SVE] Add SVE2 mla unpredicated intrinsics.
Danilo Carvalho Grael [Thu, 30 Jan 2020 22:21:39 +0000 (17:21 -0500)]
[AArch64][SVE] Add SVE2 mla unpredicated intrinsics.

Summary:
Add intrinsics for the MLA unpredicated sve2 instructions:
- smlalb, smlalt, umlalb, umlalt, smlslb, smlslt, umlslb, umlslt
- sqdmlalb, sqdmlalt, sqdmlslb, sqdmlslt
- sqdmlalbt, sqdmlslbt

Reviewers: efriedma, sdesmalen, cameron.mcinally, c-rhodes, rengolin, kmclaughlin

Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, llvm-commits, amehsan

Tags: #llvm

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

4 years ago[NFC] Introduce a type to model memory operation
Guillaume Chatelet [Fri, 31 Jan 2020 14:40:31 +0000 (15:40 +0100)]
[NFC] Introduce a type to model memory operation

Summary: This is a first step before changing the types to llvm::Align and introduce functions to ease client code.

Reviewers: courbet

Subscribers: arsenm, sdardis, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, jrtc27, atanasyan, jsji, kerbowa, llvm-commits

Tags: #llvm

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

4 years ago[NFC] [lldb] Unindent DWARFDebugInfoEntry::GetDWARFDeclContext
Jan Kratochvil [Fri, 31 Jan 2020 15:49:31 +0000 (16:49 +0100)]
[NFC] [lldb] Unindent DWARFDebugInfoEntry::GetDWARFDeclContext

Reduce code indentation level.