platform/upstream/llvm.git
4 years ago[AArch64][GlobalISel] Don't bail out of the select(cmp(a, b)) -> csel optimization...
Amara Emerson [Mon, 27 Jan 2020 23:57:16 +0000 (15:57 -0800)]
[AArch64][GlobalISel] Don't bail out of the select(cmp(a, b)) -> csel optimization with multiple users.

It can still be beneficial to do the optimization if the result of the compare
is used by *another* select.

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

4 years agoFix a crash when casting _Complex and ignoring the results.
Aaron Ballman [Tue, 28 Jan 2020 18:04:32 +0000 (13:04 -0500)]
Fix a crash when casting _Complex and ignoring the results.

Performing a cast where the result is ignored caused Clang to crash when
performing codegen for the conversion:

  _Complex int a;
  void fn1() { (_Complex double) a; }

This patch addresses the crash by not trying to emit the scalar conversions,
causing it to be a noop. Fixes PR44624.

4 years ago[WebAssembly] Add WebAssembly support to llvm-symbolizer
Derek Schuff [Thu, 23 Jan 2020 01:40:11 +0000 (17:40 -0800)]
[WebAssembly] Add WebAssembly support to llvm-symbolizer

The only thing missing for basic llvm-symbolizer support is the ability on
lib/Object to get a wasm symbol's section ID, which allows sorting and
computation of the symbols' sizes.

Also, when the WasmAsmParser switches sections on new functions, also add the
section to the list of Dwarf sections if Dwarf is being generated for assembly;
this allows writing of simple tests.

Reviewers: sbc100, jhenderson, aardappel

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

4 years ago[llvm-dwarfdump][Statistics] Ignore declarations of global variables
Kristina Bessonova [Sun, 19 Jan 2020 14:28:35 +0000 (16:28 +0200)]
[llvm-dwarfdump][Statistics] Ignore declarations of global variables

Reviewed by: djtodoro

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

4 years ago[llvm-dwarfdump][Statistics] Ignore DW_TAG_subroutine_type in statistics
Kristina Bessonova [Thu, 9 Jan 2020 20:21:17 +0000 (22:21 +0200)]
[llvm-dwarfdump][Statistics] Ignore DW_TAG_subroutine_type in statistics

DW_TAG_subroutine_type is not really useful for statistics purposes, as it never
has location information. But it may contain DW_TAG_formal_parameter
children that generate number of parameters w/o location and decrease
'availability' metric significantly.

Reviewed by: djtodoro

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

4 years ago[llvm-dwarfdump][Statistics] Distinguish functions/variables with same name across...
Kristina Bessonova [Tue, 14 Jan 2020 18:36:30 +0000 (20:36 +0200)]
[llvm-dwarfdump][Statistics] Distinguish functions/variables with same name across different CUs

Different variables and functions might have the same name in different CU.
To calculate 'Availability' metric more accurate (i.e. to avoid getting
availability above 100%), we need to have some additional logic to
distinguish between them.

The patch introduces a DIE identifier that consists of a function/variable name
and declaration information: a filename and a line number. This allows
distinguishing different functions/variables (different means declared in
different files/lines) with the same name, keeping duplicates counted
as duplicates.

Reviewed by: aprantl, djtodoro

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

4 years ago[llvm-objcopy] Initial support for wasm in llvm-objcopy
Derek Schuff [Sat, 23 Nov 2019 02:02:10 +0000 (18:02 -0800)]
[llvm-objcopy] Initial support for wasm in llvm-objcopy

Currently only supports simple copying, other operations to follow.

Reviewers: sbc100, alexshap, jhenderson

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

4 years agoRevert "[lldb/Target] Add Assert StackFrame Recognizer"
Med Ismail Bennani [Tue, 28 Jan 2020 17:40:08 +0000 (18:40 +0100)]
Revert "[lldb/Target] Add Assert StackFrame Recognizer"

This reverts commit 03a6b858fde5c644ec16b1fddd8e10aa9ef3f0ad.

The test doesn't pass on Debian.

