Nathan James [Mon, 24 Feb 2020 23:59:45 +0000 (23:59 +0000)]
[docs] dump_ast_matchers strips internal::(Bindable)?Matcher from Result_type
Summary: Remove `internal::Matcher` and `internal::BindableMatcher` from Result Type when dumping AST Matchers
Reviewers: joerg, gribozavr2, aaron.ballman
Reviewed By: aaron.ballman
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D75046
Jonas Devlieghere [Mon, 24 Feb 2020 23:34:58 +0000 (15:34 -0800)]
[lldb] Color the line marker
Highlight the color marker similar to what we do for the column marker.
The default color matches the color of the current PC marker (->) in the
default disassembly format.
Differential revision: https://reviews.llvm.org/D75070
Craig Topper [Mon, 24 Feb 2020 22:08:05 +0000 (14:08 -0800)]
[LegalizeTypes] Scalarize non-byte sized loads in WidenRecRes_Load and SplitVecResLoad
Should fix PR42803 and PR44902
Differential Revision: https://reviews.llvm.org/D74590
Jay Foad [Fri, 24 Jan 2020 09:02:47 +0000 (09:02 +0000)]
AMDGPU/GlobalISel: Lower 64-bit uaddo/usubo
Summary: Add more test cases for signed and unsigned add/sub with overflow.
Reviewers: arsenm, rampitec, kerbowa
Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, rovka, dstuttard, tpr, t-tye, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D75051
Alex Brachet [Mon, 24 Feb 2020 22:53:43 +0000 (17:53 -0500)]
[libc] [UnitTest] Create death tests
Summary: This patch adds `EXPECT_EXITS` and `EXPECT_DEATH` macros for testing exit codes and deadly signals. They are less convoluted than their analogs in GTEST and don't have matchers but just take an int for either the exit code or the signal respectively. Nor do they have any regex match against the stdout/stderr of the child process.
Reviewers: sivachandra, gchatelet
Reviewed By: sivachandra
Subscribers: mgorny, MaskRay, tschuett, libc-commits
Differential Revision: https://reviews.llvm.org/D74665
Med Ismail Bennani [Mon, 24 Feb 2020 15:04:16 +0000 (10:04 -0500)]
[lldb/Plugins] Move SBTarget::GetExtendedCrashInformation to SBProcess
This patch moves the SB API method GetExtendedCrashInformation from
SBTarget to SBProcess since it only makes sense to call this method on a
sane process which might not be the case on a SBTarget object.
It also addresses some feedbacks received after landing the first patch
for the 'crash-info' feature.
Differential Revision: https://reviews.llvm.org/D75049
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
zoecarver [Mon, 24 Feb 2020 22:33:39 +0000 (14:33 -0800)]
Revert "Validate argument passed to __builtin_frame_address and __builtin_return_address"
This reverts commit
c93112dc4f745b0455addb54bfe1c2f79b827c6d.
Bardia Mahjour [Mon, 24 Feb 2020 22:28:03 +0000 (17:28 -0500)]
[NFC] [DA] Refactoring getIndexExpressionsFromGEP
Summary:
This patch moves the getIndexExpressionsFromGEP function from polly
into ScalarEvolution so that both polly and DependenceAnalysis can
use it for the purpose of subscript delinearization when the array
sizes are not parametric.
Authored By: bmahjour
Reviewer: Meinersbur, sebpop, fhahn, dmgreen, grosser, etiotto, bollu
Reviewed By: Meinersbur
Subscribers: hiraditya, arphaman, Whitney, ppc-slack, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73995
zoecarver [Mon, 24 Feb 2020 21:43:22 +0000 (13:43 -0800)]
Validate argument passed to __builtin_frame_address and __builtin_return_address
Verifies that the argument passed to __builtin_frame_address and __builtin_return_address is within the range [0, 0xFFFF].
Greg Clayton [Fri, 21 Feb 2020 23:21:07 +0000 (15:21 -0800)]
Add methods to data extractor for extracting bytes and fixed length C strings.
Summary:
These modificaitons will be used in D74883.
Fixed length C strings can have trailing NULLs or sometimes spaces (BSD archive files), so the fixed length C string defaults to stripping trailing NULLs, but can have the arguments specify to remove one or more kinds of spaces if needed. This is used to extract fixed length C strings from ELF NOTEs in D74883.
Reviewers: labath, dblaikie, aprantl
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D74991
Jonas Devlieghere [Mon, 24 Feb 2020 22:08:04 +0000 (14:08 -0800)]
[lldb/Test] Update TestDisassemblyFormat for new format
Ikhlas Ajbar [Tue, 28 Jan 2020 20:36:05 +0000 (14:36 -0600)]
[Hexagon] Lower vector predicate store
This patch lowers store of vector predicate of type v128i1.
Eric Astor [Mon, 24 Feb 2020 21:37:30 +0000 (16:37 -0500)]
Reland "[ms] [llvm-ml] Improve data support, adding names and complex initializers."
This reverts commit
9fe769a961dc8e3ce7d967ea0e07a4f0e5fac6e9, and re-lands commit
c2e272f8cf76ec97f675e0dfdada75445bbee5c5.
Summary: Add support for ?, DUP, and string initializers, as well as MASM syntax for named data locations.
This version avoids the use of a C++17-only feature, if-statements with initializer.
Reviewers: rnk, thakis
Reviewed By: thakis
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73226
Roman Tereshin [Mon, 24 Feb 2020 05:53:19 +0000 (21:53 -0800)]
[MachineVerifier] Doing ::calcRegsPassed in RPO: ~35% faster MV, NFC
Depending on the target, test suite, pipeline config and perhaps other
factors machine verifier when forced on with -verify-machineinstrs can
increase compile time 2-2.5 times over (Release, Asserts On), taking up
~60% of the time. An invaluable tool, it significantly slows down
machine verifier-enabled testing.
Nearly 75% of its time MachineVerifier spends in the calcRegsPassed
method. It's a classic forward dataflow analysis executed over sets, but
visiting MBBs in arbitrary order. We switch that to RPO here.
This speeds up MachineVerifier by about 35%, decreasing the overall
compile time with -verify-machineinstrs by 20-25% or so.
calcRegsPassed itself gets 2x faster here.
All measured on a large suite of shaders targeting a number of GPUs.
Reviewers: bogner, stoklund, rudkx, qcolombet
Reviewed By: bogner
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D75032
Ikhlas Ajbar [Thu, 9 Jan 2020 19:23:28 +0000 (13:23 -0600)]
[Hexagon] Lower bitcast of a vector predicate
This patch lowers bitcast of vector predicate of type v32i1/v64i1
to i32/i64 type.
Eric Astor [Mon, 24 Feb 2020 21:08:40 +0000 (16:08 -0500)]
Revert "[ms] [llvm-ml] Improve data support, adding names and complex initializers."
This reverts commit
c2e272f8cf76ec97f675e0dfdada75445bbee5c5, which broke builds.
Jonas Devlieghere [Mon, 24 Feb 2020 20:51:01 +0000 (12:51 -0800)]
[lldb] Color the current PC marker
Differential revision: https://reviews.llvm.org/D75073
Jonas Devlieghere [Mon, 24 Feb 2020 20:47:52 +0000 (12:47 -0800)]
[lldb/Debugger] Remove macros formerly used by property definitions
The DEFAULT_ were used in property definitions which have since been
moved to CoreProperties.td.
Eric Astor [Mon, 24 Feb 2020 17:59:59 +0000 (12:59 -0500)]
[ms] [llvm-ml] Improve data support, adding names and complex initializers.
Summary: Add support for ?, DUP, and string initializers, as well as MASM syntax for named data locations.
Reviewers: rnk, thakis
Reviewed By: thakis
Subscribers: merge_guards_bot, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73226
nmostafa [Mon, 24 Feb 2020 20:21:08 +0000 (12:21 -0800)]
[MLIR] NFC - Fix indentation in examples in LoopOps.td
Craig Topper [Mon, 24 Feb 2020 20:06:55 +0000 (12:06 -0800)]
[X86] Add back fmaddsub intrinsics to work towards fixing the strict fp implementation
Previously we emitted an fmadd and a fmadd+fneg and combined them with a shufflevector. But this doesn't follow the correct exception behavior for unselected elements so the backend can't merge them into the fmaddsub/fmsubadd instructions.
This patch restores the the fmaddsub intrinsics so we don't have two arithmetic operations. We lose out on optimization opportunity in the non-strict FP case, but I don't think this is a big loss. If someone gives us a test case we can look into adding instcombine/dagcombine improvements. I'd rather not have the frontend do completely different things for strict and non-strict.
This still has problems because target specific intrinsics don't support strict semantics yet. We also still have all of the problems with masking. But we at least generate the right instruction in constrained mode now.
Differential Revision: https://reviews.llvm.org/D74268
Stanislav Mekhanoshin [Mon, 24 Feb 2020 01:01:19 +0000 (17:01 -0800)]
[AMDGPU] use llvm_unreachable instead of default for rp set
GCC 9.2 seems to incorrectly issue warning about out of bounds
access. This situation should not happen in any way.
Differential Revision: https://reviews.llvm.org/D75071
Raphael Isemann [Mon, 24 Feb 2020 19:20:54 +0000 (20:20 +0100)]
[libc++] Give headers that require C++14 a cplusplus14 requires in the modulemap
https://reviews.llvm.org/D68480 added those headers and made the std module
only usable with C++14 or later as the submodules were not marked as requiring
C++14 or later. This just adds the missing requires directives.
Lei Zhang [Mon, 24 Feb 2020 18:35:33 +0000 (13:35 -0500)]
[mlir][spirv] NFC: Move test passes to test/lib
Previously C++ test passes for SPIR-V were put under
test/Dialect/SPIRV. Move them to test/lib/Dialect/SPIRV
to create a better structure.
Also fixed one of the test pass to use new
PassRegistration mechanism.
Differential Revision: https://reviews.llvm.org/D75066
Ayke van Laethem [Mon, 24 Feb 2020 19:13:41 +0000 (20:13 +0100)]
[LLVM-C] Add bindings for addCoroutinePassesToExtensionPoints
This patch adds bindings to C and Go for
addCoroutinePassesToExtensionPoints, which is used to add coroutine
passes to the correct locations in PassManagerBuilder.
Differential Revision: https://reviews.llvm.org/D51642
Simon Pilgrim [Mon, 24 Feb 2020 18:52:18 +0000 (18:52 +0000)]
[SelectionDAG] Merge constant SDNode arithmetic into foldConstantArithmetic
This is the second patch as part of https://bugs.llvm.org/show_bug.cgi?id=36544
Merging in the ConstantSDNode variant of FoldConstantArithmetic. After this, I will begin merging in FoldConstantVectorArithmetic
I've ensured this patch can build & pass all lit tests in Windows and Linux environments.
Patch by @justice_adams (Justice Adams)
Differential Revision: https://reviews.llvm.org/D74881
Francis Visoiu Mistrih [Mon, 24 Feb 2020 18:42:21 +0000 (10:42 -0800)]
[MachO] Add cpu(sub)type tests and improve error handling
Add checks for triples that don't use mach-o, and unit tests for
everything.
Ayke van Laethem [Mon, 24 Feb 2020 18:38:47 +0000 (19:38 +0100)]
[bindings/go] Add RemoveFromParentAsInstruction
This allows removing instructions without erasing them. They can then be
added somewhere else in the IR using Builder.Insert().
Ayke van Laethem [Wed, 5 Feb 2020 11:53:06 +0000 (12:53 +0100)]
[AVR] Disassemble register operands
Simply by implementing a few functions I was able to correctly
disassemble a much larger amount of instructions.
Differential Revision: https://reviews.llvm.org/D74045
Simon Pilgrim [Mon, 24 Feb 2020 18:24:31 +0000 (18:24 +0000)]
[X86] combineX86ShuffleChain - select X86ISD::FAND/ISD::AND based on MaskVT
Noticed by inspection, we shouldn't use FloatDomain directly, we've already bitcast both inputs to MaskVT so select the opcode using that.
Ayke van Laethem [Tue, 4 Feb 2020 13:12:43 +0000 (14:12 +0100)]
[AVR] Don't assert on an undefined operand
Not all operands are correctly disassembled at the moment. This means
that some machine instructions won't have all the necessary operands
set.
To avoid asserting, print an error instead until the necessary support
has been implemented.
Differential Revision: https://reviews.llvm.org/D73958
Ayke van Laethem [Mon, 24 Feb 2020 14:45:43 +0000 (15:45 +0100)]
[AVR] Use correct register class for mul instructions
A number of multiplication instructions (muls, mulsu, fmul, fmuls,
fmulsu) had the wrong register class for an operand. This resulted in
the wrong register being used for the instruction.
Example:
target datalayout = "e-P1-p:16:8-i8:8-i16:8-i32:8-i64:8-f32:8-f64:8-n8-a:8"
target triple = "avr-atmel-none"
define i16 @sliceAppend(i16, i16, i16, i16, i16, i16) addrspace(1) {
%d = mul i16 %0, %5
ret i16 %d
}
The first instruction would be muls r24, r31 before this patch. The r31
should have been r15 if you look at the intermediate forms during
instruction selection / register allocation, but the generated
instruction uses r31. After this patch, an extra movw is inserted to get
%5 in range for muls.
To make sure this bug is fixed everywhere, I checked all instructions
and found that most multiplication instructions suffered from this bug,
which I have fixed with this patch. No other instructions appear to be
affected.
Differential Revision: https://reviews.llvm.org/D74281
jasonliu [Mon, 24 Feb 2020 15:46:11 +0000 (15:46 +0000)]
[XCOFF][AIX] Fix incorrect alignment for function descriptor csect
Summary:
Function descriptor csect on AIX should be 4 byte align instead of 1 byte align.
Reviewer: daltenty
Differential Revision: https://reviews.llvm.org/D74974
Michael Kruse [Mon, 24 Feb 2020 17:51:00 +0000 (11:51 -0600)]
[CMake] Default to static linking for subprojects.
Pass plugins introduced in D61446 do not support dynamic linking on
Windows, hence the option LLVM_${name_upper}_LINK_INTO_TOOLS can only
work being set to "ON". Currently, it defaults to "OFF" such that such
plugins are inoperable by default on Windows. Change the default for
subprojects to follow LLVM_ENABLE_PROJECTS.
Reviewed By: serge-sans-paille, MaskRay
Differential Revision: https://reviews.llvm.org/D72372
Francesco Petrogalli [Fri, 21 Feb 2020 16:15:09 +0000 (16:15 +0000)]
[ReleaseNotes] Mention the `vector-function-abi-variant` attribute.
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D74969
Louis Dionne [Mon, 24 Feb 2020 17:21:07 +0000 (12:21 -0500)]
[libc++] Drop redundant check for -std=c++14
We always build all components of libc++ with -std=c++14 anyway
serge-sans-paille [Mon, 24 Feb 2020 16:20:49 +0000 (17:20 +0100)]
[NFC] Fix typo in error message
Peter Collingbourne [Mon, 24 Feb 2020 17:11:15 +0000 (09:11 -0800)]
Revert "Rework go bindings so that validation works fine"
And add llvm-go back to the test dependencies.
No longer necessary now that llvm-go has been brought back.
This reverts commit
e8f8873da5eaad187f82dad78ebdb3ab3df22b36.
Nico Weber [Mon, 24 Feb 2020 17:10:40 +0000 (12:10 -0500)]
[gn build] remove -std=c++11 in libcxx build pending discussion in
80e73f2 review thread
Louis Dionne [Mon, 24 Feb 2020 16:39:48 +0000 (11:39 -0500)]
[libc++] Fix CI and Linux failures after landing D68480
- Avoid using C++11-and-later features in <atomic>:
Historically, we've supported <atomic> in C++03, so we can't use C++11
features in that header. This is something we really need to change,
since our implementation of <atomic> is starting to accumulate technical
debt because of that.
- Mark a test as unsupported on single threaded systems
- Add missing symbols to the Linux ABI list
Nico Weber [Mon, 24 Feb 2020 16:42:32 +0000 (11:42 -0500)]
[gn build] (manually) merge
54fa9ecd308
Simon Pilgrim [Mon, 24 Feb 2020 16:25:55 +0000 (16:25 +0000)]
[X86] getTargetShuffleInputs - check that the source inputs are all the right size.
I'm hoping to begin improving shuffle combining across different vector sizes, but before that we must ensure that all existing getTargetShuffleInputs calls must bail if the inputs aren't the same size.
Sean Fertile [Mon, 24 Feb 2020 15:48:45 +0000 (10:48 -0500)]
[PowerPC][AIX] Spill/restore the callee-saved condition register bits.
Extends the existing support for spilling and restoring the condition
register to the linkage area for 32-bit targets, and enables for AIX.
Differential Revision: https://reviews.llvm.org/D74349
Pavel Labath [Mon, 24 Feb 2020 15:45:37 +0000 (16:45 +0100)]
[lldb/DWARF] Fix dwp search path in the separate-debug-file case
The convention is that the dwp file name is derived from the name of the
file holding the executable code, even if the linked portion of the
debug info is elsewhere (objcopy --only-keep-debug).
Louis Dionne [Mon, 17 Feb 2020 15:23:48 +0000 (10:23 -0500)]
[libc++] Mark the C++03 version of std::function as deprecated
Summary: We want to eventually remove it.
Reviewers: EricWF
Subscribers: christof, jkorous, dexonsmith, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D74719
Louis Dionne [Mon, 24 Feb 2020 15:08:41 +0000 (10:08 -0500)]
[libc++] Adapt a few things around the implementation of P1135R6
- Add the new symbols to the ABI list on Darwin
- Add XFAIL markup to the tests that require dylib support on older platforms
- Add availability markup for back-deployment
Olivier Giroux [Tue, 18 Feb 2020 14:58:34 +0000 (09:58 -0500)]
[libc++] Implementation of C++20's P1135R6 for libcxx
Differential Revision: https://reviews.llvm.org/D68480
cchen [Mon, 24 Feb 2020 15:06:17 +0000 (10:06 -0500)]
[OpenMP] Refactor the analysis in checkMapClauseBaseExpression using StmtVisitor class.
Summary: This step is the preparation of allowing lvalue in map/motion clause.
Reviewers: ABataev, jdoerfert
Reviewed By: ABataev
Subscribers: guansong, cfe-commits
Tags: #clang, #openmp
Differential Revision: https://reviews.llvm.org/D74970
Xiangling Liao [Mon, 24 Feb 2020 14:46:00 +0000 (09:46 -0500)]
[AIX][Frontend] C++ ABI customizations for AIX boilerplate
This PR enables "XL" C++ ABI in frontend AST to IR codegen. And it is driven by
static init work. The current kind in Clang by default is Generic Itanium, which
has different behavior on static init with IBM xlclang compiler on AIX.
Differential Revision: https://reviews.llvm.org/D74015
Melanie Blower [Mon, 24 Feb 2020 14:42:05 +0000 (06:42 -0800)]
add release notes for ffp-model and ffp-exception-behavior
Simon Pilgrim [Mon, 24 Feb 2020 14:22:48 +0000 (14:22 +0000)]
[CostModel][X86] We don't need a scale factor for SLM extract costs
D74976 will handle larger vector types, but since SLM doesn't support AVX+ then we will always be extracting from 128-bit vectors so don't need to scale the cost.
Sjoerd Meijer [Mon, 24 Feb 2020 14:19:21 +0000 (14:19 +0000)]
[MIR][ARM] MachineOperand comments
This adds infrastructure to print and parse MIR MachineOperand comments.
The motivation for the ARM backend is to print condition code names instead of
magic constants that are difficult to read (for human beings). For example,
instead of this:
dead renamable $r2, $cpsr = tEOR killed renamable $r2, renamable $r1, 14, $noreg
t2Bcc %bb.4, 0, killed $cpsr
we now print this:
dead renamable $r2, $cpsr = tEOR killed renamable $r2, renamable $r1, 14 /* CC::always */, $noreg
t2Bcc %bb.4, 0 /* CC:eq */, killed $cpsr
This shows that MachineOperand comments are enclosed between /* and */. In this
example, the EOR instruction is not conditionally executed (i.e. it is "always
executed"), which is encoded by the 14 immediate machine operand. Thus, now
this machine operand has /* CC::always */ as a comment. The 0 on the next
conditional branch instruction represents the equal condition code, thus now
this operand has /* CC:eq */ as a comment.
As it is a comment, the MI lexer/parser completely ignores it. The benefit is
that this keeps the change in the lexer extremely minimal and no target
specific parsing needs to be done. The changes on the MIPrinter side are also
minimal, as there is only one target hooks that is used to create the machine
operand comments.
Differential Revision: https://reviews.llvm.org/D74306
Kerry McLaughlin [Mon, 24 Feb 2020 11:08:52 +0000 (11:08 +0000)]
[AArch64][SVE] Add the SVE dupq_lane intrinsic
Summary:
Implements the @llvm.aarch64.sve.dupq.lane intrinsic.
As specified in the ACLE, the behaviour of:
svdupq_lane_u64(data, index)
...is identical to:
svtbl(data, svadd_x(svptrue_b64(),
svand_x(svptrue_b64(), svindex_u64(0, 1), 1),
index * 2))
If the index is in the range [0,3], the operation is equivalent
to a single DUP (.q) instruction.
Reviewers: sdesmalen, c-rhodes, cameron.mcinally, efriedma, dancgr, rengolin
Reviewed By: sdesmalen
Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, cfe-commits, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D74734
Sam Parker [Mon, 24 Feb 2020 13:50:46 +0000 (13:50 +0000)]
[RDA][ARM][LowOverheadLoops] Iteration count IT blocks
Change the way that we remove the redundant iteration count code in
the presence of IT blocks. collectLocalKilledOperands has been
introduced to scan an instructions operands, collecting the killed
instructions and then visiting them too. This is used to delete the
code in the preheader which calculates the iteration count. We also
track any IT blocks within the preheader and, if we remove all the
instructions from the IT block, we also remove the IT instruction.
isSafeToRemove is used to remove any redundant uses of the iteration
count within the loop body.
Differential Revision: https://reviews.llvm.org/D74975
Michele Scandale [Mon, 24 Feb 2020 12:59:26 +0000 (07:59 -0500)]
Fix TryParsePtrOperatorSeq.
The syntax rules for ptr-operator allow attributes after *, &,
&&, therefore we should be able to parse the following:
void fn() {
void (*[[attr]] x)() = &fn;
void (&[[attr]] y)() = fn;
void (&&[[attr]] z)() = fn;
}
However the current logic in TryParsePtrOperatorSeq does not consider
the presence of attributes leading to unexpected parsing errors.
Moreover we should also consider _Atomic a possible qualifier that can
appear after the sequence of attribute specifiers.
Mikhail Maltsev [Mon, 24 Feb 2020 12:49:20 +0000 (12:49 +0000)]
[ARM,MVE] Remove 64-bit variants of vbrsrq* intrinsics
Summary:
According to the ACLE the vbrsrq* intrinsics don't accept vectors
with 64-bit elements (and neither does the corresponding VBRSR
instruction).
Reviewers: simon_tatham, dmgreen, MarkMurrayARM, ostannard
Reviewed By: simon_tatham
Subscribers: kristof.beyls, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D75038
David Green [Mon, 24 Feb 2020 11:15:09 +0000 (11:15 +0000)]
[ARM] FP16 bitcast test. NFC
Simon Pilgrim [Mon, 24 Feb 2020 11:58:50 +0000 (11:58 +0000)]
[CostModel][X86] Try to check against common prefixes before using target-specific cpu checks
SLM/GLM is still a mess so not all of them have been updated yet.
Kirill Bobyrev [Mon, 24 Feb 2020 11:17:55 +0000 (12:17 +0100)]
Use temporary directory for tests in D74346
Benjamin Kramer [Mon, 24 Feb 2020 11:10:13 +0000 (12:10 +0100)]
[ORC] Remove spammy debug print
Kerry McLaughlin [Mon, 24 Feb 2020 10:38:37 +0000 (10:38 +0000)]
[AArch64][SVE] Add intrinsics for SVE2 cryptographic instructions
Summary:
Implements the following SVE2 intrinsics:
- @llvm.aarch64.sve.aesd
- @llvm.aarch64.sve.aesimc
- @llvm.aarch64.sve.aese
- @llvm.aarch64.sve.aesmc
- @llvm.aarch64.sve.rax1
- @llvm.aarch64.sve.sm4e
- @llvm.aarch64.sve.sm4ekey
Reviewers: sdesmalen, c-rhodes, dancgr, cameron.mcinally, efriedma, rengolin
Reviewed By: sdesmalen
Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, cfe-commits, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D74833
Benjamin Kramer [Mon, 24 Feb 2020 10:45:59 +0000 (11:45 +0100)]
Silence compiler warnings
mlir/lib/Parser/Parser.cpp:4484:15: warning: 'parseAssignmentList' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
ParseResult parseAssignmentList(SmallVectorImpl<OperandType> &lhs,
^
mlir/include/mlir/IR/OpImplementation.h:662:3: note: overridden virtual function is here
parseAssignmentList(SmallVectorImpl<OperandType> &lhs,
^
mlir/lib/Parser/Parser.cpp:4488:12: warning: unused variable 'type' [-Wunused-variable]
Type type;
^
Benjamin Kramer [Fri, 21 Feb 2020 12:24:54 +0000 (13:24 +0100)]
Add a basic tiling pass for parallel loops
This exploits the fact that the iterations of parallel loops are
independent so tiling becomes just an index transformation. This pass
only tiles the innermost loop of a loop nest.
The ultimate goal is to allow vectorization of the tiled loops, but I
don't think we're there yet with the current rewriting, as the tiled
loops don't have a constant trip count.
Differential Revision: https://reviews.llvm.org/D74954
Bevin Hansson [Mon, 16 Dec 2019 14:25:52 +0000 (15:25 +0100)]
[Intrinsic] Add fixed point saturating division intrinsics.
Summary:
This patch adds intrinsics and ISelDAG nodes for signed
and unsigned fixed-point division:
```
llvm.sdiv.fix.sat.*
llvm.udiv.fix.sat.*
```
These intrinsics perform scaled, saturating division
on two integers or vectors of integers. They are
required for the implementation of the Embedded-C
fixed-point arithmetic in Clang.
Reviewers: bjope, leonardchan, craig.topper
Subscribers: hiraditya, jdoerfert, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71550
Calixte Denizet [Mon, 10 Feb 2020 17:46:37 +0000 (18:46 +0100)]
[profile] Don't dump counters when forking and don't reset when calling exec** functions
Summary:
There is no need to write out gcdas when forking because we can just reset the counters in the parent process.
Let say a counter is N before the fork, then fork and this counter is set to 0 in the child process.
In the parent process, the counter is incremented by P and in the child process it's incremented by C.
When dump is ran at exit, parent process will dump N+P for the given counter and the child process will dump 0+C, so when the gcdas are merged the resulting counter will be N+P+C.
About exec** functions, since the current process is replaced by an another one there is no need to reset the counters but just write out the gcdas since the counters are definitely lost.
To avoid to have lists in a bad state, we just lock them during the fork and the flush (if called explicitely) and lock them when an element is added.
Reviewers: marco-c
Reviewed By: marco-c
Subscribers: hiraditya, cfe-commits, #sanitizers, llvm-commits, sylvestre.ledru
Tags: #clang, #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D74953
Pavel Labath [Thu, 20 Feb 2020 14:24:09 +0000 (15:24 +0100)]
Use new FailedWithMessage matcher in DWARFDebugLineTest.cpp
Summary:
This should produce slightly better error messages in case of failures.
Only slightly, because this code was pretty careful about that to begin
with -- I've seen code which does much worse.
Reviewers: jhenderson, dblaikie
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D74899
Bevin Hansson [Mon, 9 Dec 2019 15:22:57 +0000 (16:22 +0100)]
[MC] Widen the functional unit type from 32 to 64 bits.
Summary:
The type used to represent functional units in MC is
'unsigned', which is 32 bits wide. This is currently
not a problem in any upstream target as no one seems
to have hit the limit on this yet, but in our
downstream one, we need to define more than 32
functional units.
Increasing the size does not seem to cause a huge
size increase in the binary (an llc debug build went
from
1366497672 to
1366523984, a difference of 26k),
so perhaps it would be acceptable to have this patch
applied upstream as well.
Subscribers: hiraditya, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71210
Raphael Isemann [Mon, 24 Feb 2020 08:04:18 +0000 (09:04 +0100)]
[lldb] Disable auto fix-its when evaluating expressions in the test suite
Summary:
Currently the test suite runs with enabled automatically applied Clang fix-its for expressions.
This is causing that sometimes incorrect expressions in tests are still evaluated even though they
are actually incorrect. Let's disable this feature in the test suite so that we know when expressions
are wrong and leave the fix-it testing to the dedicated tests for that feature.
Also updates the `lang/cpp/operators/` test as it seems Clang needs the `struct` keywords
before C and would otherwise fail without fixits.
Reviewers: jingham, JDevlieghere, shafik
Reviewed By: JDevlieghere, shafik
Subscribers: shafik, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D74957
Pavel Labath [Mon, 24 Feb 2020 08:02:18 +0000 (09:02 +0100)]
[lldb/test] simplify basic-elf.yaml
Explicit dynsym/dynstr sections were added in
a6370d5 to compensate for
a yaml2obj change D74764. This test doesn't need those sections, so
instead I just delete the explicit section blocks, and also the
"DynamicSymbols" block, which triggers their implicit generation.
Pavel Labath [Fri, 21 Feb 2020 14:49:12 +0000 (15:49 +0100)]
[lldb/DWARF] Don't index dwp file multiple times
Summary:
When we added support for type units in dwo files, we changed the
"manual" dwarf index to index _all_ dwarf units in the dwo file instead
of just the split unit belonging to our skeleton unit. This was fine for
dwo files, as they contain only a single compile units and type units do
not have a split type unit which would point to them.
However, this does not work for dwp files because, these files do
contain multiple split compile units, and the current approach means
that each unit gets indexed multiple times (once for each split unit =>
n^2 complexity).
This patch teaches the manual dwarf index to treat dwp files specially.
Any type units in the dwp file added to the main list of compile units
and indexed with them in a single batch. Split compile units in dwp
files are still indexed as a part of their skeleton unit -- this is done
because we need the DW_AT_language attribute from the skeleton unit to
index them properly.
Handling of dwo files remains unchanged -- all units (type and skeleton)
are indexed when we reach the dwo file through the split unit.
Reviewers: clayborg, JDevlieghere, aprantl
Subscribers: arphaman, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D74964
Sam Parker [Fri, 21 Feb 2020 14:57:51 +0000 (14:57 +0000)]
[ARM][MVE] Combine more extending masked loads
For MVE, don't look at the users of the extending loads so that more
as desirable for folding.
Differential Revision: https://reviews.llvm.org/D74958
Raphael Isemann [Mon, 24 Feb 2020 07:38:44 +0000 (08:38 +0100)]
[lldb] Remove all the 'current_id' logging counters from the lookup code.
Summary:
We have a lot of code in our lookup code to pass around `current_id` counters which end up in our logs like this:
```
AOCTV::FT [234] Found XYZ
```
This patch removes all of this code because:
* I'm splitting up all humongous functions, so I need to write more and more boilerplate to pass around these ids.
* I never saw any similar counters in the LLDB/LLVM code base.
* They're essentially globals and the last thing we need in LLDB is even more global state.
* They're not really useful when readings logs. It doesn't help that there isn't just 1 or 2 counters, but 12 (!) unique counters. I always thought that if I see two identical counter values in those brackets it's the same lookup request, but it seems that's only true by accident (and you can't know which of the 12 counters is actually printed without reading the code). The only time I know I can trust the counters is when it's obvious from the log that it's the same counter like in the log below, but then why have the counters in the first place?
```
LayoutRecordType[28] on (ASTContext*)0x00007FFA1C840200 'scratch ASTContext' for (RecordDecl*)0x00007FFA0AAE8CF0 [name = '__tree']
LRT[28] returned:
LRT[28] Original = (RecordDecl*)%p
LRT[28] Size = %lld
LRT[28] Alignment = %lld
LRT[28] Fields:
LRT[28] (FieldDecl*)0x00007FFA1A13B1D0, Name = '__begin_node_', Offset = 0 bits
LRT[28] (FieldDecl*)0x00007FFA1C08FD30, Name = '__pair1_', Offset = 64 bits
LRT[28] (FieldDecl*)0x00007FFA1C061210, Name = '__pair3_', Offset = 128 bits
LRT[28] Bases:
```
Reviewers: labath, shafik, JDevlieghere
Reviewed By: labath, shafik, JDevlieghere
Subscribers: abidh, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D74951
Lang Hames [Mon, 24 Feb 2020 06:53:48 +0000 (22:53 -0800)]
[JITLink] Add a MachO x86-64 GOT and Stub bypass optimization.
This optimization bypasses GOT loads and calls/branches through stubs when the
ultimate target of the access/branch is found to be within range of the
reference.
Extra debugging output is also added to the generic JITLink algorithm and
basic GOT and Stubs builder utility to aid debugging.
Craig Topper [Mon, 24 Feb 2020 07:00:40 +0000 (23:00 -0800)]
[X86] When creating X86ISD::MGATHER nodes from AVX2 gather intrinsics, cast the mask to integer type.
The gather intrinsics use a floating point mask when the result
type is FP. But we call DemandedBits on the mask assuming its an
integer type. We also use integer types when we create it from
generic IR. So add a bitcast to the intrinsic path to guarantee
the integer type.
Craig Topper [Mon, 24 Feb 2020 03:40:29 +0000 (19:40 -0800)]
[X86] Use custom isel for gather/scatter instructions.
The type profile we use for the isel patterns lied about how
many operands the gather/scatter node has to skip the index
and scale operands. This allowed us to expand the baseptr
operand into base, displacement, and segment and then merge
the index and scale with them in the final instruction during
isel. This is kind of a hack that relies on isel not checking the
number of operands at all.
This commit switches to custom isel where we can manage this
directly without relying on holes in the isel checking.
Craig Topper [Sun, 23 Feb 2020 23:19:04 +0000 (15:19 -0800)]
[SelectionDAG] Remove ISD::LIFETIME_START/LIFETIME_END from assert in getMemIntrinsicNode.
These appear to have their own SDNode type and shouldn't use
MemIntrinsicSDNode.
Siva Chandra Reddy [Wed, 12 Feb 2020 21:03:09 +0000 (13:03 -0800)]
[libc] Add a README to the sub-directories under the utils directory.
Also, the source layout document has been updated to reflect the current
layout of the `utils` directory.
Reviewers: PaulkaToast
Differential Revision: https://reviews.llvm.org/D74502
Shengchen Kan [Sun, 23 Feb 2020 12:35:32 +0000 (20:35 +0800)]
[Driver][X86] Add helptext for malign-branch*, mbranches-within-32B-boundaries
Differential Revision: https://reviews.llvm.org/D75017
QingShan Zhang [Mon, 24 Feb 2020 04:02:24 +0000 (04:02 +0000)]
[NFC][PowerPC] Refactor the tryAndWithMask()
Split the tryAndWithMask into several small calls.
Differential Revision: https://reviews.llvm.org/D72250
Hongtao Yu [Sun, 23 Feb 2020 23:13:27 +0000 (15:13 -0800)]
IR printing for single function with the new pass manager.
Summary:
The IR printing always prints out all functions in a module with the new pass manager, even with -filter-print-funcs specified. This is being fixed in this change. However, there are two exceptions, i.e, with user-specified wildcast switch -filter-print-funcs=* or -print-module-scope, under which IR of all functions should be printed.
Test Plan:
make check-clang
make check-llvm
Reviewers: wenlei
Reviewed By: wenlei
Subscribers: wenlei, hiraditya, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D74814
Craig Topper [Sun, 23 Feb 2020 20:50:48 +0000 (12:50 -0800)]
[SelectionDAG] Remove SelectionDAG::getTargetMemSDNode now that its not used.
Targets are expected to use getMemIntrinsicNode and not provide
their own subclasses. X86 was previously the only user.
Craig Topper [Sun, 23 Feb 2020 20:47:42 +0000 (12:47 -0800)]
[X86] Remove most X86 specific subclasses of MemSDNode. Just use a MemIntrinsicSDNode as we usually do.
Leave the gather/scatter subclasses, but make them inherit from
MemIntrinsicSDNode and delete their constructor and destructor.
This way we can still have the getIndex, getMask, etc. convenience
functions.
Craig Topper [Sun, 23 Feb 2020 18:46:34 +0000 (10:46 -0800)]
[X86] Enable the use of movlps for i64 atomic load on 32-bit targets with sse1.
Still a little room for improvement by using movlps to store to
the stack temporary needed to move data out of the xmm register
after the load.
Craig Topper [Sun, 23 Feb 2020 18:21:59 +0000 (10:21 -0800)]
[X86] Use FIST for i64 atomic stores on 32-bit targets without SSE.
Jonas Paulsson [Wed, 19 Feb 2020 22:54:12 +0000 (14:54 -0800)]
[SystemZ] Support the kernel back chain.
In order to build the Linux kernel, the back chain must be supported with
packed-stack. The back chain is then stored topmost in the register save
area.
Review: Ulrich Weigand
Differential Revision: https://reviews.llvm.org/D74506
Sam McCall [Sun, 23 Feb 2020 20:11:58 +0000 (21:11 +0100)]
[clangd] Try to fix buildbots - copy elision not happening here?
Aaron Ballman [Sun, 23 Feb 2020 19:33:37 +0000 (14:33 -0500)]
Updating a comment to clarify that SkipUntil handles balanced delimiters.
Sam McCall [Sun, 23 Feb 2020 19:03:00 +0000 (20:03 +0100)]
[clangd] Reapply
b60896fad926 Fall back to selecting token-before-cursor if token-after-cursor fails.
This reverts commit
b4b9706d5da368c81b86867b1c11a2e17b4472ac.
Now avoiding expected<vector<selection>> in favor of expected<vector<unique_ptr<selection>>>
Florian Hahn [Sun, 23 Feb 2020 19:13:13 +0000 (19:13 +0000)]
[AArch64] Update new test.
Changed after
7769030b9310c1865fd331edb78dc242a39b109a.
Florian Hahn [Sun, 23 Feb 2020 16:32:55 +0000 (16:32 +0000)]
Recommit "[PatternMatch] Match XOR variant of unsigned-add overflow check."
This version fixes a buildbot failure cause by picking the wrong insert
point for XORs. We cannot pick the XOR binary operator as insert point,
as it is not guaranteed that both input operands for the overflow
intrinsic are defined before it.
This reverts the revert commit
c7fc0e5da6c3c36eb5f3a874a6cdeaedb26856e0.
Craig Topper [Sun, 23 Feb 2020 07:01:19 +0000 (23:01 -0800)]
[X86] Regenerate some tests to show FMA4 comments. NFC
Sanjay Patel [Sun, 23 Feb 2020 16:26:28 +0000 (11:26 -0500)]
[SDAG] fold fsub -0.0, undef to undef rather than NaN
A question about this behavior came up on llvm-dev:
http://lists.llvm.org/pipermail/llvm-dev/2020-February/139003.html
...and as part of backend improvements in D73978.
We decided not to implement a more general change that would have
folded any FP binop with nearly arbitrary constant + undef operand
to undef because that is not theoretically correct (even if it is
practically correct).
This is the SDAG-equivalent to the IR change in D74713.
Florian Hahn [Sun, 23 Feb 2020 15:39:15 +0000 (15:39 +0000)]
[DSE] Track overlapping stores.
Add a map from BasicBlocks to overlap intervals. For partial writes, we
can keep track of those in IOLs. We only add candidates that are valid
for eliminations.
Reviewers: dmgreen, bryant, asbirlea, Tyker
Reviewed By: asbirlea
Differential Revision: https://reviews.llvm.org/D73757
Sam McCall [Sun, 23 Feb 2020 15:34:49 +0000 (16:34 +0100)]
Revert "[clangd] Reapply
b60896fad926 Fall back to selecting token-before-cursor if token-after-cursor fails."
This reverts commit
a2ce807eb72a8e154abca09b1e968b2d99ba6933.
Buildbot failures on GCC due to SelectionTree not being copyable, and
instantiating vector<Selection> in the tweak-handling in ClangdServer.
Sam McCall [Sun, 23 Feb 2020 15:09:36 +0000 (16:09 +0100)]
[clangd] Reapply
b60896fad926 Fall back to selecting token-before-cursor if token-after-cursor fails.
This reverts commit
6af1ad20d60ef8ea23f2cfdb02d299b3b3114b06.
Sam McCall [Tue, 4 Feb 2020 11:47:05 +0000 (12:47 +0100)]
[clangd] Debounce rebuilds responsively to rebuild times.
Summary:
Old: 500ms always. New: rebuild time, up to 500ms.
Fixes https://github.com/clangd/clangd/issues/275
Reviewers: hokein
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D73949
Nuno Lopes [Sun, 23 Feb 2020 12:42:47 +0000 (12:42 +0000)]
[NFC] fix test nan value
Denis Khalikov [Sun, 23 Feb 2020 12:05:27 +0000 (15:05 +0300)]
[NFC] Test commit access. Drop trivial braces.
Craig Topper [Sun, 23 Feb 2020 06:40:13 +0000 (22:40 -0800)]
[X86] Add sse2 command lines to sse-intrinsics-fast-isel.ll.
The extra available vector types on sse2 causes us to produce
different code.
Craig Topper [Sun, 23 Feb 2020 05:42:57 +0000 (21:42 -0800)]
[X86] Add AddToWorklist(N) after calls to SimplifyDemandedBits/SimplifyDemandedVectorElts that are called on an operand of N.
If a simplication occurs the operand will be added to the worklist.
But since the demanded mask was based on N, we need to make sure
we revisit N in case there are more simplifications to be done.
Returning SDValue(N, 0) as we do, only tells DAG combine that
something changed, but that won't make it add anything to the
worklist.
Found while playing around with using VEXTRACT_STORE in more cases.
But I guess this doesn't affect any of our existing tests.