platform/upstream/llvm.git
4 years agoadd a test for D77524
Juneyoung Lee [Thu, 21 May 2020 01:03:27 +0000 (10:03 +0900)]
add a test for D77524

4 years ago[gn build] Port d9a4a244138
LLVM GN Syncbot [Thu, 21 May 2020 00:30:02 +0000 (00:30 +0000)]
[gn build] Port d9a4a244138

4 years agoAdd CanonicalizeFreezeInLoops pass
Juneyoung Lee [Thu, 7 May 2020 20:28:42 +0000 (05:28 +0900)]
Add CanonicalizeFreezeInLoops pass

Summary:
If an induction variable is frozen and used, SCEV yields imprecise result
because it doesn't say anything about frozen variables.

Due to this reason, performance degradation happened after
https://reviews.llvm.org/D76483 is merged, causing
SCEV yield imprecise result and preventing LSR to optimize a loop.

The suggested solution here is to add a pass which canonicalizes frozen variables
inside a loop. To be specific, it pushes freezes out of the loop by freezing
the initial value and step values instead & dropping nsw/nuw flags from instructions used by freeze.
This solution was also mentioned at https://reviews.llvm.org/D70623 .

Reviewers: spatel, efriedma, lebedev.ri, fhahn, jdoerfert

Reviewed By: fhahn

Subscribers: nikic, mgorny, hiraditya, javed.absar, llvm-commits, sanwou01, nlopes

Tags: #llvm

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

4 years ago[clang-format][docfix] Update predefined styles in docs
Jake Merdich [Wed, 20 May 2020 16:17:55 +0000 (12:17 -0400)]
[clang-format][docfix] Update predefined styles in docs

Summary:
The predefined styles that clang-format supports are listed in two
places, and neither is up-to-date. GNU style isn't mentioned at all!

Subscribers: cfe-commits

Tags: #clang

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

4 years ago[analyzer] Make buildbots happy
Kirstóf Umann [Wed, 20 May 2020 23:54:11 +0000 (01:54 +0200)]
[analyzer] Make buildbots happy

4 years ago[AArch64] Fix unwind info generated by outliner.
Eli Friedman [Tue, 19 May 2020 20:24:53 +0000 (13:24 -0700)]
[AArch64] Fix unwind info generated by outliner.

The offsets were wrong. The result is now the same as what the compiler
would generate for a function that spills lr normally.

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

4 years agoMake Value::getPointerAlignment() return an Align, not a MaybeAlign.
Eli Friedman [Sun, 17 May 2020 00:55:18 +0000 (17:55 -0700)]
Make Value::getPointerAlignment() return an Align, not a MaybeAlign.

If we don't know anything about the alignment of a pointer, Align(1) is
still correct: all pointers are at least 1-byte aligned.

Included in this patch is a bugfix for an issue discovered during this
cleanup: pointers with "dereferenceable" attributes/metadata were
assumed to be aligned according to the type of the pointer.  This
wasn't intentional, as far as I can tell, so Loads.cpp was fixed to
stop making this assumption. Frontends may need to be updated.  I
updated clang's handling of C++ references, and added a release note for
this.

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

4 years ago[AArch64] Fix GlobalISel tests on non-darwin platforms
Francis Visoiu Mistrih [Wed, 20 May 2020 23:26:37 +0000 (16:26 -0700)]
[AArch64] Fix GlobalISel tests on non-darwin platforms

http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-debian/builds/6998

4 years ago[LLD] Make scoped timers thread safe
Reid Kleckner [Wed, 20 May 2020 14:50:19 +0000 (07:50 -0700)]
[LLD] Make scoped timers thread safe

Summary:
This is a pre-requisite to parallelizing PDB symbol and type merging.
Currently this timer usage would not be thread safe.

Reviewers: aganea, MaskRay

Subscribers: jfb, llvm-commits

Tags: #llvm

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

4 years ago[analyzer] Fix a null FunctionDecl dereference bug after D75432
Kirstóf Umann [Wed, 20 May 2020 23:03:31 +0000 (01:03 +0200)]
[analyzer] Fix a null FunctionDecl dereference bug after D75432

4 years ago[AArch64] Provide Darwin variants of most calling conventions
Francis Visoiu Mistrih [Fri, 31 Jan 2020 21:20:57 +0000 (13:20 -0800)]
[AArch64] Provide Darwin variants of most calling conventions

With the new SVE stack layout, we now need to provide a Darwin variant
for all the calling conventions based on the main AAPCS CSR save order.

This also changes APCS_SwiftError to have a Darwin and a non-Darwin
version, assuming it could be used on other platforms these days, and
restricts the AArch64_CXX_TLS calling convention to Darwin.

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

4 years ago[AMDGPU] Always expand ext/insertelement with divergent idx
Stanislav Mekhanoshin [Fri, 15 May 2020 17:43:18 +0000 (10:43 -0700)]
[AMDGPU] Always expand ext/insertelement with divergent idx

Even though series of cmd/cndmask can produce quite a lot of
code that is still better than a loop. In case of doubles we
would even produce two loops.

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

4 years ago[LegalizeVectorTypes] Create correct memoperands in SplitVecRes_INSERT_SUBVECTOR.
Craig Topper [Wed, 20 May 2020 22:06:36 +0000 (15:06 -0700)]
[LegalizeVectorTypes] Create correct memoperands in SplitVecRes_INSERT_SUBVECTOR.

Previously this code just used a default constructed
MachinePointerInfo. But we know the accesses are to a fixed stack
object or at least somewhere on the stack.

While there fix the alignment passed to the full vector load/stores.

I don't think this function is currently exercised in tree so I
don't know how to test it. I just noticed it when I removed
non-constant index support in this function.

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

4 years ago[mlir] NFC - Appease GCC 5 again..
Nicolas Vasilache [Wed, 20 May 2020 21:58:10 +0000 (17:58 -0400)]
[mlir] NFC - Appease GCC 5 again..

4 years ago[mlir][gpu] Refactor functions for workgroup and private buffer attributions.
Wen-Heng (Jack) Chung [Wed, 6 May 2020 17:45:58 +0000 (12:45 -0500)]
[mlir][gpu] Refactor functions for workgroup and private buffer attributions.

Summary:

Consolidate interfaces adding workgroup and private buffer attributions in GPU
dialect.

Note all private buffer attributions must follow workgroup buffer attributions.

Reviewers: herhut

Subscribers: mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, nicolasvasilache, csigg, arpith-jacob, mgester, lucyrfox, liufengdb, stephenneuendorffer, Joonsoo, grosul1, frgossen, Kayjukh, llvm-commits

Tags: #llvm, #mlir

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

4 years ago[mlir][gpu] Refactor ConvertGpuLaunchFuncToCudaCalls pass.
Wen-Heng (Jack) Chung [Mon, 18 May 2020 18:01:54 +0000 (13:01 -0500)]
[mlir][gpu] Refactor ConvertGpuLaunchFuncToCudaCalls pass.

Due to similar APIs between CUDA and ROCm (HIP),
ConvertGpuLaunchFuncToCudaCalls pass could be used on both platforms with some
refactoring.

In this commit:

- Migrate ConvertLaunchFuncToCudaCalls from GPUToCUDA to GPUCommon, and rename.
- Rename runtime wrapper APIs be platform-neutral.
- Let GPU binary annotation attribute be specifiable as a PassOption.
- Naming changes within the implementation and tests.

Subsequent patches would introduce ROCm-specific tests and runtime wrapper
APIs.

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

4 years ago[lldb/Test] Support arbitrary file extensions in TestPositionalArgs.test
Jonas Devlieghere [Wed, 20 May 2020 21:08:55 +0000 (14:08 -0700)]
[lldb/Test] Support arbitrary file extensions in TestPositionalArgs.test

On Windows the line must match:

  Use 'lldb.exe --help' for a complete list of options.

4 years ago[mlir] NFC - Appease GCC 5 again..
Nicolas Vasilache [Wed, 20 May 2020 20:41:41 +0000 (16:41 -0400)]
[mlir] NFC - Appease GCC 5 again..

4 years ago[lit] GoogleTest framework should report failures if test binary crashes
Stephen Neuendorffer [Mon, 18 May 2020 00:41:39 +0000 (17:41 -0700)]
[lit] GoogleTest framework should report failures if test binary crashes

lit runs a gtest executable multiple times. First it runs it to
discover tests, then later it runs the executable again for each test.
However, if the discovery fails (perhaps because of a broken
executable), then no tests were previously run and no failures were
reported.  This patch creates a dummy test if discovery fails, which
will later fail when test are run and be reported as a failure.

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

4 years ago[clang-format] Added new option IndentExternBlock
mydeveloperday [Wed, 20 May 2020 20:25:18 +0000 (21:25 +0100)]
[clang-format] Added new option IndentExternBlock

Reviewers: MyDeveloperDay, krasimir, klimek, mitchell-stellar, Abpostelnicu

Patch By: MarcusJohnson91

Reviewed By: MyDeveloperDay, Abpostelnicu

Subscribers: sylvestre.ledru, Abpostelnicu, cfe-commits

Tags: #clang, #clang-format, #clang-tools-extra

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

4 years agoGive microsoftDemangle() an outparam for how many input bytes were consumed.
Nico Weber [Mon, 18 May 2020 23:57:30 +0000 (19:57 -0400)]
Give microsoftDemangle() an outparam for how many input bytes were consumed.

Demangling Itanium symbols either consumes the whole input or fails,
but Microsoft symbols can be successfully demangled with just some
of the input.

Add an outparam that enables clients to know how much of the input was
consumed, and use this flag to give llvm-undname an opt-in warning
on partially consumed symbols.

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

4 years ago[clang-format] Set of unit test to begin to validate that we don't change defaults
mydeveloperday [Wed, 20 May 2020 20:11:10 +0000 (21:11 +0100)]
[clang-format] Set of unit test to begin to validate that we don't change defaults

Summary:
This revision is to complement {D75791} so we can be sure that we don't change any default behavior.

For now just add rules to cover AfterExternBlock, but in the future we should add cases to cover the other BraceWrapping rules for each style. This will help guard us when we change code inside of the various getXXXStyle() functions to ensure we are not breaking everyone.

Reviewed By: MarcusJohnson91

Subscribers: cfe-commits

Tags: #clang, #clang-format

Differential Revision: https:

4 years ago[lldb/Reproducers] Add instrumentation to SBEnvironment
Jonas Devlieghere [Wed, 20 May 2020 19:59:51 +0000 (12:59 -0700)]
[lldb/Reproducers] Add instrumentation to SBEnvironment

This class should've been instrumented when it landed. Whether the class
is "highly mutable" or not doesn't affect that.

With this patch TestSBEnvironment.py now passes when replayed.

4 years ago[sanitizer_symbolizer] Add __isinf to symbols list.
Matt Morehouse [Wed, 20 May 2020 19:39:40 +0000 (12:39 -0700)]
[sanitizer_symbolizer] Add __isinf to symbols list.

4 years ago[lldb/Driver] Print snippet before exiting with unknown argument.
Jonas Devlieghere [Wed, 20 May 2020 19:32:41 +0000 (12:32 -0700)]
[lldb/Driver] Print snippet before exiting with unknown argument.

Print a little snippet before exiting when passed unrecognized
arguments. The goal is twofold:

 - Point users to lldb --help.
 - Make it clear that we exited the debugger.

4 years ago[lldb] Cleans up system_libs
Haibo Huang [Tue, 19 May 2020 22:23:35 +0000 (15:23 -0700)]
[lldb] Cleans up system_libs

Summary:
Long long ago system_libs was appended to LLDB_SYSTEM_LIBS in
cmake/LLDBDependencies.cmake. After that file was removed, system_libs
is orphaned.

Currently the only user is source/Utility. Move the logic there and
remove system_libs.

Subscribers: mgorny, lldb-commits

Tags: #lldb

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

4 years ago[lldb] Allows customizing libxml2 for darwin
Haibo Huang [Tue, 19 May 2020 23:00:54 +0000 (16:00 -0700)]
[lldb] Allows customizing libxml2 for darwin

Summary:
This changes allows to disable or use customized libxml2 for lldb.

1. Removes redundant include_directories. The one in LLDBConfig.cmake should be enough.

2. Link to ${LIBXML2_LIBRARIES} if xml2 is enabled.

Subscribers: mgorny, lldb-commits