4 years agoAdd missing clang tests for 6d614a82a4230ea69e322f56dc18dcbd815ed37b (AMDGPU MFMA...
Konstantin Pyzhov [Tue, 28 Jan 2020 09:41:21 +0000 (04:41 -0500)]
Add missing clang tests for 6d614a82a4230ea69e322f56dc18dcbd815ed37b (AMDGPU MFMA built-ins)

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

4 years ago[Matrix] Mark expressions shared between multiple remarks.
Florian Hahn [Tue, 28 Jan 2020 17:01:00 +0000 (09:01 -0800)]
[Matrix] Mark expressions shared between multiple remarks.

This patch adds support for explicitly highlighting sub-expressions
shared by multiple leaf nodes. For example consider the following
code

  %shared.load = tail call <8 x double> @llvm.matrix.columnwise.load.v8f64.p0f64(double* %arg1, i32 %stride, i32 2, i32 4), !dbg !10, !noalias !10
  %trans = tail call <8 x double> @llvm.matrix.transpose.v8f64(<8 x double> %shared.load, i32 2, i32 4), !dbg !10
  tail call void @llvm.matrix.columnwise.store.v8f64.p0f64(<8 x double> %trans, double* %arg3, i32 10, i32 4, i32 2), !dbg !10
  %load.2 = tail call <30 x double> @llvm.matrix.columnwise.load.v30f64.p0f64(double* %arg3, i32 %stride, i32 2, i32 15), !dbg !10, !noalias !10
  %mult = tail call <60 x double> @llvm.matrix.multiply.v60f64.v8f64.v30f64(<8 x double> %trans, <30 x double> %load.2, i32 4, i32 2, i32 15), !dbg !11
  tail call void @llvm.matrix.columnwise.store.v60f64.p0f64(<60 x double> %mult, double* %arg2, i32 10, i32 4, i32 15), !dbg !11

We have two leaf nodes (the 2 stores) and the first store stores %trans
which is also used by the matrix multiply %mult. We generate separate
remarks for each leaf (stores). To denote that parts are shared, the
shared expressions are marked as shared (), with a reference to the
other remark that shares it. The operation summary also denotes the
shared operations separately.

Reviewers: anemet, Gerolf, thegameg, hfinkel, andrew.w.kaylor, LuoYuanke

Reviewed By: anemet

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

4 years ago[lldb/Target] Add Assert StackFrame Recognizer
Med Ismail Bennani [Thu, 23 Jan 2020 14:11:53 +0000 (15:11 +0100)]
[lldb/Target] Add Assert StackFrame Recognizer

When a thread stops, this checks depending on the platform if the top frame is
an abort stack frame. If so, it looks for an assert stack frame in the upper
frames and set it as the most relavant frame when found.

To do so, the StackFrameRecognizer class holds a "Most Relevant Frame" and a
"cooked" stop reason description. When the thread is about to stop, it checks
if the current frame is recognized, and if so, it fetches the recognized frame's
attributes and applies them.

rdar://58528686

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

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
4 years ago[llvm] Fix broken cases of 'CHECK[^:]*$' in tests
Jonathan Roelofs [Mon, 27 Jan 2020 01:16:57 +0000 (18:16 -0700)]
[llvm] Fix broken cases of 'CHECK[^:]*$' in tests

4 years ago[LV] Hoist code to mark conditional assumes as dead to caller (NFC).
Florian Hahn [Tue, 28 Jan 2020 16:46:27 +0000 (08:46 -0800)]
[LV] Hoist code to mark conditional assumes as dead to caller (NFC).

This is a follow-up suggested in D73423. It is sufficient to just add
the conditional assumes to DeadInstructions once.

4 years agoSummary:
Konstantin Pyzhov [Tue, 28 Jan 2020 08:51:27 +0000 (03:51 -0500)]
Summary:
This CL adds clang declarations of built-in functions for AMDGPU MFMA intrinsics and instructions.
OpenCL tests for new built-ins are included.

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

4 years ago[LLD] Avoid exiting with a locked mutex NFC
Andrew Ng [Wed, 22 Jan 2020 17:08:09 +0000 (17:08 +0000)]
[LLD] Avoid exiting with a locked mutex NFC

In ErrorHandler::error(), rearrange code to avoid calling exitLld with
the mutex locked. Acquire mutex lock when flushing the output streams in
exitLld.

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

4 years ago[OPENMP50]Check for lastprivate conditional updates in atomic
Alexey Bataev [Tue, 28 Jan 2020 16:19:45 +0000 (11:19 -0500)]
[OPENMP50]Check for lastprivate conditional updates in atomic
constructs.

Added analysis in atomic constrcuts to support checks for updates of
conditional lastprivate variables.

4 years agoFix warning of `-Wcast-qual`. NFC.
Michael Liao [Tue, 28 Jan 2020 16:35:52 +0000 (11:35 -0500)]
Fix warning of `-Wcast-qual`. NFC.

4 years ago[LV] Do not try to sink dead instructions.
Florian Hahn [Tue, 28 Jan 2020 16:20:40 +0000 (08:20 -0800)]
[LV] Do not try to sink dead instructions.

Dead instructions do not need to be sunk. Currently we try and record
the recipies for them, but there are no recipes emitted for them and
there's nothing to sink. They can be removed from SinkAfter while
marking them for recording.

Fixes PR44634.

Reviewers: rengolin, hsaito, fhahn, Ayal, gilr

Reviewed By: gilr

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

4 years ago[HIP] Fix environment variable HIP_DEVICE_LIB_PATH
Yaxun (Sam) Liu [Thu, 23 Jan 2020 22:30:07 +0000 (17:30 -0500)]
[HIP] Fix environment variable HIP_DEVICE_LIB_PATH

Currently device lib path set by environment variable HIP_DEVICE_LIB_PATH
does not work due to extra "-L" added to each entry.

This patch fixes that by allowing argument name to be empty in addDirectoryList.

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

4 years agoRevert "[lldb/PDB] Use the new line table constructor"
Pavel Labath [Tue, 28 Jan 2020 16:15:26 +0000 (17:15 +0100)]
Revert "[lldb/PDB] Use the new line table constructor"

This reverts commit bb73210ba9f16c1516f564235c86cbddccd1bd6d due to
failures on the windows bot.

4 years ago[gn build] Port a32f894f17b
LLVM GN Syncbot [Tue, 28 Jan 2020 15:50:50 +0000 (15:50 +0000)]
[gn build] Port a32f894f17b

4 years ago[ADT] Remove more llvm::make_unique
Jonathan Roelofs [Fri, 24 Jan 2020 00:54:15 +0000 (17:54 -0700)]
[ADT] Remove more llvm::make_unique

https://reviews.llvm.org/D73316

4 years ago[clang] Fix EOL whitespace. NFC
Jonathan Roelofs [Sun, 26 Jan 2020 19:05:46 +0000 (12:05 -0700)]
[clang] Fix EOL whitespace. NFC

4 years ago[clang][CodeComplete] Support for designated initializers
Kadir Cetinkaya [Thu, 23 Jan 2020 12:28:16 +0000 (13:28 +0100)]
[clang][CodeComplete] Support for designated initializers

Reviewers: sammccall

Subscribers: cfe-commits

Tags: #clang

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

4 years ago[scudo][standalone] Secondary & general other improvements
Kostya Kortchinsky [Mon, 27 Jan 2020 22:03:21 +0000 (14:03 -0800)]
[scudo][standalone] Secondary & general other improvements

Summary:
This CL changes multiple things to improve performance (notably on
Android).We introduce a cache class for the Secondary that is taking
care of this mechanism now.

The changes:
- change the Secondary "freelist" to an array. By keeping free secondary
  blocks linked together through their headers, we were keeping a page
  per block, which isn't great. Also we know touch less pages when
  walking the new "freelist".
- fix an issue with the freelist getting full: if the pattern is an ever
  increasing size malloc then free, the freelist would fill up and
  entries would not be used. So now we empty the list if we get to many
  "full" events;
- use the global release to os interval option for the secondary: it
  was too costly to release all the time, particularly for pattern that
  are malloc(X)/free(X)/malloc(X). Now the release will only occur
  after the selected interval, when going through the deallocate path;
- allow release of the `BatchClassId` class: it is releasable, we just
  have to make sure we don't mark the batches containing batches
  pointers as free.
- change the default release interval to 1s for Android to match the
  current Bionic allocator configuration. A patch is coming up to allow
  changing it through `mallopt`.
- lower the smallest class that can be released to `PageSize/64`.

Reviewers: cferris, pcc, eugenis, morehouse, hctim

Subscribers: phosek, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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

4 years ago[mlir][spirv] Add GroupNonUniform arithmetic operations.
Denis Khalikov [Tue, 28 Jan 2020 14:36:01 +0000 (09:36 -0500)]
[mlir][spirv] Add GroupNonUniform arithmetic operations.

Add GroupNonUniform arithmetic operations: FAdd, FMul, IMul.
Unify parser, printer, verifier for GroupNonUniform arithmetic
operations.

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

4 years ago[clangd] Make bin/llvm-lit run standalone clangd tests
Kadir Cetinkaya [Tue, 28 Jan 2020 11:24:45 +0000 (12:24 +0100)]
[clangd] Make bin/llvm-lit run standalone clangd tests

Summary:
Currently clangd lit tests can't be run in isolation because we don't
set some of the config parameters. This enables running

./bin/llvm-lit ../clang-tools-extra/clangd/test/

or any other test in that subdirectory.

Reviewers: sammccall

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

Tags: #clang

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

4 years agoPrevent building with MSVC 14.24
Nico Weber [Tue, 28 Jan 2020 15:09:52 +0000 (10:09 -0500)]
Prevent building with MSVC 14.24

MSVC 14.24 miscompiles some of LLVM's code, which makes at least these tests fail:

    LLVM :: MC/MachO/gen-dwarf-cpp.s
    LLVM :: MC/MachO/gen-dwarf-macro-cpp.s
    LLVM :: MC/MachO/gen-dwarf-producer.s
    LLVM :: MC/MachO/gen-dwarf.s

It seems better to diagnose that at build time. Since both the previous
and the next version have a fix, this might be good enough and we might
not need a real workaround. (We ran into this at
https://crbug.com/1045948)

If you hit this, use either a newer or an older version of MSVC,
or use clang-cl as host compiler.

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

4 years ago[clang-format] Handle quotes and escaped braces in C# interpolated strings
Jonathan Coe [Tue, 28 Jan 2020 14:46:27 +0000 (14:46 +0000)]
[clang-format] Handle quotes and escaped braces in C# interpolated strings

Summary:
This addresses issues raised in https://bugs.llvm.org/show_bug.cgi?id=44454.

There are outstanding issues with multi-line verbatim strings in C# that will be addressed in a follow-up PR.

Reviewers: krasimir, MyDeveloperDay

Reviewed By: krasimir, MyDeveloperDay

Subscribers: MyDeveloperDay

Tags: #clang-format

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

4 years agoRevert "[Clang] Warn about 'z' printf modifier in old MSVC."
Nico Weber [Tue, 28 Jan 2020 14:27:54 +0000 (09:27 -0500)]
Revert "[Clang] Warn about 'z' printf modifier in old MSVC."

This reverts commit fe0d1b6a8ac5048b8007e5e7cc2aeb4e3291bda0.
Makes Analysis/taint-generic.c fail on some Windows systems.

4 years ago[PowerPC][Future] Add pld and pstd to future CPU
Victor Huang [Tue, 28 Jan 2020 14:22:53 +0000 (08:22 -0600)]
[PowerPC][Future] Add pld and pstd to future CPU
Add the prefixed instructions pld and pstd to future CPU. These are load and
store instructions that require new operand types that are 34 bits. This patch
adds the two instructions as well as the operand types required.

Note that this patch also makes a minor change to tablegen to account for the
fact that some instructions are going to require shifts greater than 31 bits
for the new 34 bit instructions.

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

4 years ago[CodeMoverUtils] Improve IsControlFlowEquivalent.
Whitney Tsang [Tue, 28 Jan 2020 03:50:33 +0000 (03:50 +0000)]
[CodeMoverUtils] Improve IsControlFlowEquivalent.

Summary:
Currently IsControlFlowEquivalent determine if two blocks are control
flow equivalent by checking if A dominates B and B post dominates A.
There exists blocks that are control flow equivalent even if they don't
satisfy the A dominates B and B post dominates A condition.
For example,

if (cond)
  A
if (cond)
  B
In the PR, we determine if two blocks are control flow equivalent by
also checking if the two sets of conditions A and B depends on are
equivalent.
Reviewer: jdoerfert, Meinersbur, dmgreen, etiotto, bmahjour, fhahn,
hfinkel, kbarton
Reviewed By: fhahn
Subscribers: hiraditya, llvm-commits
Tag: LLVM
Differential Revision: https://reviews.llvm.org/D71578

4 years ago[lldb/PDB] Use the new line table constructor
Pavel Labath [Tue, 28 Jan 2020 14:03:09 +0000 (15:03 +0100)]
[lldb/PDB] Use the new line table constructor

The old method of adding line sequences one by one can easily go
quadratic if the sequences are not perfectly sorted. The equivalent
change in DWARF brought a considerable improvement in line table
parsing. It is not clear if the same will be the case for PDB, but this
does bring us a step closer towards removing the dangerous API.

4 years agoFix sphinx build bot failure. NFCI.
Wang, Pengfei [Tue, 28 Jan 2020 14:05:15 +0000 (22:05 +0800)]
Fix sphinx build bot failure. NFCI.

4 years agoRevert "PR44684: Look through parens and similar constructs when determining"
Nico Weber [Tue, 28 Jan 2020 14:03:27 +0000 (09:03 -0500)]
Revert "PR44684: Look through parens and similar constructs when determining"

This reverts commit af80b8ccc5772c14920d4554b7ca7e15f2fad1c4.
It broke clang-tidy/checkers/modernize-use-uncaught-exceptions.cpp in
check-clang-tools on macOS and Windows, see e.g.
http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/13976/steps/stage%201%20check/logs/stdio

4 years ago[NFC][RDA] typedef SmallPtrSetImpl<MachineInstr*>
Sam Parker [Tue, 28 Jan 2020 13:06:07 +0000 (13:06 +0000)]
[NFC][RDA] typedef SmallPtrSetImpl<MachineInstr*>

4 years ago[ASTMatchers] Add cxxNoexceptExpr AST matcher
Nathan [Tue, 28 Jan 2020 13:12:08 +0000 (13:12 +0000)]
[ASTMatchers] Add cxxNoexceptExpr AST matcher

Summary: Adds a cxxNoexceptExpr matcher that matches the [[ https://en.cppreference.com/w/cpp/language/noexcept |  noexcept operator ]].

Reviewers: aaron.ballman

Reviewed By: aaron.ballman

Subscribers: merge_guards_bot, cfe-commits

Tags: #clang

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

4 years ago[ADT] Implicitly convert between StringRef and std::string_view when we have C++17
Benjamin Kramer [Tue, 28 Jan 2020 12:51:38 +0000 (13:51 +0100)]
[ADT] Implicitly convert between StringRef and std::string_view when we have C++17

This makes the types almost seamlessly interchangeable in C++17
codebases. Eventually we want to replace StringRef with the standard
type, but that requires C++17 being the default and a huge refactoring
job as StringRef has a lot more functionality.

4 years agoRevert "[lldb/DWARF] Only match mangled name in full-name function lookup (with accel...
Pavel Labath [Tue, 28 Jan 2020 12:42:34 +0000 (13:42 +0100)]
Revert "[lldb/DWARF] Only match mangled name in full-name function lookup (with accelerators)"

This reverts commit 1b12766883006b8aa9d1ff744e57317647aa052a because of
breaking the mac test suite.

I'm not certain this is the cause because of a concurrent build breakage
which masked this problem, but the failure messages are related to
symbol lookup, which makes this very likely.

4 years ago[FPEnv] Add pragma FP_CONTRACT support under strict FP.
Wang, Pengfei [Wed, 15 Jan 2020 11:08:38 +0000 (19:08 +0800)]
[FPEnv] Add pragma FP_CONTRACT support under strict FP.

Summary: Support pragma FP_CONTRACT under strict FP.

Reviewers: craig.topper, andrew.w.kaylor, uweigand, RKSimon, LiuChen3

Subscribers: hiraditya, jdoerfert, cfe-commits, llvm-commits, LuoYuanke

Tags: #clang, #llvm

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

4 years ago[mips][NFC] Remove unused instruction formats
Miloš Stojanović [Mon, 27 Jan 2020 15:29:26 +0000 (16:29 +0100)]
[mips][NFC] Remove unused instruction formats

`BranchBase` unused sice: rL170663
`FI` unsused since: rL170954
`FFI` unused since: rL190221

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

4 years ago[X86] Add combination for fma and fneg on X86 under strict FP.
Wang, Pengfei [Wed, 15 Jan 2020 11:08:38 +0000 (19:08 +0800)]
[X86] Add combination for fma and fneg on X86 under strict FP.

Summary: X86 has instructions to calculate fma and fneg at the same time. But we combine the fneg and fma only when fneg is the source operand under strict FP.

Reviewers: craig.topper, andrew.w.kaylor, uweigand, RKSimon, LiuChen3

Subscribers: LuoYuanke, llvm-commits, cfe-commits, jdoerfert, hiraditya

Tags: #llvm

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

4 years ago[LLD][ELF][ARM] Do not insert interworking thunks for non STT_FUNC symbols
Peter Smith [Thu, 23 Jan 2020 19:03:25 +0000 (19:03 +0000)]
[LLD][ELF][ARM] Do not insert interworking thunks for non STT_FUNC symbols

ELF for the ARM architecture requires linkers to provide
interworking for symbols that are of type STT_FUNC. Interworking for
other symbols must be encoded directly in the object file. LLD was always
providing interworking, regardless of the symbol type, this breaks some
programs that have branches from Thumb state targeting STT_NOTYPE symbols
that have bit 0 clear, but they are in fact internal labels in a Thumb
function. LLD treats these symbols as ARM and inserts a transition to Arm.

This fixes the problem for in range branches, R_ARM_JUMP24,
R_ARM_THM_JUMP24 and R_ARM_THM_JUMP19. This is expected to be the vast
majority of problem cases as branching to an internal label close to the
function.

There is at least one follow up patch required.
- R_ARM_CALL and R_ARM_THM_CALL may do interworking via BL/BLX
  substitution.

In theory range-extension thunks can be altered to not change state when
the symbol type is not STT_FUNC. I will need to check with ld.bfd to see if
this is the case in practice.

Fixes (part of) https://github.com/ClangBuiltLinux/linux/issues/773

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

4 years ago[LLD][ELF][ARM] clang-format function signature [NFC]
Peter Smith [Tue, 28 Jan 2020 11:22:48 +0000 (11:22 +0000)]
[LLD][ELF][ARM] clang-format function signature [NFC]

ARM::needsThunk had gone over 80 characters, run clang-format over it to
prevent it wrapping.

4 years agoRevert "[DebugInfo] Make most debug line prologue errors non-fatal to parsing"
James Henderson [Tue, 28 Jan 2020 11:49:30 +0000 (11:49 +0000)]
Revert "[DebugInfo] Make most debug line prologue errors non-fatal to parsing"

This reverts commit b94191fecdbadc18b342a27df1109754edcb8c4b.

The change broke both an LLD test and the LLDB build.

4 years ago[DebugInfo] Make most debug line prologue errors non-fatal to parsing
James Henderson [Fri, 3 Jan 2020 15:19:27 +0000 (15:19 +0000)]
[DebugInfo] Make most debug line prologue errors non-fatal to parsing

Many of the debug line prologue errors are not inherently fatal. In most
cases, we can make reasonable assumptions and carry on. This patch does
exactly that. In the case of length problems, the approach of "the
claimed length is correct" is taken to be consistent with other
instances such as the SectionParser, which ignores the read length.

Reviewed by: dblaikie

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

4 years ago[clangd] use SCOPED_TRACE to better trace the testcase in test failure, NFC
Haojian Wu [Mon, 27 Jan 2020 13:09:27 +0000 (14:09 +0100)]
[clangd] use SCOPED_TRACE to better trace the testcase in test failure, NFC

Reviewers: kadircet

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

Tags: #clang

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

4 years ago[lldb/DWARF] Only match mangled name in full-name function lookup (with accelerators)
Jaroslav Sevcik [Tue, 28 Jan 2020 10:37:44 +0000 (11:37 +0100)]
[lldb/DWARF] Only match mangled name in full-name function lookup (with accelerators)

Summary:
In the spirit of https://reviews.llvm.org/D70846, we only return functions with matching mangled name from Apple/DebugNamesDWARFIndex::GetFunction if eFunctionNameTypeFull is requested.

This speeds up lookup in the presence of large amount of class methods of the same name (a typical examples would be constructors of templates with many instantiations or overloaded operators).

Reviewers: labath

Reviewed By: labath

Subscribers: aprantl, arphaman, lldb-commits

Tags: #lldb

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

4 years ago[docs] Clarify llvm.used semantics with less awkward wording
Benjamin Kramer [Tue, 28 Jan 2020 11:13:57 +0000 (12:13 +0100)]
[docs] Clarify llvm.used semantics with less awkward wording

4 years agoAdd lowering for loop.parallel to cfg.
Stephan Herhut [Fri, 24 Jan 2020 14:17:04 +0000 (15:17 +0100)]
Add lowering for loop.parallel to cfg.

Summary:
This also removes the explicit pattern for loop.terminator to ensure
that the terminator is only erased if the parent op is rewritten.

Reductions are not yet supported.

Reviewers: nicolasvasilache

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

Tags: #llvm

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

4 years ago[mlir] NFC: use ValueRange in AffineToStandard conversion
Alex Zinenko [Tue, 28 Jan 2020 10:53:00 +0000 (11:53 +0100)]
[mlir] NFC: use ValueRange in AffineToStandard conversion

ValueRange is a more flexible way of passing around ranges of Values
that avoids Value vector materialization in affine expression expansion.

4 years ago[AMDGPU] Fix vccz after v_readlane/v_readfirstlane to vcc_lo/hi
Jay Foad [Wed, 30 Oct 2019 12:18:51 +0000 (12:18 +0000)]
[AMDGPU] Fix vccz after v_readlane/v_readfirstlane to vcc_lo/hi

Summary:
Up to gfx9, writes to vcc_lo and vcc_hi by instructions like
v_readlane and v_readfirstlane do not update vccz to reflect the new
value of vcc. Fix it by reusing part of the existing vccz bug handling
code, which inserts an "s_mov_b64 vcc, vcc" instruction to restore vccz
just before an instruction that needs the correct value.

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

Tags: #llvm

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

4 years ago[lldb][NFC] Simplify Materializer/Dematerializer constructors
Raphael Isemann [Tue, 28 Jan 2020 10:31:02 +0000 (11:31 +0100)]
[lldb][NFC] Simplify Materializer/Dematerializer constructors

4 years ago[clangd][Hover] Handle uninstantiated templates
Kadir Cetinkaya [Fri, 24 Jan 2020 12:04:00 +0000 (13:04 +0100)]
[clangd][Hover] Handle uninstantiated templates

Summary: Fixes https://github.com/clangd/clangd/issues/263

Reviewers: hokein, sammccall

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

Tags: #clang

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

4 years ago[clangd] Support pseudo-obj expr, opaque values, and property references in findExpli...
Sam McCall [Fri, 10 Jan 2020 15:27:12 +0000 (16:27 +0100)]
[clangd] Support pseudo-obj expr, opaque values, and property references in findExplicitReferences()

Reviewers: ilya-biryukov, dgoldman

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

Tags: #clang

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

4 years ago[lldb] Cut off unused suffix in CompletionRequest::GetRawLine
Raphael Isemann [Tue, 28 Jan 2020 09:21:30 +0000 (10:21 +0100)]
[lldb] Cut off unused suffix in CompletionRequest::GetRawLine

The GetRawLine currently returns the full command line used
to create the CompletionRequest. So for example for "foo b[tab] --arg"
it would return the whole string instead of "foo b". Usually
completion code makes the wrong assumption that the cursor is at
the end of the line and handing out the complete line will cause
that people implement completions that also make this assumption.

This patch makes GetRawLine() return only the string until the
cursor and hides the suffix (so that the cursor is always at the
end of this string) and adds another function GetRawLineWithUnusedSuffix
that is specifically the line with the suffix that isn't used by
the CompletionRequest for argument parsing etc.

There is only one user of this new function that actually needs the
suffix and that is the expression command which needs the suffix to
detect if it is in the raw or argument part of the command (by looking
at the "--" separator).

4 years ago[clangd] Improve ObjC property handling in SelectionTree.
Sam McCall [Mon, 13 Jan 2020 18:53:52 +0000 (19:53 +0100)]
[clangd] Improve ObjC property handling in SelectionTree.

Fixes https://github.com/clangd/clangd/issues/233

Reviewers: dgoldman

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

Tags: #clang

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

4 years ago[mlir] fixed invalid LLVM intrinsics in LLVMOPs.td and llvmir-intrinsics.mlir.
Julian Gross [Mon, 27 Jan 2020 13:58:36 +0000 (14:58 +0100)]
[mlir] fixed invalid LLVM intrinsics in LLVMOPs.td and llvmir-intrinsics.mlir.

Summary:
The intrinsic operation added multiple type annotations to the llvm intrinsic operations, but only one is needed.
The related tests in llvmir-intrinsics.mlir checked the wrong number and are adjusted as well.

Reviewers: nicolasvasilache, ftynse

Reviewed By: ftynse

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

Tags: #llvm

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

4 years agoAdd tanh lowering from Standard dialect to NVVM and ROCDL.
Julian Gross [Mon, 27 Jan 2020 13:59:49 +0000 (14:59 +0100)]
Add tanh lowering from Standard dialect to NVVM and ROCDL.

Summary:
The tanh lowering from Standard dialect to NVVM and ROCDL was not working.
The conversion pattern are inserted in the lowering files.
The test cases for the lowerings were added in the test files.

Reviewers: nicolasvasilache, ftynse, herhut

Reviewed By: ftynse, herhut

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

Tags: #llvm

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

4 years ago[VE] call isel with stack passing
Kazushi (Jam) Marukawa [Tue, 28 Jan 2020 08:55:56 +0000 (09:55 +0100)]
[VE] call isel with stack passing

Summary:
Function calls and stack-passing of function arguments.
Custom lowering, isel patterns and tests.

Reviewed By: arsenm

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

4 years ago[llvm-readobj][test] - Remove --symbols --dyn-syms part from Object/readobj-shared...
Georgii Rymar [Wed, 22 Jan 2020 12:58:32 +0000 (15:58 +0300)]
[llvm-readobj][test] - Remove --symbols --dyn-syms part from Object/readobj-shared-object.test.

The intention of Object/readobj-shared-object.test was to check the
general output for shared object.

I've added a case for testing dynamic objects to ELF/symbols.test.
Also we already test dynamic symbols printing in ELF/dyn-symbols.test +
I've added a case for `--dyn-syms` alias in D73164.

Hence we can remove this piece from Object/readobj-shared-object.test.

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

4 years agoUpdate tests for @llvm.memcpy.inline intrinsics
Guillaume Chatelet [Tue, 28 Jan 2020 09:32:32 +0000 (10:32 +0100)]
Update tests for @llvm.memcpy.inline intrinsics

4 years ago[mlir] NFC: use doxygen-style comments in AffineToStandard.cpp
Alex Zinenko [Tue, 28 Jan 2020 09:21:12 +0000 (10:21 +0100)]
[mlir] NFC: use doxygen-style comments in AffineToStandard.cpp

4 years agoFix failing bot
Guillaume Chatelet [Tue, 28 Jan 2020 09:20:41 +0000 (10:20 +0100)]
Fix failing bot

4 years ago[Clang] Warn about 'z' printf modifier in old MSVC.
Simon Tatham [Tue, 28 Jan 2020 09:03:31 +0000 (09:03 +0000)]
[Clang] Warn about 'z' printf modifier in old MSVC.

Summary:
The 'z' length modifier, signalling that an integer format specifier
takes a `size_t` sized integer, is only supported by the C library of
MSVC 2015 and later. Earlier versions don't recognize the 'z' at all,
and respond to `printf("%zu", x)` by just printing "zu".

So, if the MS compatibility version is set to a value earlier than
MSVC2015, it's useful to warn about 'z' modifiers in printf format
strings we check.

Reviewers: aaron.ballman, lebedev.ri, rnk, majnemer, zturner

Reviewed By: aaron.ballman

Subscribers: amccarth, cfe-commits

Tags: #clang

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

4 years ago[VE] enable unaligned load/store isel
Kazushi (Jam) Marukawa [Tue, 28 Jan 2020 08:52:53 +0000 (09:52 +0100)]
[VE] enable unaligned load/store isel

Summary: Enable unaligned load/store isel for iN and fp32/64 and tests.

Reviewed By: arsenm

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

4 years ago[instrinsics] Add @llvm.memcpy.inline instrinsics
Guillaume Chatelet [Thu, 19 Dec 2019 16:33:36 +0000 (17:33 +0100)]
[instrinsics] Add @llvm.memcpy.inline instrinsics

Summary:
This is a follow up on D61634. It adds an LLVM IR intrinsic to allow better implementation of memcpy from C++.
A follow up CL will add the intrinsics in Clang.

Reviewers: courbet, theraven, t.p.northover, jdoerfert, tejohnson

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

4 years agoRevert "[lsan] Support LeakSanitizer runtime on Fuchsia"
Petr Hosek [Tue, 28 Jan 2020 08:24:41 +0000 (00:24 -0800)]
Revert "[lsan] Support LeakSanitizer runtime on Fuchsia"

This reverts commit d59e3429f3a6291416e7eb99184448dfe685b77a.

4 years ago[mlir] Replace toy::DeadFunctionEliminationPass with symbolDCEPass.
River Riddle [Tue, 28 Jan 2020 07:40:01 +0000 (23:40 -0800)]
[mlir] Replace toy::DeadFunctionEliminationPass with symbolDCEPass.

Summary:
The dead function elimination pass in toy was a temporary stopgap until we had proper dead function elimination support in MLIR. Now that this functionality is available, this pass is no longer necessary.

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

4 years ago[Clang] Enable -fsanitize=leak on Fuchsia targets
Roland McGrath [Tue, 28 Jan 2020 07:36:24 +0000 (23:36 -0800)]
[Clang] Enable -fsanitize=leak on Fuchsia targets

This required some fixes to the generic code for two issues:

1. -fsanitize=safe-stack is default on x86_64-fuchsia and is *not* incompatible with -fsanitize=leak on Fuchisa
2. -fsanitize=leak and other static-only runtimes must not be omitted under -shared-libsan (which is the default on Fuchsia)

Patch By: mcgrathr

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

4 years ago[lsan] Support LeakSanitizer runtime on Fuchsia
Roland McGrath [Tue, 28 Jan 2020 07:34:15 +0000 (23:34 -0800)]
[lsan] Support LeakSanitizer runtime on Fuchsia

Support LeakSanitizer runtime on Fuchsia.

Patch By: mcgrathr

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

4 years ago[mlir] Add a DCE pass for dead symbols.
River Riddle [Tue, 28 Jan 2020 07:24:48 +0000 (23:24 -0800)]
[mlir] Add a DCE pass for dead symbols.

Summary: This pass deletes all symbols that are found to be unreachable. This is done by computing the set of operations that are known to be live, propagating that liveness to other symbols, and then deleting all symbols that are not within this live set.

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

4 years ago[mlir] Refactor the implementation of Symbol use lists.
River Riddle [Tue, 28 Jan 2020 06:57:06 +0000 (22:57 -0800)]
[mlir] Refactor the implementation of Symbol use lists.

Summary: This revision refactors the implementation of the symbol use-list functionality to be a bit cleaner, as well as easier to reason about. Aside from code cleanup, this revision updates the user contract to never recurse into operations if they define a symbol table. The current functionality, which does recurse, makes it difficult to examine the uses held by a symbol table itself. Moving forward users may provide a specific region to examine for uses instead.

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

4 years ago[mlir][NFC] Update Operation::getResultTypes to use ArrayRef<Type> instead of iterato...
River Riddle [Tue, 28 Jan 2020 03:57:14 +0000 (19:57 -0800)]
[mlir][NFC] Update Operation::getResultTypes to use ArrayRef<Type> instead of iterator_range.

Summary: The new internal representation of operation results now allows for accessing the result types to be more efficient. Changing the API to ArrayRef is more efficient and removes the need to explicitly materialize vectors in several places.

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

4 years ago[mlir] Add support for marking 'unknown' operations as dynamically legal.
River Riddle [Tue, 28 Jan 2020 03:04:55 +0000 (19:04 -0800)]
[mlir] Add support for marking 'unknown' operations as dynamically legal.

Summary: This allows for providing a default "catchall" legality check that is not dependent on specific operations or dialects. For example, this can be useful to check legality based on the specific types of operation operands or results.

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

4 years agoMake AST reading work better with LLVM_APPEND_VC_REV=NO
Nico Weber [Wed, 22 Jan 2020 15:34:34 +0000 (10:34 -0500)]
Make AST reading work better with LLVM_APPEND_VC_REV=NO

With LLVM_APPEND_VC_REV=NO, Modules/merge-lifetime-extended-temporary.cpp
would fail if it ran before a0f50d731639350c7a7 (which changed
the serialization format) and then after, for these reasons:

1. With LLVM_APPEND_VC_REV=NO, the module hash before and after the
   change was the same.

2. Modules/merge-lifetime-extended-temporary.cpp is the only test
   we have that uses -fmodule-cache-path=%t that
   a) actually writes to the cache path
   b) doesn't do `rm -rf %t` at the top of the test

So the old run would write a module file, and then the new run would
try to load it, but the serialized format changed.

Do several things to fix this:

1. Include clang::serialization::VERSION_MAJOR/VERSION_MINOR in
   the module hash, so that when the AST format changes (...and
   we remember to bump these), we use a different module cache dir.
2. Bump VERSION_MAJOR, since a0f50d731639350c7a7 changed the
   on-disk format in a way that a gch file written before that change
   can't be read after that change.
3. Add `rm -rf %t` to all tests that pass -fmodule-cache-path=%t.
   This is unnecessary from a correctness PoV after 1 and 2,
   but makes it so that we don't amass many cache dirs over time.
   (Arguably, it also makes it so that the test suite doesn't catch
   when we change the serialization format but don't bump
   clang::serialization::VERSION_MAJOR/VERSION_MINOR; oh well.)

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

4 years agoPR44684: Look through parens and similar constructs when determining
Richard Smith [Tue, 28 Jan 2020 02:08:41 +0000 (18:08 -0800)]
PR44684: Look through parens and similar constructs when determining
whether a call is to a builtin.

We already had a general mechanism to do this but for some reason
weren't using it. In passing, check for the other unary operators that
can intervene in a reasonably-direct function call (we already handled
'&' but missed '*' and '+').

4 years ago[Matrix] Mark remarks test as AArch64 specific.
Florian Hahn [Tue, 28 Jan 2020 02:00:43 +0000 (18:00 -0800)]
[Matrix] Mark remarks test as AArch64 specific.

4 years ago[Matrix] Add info about number of operations to remarks.
Florian Hahn [Tue, 28 Jan 2020 01:17:17 +0000 (17:17 -0800)]
[Matrix] Add info about number of operations to remarks.

This patch updates the remark to also include a summary of the number of
vector operations generated for each matrix expression.

Reviewers: anemet, Gerolf, thegameg, hfinkel, andrew.w.kaylor, LuoYuanke

Reviewed By: anemet

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

4 years ago[llvm] Fix file ignoring inside directories
Shoaib Meenai [Thu, 23 Jan 2020 06:29:34 +0000 (22:29 -0800)]
[llvm] Fix file ignoring inside directories

We have some ! patterns in the .gitignore (for the projects and runtimes
directories), and those patterns end up overriding the previous file
ignores, such that e.g. a .swp file inside the runtimes directory isn't
ignored. Move the file ignores last to ensure they take effect.

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

4 years ago[runtimes] Support install-*-stripped targets
Shoaib Meenai [Thu, 23 Jan 2020 06:28:14 +0000 (22:28 -0800)]
[runtimes] Support install-*-stripped targets

This is needed to support including runtime targets in
LLVM_DISTRIBUTION_COMPONENTS.

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

4 years ago[runtimes] Fix installation for LLVM_RUNTIME_DISTRIBUTION_COMPONENTS
Shoaib Meenai [Thu, 23 Jan 2020 06:16:28 +0000 (22:16 -0800)]
[runtimes] Fix installation for LLVM_RUNTIME_DISTRIBUTION_COMPONENTS

The installation target we create should trigger the corresponding
installation target in the runtimes external project.

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

4 years ago[LV] Remove nondeterminacy by changing LoopVectorizationLegality::Reductions
Wei Mi [Tue, 28 Jan 2020 00:49:50 +0000 (16:49 -0800)]
[LV] Remove nondeterminacy by changing LoopVectorizationLegality::Reductions
from DenseMap to MapVector

The iteration order of LoopVectorizationLegality::Reductions matters for the
final code generation, so we better use MapVector instead of DenseMap for it
to remove the nondeterminacy. reduction-order.ll in the patch is an example
reduced from the case we saw. In the output of opt command, the order of the
select instructions in the vector.body block keeps changing from run to run
currently.

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

4 years ago[Matrix] Add optimization remarks for matrix expression.
Florian Hahn [Tue, 28 Jan 2020 00:22:04 +0000 (16:22 -0800)]
[Matrix] Add optimization remarks for matrix expression.

Generate remarks for matrix operations in a function. To generate remarks
for matrix expressions, the following approach is used:
1. Collect leafs of matrix expressions (done in
   RemarkGenerator::getExpressionLeafs).  Leafs are lowered matrix
   instructions without other matrix users (like stores).

2. For each leaf, create a remark containing a linearizied version of the
   matrix expression.

The following improvements will be submitted as follow-ups:
* Summarize number of vector instructions generated for each expression.
* Account for shared sub-expressions.
* Propagate matrix remarks up the inlining chain.

The information provided by the matrix remarks helps users to spot cases
where matrix expression got split up, e.g. due to inlining not
happening. The remarks allow users to address those issues, ensuring
best performance.

Reviewers: anemet, Gerolf, thegameg, hfinkel, andrew.w.kaylor, LuoYuanke

Reviewed By: anemet

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

4 years ago[clang-tidy] Fix bugprone-use-after-move when move is in noexcept operator
Nathan [Tue, 28 Jan 2020 00:28:59 +0000 (00:28 +0000)]
[clang-tidy] Fix bugprone-use-after-move when move is in noexcept operator

Summary: Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=44667 | noexcept operator misinterpreted as being evaluated ]].

