Louis Dionne [Wed, 12 Feb 2020 15:20:09 +0000 (16:20 +0100)]
[libc++] span: Guard against overflow in span::subspan
The calculation _Offset + _Count <= size() may overflow, so use
_Count <= size() - _Offset instead. Note that this is safe due to
the previous constraint that _Offset <= size().
Patch by Michael Schellenberger Costa.
Differential Revision: https://reviews.llvm.org/D71998
Anil Mahmud [Mon, 3 Feb 2020 18:34:44 +0000 (12:34 -0600)]
[PowerPC] Add support for intrinsic llvm.ppc.eieio
Add support for the intrinsic llvm.ppc.eieio to emit the instruction eieio.
Differential Revision: https://reviews.llvm.org/D69066
Anil Mahmud [Mon, 3 Feb 2020 17:03:54 +0000 (11:03 -0600)]
[PowerPC] Add support for intrinsics llvm.ppc.dcbfl and llvm.ppc.dcbflp
Added support for the intrinsic llvm.ppc.dcbfl and llvm.ppc.dcbflp.
These will be used for emitting cache control instructions dcbfl and dcbflp
which are actually mnemonics for using dcbf instruction with different
immediate arguments.
dcbfl ra, rb -> dcbf ra, rb, 1
dcbflp, ra, rb -> dcbf ra, rb, 3
Differential Revision: https://reviews.llvm.org/D68411
Matt Arsenault [Wed, 12 Feb 2020 14:56:36 +0000 (09:56 -0500)]
AMDGPU/GlobalISel: Split 96-bit load/store select tests out
These are only legal on CI+. The test would fail in a debug build, but
not a release due to the partial selection since the pre-selection
legality assert only happens in a debug build.
James Henderson [Wed, 12 Feb 2020 14:56:09 +0000 (14:56 +0000)]
[MC][AVR] Fix AVR test following
740bc366
James Henderson [Wed, 12 Feb 2020 14:37:10 +0000 (14:37 +0000)]
[DebugInfo] Add checks for v2 directory and file name table terminators
The DWARFv2-4 specification for the line table header states that the
include directories and file name tables both end with a single null
byte. Prior to this change, the parser did not detect if this byte was
missing, because it also stopped reading the tables once it reached the
prologue end, as claimed by the header_length field. This change adds a
check that the terminator has been seen at the end of each table.
Reviewed by: dblaikie, MaskRay
Differential Revision: https://reviews.llvm.org/D74413
James Henderson [Tue, 11 Feb 2020 12:17:33 +0000 (12:17 +0000)]
[DebugInfo] Add check for zero debug line opcode_base
The number of standard opcodes is defined to be opcode_base - 1, so a
value of 0 for the opcode_base caused a crash as an attempt was made to
reserve many entries in a vector. This change fixes the crash, by
issuing a warning and skipping reading of standard opcode lengths in the
event of an opcode_base of 0.
Reviewed by: dblaikie
Differential Revision: https://reviews.llvm.org/D74309
James Henderson [Tue, 11 Feb 2020 14:11:01 +0000 (14:11 +0000)]
[DebugInfo] Print version in error message in decimal
Also remove some test duplication and add a test case that shows the
maximum version is rejected (this also shows that the value in the error
message is actually in decimal, and not just missing an 0x prefix).
Reviewed by: dblaikie
Differential Revision: https://reviews.llvm.org/D74403
stozer [Wed, 12 Feb 2020 13:41:18 +0000 (13:41 +0000)]
Re-reapply: Recover debug intrinsics when killing duplicated/empty blocks
This reverts commit
636c93ed11a5f98b5c3ff88241460d61cb7785bb.
The original patch caused build failures on TSan buildbots. Commit
6ded69f294a9
fixes this issue by reducing the rate at which empty debug intrinsics
propagate, reducing the memory footprint and preventing a fatal spike.
Matt Arsenault [Tue, 21 Jan 2020 18:23:45 +0000 (13:23 -0500)]
AMDGPU/GlobalISel: Widen non-power-of-2 load results
Load extra bits if suitably aligned. This allows using widened
3-vector loads on SI, and fixes legalization for <9 x s32> (which LSV
apparently forms frequently on lowered kernel argument lists).
Fix incorrectly treating these as legal on SI. This should emit a
64-bit store and a 32-bit store.
I think all of the load and store rules are just about complete, but
due for a rewrite.
Saar Raz [Wed, 12 Feb 2020 14:23:55 +0000 (16:23 +0200)]
[Concepts] Add missing TPA commit to requires expression parsing
If an error had occurred when annotating a scope spec during the tentative parse
for a type-requirement, we would not revert nor commit the tentative parse, triggerring
an assertion failure.
Commit the TPA in this case and then do error recovery.
Florian Hahn [Tue, 11 Feb 2020 18:27:41 +0000 (18:27 +0000)]
Recommit "[DSE] Add first version of MemorySSA-backed DSE (Bottom up walk)."
This includes a fix for the santizier failures.
This reverts the revert commit
42f8b915eb72364cc5e84adf58a2c2d4947e8b10.
Alex Zinenko [Wed, 12 Feb 2020 14:08:38 +0000 (15:08 +0100)]
[mlir] Linalg fusion: ignore indexed_generic producers
They are currently not supported and we should not attempt fusing them.
Pierre Oechsel [Wed, 12 Feb 2020 09:26:01 +0000 (10:26 +0100)]
[mlir] StdToLLVM: Add error when the sourceMemRef of a subview is not a llvm type.
A memref_cast casting to a memref with a non identity map can't be
lowered to llvm. Take the following case:
```
func @invalid_memref_cast(%arg0: memref<?x?xf64>) {
%c1 = constant 1 : index
%c0 = constant 0 : index
%5 = memref_cast %arg0 : memref<?x?xf64> to memref<?x?xf64, #map1>
%25 = std.subview %5[%c0, %c0][%c1, %c1][] : memref<?x?xf64, #map1> to memref<?x?xf64, #map1>
return
}
```
When lowering the subview mlir was assuming `%5` to have an llvm type
(which is not the case as mlir failed to lower the memref_cast).
Differential Revision: https://reviews.llvm.org/D74466
Hans Wennborg [Wed, 12 Feb 2020 14:12:31 +0000 (15:12 +0100)]
Fix unused function warning (PR44808)
Stephan Herhut [Wed, 12 Feb 2020 13:35:32 +0000 (14:35 +0100)]
[MLIR][CUDA] Fix build file for mlir-cuda-runner
Summary:
This was broken recently when moving from dialect registration via
static initializers to explicit intialization.
Differential Revision: https://reviews.llvm.org/D74480
Saar Raz [Wed, 12 Feb 2020 13:58:51 +0000 (15:58 +0200)]
[Concepts] Do not check constraints if not all template arguments have been deduced
We previously checked the constraints of instantiated function templates even in cases where
PartialOverloading was true and not all template arguments have been deduced, which caused crashes
in clangd (bug 44714).
We now check if all arguments have been deduced before checking constraints in partial overloading
scenarios.
Ayman Musa [Wed, 12 Feb 2020 13:00:25 +0000 (15:00 +0200)]
[AggressiveInstCombine] Add test with baseline CHECKs for aggressive inst combine for ICmp instruction.
Sergej Jaskiewicz [Wed, 12 Feb 2020 13:07:30 +0000 (16:07 +0300)]
[libcxx] Don't assume cwd name in std::filesystem tests
Summary:
In `std::filesystem::proximate` tests we assume that the current working directory's name
is `fs.op.proximate`. This is fine when we're running the tests locally.
However, if we're running those tests on a remote machine via SSH, the directory layout may be
different. For example, currently we copy each test executable individually into
a temporary directory on the target board using SCP, so the assumption about the working directory name
doesn't necessarily hold.
This patch is the only thing that is necessary for all libc++ tests to pass when run remotely.
Reviewers: ldionne, EricWF, mclow.lists
Reviewed By: ldionne, EricWF
Subscribers: christof, dexonsmith, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D74348
Ayman Musa [Wed, 12 Feb 2020 13:04:49 +0000 (15:04 +0200)]
Revert "[AggressiveInstCombine] Add support for ICmp instr that feeds a select intsr's condition operand."
This reverts commit
cf155150f992270c88e586ffc61973d2552b72e8.
Ayman Musa [Wed, 12 Feb 2020 12:33:31 +0000 (14:33 +0200)]
[AggressiveInstCombine] Add support for ICmp instr that feeds a select intsr's condition operand.
Lei Zhang [Fri, 7 Feb 2020 16:30:19 +0000 (11:30 -0500)]
[mlir][spirv] Introduce spv.func
Thus far we have been using builtin func op to model SPIR-V functions.
It was because builtin func op used to have special treatment in
various parts of the core codebase (e.g., pass pipelines, etc.) and
it's easy to bootstrap the development of the SPIR-V dialect. But
nowadays with general op concepts and region support we don't have
such limitations and it's time to tighten the SPIR-V dialect for
completeness.
This commits introduces a spv.func op to properly model SPIR-V
functions. Compared to builtin func op, it can provide the following
benefits:
* We can control the full op so we can integrate SPIR-V information
bits (e.g., function control) in a more integrated way and define
our own assembly form and enforcing better verification.
* We can have a better dialect and library boundary. At the current
moment only functions are modelled with an external op. With this
change, all ops modelling SPIR-V concpets will be spv.* ops and
registered to the SPIR-V dialect.
* We don't need to special-case func op anymore when creating
ConversionTarget declaring SPIR-V dialect as legal. This is quite
important given we'll see more and more conversions in the future.
In the process, bumps a few FuncOp methods to the FunctionLike trait.
Differential Revision: https://reviews.llvm.org/D74226
stozer [Wed, 12 Feb 2020 11:48:20 +0000 (11:48 +0000)]
Reapply "[DebugInfo] Prevent explosion of debug intrinsics during jump threading"
This reverts commit
6ded69f294a9a62a68b0a07aa987c8165a4b31e7.
Mehdi Amini [Wed, 12 Feb 2020 10:06:50 +0000 (10:06 +0000)]
Fix MLIR build when the NVPTX target isn't configured
Differential Revision: https://reviews.llvm.org/D74472
Ehud Katz [Wed, 12 Feb 2020 12:13:14 +0000 (14:13 +0200)]
[unittests] Fix TargetLibraryInfoTest.ValidProto
Ayman Musa [Tue, 28 Jan 2020 13:17:15 +0000 (15:17 +0200)]
[AggressiveInstCombine] Add support for select instruction.
Differential Revision: https://reviews.llvm.org/D72837
Simon Pilgrim [Wed, 12 Feb 2020 11:42:25 +0000 (11:42 +0000)]
[TargetLowering] Add NegatibleCost enum for isNegatibleForFree return codes
The isNegatibleForFree/getNegatedExpression methods currently rely on a raw char value to indicate whether a negation is beneficial or not.
This patch replaces the char return value with an NegatibleCost enum to more clearly demonstrate what is implied.
It also renames isNegatibleForFree to getNegatibleCost to more accurately reflect whats going on.
Differential Revision: https://reviews.llvm.org/D74221
Balázs Kéri [Wed, 12 Feb 2020 10:26:38 +0000 (11:26 +0100)]
[analyzer]StreamChecker refactoring (NFC).
Reviewers: Szelethus
Reviewed By: Szelethus
Subscribers: xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, donat.nagy, Charusso, dkrupp, Szelethus, gamesh411, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D73359
Pavel Labath [Wed, 12 Feb 2020 11:47:43 +0000 (12:47 +0100)]
[lldb/DWARF] Use DWARFDebugInfoEntry * in ElaboratingDIEIterator
This is simpler, faster, and sufficient to uniquely idenify a DIE.
stozer [Wed, 12 Feb 2020 11:47:01 +0000 (11:47 +0000)]
Revert "[DebugInfo] Prevent explosion of debug intrinsics during jump threading"
This reverts commit
fe6f6cd6b8e647c5b4ac82f4fcd56c057c2ef8ce.
Found test failure on several buildbots.
Ayman Musa [Wed, 12 Feb 2020 11:40:40 +0000 (13:40 +0200)]
[NFC][AggressiveInstCombine] Remove redundant std::max.
Differential Revision: https://reviews.llvm.org/D74476
Martin Storsjö [Wed, 12 Feb 2020 09:22:26 +0000 (11:22 +0200)]
[LLDB] Fix GCC warnings about extra semicolons. NFC.
stozer [Mon, 27 Jan 2020 16:05:34 +0000 (16:05 +0000)]
[DebugInfo] Prevent explosion of debug intrinsics during jump threading
This patch is a fix following the revert of 72ce759
(https://reviews.llvm.org/rG72ce759928e6dfee6a9efa310b966c19722352ba)
and fixes the failure that it caused.
The above patch failed on the Thread Sanitizer buildbot with an out of
memory error. After an investigation, the cause was identified as an
explosion in debug intrinsics while running the Jump Threading pass on
ModuleMap.ll. The above patched prevented debug intrinsics from being
dropped when their Basic Block was deleted due to being "empty". In this
case, one of the functions in ModuleMap.ll had (after many optimization
passes) a very large number of debug intrinsics representing a set of
repeatedly inlined variables. Previously the vast majority of these were
silently dropped during Jump Threading when their blocks were deleted,
but as of the above patch they survived for longer, causing a large
increase in the number of debug intrinsics. These intrinsics were then
repeatedly cloned by the Jump Threading pass as edges were threaded,
multiplying the intrinsic count further. The memory consumed by this
process spiralled out of control, crashing the buildbot that uses TSan
(which has an estimated 5-10x memory overhead compared to non-sanitized
builds).
This patch adds RemoveRedundantDbgInstrs to the Jump Threading pass, in
order to reduce the number of debug intrinsics down to a manageable
amount in cases where many intrinsics for the same variable end up
bunched together contiguously, as in this case.
Differential Revision: https://reviews.llvm.org/D73054
Ehud Katz [Wed, 12 Feb 2020 11:14:09 +0000 (13:14 +0200)]
[ConstantFolding] Fold calls to FP remainder function
With the fixed implementation of the "remainder" operation in
rG9d0956ebd471, we can now add support to folding calls to it.
Differential Revision: https://reviews.llvm.org/D69777
Jay Foad [Wed, 12 Feb 2020 11:15:56 +0000 (11:15 +0000)]
[AMDGPU] Add one more pass to LLVMInitializeAMDGPUTarget
James Henderson [Tue, 11 Feb 2020 13:33:29 +0000 (13:33 +0000)]
[DebugInfo][test][NFC] Remove case numbers
This reduces the noise caused by adding cases earlier in the sequence.
Reviewed by: dblaikie
Differential Revision: https://reviews.llvm.org/D74402
Djordje Todorovic [Wed, 12 Feb 2020 10:54:29 +0000 (11:54 +0100)]
Revert "[DebugInfo] Enable the debug entry values feature by default"
This reverts commit rG9f6ff07f8a39.
Found a test failure on clang-with-thin-lto-ubuntu buildbot.
Liad Mordekoviz [Tue, 11 Feb 2020 11:10:57 +0000 (11:10 +0000)]
[llvm-objdump] Add column headers for relocation printing
This allows us better readability and compatibility with what GNU
objdump prints.
Fixes https://bugs.llvm.org/show_bug.cgi?id=43941
Reviewed by: jhenderson, MaskRay
Differential Revision: https://reviews.llvm.org/D72992
David Green [Tue, 11 Feb 2020 12:17:03 +0000 (12:17 +0000)]
[ARM] MVE vector reduce add tests. NFC
Kadir Cetinkaya [Wed, 12 Feb 2020 10:34:40 +0000 (11:34 +0100)]
[llvm-objcopy] Fix pipeline syntax
Raphael Isemann [Mon, 10 Feb 2020 07:13:09 +0000 (08:13 +0100)]
[lldb] Pass a valid SourceLocation to Sema::RequireCompleteType in ASTResultSynthesizer
Sema::RequireCompleteTypeImpl is supposed to have an assert that checks that the
SourceLocation that is passed in is always valid. It's currently commented out, but
as soon as this assert goes active, nearly every LLDB expression will start crashing as
we always pass in an invalid SourceLocation from the ASTResultSynthesizer.
This patch just passes in the valid SourceLocation of the expression (which is
the SourceLocation where the complete type is required) to prevent that from happening.
jasonliu [Tue, 11 Feb 2020 09:52:56 +0000 (09:52 +0000)]
[clang] Add -fignore-exceptions
Summary:
This is trying to implement the functionality proposed in:
http://lists.llvm.org/pipermail/cfe-dev/2017-April/053417.html
An exception can throw, but no cleanup is going to happen.
A module compiled with exceptions on, can catch the exception throws
from module compiled with -fignore-exceptions.
The use cases for enabling this option are:
1. Performance analysis of EH instrumentation overhead
2. The ability to QA non EH functionality when EH functionality is not available.
3. User of EH enabled headers knows the calls won't throw in their program and
wants the performance gain from ignoring EH construct.
The implementation tried to accomplish that by removing any landing pad code
that might get generated.
Reviewed by: aaron.ballman
Differential Revision: https://reviews.llvm.org/D72644
Florian Hahn [Wed, 12 Feb 2020 09:41:19 +0000 (09:41 +0000)]
Revert "[SCCP] Remove forcedconstant, go to overdefined instead"
This causes a crash for the reproducer below
enum { a };
enum b { c, d };
e;
static _Bool g(struct f *h, enum b i) {
i &&j();
return a;
}
static k(char h, enum b i) {
_Bool l = g(e, i);
l;
}
m(h) {
k(h, c);
g(h, d);
}
This reverts commit
aadb635e04854220064b77cc10d0e6772f5492fd.
Clement Courbet [Mon, 10 Feb 2020 10:27:53 +0000 (11:27 +0100)]
[CodeGen] Fix the computation of the alignment of split stores.
Summary:
Right now the alignment of the lower half of a store is computed as
align/2, which fails for unaligned stores (align = 1), and is overly
pessimitic for, e.g. a 8 byte store aligned to 4 bytes.
Fixes PR44851
Fixes PR44877
Reviewers: gchatelet, spatel, lebedev.ri
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D74311
Roman Lebedev [Wed, 12 Feb 2020 09:27:38 +0000 (12:27 +0300)]
[NFC?][SCEV][LoopVectorize] Add datalayout to the X86/float-induction-x86.ll test
Summary:
Currently, `SCEVExpander::isHighCostExpansionHelper()` has the following logic:
```
if (auto *UDivExpr = dyn_cast<SCEVUDivExpr>(S)) {
// If the divisor is a power of two and the SCEV type fits in a native
// integer (and the LHS not expensive), consider the division cheap
// irrespective of whether it occurs in the user code since it can be
// lowered into a right shift.
if (auto *SC = dyn_cast<SCEVConstant>(UDivExpr->getRHS()))
if (SC->getAPInt().isPowerOf2()) {
if (isHighCostExpansionHelper(UDivExpr->getLHS(), L, At,
BudgetRemaining, TTI, Processed))
return true;
const DataLayout &DL =
L->getHeader()->getParent()->getParent()->getDataLayout();
unsigned Width = cast<IntegerType>(UDivExpr->getType())->getBitWidth();
return DL.isIllegalInteger(Width);
}
```
Since this test does not have a datalayout specified,
`SCEVExpander::isHighCostExpansionHelper()` says that
`[[TMP2:%.*]] = lshr exact i64 [[TMP1]], 5` is high-cost, and didn't perform it.
But future patches will change that logic to solely rely on cost-model,
without any such datalayout checks, so i think it is best to show
that that change is ephemeral, and can already happen without costmodel changes.
Reviewers: reames, fhahn, sanjoy, craig.topper, RKSimon
Reviewed By: RKSimon
Subscribers: javed.absar, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73717
Djordje Todorovic [Mon, 10 Feb 2020 10:06:44 +0000 (11:06 +0100)]
[DebugInfo] Enable the debug entry values feature by default
This patch enables the debug entry values feature.
- Remove the (CC1) experimental -femit-debug-entry-values option
- Enable it for x86, arm and aarch64 targets
- Resolve the test failures
- Leave the llc experimental option for targets that do not
support the CallSiteInfo yet
Differential Revision: https://reviews.llvm.org/D73534
Mehdi Amini [Wed, 12 Feb 2020 09:03:40 +0000 (09:03 +0000)]
Remove static registration for dialects, and the "alwayslink" hack for passes
In the previous state, we were relying on forcing the linker to include
all libraries in the final binary and the global initializer to self-register
every piece of the system. This change help moving away from this model, and
allow users to compose pieces more freely. The current change is only "fixing"
the dialect registration and avoiding relying on "whole link" for the passes.
The translation is still relying on the global registry, and some refactoring
is needed to make this all more convenient.
Differential Revision: https://reviews.llvm.org/D74461
Clement Courbet [Wed, 12 Feb 2020 08:05:27 +0000 (09:05 +0100)]
[CodeGenPrepare] Add more store splitting tests for PR44877.
Raphael Isemann [Wed, 12 Feb 2020 08:35:19 +0000 (09:35 +0100)]
[lldb][NFC] Remove GetConstTypeName and GetConstQualifiedTypeName from CompilerType
Beside these two functions just being wrappers around GetTypeName they are also
just a leftover from migrating the CompilerType interface to ConstString.
Raphael Isemann [Wed, 12 Feb 2020 08:22:59 +0000 (09:22 +0100)]
[lldb][NFC] Move common_completions mapping out of CommandCompletions header.
Marius Brehler [Wed, 12 Feb 2020 08:41:40 +0000 (09:41 +0100)]
[mlir] Revise naming of MLIROptMain and MLIRMlirOptLib
* Rename CMake target MLIROptMain to MLIROptLib:
The target provides the main library
* Rename CMake target MLIRMlirOptLib to MLIRMlirOptMain:
The target provides the main() entry function
At the moment, the Bazel configuration of TenorFlow maps the target
MlirOptLib to "lib/Support/MlirOptMain.cpp" and MlirOptMain to
"tools/mlir-opt/mlir-opt.cpp". This is the other way around in the CMake
configuration. As discussed in the context of the pull request
https://github.com/tensorflow/tensorflow/pull/36301, it seems useful to
revise the naming in the MLIR repo.
Differential Revision: https://reviews.llvm.org/D73778
Ehud Katz [Wed, 12 Feb 2020 08:42:55 +0000 (10:42 +0200)]
[APFloat] Fix FP remainder operation
Reimplement IEEEFloat::remainder() function.
Fix PR3359.
Differential Revision: https://reviews.llvm.org/D69776
Raphael Isemann [Wed, 12 Feb 2020 08:10:19 +0000 (09:10 +0100)]
[lldb] Move implementation of GetDisplayName to TypeSystem class
CompilerType doesn't implement logic.
Georgii Rymar [Tue, 11 Feb 2020 11:13:16 +0000 (14:13 +0300)]
[yaml2obj][test] - Simplify the test: yaml2obj/ELF/call-graph-profile-section.yaml
Now with the new functionality that allows creating "defines", it is
possible to reduce this test (I tried to find another ones, but seems others
were already fixed previously).
Differential revision: https://reviews.llvm.org/D74392
Nicolai Hähnle [Tue, 11 Feb 2020 13:40:00 +0000 (14:40 +0100)]
AMDGPU: llvm.amdgcn.writelane is a source of divergence
Summary:
Consider:
%r = call i32 @llvm.amdgcn.writelane(i32 0, i32 1, i32 2)
This produces a value that is 0 on lane 1, and 2 everywhere else; i.e.,
it is divergent.
Reported-by: Marek Olsak <Marek.Olsak@amd.com>
Reviewers: arsenm, foad, mareko
Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, hiraditya, kerbowa, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D74400
Nicolai Hähnle [Fri, 7 Feb 2020 21:08:36 +0000 (22:08 +0100)]
SelectionDAG: Fix bug in ClusterNeighboringLoads
Summary:
The method attempts to find loads that can be legally clustered by
looking for loads consuming the same chain glue token.
However, the old code looks at _all_ users of values produced by the
chain node -- including uses of the loaded/returned value of volatile
loads or atomics. This could lead to circular dependencies which then
failed during scheduling.
With this change, we filter out users by getResNo, i.e. by which
SDValue value they use, to ensure that we only look at users of the
chain glue token.
This appears to be a rather old bug, which is perhaps surprising.
However, the test case is actually quite fragile (i.e., it is hidden
by fairly small changes), and the test _must_ use volatile loads for
the bug to manifest.
Reviewers: arsenm, bogner, craig.topper, foad
Subscribers: MatzeB, jvesely, wdng, hiraditya, javed.absar, jfb, kerbowa, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D74253
Raphael Isemann [Wed, 12 Feb 2020 07:56:03 +0000 (08:56 +0100)]
[lldb][NFC] Move all completer subclasses into source file
They are all implementation details so let's keep them out of the interface.
Also makes this code more readable by keeping these small classes
not spread over header and source file.
Alexander Belyaev [Wed, 12 Feb 2020 08:04:15 +0000 (09:04 +0100)]
[MLIR] Support memrefs with complex element types.
Differential Revision: https://reviews.llvm.org/D74307
Kazushi (Jam) Marukawa [Wed, 12 Feb 2020 08:01:30 +0000 (09:01 +0100)]
[VE] Bit operator isel
Summary: Isel and tests for bswap,brev,ctpop,ctlz,ctty,rotl,rotr
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D74304
Raphael Isemann [Wed, 12 Feb 2020 06:57:00 +0000 (07:57 +0100)]
[lldb][NFC] Remove eCustomCompletion mode
It's not used by anyone. Also if something implements its own
completion it could just not call the method instead of having
a parameter that makes the function a no-op.
Craig Topper [Wed, 12 Feb 2020 07:27:26 +0000 (23:27 -0800)]
[X86] Add test case for SoftPromoteHalf of STRICT_FP_EXTEND/STRICT_FP_ROUND.
Tests that should have been with
0daf9b8e41327b1511b2bbc272184ff4fdb8de79
Craig Topper [Wed, 12 Feb 2020 07:16:32 +0000 (23:16 -0800)]
[X86] Remove unnecessary hasSideEffects = 0, mayLoad = 1 from an instruction with a pattern. NFC
Craig Topper [Wed, 12 Feb 2020 07:13:28 +0000 (23:13 -0800)]
[X86] Correct the predicate on some patterns for 128 and 256 EVEX versions of VCVTPS2PH.
These should require AVX512VL not AVX512F. The legacy VEX patterns
will match first unless AVX512VL is enabled so this doesn't cause
a functional issue.
Igor Kudrin [Mon, 8 Jul 2019 14:55:36 +0000 (21:55 +0700)]
[DebugInfo] Add support for DWARF64 into DWARFDebugAddr.
Differential Revision: https://reviews.llvm.org/D74198
Igor Kudrin [Thu, 6 Feb 2020 07:14:12 +0000 (14:14 +0700)]
[DebugInfo] Simplify DWARFDebugAddr.
The patch removes unnecessary members of DWARFDebugAddr and further
simplifies the implementation by separating parsing methods of tables
in the DWARFv5 and pre-standard formats.
Differential Revision: https://reviews.llvm.org/D74197
Igor Kudrin [Thu, 6 Feb 2020 09:30:30 +0000 (16:30 +0700)]
[DebugInfo] Refine error messages in DWARFDebugAddr.
As a preparation for the subsequent patches, this updates the wordings
of some error messages in DWARFDebugAddr.
Differential Revision: https://reviews.llvm.org/D74196
Igor Kudrin [Tue, 11 Feb 2020 08:55:12 +0000 (15:55 +0700)]
[DebugInfo] Use "an address table" in diagnostic messages of DWARFDebugAddr.
This replaces a collocation "a .debug_addr table" with "an address table"
because the latter sounds more accurate.
Differential Revision: https://reviews.llvm.org/D74407
Igor Kudrin [Thu, 6 Feb 2020 13:34:10 +0000 (20:34 +0700)]
[DebugInfo] Do not dump header field for pre-DWARFv5 address tables.
As there is no header in pre-DWARFv5 address tables, and we fill
the class data members with some artificial values, we should not
dump them as that might be misleading.
Differential Revision: https://reviews.llvm.org/D74195
Igor Kudrin [Tue, 11 Feb 2020 12:43:20 +0000 (19:43 +0700)]
[DebugInfo] Fix reading addresses in DWARFDebugAddr.
As addresses in the address tables may have relocations, thus,
the relocations should be resolved to read the correct address.
That is especially important for targets that use RELA relocations
because in that case addends are stored in relocation sections.
Differential Revision: https://reviews.llvm.org/D74404
Craig Topper [Wed, 12 Feb 2020 04:24:51 +0000 (20:24 -0800)]
[X86][LegalizeTypes] Add SoftPromoteHalf support STRICT_FP_EXTEND and STRICT_FP_ROUND
This adds a strict version of FP16_TO_FP and FP_TO_FP16 and uses
them to implement soft promotion for the half type. This is
enough to provide basic support for __fp16 with strictfp.
Add the necessary X86 support to use VCVTPS2PH/VCVTPH2PS when F16C
is enabled.
Raphael Isemann [Wed, 12 Feb 2020 06:13:48 +0000 (07:13 +0100)]
[lldb] Remove skipIfFreeBSD from TestCompletion
This was skipped because of an pexpect issue (http://llvm.org/pr22784),
but this test is no longer using pexpect and is running fine on FreeBSD.
Fangrui Song [Wed, 12 Feb 2020 04:45:05 +0000 (20:45 -0800)]
[CMake] Delete llvm_add_go_executable and a reference to TARGET llvm-go
llvm-go was deleted by
102814b4d36ad004a2e37cd2a1e84bd2c3593d29.
Yuanfang Chen [Wed, 12 Feb 2020 04:39:34 +0000 (20:39 -0800)]
Revert "Reland "[Support] make report_fatal_error `abort` instead of `exit`""
This reverts commit rGcd5b308b828e, rGcd5b308b828e, rG8cedf0e2994c.
There are issues to be investigated for polly bots and bots turning on
EXPENSIVE_CHECKS.
Davide Italiano [Wed, 12 Feb 2020 04:30:12 +0000 (20:30 -0800)]
[TestConstVariable] Clean-up XFAIL lists.
These versions of `clang` are ancient history.
Matt Arsenault [Tue, 11 Feb 2020 20:13:42 +0000 (15:13 -0500)]
AMDGPU: Use conditions directly in division expansion
This was creating a select on true/false values, and then comparing
that later. This produced more work for later combines, which can be
avoided by just using the boolean values. This was copied from the
original DAG expansion, which also has the same problem. This doesn't
have a observable change using SelectionDAG, but since GlobalISel is
missing these optimizations, the final code was noticeably longer.
Johannes Doerfert [Wed, 12 Feb 2020 04:06:32 +0000 (22:06 -0600)]
[OpenMP][Offloading] Added support for multiple streams so that multiple kernels can be executed concurrently
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D74145
Yuanfang Chen [Wed, 12 Feb 2020 03:18:23 +0000 (19:18 -0800)]
Temporarily XFAIL these two tests.
llvm/test/CodeGen/X86/inline-asm-avx-v-constraint-32bit.ll
llvm/test/CodeGen/X86/inline-asm-avx512vl-v-constraint-32bit.ll
Yuanfang Chen [Wed, 12 Feb 2020 02:34:34 +0000 (18:34 -0800)]
Fix two more test cases for https://reviews.llvm.org/D74456.
Yuanfang Chen [Tue, 11 Feb 2020 02:33:05 +0000 (18:33 -0800)]
Reland "[Support] make report_fatal_error `abort` instead of `exit`"
Summary:
Reland D67847 after D73742 is committed. Replace `sys::Process::Exit(1)`
with `abort` in `report_fatal_error`.
After this patch, for tools turning on `CrashRecoveryContext`,
crash handler installed by `CrashRecoveryContext` is called unless
they installed a non-returning handler using `llvm::install_fatal_error_handler`
like `cc1_main` currently does.
Reviewers: rnk, MaskRay, aganea, hans, espindola, jhenderson
Subscribers: jholewinski, qcolombet, dschuff, jyknight, emaste, sdardis, nemanjai, jvesely, nhaehnle, sbc100, jgravelle-google, hiraditya, aheejin, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, sabuasal, niosHD, jrtc27, zzheng, edward-jones, atanasyan, steven_wu, rogfer01, MartinMosbeck, brucehoult, the_o, dexonsmith, PkmX, rupprecht, jocewei, jsji, Jim, dmgreen, lenary, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, kerbowa, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D74456
Mehdi Amini [Wed, 12 Feb 2020 02:05:31 +0000 (02:05 +0000)]
Removed declared but non-existent createMaterializeVectorsPass() (NFC)
Sam Clegg [Fri, 20 Dec 2019 01:30:24 +0000 (17:30 -0800)]
[lld][WebAssembly] Fail if bitcode objects are pulled in after LTO
This can happen if lto::LTO::getRuntimeLibcallSymbols doesn't return
an complete/accurate list of libcalls. In this case new bitcode
object can be linked in after LTO.
For example the WebAssembly backend currently calls:
setLibcallName(RTLIB::FPROUND_F32_F16, "__truncsfhf2");
But `__truncsfhf2` is not part of `getRuntimeLibcallSymbols` so if
this symbol is generated during LTO the link will currently fail.
Without this change the linker crashes because the bitcode symbol
makes it all the way to the output phase.
See: https://bugs.llvm.org/show_bug.cgi?id=44353
Differential Revision: https://reviews.llvm.org/D71632
Sam Clegg [Sat, 8 Feb 2020 02:15:15 +0000 (18:15 -0800)]
[compiler-rt] Compile __powitf2 under wasm
See https://github.com/emscripten-core/emscripten/issues/10374
See https://reviews.llvm.org/D74274
Differential Revision: https://reviews.llvm.org/D74275
Fangrui Song [Wed, 12 Feb 2020 01:17:08 +0000 (17:17 -0800)]
[test] Improve test/CodeGen/X86/linux-preemption.ll
Austin Kerbow [Fri, 7 Feb 2020 16:29:23 +0000 (08:29 -0800)]
[AMDGPU][GlobalISel] Refactor selectDS1Addr1Offset/selectDS64Bit4ByteAligned
Differential Revision: https://reviews.llvm.org/D74261
Reid Kleckner [Wed, 12 Feb 2020 00:03:26 +0000 (16:03 -0800)]
Re-land "[MS] Overhaul how clang passes overaligned args on x86_32"
This brings back
2af74e27ed7d0832cbdde9cb969aaca7a42e99f9 and reverts
eaabaf7e04fe98990a8177a3e053346395efde1c.
The changes were correct, the code that was broken contained an ODR
violation that assumed that these types are passed equivalently:
struct alignas(uint64_t) Wrapper { uint64_t P };
void f(uint64_t p);
void f(Wrapper p);
MSVC does not pass them the same way, and so clang-cl should not pass
them the same way either.
Jonas Devlieghere [Wed, 12 Feb 2020 00:31:26 +0000 (16:31 -0800)]
[lldb/Plugins] Rename OSPython plugin to OperatingSystemPython (NFC)
Rename the plugin to match both the directory structure and the class.
Galina Kistanova [Wed, 12 Feb 2020 00:20:06 +0000 (16:20 -0800)]
Reverted the remainings of
c1c9819ef91aab51b5a23fb3027adac5a2f551cc
as it has left broken llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast buildbot for long time.
Differential Revision: https://reviews.llvm.org/D73840
Jason Molenda [Wed, 12 Feb 2020 00:17:35 +0000 (16:17 -0800)]
Rewrite default "could not attach" msg to point to hints
about where more information can be found about why it
may have failed.
<rdar://problem/
59277928>
Matt Arsenault [Tue, 11 Feb 2020 19:57:09 +0000 (14:57 -0500)]
AMDGPU: Don't expand more special div cases in IR
These have nicer expansions implemented in the DAG. Ideally we would
either directly implement all of these special expansions, or stop
expanding division in the IR.
Reid Kleckner [Tue, 11 Feb 2020 23:50:27 +0000 (15:50 -0800)]
Fix MSVC build with C++ EH enabled
Mark the CrashRecoveryContextImpl constructor noexcept, so that MSVC
won't emit an unwind helper to clean up the allocation from `new` if the
constructor throws an exception.
Otherwise, MSVC complains:
llvm\lib\Support\CrashRecoveryContext.cpp(220): error C2712: \
Cannot use __try in functions that require object unwinding
The other simple fix would be to wrap `new` in a static helper or
lambda.
Users have reported that Tensorflow builds LLVM with /EHsc.
Jonas Devlieghere [Tue, 11 Feb 2020 23:52:41 +0000 (15:52 -0800)]
[lldb/Plugins] Move PlatformRemoteiOS into PlatformMacOSX (NFCI)
Move the logic for initialization and termination for PlatformRemoteiOS
into PlatformMacOSX, like we did for the other Darwin platforms in
a731c6ba94d0464c6a122de1af70ab88ffb5c1a6.
Matt Arsenault [Mon, 10 Feb 2020 15:30:34 +0000 (10:30 -0500)]
AMDGPU: Don't report 2-byte alignment as fast
This is apparently worse than 1-byte alignment. This does not attempt
to decompose 2-byte aligned wide stores, but will stop trying to
produce them.
Also fix bug in LoadStoreVectorizer which was decreasing the alignment
and vectorizing stack accesses. It was assuming a stack object was an
alloca that could have its base alignment changed, which is not true
if the pointer is derived from a function argument.
Derek Schuff [Tue, 11 Feb 2020 23:13:40 +0000 (15:13 -0800)]
[llvm-objcopy][WebAssembly] Add dump/add/remove-section support
Add support for adding, removing, and dumping wasm sections to objcopy
Differential Revision: https://reviews.llvm.org/D70970
Justin Lebar [Tue, 11 Feb 2020 04:33:08 +0000 (20:33 -0800)]
Use std::foo_t rather than std::foo in LLVM.
Summary: C++14 migration. No functional change.
Reviewers: bkramer, JDevlieghere, lebedev.ri
Subscribers: MatzeB, hiraditya, jkorous, dexonsmith, arphaman, kadircet, lebedev.ri, usaxena95, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D74384
Johannes Doerfert [Tue, 11 Feb 2020 23:08:48 +0000 (17:08 -0600)]
[OpenMP] Switch default C++ standard to C++ 14
Reviewed By: JonChesterfield
Differential Revision: https://reviews.llvm.org/D74258
Matt Arsenault [Tue, 11 Feb 2020 18:54:17 +0000 (13:54 -0500)]
AMDGPU: Add baseline tests for CGP div expansion
These cases are harmed by expanding division early in the IR, before
DAGCombiner.
Matt Arsenault [Tue, 11 Feb 2020 19:33:50 +0000 (14:33 -0500)]
AMDGPU: Fix crash on v3i15 kernel arguments
This was split into 3 i15 arguments. The i15 piece needs to be rounded
to a simple MVT for the memory type.
Matt Arsenault [Tue, 11 Feb 2020 14:58:53 +0000 (09:58 -0500)]
AMDGPU: Directly use rcp intrinsic in idiv expansions
Since natural fdiv lowering is now more conservative even with
denormals disabled, we get a slower expansion from just a plain
1.0/fdiv. Directly emit the rcp intrinsic when using it to implement
integer division to avoid a pointlessly complex sequence.
Matt Arsenault [Tue, 11 Feb 2020 15:16:16 +0000 (10:16 -0500)]
AMDGPU: Don't create potentially dead rcp declarations
This will introduce unused declarations if this doesn't reach any of
the paths that will really use it.
Aditya Nandakumar [Tue, 11 Feb 2020 22:51:49 +0000 (14:51 -0800)]
[MachO] Pad section data to pointer size bytes
https://reviews.llvm.org/D74273
Pad macho section data to pointer size bytes, so that relocation
table and symbol table following section data will be pointer size
aligned.
Patch by pguo.