Tags: #lldb

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

4 years ago[OPENMP]Fix PR45911: Data sharing and lambda capture.
Alexey Bataev [Thu, 14 May 2020 20:37:30 +0000 (16:37 -0400)]
[OPENMP]Fix PR45911: Data sharing and lambda capture.

Summary:
No need to generate inlined OpenMP region for variables captured in
lambdas or block decls, only for implicitly captured variables in the
OpenMP region.

Reviewers: jdoerfert

Subscribers: yaxunl, guansong, cfe-commits, caomhin

Tags: #clang

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

4 years ago[mlir][spirv] Adapt subview legalization to the updated op semantics.
MaheshRavishankar [Wed, 20 May 2020 18:48:22 +0000 (11:48 -0700)]
[mlir][spirv] Adapt subview legalization to the updated op semantics.

The subview semantics changes recently to allow for more natural
representation of constant offsets and strides. The legalization of
subview op for lowering to SPIR-V needs to account for this.
Also change the linearization to use the strides from the affine map
of a memref.

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

4 years ago[InstCombine] `insertelement` is negatible if both sources are negatible
Roman Lebedev [Wed, 20 May 2020 18:37:02 +0000 (21:37 +0300)]
[InstCombine] `insertelement` is negatible if both sources are negatible

----------------------------------------
define <2 x i4> @negate_insertelement(<2 x i4> %src, i4 %a, i32 %x, <2 x i4> %b) {
%0:
  %t0 = sub <2 x i4> { 0, 0 }, %src
  %t1 = sub i4 0, %a
  %t2 = insertelement <2 x i4> %t0, i4 %t1, i32 %x
  %t3 = sub <2 x i4> %b, %t2
  ret <2 x i4> %t3
}
=>
define <2 x i4> @negate_insertelement(<2 x i4> %src, i4 %a, i32 %x, <2 x i4> %b) {
%0:
  %t2.neg = insertelement <2 x i4> %src, i4 %a, i32 %x
  %t3 = add <2 x i4> %t2.neg, %b
  ret <2 x i4> %t3
}
Transformation seems to be correct!

4 years ago[NFC][InstCombine] Negator: tests for insertelement negation
Roman Lebedev [Wed, 20 May 2020 18:16:57 +0000 (21:16 +0300)]
[NFC][InstCombine] Negator: tests for insertelement negation

4 years ago[InstCombine] Negator: `extractelement` is negatible if src is negatible
Roman Lebedev [Wed, 20 May 2020 18:01:28 +0000 (21:01 +0300)]
[InstCombine] Negator: `extractelement` is negatible if src is negatible

----------------------------------------
define i4 @negate_extractelement(<2 x i4> %x, i32 %y, i4 %z) {
%0:
  %t0 = sub <2 x i4> { 0, 0 }, %x
  call void @use_v2i4(<2 x i4> %t0)
  %t1 = extractelement <2 x i4> %t0, i32 %y
  %t2 = sub i4 %z, %t1
  ret i4 %t2
}
=>
define i4 @negate_extractelement(<2 x i4> %x, i32 %y, i4 %z) {
%0:
  %t0 = sub <2 x i4> { 0, 0 }, %x
  call void @use_v2i4(<2 x i4> %t0)
  %t1.neg = extractelement <2 x i4> %x, i32 %y
  %t2 = add i4 %t1.neg, %z
  ret i4 %t2
}
Transformation seems to be correct!

4 years ago[NFC][InstCombine] Negator: tests for extractelement negation
Roman Lebedev [Wed, 20 May 2020 17:54:06 +0000 (20:54 +0300)]
[NFC][InstCombine] Negator: tests for extractelement negation

4 years ago[libcxx][test] Portability fix for some locale-dependent tests.
Louis Dionne [Thu, 14 May 2020 13:37:46 +0000 (09:37 -0400)]
[libcxx][test] Portability fix for some locale-dependent tests.

Tests for `std::system_error` constructor marked as slightly non-portable.
One (but not the only one) reason for such non-portability is that these
tests assume the default locale to be set to "C" (or "POSIX").

However, the default locale for the process depends on OS and
environment. This patch adds explicit setting of the correct
locale expected by the tests.

Thanks to Andrey Maksimov for the patch.

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

4 years ago[llvm] [CodeGen] [X86] Fix issues with v4i1 instruction selection
aartbik [Wed, 20 May 2020 02:49:01 +0000 (19:49 -0700)]
[llvm] [CodeGen] [X86] Fix issues with v4i1 instruction selection

Summary:
Fixes issue
https://bugs.llvm.org/show_bug.cgi?id=45995

Reviewers: mehdi_amini, nicolasvasilache, reidtatge, craig.topper, ftynse, bkramer

Reviewed By: craig.topper

Subscribers: RKSimon, hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[libcxx] Remove swap for std::span
Jan Wilken Dörrie [Wed, 20 May 2020 16:28:27 +0000 (12:28 -0400)]
[libcxx] Remove swap for std::span

This change removes both the member function swap and the free function
overload of swap for std::span. While swap is a member and overloaded
for every other container in the standard library [1], it is neither a
member function nor a free function overload for std::span [2].
Thus the corresponding implementation should be removed.

[1] https://eel.is/c++draft/libraryindex#:swap
[2] https://eel.is/c++draft/span.overview

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

4 years agoReland [X86] Codegen for preallocated
Arthur Eubanks [Mon, 16 Mar 2020 19:32:36 +0000 (12:32 -0700)]
Reland [X86] Codegen for preallocated

See https://reviews.llvm.org/D74651 for the preallocated IR constructs
and LangRef changes.

In X86TargetLowering::LowerCall(), if a call is preallocated, record
each argument's offset from the stack pointer and the total stack
adjustment. Associate the call Value with an integer index. Store the
info in X86MachineFunctionInfo with the integer index as the key.

This adds two new target independent ISDOpcodes and two new target
dependent Opcodes corresponding to @llvm.call.preallocated.{setup,arg}.

The setup ISelDAG node takes in a chain and outputs a chain and a
SrcValue of the preallocated call Value. It is lowered to a target
dependent node with the SrcValue replaced with the integer index key by
looking in X86MachineFunctionInfo. In
X86TargetLowering::EmitInstrWithCustomInserter() this is lowered to an
%esp adjustment, the exact amount determined by looking in
X86MachineFunctionInfo with the integer index key.