Reviewers: aaron.ballman, alexfh, JonasToth, hokein, gribozavr2

Reviewed By: gribozavr2

Subscribers: merge_guards_bot, Quuxplusone, xazax.hun, cfe-commits

Tags: #clang, #clang-tools-extra

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

4 years agoReland "[StackColoring] Remap PseudoSourceValue frame indices via MachineFunction...
Fangrui Song [Mon, 27 Jan 2020 23:10:07 +0000 (15:10 -0800)]
Reland "[StackColoring] Remap PseudoSourceValue frame indices via MachineFunction::getPSVManager()""

Reland 7a8b0b1595e7dc878b48cf9bbaa652087a6895db, with a fix that checks
`!E.value().empty()` to avoid inserting a zero to SlotRemap.

Debugged by rnk@ in https://bugs.chromium.org/p/chromium/issues/detail?id=1045650#c33

Reviewed By: rnk

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

4 years ago[clang-tidy] readability-redundant-string-init now flags redundant initialisation...
Nathan [Mon, 27 Jan 2020 23:50:26 +0000 (23:50 +0000)]
[clang-tidy] readability-redundant-string-init now flags redundant initialisation in Field Decls and Constructor Initialisers

Summary:
The original behaviour of this check only looked at VarDecls with strings that had an empty string initializer. This has been improved to check for FieldDecls with an in class initializer as well as constructor initializers.

