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.
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.
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.
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
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.
LLVM GN Syncbot [Wed, 20 May 2020 09:58:47 +0000 (09:58 +0000)]
[gn build] Port
bcbd26bfe61
Benjamin Kramer [Wed, 20 May 2020 09:55:37 +0000 (11:55 +0200)]
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
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
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
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
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
Simon Pilgrim [Wed, 20 May 2020 08:51:52 +0000 (09:51 +0100)]
SLPVectorizer.h - remove unused CommandLine.h include. 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
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
Ying Yi [Fri, 15 May 2020 13:11:18 +0000 (14:11 +0100)]
Github access test: remove unnecessary whitespaces.
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.
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
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
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
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.
mydeveloperday [Wed, 20 May 2020 06:48:45 +0000 (07:48 +0100)]
[clang-format] [PR42164] Add Option to Break before While
Summary:
Its currently not possible to recreate the GNU style using the `BreakBeforeBraces: Custom` style due to a lack of missing `BeforeWhile` in the `BraceWrappingFlags`
The following request was raised to add `BeforeWhile` in a `do..while` context like `BeforeElse` and `BeforeCatch` to give greater control over the positioning of the `while`
https://bugs.llvm.org/show_bug.cgi?id=42164
Reviewers: krasimir, mitchell-stellar, sammccall
Reviewed By: krasimir
Subscribers: cfe-commits
Tags: #clang, #clang-format
Differential Revision: https://reviews.llvm.org/D79325
mydeveloperday [Wed, 20 May 2020 06:44:36 +0000 (07:44 +0100)]
[clang-format] [PR33890] Add support for Microsoft C++/CLI non standard for each looping extension
Summary:
https://bugs.llvm.org/show_bug.cgi?id=33890
This revision allow the microsoft `for each(.... in ...` nonstandard C++ extension which can be used in C++/CLI to be handled as a ForEach macro.
This prevents the breaking between the for and each onto a new line
Reviewed By: JakeMerdichAMD
Subscribers: cfe-commits
Tags: #clang, #clang-format
Differential Revision: https://reviews.llvm.org/D80228
mydeveloperday [Wed, 20 May 2020 06:42:07 +0000 (07:42 +0100)]
[clang-format][PR45816] Add AlignConsecutiveBitFields
Summary:
The following revision follows D80115 since @MyDeveloperDay and I apparently both had the same idea at the same time, for https://bugs.llvm.org/show_bug.cgi?id=45816 and my efforts on tooling support for AMDVLK, respectively.
This option aligns adjacent bitfield separators across lines, in a manner similar to AlignConsecutiveAssignments and friends.
Example:
```
struct RawFloat {
uint32_t sign : 1;
uint32_t exponent : 8;
uint32_t mantissa : 23;
};
```
would become
```
struct RawFloat {
uint32_t sign : 1;
uint32_t exponent : 8;
uint32_t mantissa : 23;
};
```
This also handles c++2a style bitfield-initializers with AlignConsecutiveAssignments.
```
struct RawFloat {
uint32_t sign : 1 = 0;
uint32_t exponent : 8 = 127;
uint32_t mantissa : 23 = 0;
}; // defaults to 1.0f
```
Things this change does not do:
- Align multiple comma-chained bitfield variables. None of the other
AlignConsecutive* options seem to implement that either.
- Detect bitfields that have a width specified with something other
than a numeric literal (ie, `int a : SOME_MACRO;`). That'd be fairly
difficult to parse and is rare.
Patch By: JakeMerdichAMD
Reviewed By: MyDeveloperDay
Subscribers: cfe-commits, MyDeveloperDay
Tags: #clang, #clang-format
Differential Revision: https://reviews.llvm.org/D80176
Guillaume Chatelet [Fri, 15 May 2020 14:27:35 +0000 (14:27 +0000)]
[libc] Add memset and bzero implementations
Summary: This patch adds general purpose `memset` and `bzero` implementations.
Reviewers: sivachandra, abrachet
Subscribers: mgorny, tschuett, ecnelises, libc-commits, courbet
Tags: #libc-project
Differential Revision: https://reviews.llvm.org/D80010
mydeveloperday [Wed, 20 May 2020 06:22:01 +0000 (07:22 +0100)]
[clang-format] Fix line lengths w/ comments in align
Summary:
https://bugs.llvm.org/show_bug.cgi?id=43845
When a '//comment' trails a consecutive alignment, it adds a whitespace
replacement within the comment token. This wasn't handled correctly in
the alignment code, which treats it as a whole token and thus double
counts it.
This can wrongly trigger the "line too long, it'll wrap" alignment-break
condition with specific lengths, causing the alignment to break for
seemingly no reason.
Patch By: JakeMerdichAMD
Reviewed By: MyDeveloperDay
Subscribers: kostyakozko, cfe-commits
Tags: #clang, #clang-format
Differential Revision: https://reviews.llvm.org/D79465
Kang Zhang [Wed, 20 May 2020 05:32:09 +0000 (05:32 +0000)]
[NFC][PowerPC] Add 2 new cases to test livevars pass
Max Kazantsev [Wed, 20 May 2020 05:02:55 +0000 (12:02 +0700)]
[Test] Add missing auto-generated checks into tests
Fangrui Song [Wed, 20 May 2020 04:50:17 +0000 (21:50 -0700)]
[Support][unittest] Fix HostTest.NumPhysicalCores on __i386__ after D78324
Stanislav Mekhanoshin [Tue, 19 May 2020 22:50:49 +0000 (15:50 -0700)]
[AMDGPU] Process V_MOV_B32_indirect in SET_GPR_IDX optimization
Differential Revision: https://reviews.llvm.org/D80256
Haruki Imai [Wed, 20 May 2020 03:29:16 +0000 (03:29 +0000)]
[mlir][SystemZ] Fix incompatible datalayout in SystemZ
MLIR tests in "mlir/test/mlir-cpu-runner" fails in SystemZ (z14) because
of incompatible datalayout error. This patch fixes it by setting host
CPU name in createTargetMachine()
Differential Revision: https://reviews.llvm.org/D80130
Jinsong Ji [Wed, 20 May 2020 02:35:44 +0000 (02:35 +0000)]
[compiler-rt][scudo][LIT] Use target_suffix instead of target-arch
Per target runtime dir may change the suffix of shared libs.
We can not assume we are always building with per_target_runtime_dir on.
Reviewed By: cryptoad
Differential Revision: https://reviews.llvm.org/D80243
Eli Friedman [Mon, 18 May 2020 18:29:11 +0000 (11:29 -0700)]
[CGCall] Annotate references with "align" attribute.
If we're going to assume references are dereferenceable, we should also
assume they're aligned: otherwise, we can't actually dereference them.
See also D80072.
Differential Revision: https://reviews.llvm.org/D80166
Chintan Kaur [Wed, 20 May 2020 03:10:23 +0000 (03:10 +0000)]
Mark AffineMap::replaceDimsAndSymbols as const (NFC)
This is consistent to the other methods of the class, as well as
AffineExpr::replaceDimsAndSymbols.
Differential Revision: https://reviews.llvm.org/D80266
Matt Arsenault [Wed, 20 May 2020 02:38:54 +0000 (22:38 -0400)]
AMDGPU/GlobalISel: Fix bug in test register bank
The intent wasn't cases with illegal VGPR to SGPR copies.
Nicolas Vasilache [Tue, 19 May 2020 21:53:51 +0000 (17:53 -0400)]
[mlir] NFC - Appease gcc 5
This should fix the error ```
VectorToSCF.cpp:238:62: error: specialization of 'template<class
ConcreteOp> mlir::LogicalResult
{anonymous}::NDTransferOpHelper<ConcreteOp>::doReplace()' in different
namespace
```
Thomas Raoux [Wed, 20 May 2020 02:07:21 +0000 (19:07 -0700)]
[mlir][spirv] First step to support spirv cooperative matrix extension.
Add a new type to SPIRV dialect for cooperative matrix and add new op for
cooperative matrix load. This is missing most instructions to support
cooperative matrix extension but this is a stop-gap patch to avoid creating big
review.
Differential Revision: https://reviews.llvm.org/D80043
QingShan Zhang [Wed, 20 May 2020 02:11:16 +0000 (02:11 +0000)]
[DAGCombine] Remove the getNegatibleCost to avoid the out of sync with getNegatedExpression
We have the getNegatibleCost/getNegatedExpression to evaluate the cost and negate the expression.
However, during negating the expression, the cost might change as we are changing the DAG,
and then, hit the assertion if we negated the wrong expression as the cost is not trustful anymore.
This patch is target to remove the getNegatibleCost to avoid the out of sync with getNegatedExpression,
and check the cost during negating the expression. It also reduce the duplicated code between
getNegatibleCost and getNegatedExpression. And fix the crash for the test in D76638
Reviewed By: RKSimon, spatel
Differential Revision: https://reviews.llvm.org/D77319
Thomas Raoux [Wed, 20 May 2020 01:56:48 +0000 (18:56 -0700)]
[mlir][vulkan-runner] Minor fix in timestamp flag for vulkan runner.
The first timestamp query should use VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT.
Differential Revision: https://reviews.llvm.org/D80183
Diego Caballero [Wed, 20 May 2020 00:16:04 +0000 (17:16 -0700)]
[mlir][Affine] Introduce affine memory interfaces
This patch introduces interfaces for read and write ops with affine
restrictions. I used `read`/`write` intead of `load`/`store` for the
interfaces so that they can also be implemented by dma ops.
For now, they are only implemented by affine.load, affine.store,
affine.vector_load and affine.vector_store.
For testing purposes, this patch also migrates affine loop fusion and
required analysis to use the new interfaces. No other changes are made
beyond that.
Co-authored-by: Alex Zinenko <zinenko@google.com>
Reviewed By: bondhugula, ftynse
Differential Revision: https://reviews.llvm.org/D79829
Kuangyuan Chen [Wed, 20 May 2020 00:24:28 +0000 (20:24 -0400)]
[mlir][ods] Fix ops with both attribute-sized operands and results
Enclose verifier code for AttrSizedOperandSegments and AttrSizedResultSegments
in a nested code block to avoid symbol collision.
Differential Revision: https://reviews.llvm.org/D80250
Kirstóf Umann [Fri, 10 Apr 2020 22:21:48 +0000 (00:21 +0200)]
[analyzer][StackAddressEscape] Tie warnings to the diagnostic checkers rather then core.StackAddrEscapeBase
Differential Revision: https://reviews.llvm.org/D78101
zoecarver [Wed, 20 May 2020 00:25:00 +0000 (17:25 -0700)]
[NFC] Remove non-rvlaue non-variadic allocator::construct overloads.
Summary: All supported compilers have rvalues and variadics so we can safely remove the overloads of allocator::construct which are only enabled on compilers without rvalues and variadics.
Reviewers: ldionne, #libc!
Subscribers: dexonsmith, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D80068
zoecarver [Wed, 20 May 2020 00:21:35 +0000 (17:21 -0700)]
[NFC] Remove non-rvlaue non-variadic allocator::construct overloads.
Summary: All supported compilers have rvalues and variadics so we can safely remove the overloads of allocator::construct which are only enabled on compilers without rvalues and variadics.
Reviewers: ldionne, #libc!
Subscribers: dexonsmith, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D80068
zoecarver [Wed, 20 May 2020 00:17:16 +0000 (17:17 -0700)]
Mark shared_ptr::__create_with_control_block as noexcept.
Summary: The default constructor for shared_ptr and shared_ptr::__enable_weak_this are both noexcept so, shared_ptr::__create_with_control_block can also be marked noexcept.
Reviewers: ldionne, #libc!
Subscribers: dexonsmith, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D80070
zoecarver [Wed, 20 May 2020 00:15:28 +0000 (17:15 -0700)]
[NFC] Add _EnableIfLValueCallable and move reference out of __callable.
Summary: In std::functional moves the reference out of the `__callable` implementation and replaces `_EnableIfCallable` with `_EnableIfLValueCallable` (`_EnableIfLValueCallable` passes `__callable` an lvalue reference type).
Reviewers: ldionne, #libc!
Subscribers: dexonsmith, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D80071
Kristóf Umann [Tue, 25 Feb 2020 17:02:18 +0000 (18:02 +0100)]
[analyzer][NFC][MallocChecker] Convert many parameters into CallEvent
Exactly what it says on the tin! This is clearly not the end of the road in this
direction, the parameters could be merged far more with the use of CallEvent or
a better value type in the CallDescriptionMap, but this was shockingly difficult
enough on its own. I expect that simplifying the file further will be far easier
moving forward.
The end goal is to research how we could create a more mature checker
interaction infrastructure for more complicated C++ modeling, and I'm pretty
sure that being able successfully split up our giants is the first step in this
direction.
Differential Revision: https://reviews.llvm.org/D75432
Kirstóf Umann [Tue, 19 May 2020 23:36:06 +0000 (01:36 +0200)]
[analyzer] Change the default output type to PD_TEXT_MINIMAL in the frontend, error if an output loc is missing for PathDiagConsumers that need it
The title and the included test file sums everything up -- the only thing I'm
mildly afraid of is whether anyone actually depends on the weird behavior of
HTMLDiagnostics pretending to be TextDiagnostics if an output directory is not
supplied. If it is, I guess we would need to resort to tiptoeing around the
compatibility flag.
Differential Revision: https://reviews.llvm.org/D76510
António Afonso [Tue, 19 May 2020 23:01:43 +0000 (16:01 -0700)]
Add terminateCommands to lldb-vscode protocol
Summary: Adding this in line with "stopCommands" and "exitCommands" so that we can run commands at the end of the debugging session.
Reviewers: clayborg, wallace, labath
Reviewed By: clayborg, labath
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D79726
Vedant Kumar [Tue, 19 May 2020 23:06:38 +0000 (16:06 -0700)]
[lldb/test] Move "DataFormatters/Mock.h" to "Plugins/Language/ObjC/Utilities.h"
This addresses some post-commit review feedback from
https://reviews.llvm.org/D80150 by renaming "Mock.h" to something less
misleading, and keeping logic related to the ObjC plugin separate from
the generic DataFormatters library.
Dan Liew [Thu, 7 May 2020 19:38:14 +0000 (12:38 -0700)]
[asan_symbolize] Fix bug handling C++ symbols when using Atos.
Summary:
The previous code tries to strip out parentheses and anything in between
them. I'm guessing the idea here was to try to drop any listed arguments
for the function being symbolized. Unfortunately this approach is broken
in several ways.
* Templated functions may contain parentheses. The existing approach
messes up these names.
* In C++ argument types are part of a function's signature for the
purposes of overloading so removing them could be confusing.
Fix this simply by not trying to adjust the function name that comes
from `atos`.
A test case is included.
Without the change the test case produced output like:
```
WRITE of size 4 at 0x6060000001a0 thread T0
#0 0x10b96614d in IntWrapper<void >::operator=> const&) asan-symbolize-templated-cxx.cpp:10
#1 0x10b960b0e in void writeToA<IntWrapper<void > >>) asan-symbolize-templated-cxx.cpp:30
#2 0x10b96bf27 in decltype>)>> >)) std::__1::__invoke<void >), IntWrapper<void > >>), IntWrapper<void >&&) type_traits:4425
#3 0x10b96bdc1 in void std::__1::__invoke_void_return_wrapper<void>::__call<void >), IntWrapper<void > >>), IntWrapper<void >&&) __functional_base:348
#4 0x10b96bd71 in std::__1::__function::__alloc_func<void >), std::__1::allocator<void >)>, void >)>::operator>&&) functional:1533
#5 0x10b9684e2 in std::__1::__function::__func<void >), std::__1::allocator<void >)>, void >)>::operator>&&) functional:1707
#6 0x10b96cd7b in std::__1::__function::__value_func<void >)>::operator>&&) const functional:1860
#7 0x10b96cc17 in std::__1::function<void >)>::operator>) const functional:2419
#8 0x10b960ca6 in Foo<void >), IntWrapper<void > >::doCall>) asan-symbolize-templated-cxx.cpp:44
#9 0x10b96088b in main asan-symbolize-templated-cxx.cpp:54
#10 0x7fff6ffdfcc8 in start (in libdyld.dylib) + 0
```
Note how the symbol names for the frames are messed up (e.g. #8, #1).
With the patch the output looks like:
```
WRITE of size 4 at 0x6060000001a0 thread T0
#0 0x10005214d in IntWrapper<void (int)>::operator=(IntWrapper<void (int)> const&) asan-symbolize-templated-cxx.cpp:10
#1 0x10004cb0e in void writeToA<IntWrapper<void (int)> >(IntWrapper<void (int)>) asan-symbolize-templated-cxx.cpp:30
#2 0x100057f27 in decltype(std::__1::forward<void (*&)(IntWrapper<void (int)>)>(fp)(std::__1::forward<IntWrapper<void (int)> >(fp0))) std::__1::__invoke<void (*&)(IntWrapper<void (int)>), IntWrapper<void (int)> >(void (*&)(IntWrapper<void (int)>), IntWrapper<void (int)>&&) type_traits:4425
#3 0x100057dc1 in void std::__1::__invoke_void_return_wrapper<void>::__call<void (*&)(IntWrapper<void (int)>), IntWrapper<void (int)> >(void (*&)(IntWrapper<void (int)>), IntWrapper<void (int)>&&) __functional_base:348
#4 0x100057d71 in std::__1::__function::__alloc_func<void (*)(IntWrapper<void (int)>), std::__1::allocator<void (*)(IntWrapper<void (int)>)>, void (IntWrapper<void (int)>)>::operator()(IntWrapper<void (int)>&&) functional:1533
#5 0x1000544e2 in std::__1::__function::__func<void (*)(IntWrapper<void (int)>), std::__1::allocator<void (*)(IntWrapper<void (int)>)>, void (IntWrapper<void (int)>)>::operator()(IntWrapper<void (int)>&&) functional:1707
#6 0x100058d7b in std::__1::__function::__value_func<void (IntWrapper<void (int)>)>::operator()(IntWrapper<void (int)>&&) const functional:1860
#7 0x100058c17 in std::__1::function<void (IntWrapper<void (int)>)>::operator()(IntWrapper<void (int)>) const functional:2419
#8 0x10004cca6 in Foo<void (IntWrapper<void (int)>), IntWrapper<void (int)> >::doCall(IntWrapper<void (int)>) asan-symbolize-templated-cxx.cpp:44
#9 0x10004c88b in main asan-symbolize-templated-cxx.cpp:54
#10 0x7fff6ffdfcc8 in start (in libdyld.dylib) + 0
```
rdar://problem/
58887175
Reviewers: kubamracek, yln
Subscribers: #sanitizers, llvm-commits
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D79597
Kirstóf Umann [Sun, 1 Mar 2020 20:26:49 +0000 (21:26 +0100)]
[analyzer][NFC] Merge checkNewAllocator's paramaters into CXXAllocatorCall
Party based on this thread:
http://lists.llvm.org/pipermail/cfe-dev/2020-February/064754.html.
This patch merges two of CXXAllocatorCall's parameters, so that we are able to
supply a CallEvent object to check::NewAllocatorCall (see the description of
D75430 to see why this would be great).
One of the things mentioned by @NoQ was the following:
I think at this point we might actually do a good job sorting out this
check::NewAllocator issue because we have a "separate" "Environment" to hold
the other SVal, which is "objects under construction"! - so we should probably
simply teach CXXAllocatorCall to extract the value from the
objects-under-construction trait of the program state and we're good.
I had MallocChecker in my crosshair for now, so I admittedly threw together
something as a proof of concept. Now that I know that this effort is worth
pursuing though, I'll happily look for a solution better then demonstrated in
this patch.
Differential Revision: https://reviews.llvm.org/D75431
Matt Arsenault [Tue, 19 May 2020 18:32:31 +0000 (14:32 -0400)]
AMDGPU: Annotate functions that have stack objects
Relying on any MachineFunction state in the MachineFunctionInfo
constructor is hazardous, because the construction time is unclear and
determined by the first use. The function may be only partially
constructed, which is part of why we have many of these hacky string
attributes to track what we need for ABI lowering.
For SelectionDAG, all stack objects are created up-front before
calling convention lowering so stack objects are visible at
construction time. For GlobalISel, none of the IR function has been
visited yet and the allocas haven't been added to the MachineFrameInfo
yet. This should fix failing to set flat_scratch_init in GlobalISel
when needed.
This pass really needs to be turned into some kind of analysis, but I
haven't found a nice way use one here.
Kirstóf Umann [Tue, 14 Apr 2020 16:02:31 +0000 (18:02 +0200)]
analyzer][CallAndMessage][NFC] Change old callbacks to rely on CallEvent
The following series of patches has something similar in mind with D77474, with
the same goal to finally end incorrect checker names for good. Despite
CallAndMessage not suffering from this particular issue, it is a dependency for
many other checkers, which is problematic, because we don't really want
dependencies to also emit diagnostics (reasoning for this is also more detailed
in D77474).
CallAndMessage also has another problem, namely that it is responsible for a lot
of reports. You'll soon learn that this isn't really easy to solve for
compatibility reasons, but that is the topic of followup patches.
Differential Revision: https://reviews.llvm.org/D77845
Cameron McInally [Tue, 19 May 2020 22:28:35 +0000 (17:28 -0500)]
[SVE] MOVPRFX zero merging test renaming
Differential Revision: https://reviews.llvm.org/D80244
Matt Arsenault [Tue, 19 May 2020 13:27:25 +0000 (09:27 -0400)]
GlobalISel: Copy correct flags to select
This was looking for a compare condition, and copying the compare
flags. I don't think this was ever correct outside of certain min/max
patterns which aren't checked, but this probably predates select
instructions having fast math flags.
Kirstóf Umann [Tue, 14 Apr 2020 16:02:31 +0000 (18:02 +0200)]
[analyzer][ObjCGenerics] Don't emit diagnostics under the name core.DynamicTypePropagation
Differential Revision: https://reviews.llvm.org/D78124
Matt Arsenault [Wed, 13 May 2020 17:24:32 +0000 (13:24 -0400)]
AMDGPU: Fix DAG divergence for implicit function arguments
This should be directly implied from the register class, and there's
no need to special case live ins here. This was getting the wrong
answer for the queue ptr argument in callable functions, since it's
not an explicit IR argument and is always uniform.
Fixes not using scalar loads for the aperture in addrspacecast
lowering, and any other places that use implicit SGPR arguments.
Matt Arsenault [Tue, 19 May 2020 17:44:14 +0000 (13:44 -0400)]
AMDGPU: Use member initializers in MFI
Brian Cain [Fri, 15 May 2020 15:56:42 +0000 (10:56 -0500)]
[Hexagon] pX.new cannot be used with p3:0 as producer
Writes to p3:0 do not produce new values, we should bar any .new
consumer trying to use it as a producer.
Kirstóf Umann [Tue, 14 Apr 2020 15:44:44 +0000 (17:44 +0200)]
[analyzer][NSOrCFError] Don't emit diagnostics under the name osx.NSOrCFErrorDerefChecker
Differential Revision: https://reviews.llvm.org/D78123
Matt Arsenault [Tue, 19 May 2020 16:28:56 +0000 (12:28 -0400)]
GlobalISel: Remove unused include
Matt Arsenault [Tue, 19 May 2020 17:01:19 +0000 (13:01 -0400)]
CodeGen: Use Register
Stephen Neuendorffer [Mon, 18 May 2020 06:09:41 +0000 (23:09 -0700)]
[MLIR][cmake][NFC] Check for incorrect usage of LLVM components in LINK_LIBS
Using LLVM components in LINK_LIBS means that the mechanisms for
replacing component dependencies with libLLVM.so break. Try to catch
this incorrect usage up front, instead of waiting until later when we
get difficult to understand runtime errors from incorrectly linked
libraries.
Differential Revision: https://reviews.llvm.org/D80103
Stephen Neuendorffer [Mon, 18 May 2020 04:43:32 +0000 (21:43 -0700)]
[MLIR] LLVMMLIRTableGen -> MLIRTableGen
Like all MLIR libraries, this should start with 'MLIR'
Differential Revision: https://reviews.llvm.org/D80102
MaheshRavishankar [Tue, 19 May 2020 21:29:47 +0000 (14:29 -0700)]
[mlir][SPIRV] Fix blocks nested too deeply error.
Issue arises due to a giant if/else if/else/... construct. Changing
them to just ifs.
Differential Revision: https://reviews.llvm.org/D80245
Sean Silva [Wed, 13 May 2020 01:38:55 +0000 (18:38 -0700)]
[mlir][shape] Add `shape.from_extents`.
Summary:
This is a basic op needed for creating shapes from SSA values
representing the extents.
Differential Revision: https://reviews.llvm.org/D79833
Dávid Bolvanský [Tue, 19 May 2020 21:20:54 +0000 (23:20 +0200)]
Revert "[clang-misexpect] Fixed typo which causes that --pgo-warn-misexpect option is not passed in the compiler invocation"
This reverts commit
6d2b75e0887ee87e247756c4d51733616bb2f356.
Nico Weber [Tue, 19 May 2020 21:12:30 +0000 (17:12 -0400)]
[gn build] Try harder to unbreak Windows build after
f8e833a501.
Dávid Bolvanský [Tue, 19 May 2020 21:12:08 +0000 (23:12 +0200)]
[clang-misexpect] Fixed typo which causes that --pgo-warn-misexpect option is not passed in the compiler invocation
Eli Friedman [Tue, 19 May 2020 20:46:35 +0000 (13:46 -0700)]
[AArch64] Disable MachineOutliner on Windows.
The handling of unwind info is broken, so disable it for now.
Erich Keane [Tue, 19 May 2020 19:54:35 +0000 (12:54 -0700)]
Fix X86_64 complex-returns for regcall.
D35259 introduced a case where complex types of non-long-double would
result in FI.getReturnInfo() to not be initialized properly. This
resulted in a crash under some very specific circumstances when
dereferencing the LLVMContext.
This patch makes sure that these types have the intended getReturnInfo
initialization.
Benjamin Kramer [Tue, 19 May 2020 20:16:15 +0000 (22:16 +0200)]
Give helpers internal linkage. NFC.
Nico Weber [Tue, 19 May 2020 20:13:57 +0000 (16:13 -0400)]
[gn build] Try to unbreak Windows build after
f8e833a501.
Jonas Devlieghere [Tue, 19 May 2020 20:07:05 +0000 (13:07 -0700)]
[lldb/Reproducers] Update GDB remote client tests for passive replay
Tests that check the state of the server don't work when replayed
because the replay server replies to requests.
Artem Dergachev [Tue, 19 May 2020 19:43:10 +0000 (22:43 +0300)]
[analyzer] Move apiModeling.StdCLibraryFunctionArgs to alpha.
It was enabled by default accidentally; still missing some important
features. Also it needs a better package because it doesn't boil down to
API modeling.
Differential Revision: https://reviews.llvm.org/D80213
Sébastien Marchand [Tue, 19 May 2020 19:58:52 +0000 (15:58 -0400)]
[gn build] Add a flag zlib_path to provide the path to zlib on Windows.
Also, automatically set llvm_enable_zlib to true when zlib_path is set.
Differential Revision: https://reviews.llvm.org/D80042
Lei Huang [Mon, 11 May 2020 18:49:50 +0000 (13:49 -0500)]
[PowerPC][NFC] Cleanup load/store spilling code
Summary: Cleanup and commonize code used for spilling to the stack.
Reviewers: stefanp, nemanjai, #powerpc, kamaub
Reviewed By: nemanjai, #powerpc, kamaub
Subscribers: kamaub, hiraditya, wuzish, shchenz, llvm-commits, kbarton
Tags: #llvm, #powerpc
Differential Revision: https://reviews.llvm.org/D79736
Sanjay Patel [Tue, 19 May 2020 19:54:29 +0000 (15:54 -0400)]
[PGOProfile] make test less brittle; NFC
This test may fail just from cosmetic diffs because the values change names.
This is a minimal diff to work-around that, but more may be needed.
Thomas Lively [Tue, 19 May 2020 19:54:15 +0000 (12:54 -0700)]
[WebAssembly] Fix bug in custom shuffle combine
Summary:
The code previously assumed the source of the bitcast in the combined
pattern was a vector type, but this is not always true. This patch
adds a check to avoid an assertion failure in that case.
Reviewers: aheejin
Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D80164
Thomas Lively [Tue, 19 May 2020 19:50:44 +0000 (12:50 -0700)]
[WebAssembly] Implement i64x2.mul and remove i8x16.mul
Summary:
This reflects changes in the spec proposal made since basic arithmetic
was first implemented.
Reviewers: aheejin
Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D80174
Jez Ng [Tue, 19 May 2020 15:53:53 +0000 (08:53 -0700)]
[lld-macho][re-land] Support X86_64_RELOC_UNSIGNED
This reverts commit
db8559eee4a07c44babcc4618eef3d185cf79cc6.
Jez Ng [Tue, 19 May 2020 15:46:07 +0000 (08:46 -0700)]
[lld-macho][re-land] Support .subsections_via_symbols
Summary:
This diff restores and builds upon @pcc and @ruiu's initial work on
subsections.
The .subsections_via_symbols directive indicates we can split each
section along symbol boundaries, unless those symbols have been marked
with `.alt_entry`.
We exercise this functionality in our tests by using order files that
rearrange those symbols.
Depends on D79668.
Reviewers: ruiu, pcc, MaskRay, smeenai, alexshap, gkm, Ktwu, christylee
Reviewed By: smeenai
Subscribers: thakis, llvm-commits, pcc, ruiu
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D79926
Zola Bridges [Sun, 17 May 2020 17:11:26 +0000 (10:11 -0700)]
[llvm][docs] Add step by step git to GettingStarted
Summary:
Due to deleting the git llvm script, folks were asking for better documentation
about how to use git in order to commit to the Github repo. I added some step
by step git commands to make the usage clearer.
link: http://lists.llvm.org/pipermail/llvm-dev/2020-May/141640.html
Reviewed By: spatel, mehdi_amini
Differential Revision: https://reviews.llvm.org/D80088
Sanjay Patel [Tue, 19 May 2020 18:54:19 +0000 (14:54 -0400)]
[PhaseOrdering] add tests for x86 horizontal math ops (PR41813); NFC
Sanjay Patel [Tue, 19 May 2020 18:51:21 +0000 (14:51 -0400)]
[PhaseOrdering] make different pass manager runs equivalent; NFC
I don't see any difference from the 'avx' setting, so leaving that
off until there's a need for it.
Jay Foad [Mon, 18 May 2020 15:24:18 +0000 (16:24 +0100)]
[IR] Simplify BasicBlock::removePredecessor. NFCI.
Differential Revision: https://reviews.llvm.org/D80141
Christopher Tetreault [Tue, 19 May 2020 17:47:16 +0000 (10:47 -0700)]
[SVE] Add specialized getters to derived vector types
Summary:
Add versions of the specialized getters in base VectorType to the
derived vector types that return derived pointers. This reduces the
amount of casting you need to do when working with derived vectors
Reviewers: efriedma, david-arm, fpetrogalli, craig.topper
Reviewed By: david-arm
Subscribers: tschuett, rkruppe, psnobl, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D80026
Jonas Devlieghere [Tue, 19 May 2020 18:16:57 +0000 (11:16 -0700)]
[lldb/Properties] Move OSPluginReportsAllThreads from Target to Process
This is what Jim wanted originally.
rdar://problem/
61236293
Differential revision: https://reviews.llvm.org/D80159
Nikita Popov [Wed, 25 Mar 2020 19:02:07 +0000 (20:02 +0100)]
[LVI] Don't require DominatorTree in LVI (NFC)
After D76797 the dominator tree is no longer used in LVI, so we
can remove it as a pass dependency, and also get rid of the
dominator tree enabling/disabling logic in JumpThreading.
Apart from cleaning up the code, this also clarifies LVI
cache consistency, in that the LVI cache can no longer
depend on whether the DT was or wasn't enabled due to
pending DT updates at any given time.
Differential Revision: https://reviews.llvm.org/D76985
Hanhan Wang [Tue, 19 May 2020 17:55:17 +0000 (10:55 -0700)]
[mlir][StandardToSPIRV] Fix signedness issue in bitwidth emulation.
Summary:
Previously, after applying the mask, a negative number would convert to a
positive number because the sign flag was forgotten. This patch adds two more
shift operations to do the sign extension. This assumes that we're using two's
complement.
This patch applies sign extension unconditionally when loading a unspported integer width, and it relies the pattern to do the casting because the signedness semantic is carried by operator itself.
Differential Revision: https://reviews.llvm.org/D79753
Eric Christopher [Tue, 19 May 2020 17:55:30 +0000 (10:55 -0700)]
Silence warnings around int/float conversions.
Jonas Devlieghere [Tue, 19 May 2020 16:55:07 +0000 (09:55 -0700)]
[lldb/Reproducers] Move connection logic into replay server (NFC)
Move the logic for connecting to the replay server into the replay
server itself, so it can be reused outside of ProcessGDBRemote.
Erich Keane [Tue, 19 May 2020 17:15:34 +0000 (10:15 -0700)]
Fix aux-target diagnostics for certain builtins
When I fixed the targets specific builtins to make sure that aux-targets
are checked, it seems I didn't consider cases where the builtins check
the target info for further info. This patch bubbles the target-info
down to the individual checker functions to ensure that they validate
against the aux-target as well.
For non-aux-target invocations, this is an NFC.
Craig Topper [Tue, 19 May 2020 16:59:24 +0000 (09:59 -0700)]
[StackColoring] When remapping alloca's move the To alloca if the From alloca is before it.
If To is after From its possible that there's a use of From
between them.
Fixes issue reported here http://lists.llvm.org/pipermail/llvm-dev/2020-May/141421.html
Differential Revision: https://reviews.llvm.org/D80101
Matt Morehouse [Tue, 19 May 2020 17:28:18 +0000 (10:28 -0700)]
Entropic: Boosting LibFuzzer Performance
Summary:
This is collaboration between Marcel Boehme @ Monash, Australia and Valentin Manès plus Sang Kil Cha @ KAIST, South Korea.
We have made a few modifications to boost LibFuzzer performance by changing how weights are assigned to the seeds in the corpus. Essentially, seeds that reveal more "information" about globally rare features are assigned a higher weight. Our results on the Fuzzer Test Suite seem quite promising. In terms of bug finding, our Entropic patch usually finds the same errors much faster and in more runs. In terms of coverage, our version Entropic achieves the same coverage in less than half the time for the majority of subjects. For the lack of space, we shared more detailed performance results directly with @kcc. We'll publish the preprint with all the technical details as soon as it is accepted. Happy to share if you drop us an email.
There should be plenty of opportunities to optimise further. For instance, while Entropic achieves the same coverage in less than half the time, Entropic has a much lower #execs per second. We ran the perf-tool and found a few performance bottlenecks.
Thanks for open-sourcing LibFuzzer (and the entire LLVM Compiler Infrastructure)! This has been such a tremendous help to my research.
Patch By: Marcel Boehme
Reviewers: kcc, metzman, morehouse, Dor1s, vitalybuka
Reviewed By: kcc
Subscribers: dgg5503, Valentin, llvm-commits, kcc
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73776
Andrea Di Biagio [Tue, 19 May 2020 10:20:33 +0000 (11:20 +0100)]
[X86] Split masked integer vector stores into vXi32/vXi64 variants (PR45975). NFC
This effectively splits the scheduling WriteVecMaskedStore(Y) classes
into four different classes (one per each variant).
The new VecMaskedStore scheduling classes are now correctly marked as
'unsupported' by the bdver2 and btver2 models.
No functional change intended.
Reviewed By: RKSimon
Differential Revision: https://reviews.llvm.org/D80201
Florian Hahn [Tue, 19 May 2020 14:35:59 +0000 (15:35 +0100)]
[LV] Remove duplicated return stmt (NFC).
Jay Foad [Tue, 5 May 2020 12:00:48 +0000 (13:00 +0100)]
[InstCombine] Remove hasNoInfs check for pow(C,y) -> exp2(log2(C)*y)
We already check hasNoNaNs and that x is finite and strictly positive.
That only leaves the following special cases (taken from the Linux man
page for pow):
If x is +1, the result is 1.0 (even if y is a NaN).
If the absolute value of x is less than 1, and y is negative infinity, the result is positive infinity.
If the absolute value of x is greater than 1, and y is negative infinity, the result is +0.
If the absolute value of x is less than 1, and y is positive infinity, the result is +0.
If the absolute value of x is greater than 1, and y is positive infinity, the result is positive infinity.
The first case is handled elsewhere, and this transformation preserves
all the others, so there is no need to limit it to hasNoInfs.
Differential Revision: https://reviews.llvm.org/D79409
Fangrui Song [Mon, 18 May 2020 17:15:59 +0000 (10:15 -0700)]
[ELF] Make --trace-symbol track preempted shared definitions
Note, we still name a preempted SharedSymbol "shared definition",
instead of "reference" as printed by GNU ld. This difference should not matter.
```
// GNU ld
ld.bfd: t: definition of f@v1
ld.bfd: t.so: reference to f@v1
```
Reviewed By: psmith
Differential Revision: https://reviews.llvm.org/D80143