The arg ISelDAG node takes in a chain, a SrcValue of the preallocated
call Value, and the arg index int constant. It produces a chain and the
pointer fo the arg. It is lowered to a target dependent node with the
SrcValue replaced with the integer index key by looking in
X86MachineFunctionInfo. In
X86TargetLowering::EmitInstrWithCustomInserter() this is lowered to a
lea of the stack pointer plus an offset determined by looking in
X86MachineFunctionInfo with the integer index key.

Force any function containing a preallocated call to use the frame
pointer.

Does not yet handle a setup without a call, or a conditional call.
Does not yet handle musttail. That requires a LangRef change first.

Tried to look at all references to inalloca and see if they apply to
preallocated. I've made preallocated versions of tests testing inalloca
whenever possible and when they make sense (e.g. not alloca related,
inalloca edge cases).

Aside from the tests added here, I checked that this codegen produces
correct code for something like

```
struct A {
        A();
        A(A&&);
        ~A();
};

void bar() {
        foo(foo(foo(foo(foo(A(), 4), 5), 6), 7), 8);
}
```

by replacing the inalloca version of the .ll file with the appropriate
preallocated code. Running the executable produces the same results as
using the current inalloca implementation.

Reverted due to unexpectedly passing tests, added REQUIRES: asserts for reland.

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[lldb/Reproducers] Make SBStream::Print an API instead of a SWIG extension
Jonas Devlieghere [Wed, 20 May 2020 17:32:51 +0000 (10:32 -0700)]
[lldb/Reproducers] Make SBStream::Print an API instead of a SWIG extension

This makes it possible to instrument the call for the reproducers. This
fixes TestStructuredDataAPI.py with reproducer replay.

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

4 years agoRevert "[X86] Codegen for preallocated"
Arthur Eubanks [Wed, 20 May 2020 17:04:55 +0000 (10:04 -0700)]
Revert "[X86] Codegen for preallocated"

This reverts commit 810567dc691a57c8c13fef06368d7549f7d9c064.

Some tests are unexpectedly passing

4 years agoAdd some dependencies to the compiler-rt symbolizer build
Amy Huang [Wed, 20 May 2020 17:01:17 +0000 (10:01 -0700)]
Add some dependencies to the compiler-rt symbolizer build

4 years ago[lldb/Reproducers] Skip another test that uses lldb::FileSP under the hood
Jonas Devlieghere [Wed, 20 May 2020 16:49:28 +0000 (09:49 -0700)]
[lldb/Reproducers] Skip another test that uses lldb::FileSP under the hood

4 years ago[clang][asm goto][slh] Warn if asm goto + SLH
Zola Bridges [Mon, 11 May 2020 20:23:54 +0000 (13:23 -0700)]
[clang][asm goto][slh] Warn if asm goto + SLH

Summary:
Asm goto is not supported by SLH. Warn if an instance of asm goto is detected
while SLH is enabled.

Test included.

Reviewed By: jyu2

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

4 years ago[InstCombine] add tests for reassociative fsub/fadd expressions; NFC
Sanjay Patel [Wed, 20 May 2020 16:44:35 +0000 (12:44 -0400)]
[InstCombine] add tests for reassociative fsub/fadd expressions; NFC

4 years ago[ProfileSummary] Refactor getFromMD to prepare for another optional field. NFC.
Hiroshi Yamauchi [Tue, 19 May 2020 19:12:26 +0000 (12:12 -0700)]
[ProfileSummary] Refactor getFromMD to prepare for another optional field. NFC.

Summary:
Rename 'i' to 'I'.
Factor out the optional field handling to getOptionalVal().
Split out of D79951.

Reviewers: davidxl

Subscribers: eraman, hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[lldb/Driver] Error out when encountering unknown arguments
Jonas Devlieghere [Wed, 20 May 2020 16:21:45 +0000 (09:21 -0700)]
[lldb/Driver] Error out when encountering unknown arguments

There appears to be consensus in D80165 that this is the desired
behavior and I personally agree.

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

4 years agoFormatAdapters.h - remove unused SmallString.h include. NFC.
Simon Pilgrim [Wed, 20 May 2020 16:29:39 +0000 (17:29 +0100)]
FormatAdapters.h - remove unused SmallString.h include. NFC.

4 years agoGenericError.h - remove unused StringRef.h include. NFC.
Simon Pilgrim [Wed, 20 May 2020 15:59:37 +0000 (16:59 +0100)]
GenericError.h - remove unused StringRef.h include. NFC.

4 years ago[X86] Codegen for preallocated
Arthur Eubanks [Mon, 16 Mar 2020 19:32:36 +0000 (12:32 -0700)]
[X86] Codegen for preallocated

See https://reviews.llvm.org/D74651 for the preallocated IR constructs
and LangRef changes.

In X86TargetLowering::LowerCall(), if a call is preallocated, record
each argument's offset from the stack pointer and the total stack
adjustment. Associate the call Value with an integer index. Store the
info in X86MachineFunctionInfo with the integer index as the key.

This adds two new target independent ISDOpcodes and two new target
dependent Opcodes corresponding to @llvm.call.preallocated.{setup,arg}.

The setup ISelDAG node takes in a chain and outputs a chain and a
SrcValue of the preallocated call Value. It is lowered to a target
dependent node with the SrcValue replaced with the integer index key by
looking in X86MachineFunctionInfo. In
X86TargetLowering::EmitInstrWithCustomInserter() this is lowered to an
%esp adjustment, the exact amount determined by looking in
X86MachineFunctionInfo with the integer index key.

The arg ISelDAG node takes in a chain, a SrcValue of the preallocated
call Value, and the arg index int constant. It produces a chain and the
pointer fo the arg. It is lowered to a target dependent node with the
SrcValue replaced with the integer index key by looking in
X86MachineFunctionInfo. In
X86TargetLowering::EmitInstrWithCustomInserter() this is lowered to a
lea of the stack pointer plus an offset determined by looking in
X86MachineFunctionInfo with the integer index key.

Force any function containing a preallocated call to use the frame
pointer.

Does not yet handle a setup without a call, or a conditional call.
Does not yet handle musttail. That requires a LangRef change first.