Addresses [[ https://bugs.llvm.org/show_bug.cgi?id=44474 | clang-tidy "modernize-use-default-member-init"/"readability-redundant-string-init" and redundant initializer of std::string ]]

Reviewers: aaron.ballman, alexfh, hokein

Reviewed By: aaron.ballman

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

Tags: #clang, #clang-tools-extra

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

4 years ago[clang-tidy] readability-identifier-naming disregards parameters restrictions on...
Nathan [Mon, 27 Jan 2020 23:46:53 +0000 (23:46 +0000)]
[clang-tidy] readability-identifier-naming disregards parameters restrictions on main like functions

Summary:
Typically most main functions have the signature:
```
int main(int argc, char *argv[])
```
To stick with convention when renaming parameters we should ignore the `argc` and `argv` names even if the parameter style says they should be renamed. This patch addresses this by checking all ParmVarDecls if they form part of a function with a signature that matches main `int name(int argc, char * argv[], (optional char *env[]))`

Reviewers: aaron.ballman, JonasToth, alexfh, hokein

Reviewed By: aaron.ballman

Subscribers: Mordante, merge_guards_bot, xazax.hun, kristof.beyls, cfe-commits

Tags: #clang, #clang-tools-extra

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

4 years ago[IR] Keep a double break between functions when printing a module
Reid Kleckner [Mon, 27 Jan 2020 21:49:09 +0000 (13:49 -0800)]
[IR] Keep a double break between functions when printing a module

This behavior appears to have changed unintentionally in
b0e979724f2679e4e6f5b824144ea89289bd6d56.

Instead of printing the leading newline in printFunction, print it when
printing a module. This ensures that `OS << *Func` starts printing
immediately on the current line, but whole modules are printed nicely.

Reviewed By: MaskRay

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

4 years ago[WinEH] Re-run stack coloring test for i686
Reid Kleckner [Mon, 27 Jan 2020 23:24:58 +0000 (15:24 -0800)]
[WinEH] Re-run stack coloring test for i686

This would've caught https://crbug.com/1045650, which resulted in the
revert of 7a8b0b1595e7dc878b48cf9bbaa652087a6895db.

4 years agoSupport zero size types in StackSafetyAnalysis.
Evgenii Stepanov [Sat, 25 Jan 2020 00:36:24 +0000 (16:36 -0800)]
Support zero size types in StackSafetyAnalysis.

Reviewers: vitalybuka

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

4 years agoFix StackSafetyAnalysis crash with scalable vector types.
Evgenii Stepanov [Sat, 25 Jan 2020 00:36:13 +0000 (16:36 -0800)]
Fix StackSafetyAnalysis crash with scalable vector types.

Summary:
Treat scalable allocas as if they have storage size of 0, and
scalable-typed memory accesses as if their range is unlimited.

This is not a proper support of scalable vector types in the analysis -
we can do better, but not today.

Reviewers: vitalybuka

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[AArch64] Add option to enable/disable load-store renaming.
Florian Hahn [Mon, 27 Jan 2020 23:11:45 +0000 (15:11 -0800)]
[AArch64] Add option to enable/disable load-store renaming.

This patch adds a new option to enable/disable register renaming in the
load-store optimizer. Defaults to disabled, as there is a potential
mis-compile caused by this.

4 years ago[lldb/Commands] Make column available through _regexp-break
Jonas Devlieghere [Mon, 27 Jan 2020 23:10:13 +0000 (15:10 -0800)]
[lldb/Commands] Make column available through _regexp-break

Update _regexp-break to interpret main.c:8:21 as:

  breakpoint set --line 8 --column 21

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

4 years ago[lldb/Test] Use lit.local.cfg to mark whole directory as (un)supported.
Jonas Devlieghere [Mon, 27 Jan 2020 23:08:58 +0000 (15:08 -0800)]
[lldb/Test] Use lit.local.cfg to mark whole directory as (un)supported.

Mark the whole Python or Lua test directory as unsupported when the
corresponding language is not available.

4 years agoremove a trailing space character (test commit)
Eric Schweitz [Mon, 27 Jan 2020 23:01:55 +0000 (15:01 -0800)]
remove a trailing space character (test commit)

4 years agoAMDGPU/GlobalISel: Eliminate SelectVOP3Mods_f32
Matt Arsenault [Fri, 24 Jan 2020 18:11:23 +0000 (13:11 -0500)]
AMDGPU/GlobalISel: Eliminate SelectVOP3Mods_f32

Trivial type predicates should be moved into the tablegen pattern
itself, and not checked inside complex patterns. This eliminates a
redundant complex pattern, and fixes select source modifiers for
GlobalISel.

I have further patches which fully handle select in tablegen and
remove all of the C++ selection, although it requires the ugliness to
support the entire range of legal register types.

4 years ago[gwp-asan] Implement malloc_iterate.
Evgenii Stepanov [Fri, 24 Jan 2020 00:12:15 +0000 (16:12 -0800)]
[gwp-asan] Implement malloc_iterate.

Summary:
This is an Android-specific interface for iterating over all live
allocations in a memory range.

Reviewers: hctim, cferris

Subscribers: mgorny, mgrang, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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

4 years ago[GlobalISel] Make use of KnownBits::computeForAddSub
Jay Foad [Sun, 26 Jan 2020 14:34:28 +0000 (14:34 +0000)]
[GlobalISel] Make use of KnownBits::computeForAddSub

Summary:
This is mostly NFC. computeForAddSub may give more precise results in
some cases, but that doesn't seem to affect any existing GlobalISel
tests.

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

Tags: #llvm

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

4 years ago[mlir] Remove 'valuesToRemoveIfDead' from PatternRewriter API
Diego Caballero [Mon, 27 Jan 2020 21:13:20 +0000 (13:13 -0800)]
[mlir] Remove 'valuesToRemoveIfDead' from PatternRewriter API

Summary:
Remove 'valuesToRemoveIfDead' from PatternRewriter API. The removal
functionality wasn't implemented and we decided [1] not to implement it in
favor of having more powerful DCE approaches.

[1] https://github.com/tensorflow/mlir/pull/212

Reviewers: rriddle, bondhugula

Reviewed By: rriddle

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

Tags: #llvm

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