Tried to look at all references to inalloca and see if they apply to
preallocated. I've made preallocated versions of tests testing inalloca
whenever possible and when they make sense (e.g. not alloca related,
inalloca edge cases).

Aside from the tests added here, I checked that this codegen produces
correct code for something like

```
struct A {
        A();
        A(A&&);
        ~A();
};

void bar() {
        foo(foo(foo(foo(foo(A(), 4), 5), 6), 7), 8);
}
```

by replacing the inalloca version of the .ll file with the appropriate
preallocated code. Running the executable produces the same results as
using the current inalloca implementation.

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[lldb/Reproducers] Support reproducers for PlatformRemoteGDBServer
Jonas Devlieghere [Wed, 20 May 2020 16:10:20 +0000 (09:10 -0700)]
[lldb/Reproducers] Support reproducers for PlatformRemoteGDBServer

Add reproducer support to PlatformRemoteGDBServer. The logic is
essentially the same as for ProcessGDBRemote. During capture we record
the GDB packets and during replay we connect to a replay server.

This fixes TestPlatformClient.py when run form a reproducer.

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

4 years ago[mlir][Linalg] Add producer-consumer fusion when producer is a ConstantOp
MaheshRavishankar [Wed, 20 May 2020 15:57:32 +0000 (08:57 -0700)]
[mlir][Linalg] Add producer-consumer fusion when producer is a ConstantOp
and Consumer is a GenericOp.

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

4 years ago[lldb/Reproducers] Update macosx remote tests for passive replay
Jonas Devlieghere [Tue, 19 May 2020 21:01:23 +0000 (14:01 -0700)]
[lldb/Reproducers] Update macosx remote tests for passive replay

Skip tests or part thereof that are not supposed to work with replay.

4 years agoAMDGPU/GlobalISel: Fix splitting 64-bit extensions
Matt Arsenault [Mon, 18 May 2020 17:47:49 +0000 (13:47 -0400)]
AMDGPU/GlobalISel: Fix splitting 64-bit extensions

This was replicating the low bits into the high bits for G_ZEXT,
rather than using 0.

4 years ago[mlir][Vector] Add option to fully unroll for VectorTransfer to SCF lowering
Nicolas Vasilache [Wed, 20 May 2020 13:52:55 +0000 (09:52 -0400)]
[mlir][Vector] Add option to fully unroll for VectorTransfer to SCF lowering

Summary:
Previously, the only support partial lowering from vector transfers to SCF was
going through loops. This requires a dedicated allocation and extra memory
roundtrips because LLVM aggregates cannot be indexed dynamically (for more
details see the [deep-dive](https://mlir.llvm.org/docs/Dialects/Vector/#deeperdive)).

This revision allows specifying full unrolling which removes this additional roundtrip.
This should be used carefully though because full unrolling will spill, negating the
benefits of removing the interim alloc in the first place.

Proper heuristics are left for a later time.

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

4 years ago[OPENMP][DOCS]Update status of implemented features, NFC.
Alexey Bataev [Wed, 20 May 2020 14:54:53 +0000 (10:54 -0400)]
[OPENMP][DOCS]Update status of implemented features, NFC.

4 years ago[mlir] ensureRegionTerminator: take OpBuilder
Alex Zinenko [Wed, 20 May 2020 14:00:57 +0000 (16:00 +0200)]
[mlir] ensureRegionTerminator: take OpBuilder

The SingleBlockImplicitTerminator op trait provides a function
`ensureRegionTerminator` that injects an appropriate terminator into the block
if necessary, which is used during operation constructing and parsing.
Currently, this function directly modifies the IR using low-level APIs on
Operation and Block. If this function is called from a conversion pattern,
these manipulations are not reflected in the ConversionPatternRewriter and thus
cannot be undone or, worse, lead to tricky memory errors and malformed IR.
Change `ensureRegionTerminator` to take an instance of `OpBuilder` instead of
`Builder`, and use it to construct the block and the terminator when required.
Maintain overloads taking an instance of `Builder` and creating a simple
`OpBuilder` to use in parsers, which don't have an `OpBuilder` and cannot
interact with the dialect conversion mechanism. This change was one of the
reasons to make `<OpTy>::build` accept an `OpBuilder`.

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

4 years ago[mlir] SCFToStandard: support any ops in and around the control flow ops
Alex Zinenko [Wed, 20 May 2020 14:00:47 +0000 (16:00 +0200)]
[mlir] SCFToStandard: support any ops in and around the control flow ops

Originally, the SCFToStandard conversion only declared Ops from the Standard
dialect as legal after conversion. This is undesirable as it would fail the
conversion if the SCF ops contained ops from any other dialect. Furthermore,
this would be problematic for progressive lowering of `scf.parallel` to
`scf.for` after `ensureRegionTerminator` is made aware of the pattern rewriting
infrastructure because it creates temporary `scf.yield` operations declared
illegal. Change the legalization target to declare any op other than `scf.for`,
`scf.if` and `scf.parallel` legal.

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

4 years ago[mlir] Erase or clear blocks through ConversionPatternRewriter when applicable
Alex Zinenko [Wed, 20 May 2020 14:00:37 +0000 (16:00 +0200)]
[mlir] Erase or clear blocks through ConversionPatternRewriter when applicable

Multiple places in the code base were erasing Blocks or operations in them
using in-place modifications (`Block::erase` or `Block::clear`) unknown to
ConversionPatternRewriter. These operations could not be undone if the pattern
failed and could lead to inconsistent in-memory state of the IR with dangling
pointers. Use `ConversionPatternRewriter::eraseOp` and `::eraseBlock` instead.

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

4 years ago[mlir] DialectConversion: support erasing blocks
Alex Zinenko [Wed, 20 May 2020 14:00:27 +0000 (16:00 +0200)]
[mlir] DialectConversion: support erasing blocks

PatternRewriter has support for erasing a Block from its parent region, but
this feature has not been implemented for ConversionPatternRewriter that needs
to keep track of and be able to undo block actions. Introduce support for
undoing block erasure in the ConversionPatternRewriter by marking all the ops
it contains for erasure and by detaching the block from its parent region. The
detached block is stored in the action description and is not actually deleted
until the rewrites are applied.

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

4 years ago[mlir] DialectConversion: avoid double-free when rolling back op creation
Alex Zinenko [Wed, 20 May 2020 13:59:54 +0000 (15:59 +0200)]
[mlir] DialectConversion: avoid double-free when rolling back op creation

Dialect conversion infrastructure may roll back op creation by erasing the
operations in the reverse order of their creation. While this guarantees uses
of values will be deleted before their definitions, this does not guarantee
that a parent operation will not be deleted before its child. (This may happen
in case of block inlining or if child operations, such as terminators, are
created in the parent's `build` function before the parent itself.) Handle the
parent/child relationship between ops by removing all child ops from the blocks
before erasing the parent. The child ops remain live, detached from a block,
and will be safely destroyed in their turn, which may come later than that of
the parent.

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

4 years ago[mlir] Toy tutorial: insert terminators at the end of the loop during rewrite
Alex Zinenko [Wed, 20 May 2020 13:59:44 +0000 (15:59 +0200)]
[mlir] Toy tutorial: insert terminators at the end of the loop during rewrite

When creating temporary `scf.for` loops in `toy.print` lowering, the block
insertion point was erronously set up to the beginning of the block rather than
to its end, contradicting the comment just above the insertion point change.
The code was nevertheless operational because `scf.for` was setting up its
`scf.yield` terminator in an opaque to the pattern rewriting infrastructure
way. Now that it is about to change, the problem would have been exposed and
lead to conversion failures.

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

4 years ago[mlir][Linalg] NFC - Simplify GenericNestLoop builder
Nicolas Vasilache [Wed, 20 May 2020 13:43:58 +0000 (09:43 -0400)]
[mlir][Linalg] NFC - Simplify GenericNestLoop builder

Summary: This revision trims unnecessary complexity.

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

4 years ago[mlir][Linalg] Refactor linalg tiling
Nicolas Vasilache [Wed, 20 May 2020 13:10:21 +0000 (09:10 -0400)]
[mlir][Linalg] Refactor linalg tiling

Summary:
This revision refactors the Linalg tiling pass to be written as pattern applications and retires the use of the folder in Linalg tiling.
In the early days, tiling was written as a pass that would create (partially) folded and canonicalized operations on the fly for better composability.
As this evolves towards composition of patterns, the pass-specific folder is counter-productive and is retired.
The tiling options struct evolves to take a tile size creation function which allows materializing tile sizes on the fly (in particular constant tile sizes). This plays better with folding and DCE.

With the folder going away in Tiling, the check on whether subviews are the same in linalg fusion needs to be more robust. This revision also implements such a check.

In the current form, there are still some canonicalizations missing due to  AffineMin/Max ops fed by scf::ForOp. These will be improved at a later time.

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

4 years agoMachineMemOperand.h - replace Type.h with full GlobalValue.h include to fix -Wundefin...
Simon Pilgrim [Wed, 20 May 2020 13:38:25 +0000 (14:38 +0100)]
MachineMemOperand.h - replace Type.h with full GlobalValue.h include to fix -Wundefined-inline warnings.

4 years agoDIPrinter.h - reduce unnecessary includes to forward declarations. NFC.
Simon Pilgrim [Wed, 20 May 2020 13:31:01 +0000 (14:31 +0100)]
DIPrinter.h - reduce unnecessary includes to forward declarations. NFC.

4 years ago[AMDGPU] Add the test from D49097.
Jay Foad [Wed, 20 May 2020 13:29:55 +0000 (14:29 +0100)]
[AMDGPU] Add the test from D49097.

4 years ago[lldb][NFC] Minor NamespaceMap refactor
Raphael Isemann [Wed, 20 May 2020 13:02:16 +0000 (15:02 +0200)]
[lldb][NFC] Minor NamespaceMap refactor

4 years ago[clang] FastMathFlags.allowContract should be initialized only from FPFeatures.allowF...
Melanie Blower [Fri, 15 May 2020 14:30:49 +0000 (07:30 -0700)]
[clang] FastMathFlags.allowContract should be initialized only from FPFeatures.allowFPContractAcrossStatement

Summary: Fix bug introduced in D72841 adding support for pragma float_control

Reviewers: rjmccall, Anastasia

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

4 years ago[mlir] NFC: rename tests related to SCF dialect from Loops to SCF
Alex Zinenko [Tue, 19 May 2020 14:43:54 +0000 (16:43 +0200)]
[mlir] NFC: rename tests related to SCF dialect from Loops to SCF

The dialect and conversions from/to it were renamed in previous commits.

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

4 years agoGenericDomTreeConstruction.h - reorder includes. NFC.
Simon Pilgrim [Wed, 20 May 2020 13:00:52 +0000 (14:00 +0100)]
GenericDomTreeConstruction.h - reorder includes. NFC.

4 years agoPseudoSourceValue.h - reduce GlobalValue.h include to forward declaration. NFC.
Simon Pilgrim [Wed, 20 May 2020 12:52:22 +0000 (13:52 +0100)]
PseudoSourceValue.h - reduce GlobalValue.h include to forward declaration. NFC.

Exposes an implicit dependency on Type.h in MachineMemOperand.h

4 years agoPseudoSourceValue.h - remove unused operator declaration. NFC.
Simon Pilgrim [Wed, 20 May 2020 09:11:06 +0000 (10:11 +0100)]
PseudoSourceValue.h - remove unused operator declaration. NFC.

MSVC was warning that the definition for the MachineMemOperand stream handler doesn't exist.

4 years ago[analyzer] Get scan-view executable from environment.
Artem Dergachev [Wed, 20 May 2020 11:31:06 +0000 (14:31 +0300)]
[analyzer] Get scan-view executable from environment.

Fixes "Use of uninitialized value $ScanView in exec" error on systems
with scan-view executable not located in the expected place.

Patch by Oliver Tušla!

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

4 years agoRevert "[lldb-server] Reset stop reason of all threads when resuming"
Raphael Isemann [Wed, 20 May 2020 11:29:04 +0000 (13:29 +0200)]
Revert "[lldb-server] Reset stop reason of all threads when resuming"

This reverts commit 56de738d18e11c86169f0248b97b2854c37e35ce.

This broke the aarch64 bot. Reverting on behalf of jarin.

4 years ago[mlir] Add custom assembly formats to shape.witness ops.
Tres Popp [Tue, 19 May 2020 04:21:00 +0000 (06:21 +0200)]
[mlir] Add custom assembly formats to shape.witness ops.

The assembly formats are essentially the generic forms without
quotations and type information.

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

4 years ago[Target][ARM] Make Low Overhead Loops coexist with VPT blocks.
Pierre-vh [Wed, 8 Apr 2020 13:31:21 +0000 (14:31 +0100)]
[Target][ARM] Make Low Overhead Loops coexist with VPT blocks.

Previously, the LowOverheadLoops pass couldn't handle VPT blocks
with conditions, or with multiple VCTPs. This patch improves the
LowOverheadLoops pass so it can handle those cases.

It also adds support for VCMPs before the VCTP.

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

4 years ago[Polly] Update ScalarEvolutionExpander.h include.
Florian Hahn [Wed, 20 May 2020 11:21:06 +0000 (12:21 +0100)]
[Polly] Update ScalarEvolutionExpander.h include.

4 years ago[NFCI][CostModel] Refactor getIntrinsicInstrCost
Sam Parker [Wed, 20 May 2020 08:18:42 +0000 (09:18 +0100)]
[NFCI][CostModel] Refactor getIntrinsicInstrCost

Combine the two API calls into one by introducing a structure to hold
the relevant data. This has the added benefit of moving the boiler
plate code for arguments and flags, into the constructors. This is
intended to be a non-functional change, but the complicated web of
logic involved here makes it very hard to guarantee.

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

4 years agoRevert "[lldb/DataFormatter] Check for overflow when finding NSDate epoch"
Dmitri Gribenko [Wed, 20 May 2020 09:59:47 +0000 (11:59 +0200)]
Revert "[lldb/DataFormatter] Check for overflow when finding NSDate epoch"

This reverts commit b783f70a42575a5d9147bea1ac97e872370fe55b. This
change had multiple issues which required post-commit fixups, and not
all issues are fixed yet. In particular, the LLDB build bot for ARM is
still broken. There is also an ongoing conversation in the original
phabricator review about whether there is undefined behavior in the
code.

4 years agoRevert "[lldb/test] Relax NSDate mock test for non-Apple platforms"
Dmitri Gribenko [Wed, 20 May 2020 09:59:27 +0000 (11:59 +0200)]
Revert "[lldb/test] Relax NSDate mock test for non-Apple platforms"

This reverts commit fff3a8464d4d518c7086c928fba967908eb294d7. It is a
follow-up to b783f70a42575a5d9147bea1ac97e872370fe55b, which I'm
reverting -- see the explanation in that revert.

4 years agoRevert "[lldb/test] Disable NSDate format check under _WIN32"
Dmitri Gribenko [Wed, 20 May 2020 09:58:59 +0000 (11:58 +0200)]
Revert "[lldb/test] Disable NSDate format check under _WIN32"

This reverts commit e3aa4cd9dbcee6441f51102e3958c35321698c67. It is a
follow-up to b783f70a42575a5d9147bea1ac97e872370fe55b, which I'm
reverting -- see the explanation in that revert.

4 years agoRevert "Silence warnings around int/float conversions."
Dmitri Gribenko [Wed, 20 May 2020 09:56:16 +0000 (11:56 +0200)]
Revert "Silence warnings around int/float conversions."

This reverts commit 15ee8a3a58223b48afbe33cb60084f864ef20889. It is a
follow-up to b783f70a42575a5d9147bea1ac97e872370fe55b, which I'm
reverting -- see the explanation in that revert.

4 years agoRevert "[lldb/test] Move "DataFormatters/Mock.h" to "Plugins/Language/ObjC/Utilities.h""
Dmitri Gribenko [Wed, 20 May 2020 09:55:36 +0000 (11:55 +0200)]
Revert "[lldb/test] Move "DataFormatters/Mock.h" to "Plugins/Language/ObjC/Utilities.h""

This reverts commit 82dbf4aca84ec889d0dc390674ff44e30441bcfd. It is a
follow-up to b783f70a42575a5d9147bea1ac97e872370fe55b, which I'm
reverting -- see the explanation in that revert.

4 years ago[yaml2obj] - Implement the "Offset" property for the Fill Chunk.
Georgii Rymar [Mon, 18 May 2020 17:46:28 +0000 (20:46 +0300)]
[yaml2obj] - Implement the "Offset" property for the Fill Chunk.

Similar to a regular section chunk, a Fill should have this property.
This patch implements it.

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

4 years ago[lldb][NFC] Modernize TestCPPStaticMethods
Raphael Isemann [Wed, 20 May 2020 09:57:52 +0000 (11:57 +0200)]
[lldb][NFC] Modernize TestCPPStaticMethods

Now with LLVM code style and expect_expr for checking. Also some minor changes
to be more similar to the structure we use in other tests.

4 years ago[gn build] Port bcbd26bfe61
LLVM GN Syncbot [Wed, 20 May 2020 09:58:47 +0000 (09:58 +0000)]
[gn build] Port bcbd26bfe61

4 years ago[gold-plugin] Unbreak the build after d9b9ce6c04764275a23cd0cf1856a35aae921af7
Benjamin Kramer [Wed, 20 May 2020 09:55:37 +0000 (11:55 +0200)]
[gold-plugin] Unbreak the build after d9b9ce6c04764275a23cd0cf1856a35aae921af7

4 years ago[SCEV] Move ScalarEvolutionExpander.cpp to Transforms/Utils (NFC).
Florian Hahn [Wed, 20 May 2020 09:08:08 +0000 (10:08 +0100)]
[SCEV] Move ScalarEvolutionExpander.cpp to Transforms/Utils (NFC).

SCEVExpander modifies the underlying function so it is more suitable in
Transforms/Utils, rather than Analysis. This allows using other
transform utils in SCEVExpander.

This patch was originally committed as b8a3c34eee06, but broke the
modules build, as LoopAccessAnalysis was using the Expander.

The code-gen part of LAA was moved to lib/Transforms recently, so this
patch can be landed again.

Reviewers: sanjoy.google, efriedma, reames

Reviewed By: sanjoy.google

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

4 years ago[PowerPC] Enable machine verification for 3 passes
Kang Zhang [Wed, 20 May 2020 09:40:25 +0000 (09:40 +0000)]
[PowerPC] Enable machine verification for 3 passes

Summary:
For PowerPC, there are 3 passes has disabled the machine verification.
```
PPCTargetMachine.cpp:    addPass(&LiveVariablesID, false);
PPCTargetMachine.cpp:    addPass(createPPCEarlyReturnPass(), false);
PPCTargetMachine.cpp:  addPass(createPPCBranchSelectionPass(), false);
```
This patch is to enable machine verification for above three passes.

Reviewed By: steven.zhang

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

4 years ago[llvm-readobj][test] - Deduplicate YAMLs in gnuhash.test and hash-table.test. NFCI.
Georgii Rymar [Tue, 19 May 2020 09:44:26 +0000 (12:44 +0300)]
[llvm-readobj][test] - Deduplicate YAMLs in gnuhash.test and hash-table.test. NFCI.

We can use `-D` to generalize inputs. This patch does it.

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

4 years agoUse IPv4 for Android connections
Emre Kultursay [Wed, 20 May 2020 09:11:12 +0000 (11:11 +0200)]
Use IPv4 for Android connections

Summary:
When adb client connects to adb server, or when lldb connects to
lldb server on Android device, IPv6 does not work (at least on
Windows it does not work).

For Android on Windows, each IPv6 failure (fallback-to-IPv4) wastes
2 seconds, and since this is called 5 times when attaching, LLDB
is wasting 10 seconds. This CL brings a big improvement to attach latency.

Reviewers: labath

Reviewed By: labath

Subscribers: aadsm, clayborg, mgrang, lldb-commits

Tags: #lldb

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

4 years ago[lldb-server] Reset stop reason of all threads when resuming
Jaroslav Sevcik [Wed, 20 May 2020 08:59:57 +0000 (10:59 +0200)]
[lldb-server] Reset stop reason of all threads when resuming

Summary:
This patch makes the stop reason reset logic similar to MacOS' debugserver, where exceptions are reset for all threads when resuming process for stepping or continuing (see [[ https://github.com/llvm/llvm-project/blob/96f3ea0d21b48ca088355db10d4d1a2e9bc9f884/lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp#L433 | MachThreadList::ProcessWillResume ]] and [[ https://github.com/llvm/llvm-project/blob/96f3ea0d21b48ca088355db10d4d1a2e9bc9f884/lldb/tools/debugserver/source/MacOSX/MachThread.cpp#L363 | MachThread::ThreadWillResume ]]).

Resetting stop reasons on resume fixes problems where LLDB spuriously reports SIGTRAP signal stop reason for deleted breakpoints (both internal and public) and where  LLDB stops on an internal breakpoint while stepping over while a breakpoint is hit in another thread. See [[ https://bugs.llvm.org/show_bug.cgi?id=45642 | PR45642 ]] for details.

Reviewed By: jingham, labath

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

4 years agoSLPVectorizer.h - remove unused CommandLine.h include. NFC
Simon Pilgrim [Wed, 20 May 2020 08:51:52 +0000 (09:51 +0100)]
SLPVectorizer.h - remove unused CommandLine.h include. NFC

4 years agoCommandFlags.h - remove unnecessary includes. NFC.
Simon Pilgrim [Tue, 19 May 2020 16:12:32 +0000 (17:12 +0100)]
CommandFlags.h - remove unnecessary includes. NFC.

Replace with forward declarations and move necessary includes down to source files.

Exposes an implicit dependency on TargetMachine.h in llvm-opt-fuzzer.cpp

4 years ago[IR] Simplify BasicBlock::removePredecessor. NFCI.
Jay Foad [Mon, 18 May 2020 15:24:18 +0000 (16:24 +0100)]
[IR] Simplify BasicBlock::removePredecessor. NFCI.

This is the second attempt at landing this patch, after fixing the
KeepOneInputPHIs behaviour to also keep zero input PHIs.

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

4 years agoGithub access test: remove unnecessary whitespaces.
Ying Yi [Fri, 15 May 2020 13:11:18 +0000 (14:11 +0100)]
Github access test: remove unnecessary whitespaces.

4 years agoRevert "Add terminateCommands to lldb-vscode protocol"
Pavel Labath [Wed, 20 May 2020 08:08:09 +0000 (10:08 +0200)]
Revert "Add terminateCommands to lldb-vscode protocol"

This reverts commit a3609b0ec68522cb417ffe36ce9eb2e25ca61578, because it
makes a number of lldb-vscode tests flaky.

4 years ago[mlir] Custom printing/parsing for Shape::AssumingOp
Tres Popp [Tue, 19 May 2020 07:05:09 +0000 (09:05 +0200)]
[mlir] Custom printing/parsing for Shape::AssumingOp

Summary:
Additionally, this adds traits and builder methods to AssumingYieldOp
and names the input witness to the AssumingOp.

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

4 years ago[mlir] Mark witness related Shape dialect ops as NoSideEffect.
Tres Popp [Tue, 19 May 2020 04:24:41 +0000 (06:24 +0200)]
[mlir] Mark witness related Shape dialect ops as NoSideEffect.

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

4 years ago[Analyzer][StreamChecker] Added support for 'fread' and 'fwrite'.
Balázs Kéri [Wed, 20 May 2020 06:58:17 +0000 (08:58 +0200)]
[Analyzer][StreamChecker] Added support for 'fread' and 'fwrite'.

Summary:
Stream functions `fread` and `fwrite` are evaluated
and preconditions checked.
A new bug type is added for a (non fatal) warning if `fread`
is called in EOF state.

Reviewers: Szelethus, NoQ, dcoughlin, baloghadamsoftware, martong, xazax.hun

Reviewed By: Szelethus

Subscribers: rnkovacs, xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, gamesh411, Charusso, martong, ASDenysPetrov, cfe-commits

Tags: #clang

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

4 years agoRevert "[IR] Simplify BasicBlock::removePredecessor. NFCI."
Jay Foad [Wed, 20 May 2020 07:01:43 +0000 (08:01 +0100)]
Revert "[IR] Simplify BasicBlock::removePredecessor. NFCI."

This reverts commit 59f49f7ee7f3397e000f7e11facb4a5605cd1cab.

It was causing buildbot failures.