OSDN Git Service
Andrei Elovikov [Tue, 21 Jan 2020 22:25:55 +0000 (14:25 -0800)]
[SLP] Don't allow Div/Rem as alternate opcodes
Summary:
We don't have control/verify what will be the RHS of the division, so it might
happen to be zero, causing UB.
Reviewers: Vasilis, RKSimon, ABataev
Reviewed By: ABataev
Subscribers: vporpo, ABataev, hiraditya, llvm-commits, vdmitrie
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D72740
Jonas Devlieghere [Tue, 21 Jan 2020 23:14:28 +0000 (15:14 -0800)]
[lldb/Plugin] Move DisassemblerLLVMC for consistency with plugin (NFC)
Rename the DisassemblerLLVMC directory from llvm to LLVMC to match the
plugin name.
Jonas Devlieghere [Tue, 21 Jan 2020 23:01:36 +0000 (15:01 -0800)]
[lldb/Plugin] Rename MainThreadCheckerRuntime for consistency with plugin (NFC)
Renames MainThreadCheckerRuntime to
InstrumentationRuntimeMainThreadChecker to be consistent with the
directory structure and plugin name.
Jonas Devlieghere [Tue, 21 Jan 2020 22:55:13 +0000 (14:55 -0800)]
[lldb/Plugin] Rename UBSanRuntime for consistency with plugin (NFC)
Renames UBSanRuntime to InstrumentationRuntimeUBSan to be consistent
with the directory structure and plugin name.
Jonas Devlieghere [Tue, 21 Jan 2020 22:50:36 +0000 (14:50 -0800)]
[lldb/Plugin] Rename TSanRuntime for consistency with plugin (NFC)
Renames TSanRuntime to InstrumentationRuntimeTSan to be
consistent with the directory structure and plugin name.
Jonas Devlieghere [Tue, 21 Jan 2020 22:43:46 +0000 (14:43 -0800)]
[lldb/Plugin] Rename AddressSanitizerRuntime for consistency with plugin (NFC)
Renames AddressSanitizerRuntime to InstrumentationRuntimeASan to be
consistent with the directory structure and plugin name.
Jason Molenda [Tue, 21 Jan 2020 22:45:21 +0000 (14:45 -0800)]
Fix an over-suspend bug with LaunchInNewTerminalWithAppleScript sessions
When launching an inferior in a new terminal window via AppleScript
and the darwin-debug helper program, we could often end up with the
inferior process having a too-high suspend count, and it would never
resume execution.
lldb tries to wait until darwin-debug has finished its work and has
launched the inferior (WaitForProcessToSIGSTOP) but this wasn't
working correctly - and cannot be made to work.
This patch removes WaitForProcessToSIGSTOP, adds a special tiny
segment to the darwin-debug executable so it can be identified as
that binary (ExecExtraSuspend), and adds code to debugserver to
detect this segment. When debugserver sees this segment, it notes
that the next exec will be done with a launch-suspended flag. When
the next exec happens, debugserver forces an extra task_resume when
we resume the inferior.
An alternative approach would be if lldb could detect when the
inferior has been launched by darwin-debug unambiguously; monitoring
when the unix socket between darwin-debug and lldb was closed would
have been a reasonable way to do this too.
<rdar://problem/
29760580>
Differential Revision: https://reviews.llvm.org/D72963
Florian Hahn [Tue, 21 Jan 2020 22:32:34 +0000 (14:32 -0800)]
[AArch64] Add custom store lowering for 256 bit non-temporal stores.
Currently we fail to lower non-termporal stores for 256+ bit vectors
to STNPQ, because type legalization will split them up to 128 bit stores
and because there are no single non-temporal stores, creating STPNQ
in the Load/Store optimizer would be quite tricky.
This patch adds custom lowering for 256 bit non-temporal vector stores
to improve the generated code.
Reviewers: dmgreen, samparker, t.p.northover, ab
Reviewed By: dmgreen
Differential Revision: https://reviews.llvm.org/D72919
Matt Arsenault [Tue, 21 Jan 2020 22:12:26 +0000 (17:12 -0500)]
AMDGPU/GlobalISel: Merge trivial legalize rules
Also move constant-like rules together
Roman Lebedev [Tue, 21 Jan 2020 22:04:47 +0000 (01:04 +0300)]
[IR] Value::getPointerAlignment(): handle pointer constants
Summary:
New `@test13` in `Attributor/align.ll` is the main motivation - `null` pointer
really does not limit our alignment knowledge, in fact it is fully aligned
since it has no bits set.
Here we don't special-case `null` pointer because it is somewhat controversial
to add one more place where we enforce that `null` pointer is zero,
but instead we do the more general thing of trying to perform constant-fold
of pointer constant to an integer, and perform alignment inferrment on that.
Reviewers: jdoerfert, gchatelet, courbet, sstefan1
Reviewed By: jdoerfert
Subscribers: hiraditya, arphaman, jfb, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73131
Florian Hahn [Tue, 21 Jan 2020 22:22:33 +0000 (14:22 -0800)]
[Matrix] Hide and describe matrix-propagate-shape option.
Andrei Elovikov [Wed, 15 Jan 2020 17:24:12 +0000 (09:24 -0800)]
[SLP] Add a test showing miscompilation in AltOpcode support
Reviewers: Vasilis, RKSimon, ABataev
Reviewed By: RKSimon, ABataev
Subscribers: ABataev, inglorion, dexonsmith, llvm-commits, vdmitrie
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D72739
Alexandre Ganea [Tue, 21 Jan 2020 22:03:00 +0000 (17:03 -0500)]
[PATCH] Reland [Clang] Un-break scan-build after integrated-cc1 change
The issue was reported by @xazax.hun here: https://reviews.llvm.org/D69825#
1827826
"This patch (D69825) breaks scan-build-py which parses the output of "-###" to get -cc1 command. There might be other tools with the same problems. Could we either remove (in-process) from CC1Command::Print or add a line break?
Having the last line as a valid invocation is valuable and there might be tools relying on that."
Differential Revision: https://reviews.llvm.org/D72982
Matt Arsenault [Tue, 21 Jan 2020 21:37:15 +0000 (16:37 -0500)]
AMDGPU/GlobalISel: Merge G_PTR_ADD/G_PTR_MASK rules
Tim Shen [Wed, 13 Nov 2019 02:17:04 +0000 (18:17 -0800)]
[APInt] Fix tests that had wrong assumption about sdivs with negative quotient.
Reviewers: sanjoy
Subscribers: bixia, dexonsmith, sanjoy.google, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70156
Fred Riss [Mon, 20 Jan 2020 16:39:25 +0000 (08:39 -0800)]
[lldb/DataFormatters] Fix the `$$deference$$` synthetic child
Summary:
The ValueObject code checks for a special `$$dereference$$` synthetic
child to allow formatter providers to implement a natural
dereferencing behavior in `frame variable` for objects like smart
pointers.
This support was broken when used directly throught the Python API and
not trhough `frame variable`. The reason is that
SBFrame.FindVariable() will return by default the synthetic variable
if it exists, while `frame variable` will not do this eagerly. The
code in `ValueObject::Dereference()` accounted for the latter but not
for the former. The fix is trivial. The test change includes
additional covergage for the already-working bahevior as it wasn't
covered by the testsuite before.
This commit also adds a short piece of documentatione explaining that
it is possible (even advisable) to provide this synthetic child
outstide of the range of the normal children.
Reviewers: jingham
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D73053
Matt Arsenault [Tue, 21 Jan 2020 21:07:22 +0000 (16:07 -0500)]
AMDGPU/GlobalISel: Legalize G_PTR_ADD for arbitrary pointers
Pointers of unrecognized address spaces shoudl be treated as
global-like pointers. Even if loads and stores of them aren't handled,
dumb operations that just operate on the bits should work.
Jonas Devlieghere [Tue, 21 Jan 2020 21:21:34 +0000 (13:21 -0800)]
[lldb/CMake] Add check-lldb-shell and check-lldb-api targets for Xcode
The Xcode generator does not provide the auto-generated targets where
you can append a folder name to check-lldb. Instead add two custom lit
targets to run just the shell and api tests.
Vladimir Vereschaka [Tue, 21 Jan 2020 21:03:11 +0000 (13:03 -0800)]
Revert "List implicit operator== after implicit destructors in a vtable."
This reverts commit
add2b7e44ada46f30715b5c48823a9e9e317e0c3.
Failed "Clang::virtual-compare.cpp" test on the arm builders.
See
http://lab.llvm.org:8011/builders/llvm-clang-win-x-armv7l/builds/3169
for details.
Alexandre Ganea [Tue, 21 Jan 2020 21:06:36 +0000 (16:06 -0500)]
Revert "[Clang] Un-break scan-build after integrated-cc1 change"
This reverts commit
a6883017ea9af529e89d7f89af2477378b6eafca.
Aaron Ballman [Tue, 21 Jan 2020 21:03:22 +0000 (16:03 -0500)]
Removing an accidentally duplicated line of test code to fix bots.
Etienne Pierre-Doray [Tue, 21 Jan 2020 20:43:17 +0000 (15:43 -0500)]
Allow arbitrary capability name in Thread Safety Analysis
Restricting the names of capabilities to only "role" or "mutex" makes
for awkward diagnostic text, such as with:
https://chromium-review.googlesource.com/c/chromium/src/+/
1948098/19/base/sequence_checker_unittest.nc#33
Jonas Devlieghere [Tue, 21 Jan 2020 20:25:45 +0000 (12:25 -0800)]
[lldb/Platform] Re-add ifdef's to guard macOS-only code.
I moved the code from the system initializer to PlatformMacOSX. The
defines are still necessary because MacOSX is initialized on other
platforms where the other platforms are not available.
Fangrui Song [Tue, 21 Jan 2020 20:23:49 +0000 (12:23 -0800)]
[APFloat][unittest] Fix -Wsign-compare after D69773
Eric Fiselier [Tue, 21 Jan 2020 20:10:47 +0000 (15:10 -0500)]
[clang-tidy] Fix check for Abseil internal namespace access
This change makes following modifications:
* If reference originated from macro expansion, we report location inside of
the macro instead of location where macro is referenced.
* If for any reason deduced location is not correct we silently ignore it.
Patch by Gennadiy Rozental (rogeeff@google.com)
Reviewed as https://reviews.llvm.org/D72484
Mark de Wever [Sun, 19 Jan 2020 16:01:12 +0000 (17:01 +0100)]
[Sema] Avoid Wrange-loop-analysis false positives
When Wrange-loop-analysis issues a diagnostic on a dependent type in a
template the diagnostic may not be valid for all instantiations. Therefore
the diagnostic is suppressed during the instantiation. Non dependent types
still issue a diagnostic.
The same can happen when using macros. Therefore the diagnostic is
disabled for macros.
Fixes https://bugs.llvm.org/show_bug.cgi?id=44556
Differential Revision: https://reviews.llvm.org/D73007
Sid Manning [Fri, 10 Jan 2020 17:58:21 +0000 (11:58 -0600)]
[lld][Hexagon] Add General Dynamic relocations (GD)
Differential revision: https://reviews.llvm.org/D72522
Marcello Maggioni [Sat, 18 Jan 2020 03:26:46 +0000 (19:26 -0800)]
[mlir] Fix LLVM intrinsic convesion generator for overloadable types.
Summary:
If an intrinsic has overloadable types like llvm_anyint_ty or
llvm_anyfloat_ty then to getDeclaration() we need to pass a list
of the types that are "undefined" essentially concretizing them.
This patch add support for deriving such types from the MLIR op
that has been matched.
Reviewers: andydavis1, ftynse, nicolasvasilache, antiagainst
Subscribers: mehdi_amini, rriddle, jpienaar, burmako, shauheen, arpith-jacob, mgester, lucyrfox, liufengdb, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D72974
Ehud Katz [Tue, 21 Jan 2020 19:48:07 +0000 (21:48 +0200)]
Fix tests of constant folding of fp operations on NaN values
Fix failures introduced due to change rG0b336b6048ae.
Quentin Colombet [Tue, 21 Jan 2020 19:07:15 +0000 (11:07 -0800)]
[GISelKnownBits] Make the max depth a parameter of the analysis
Allow users of that analysis to define the cut off depth of the
analysis instead of hardcoding 6.
NFC as the default parameter is 6.
Thomas Lively [Fri, 13 Dec 2019 23:15:22 +0000 (15:15 -0800)]
[WebAssembly] Split and recombine multivalue calls for ISel
Summary:
Multivalue calls both take and return an arbitrary number of
arguments, but ISel only supports one or the other in a single
instruction. To get around this, calls are modeled as two pseudo
instructions during ISel. These pseudo instructions, CALL_PARAMS and
CALL_RESULTS, are recombined into a single CALL MachineInstr in a
custom emit hook.
RegStackification and the MC layer will additionally need to be made
aware of multivalue calls before the tests will produce correct
output.
Reviewers: aheejin, dschuff
Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71496
Daniel Kiss [Tue, 21 Jan 2020 19:24:57 +0000 (19:24 +0000)]
[lldb] Add a setting to not install the main executable
Summary:
Add setting target.auto-install-main-executable that controls whether
the main executable should be automatically installed when connected to
a remote platform even if it does not have an explicit install path
specified. The default is true as the current behaviour.
Reviewers: omjavaid, JDevlieghere, srhines, labath, clayborg
Reviewed By: clayborg
Subscribers: kevin.brodsky, lldb-commits, llvm-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D71761
Francesco Petrogalli [Tue, 21 Jan 2020 19:21:35 +0000 (19:21 +0000)]
Revert "[lldb] Add a setting to not install the main executable"
The commit has been reverted as it does not mention the author of the
patch.
This reverts commit
7c9bcba644c4fc2178e20060d9ba2ff1f50ae15e.
Krzysztof Parzyszek [Tue, 21 Jan 2020 19:19:27 +0000 (13:19 -0600)]
[Hexagon] Add REQUIRES: asserts to a testcase using -debug-only
Kostya Kortchinsky [Mon, 20 Jan 2020 17:50:22 +0000 (09:50 -0800)]
[scudo][standalone] Allow sched_getaffinity to fail
Summary:
In some configuration, `sched_getaffinity` can fail. Some reasons for
that being the lack of `CAP_SYS_NICE` capability or some syscall
filtering and so on.
This should not be fatal to the allocator, so in this situation, we
will fallback to the `MaxTSDCount` value specified in the allocator
configuration.
Reviewers: cferris, eugenis, hctim, morehouse, pcc
Subscribers: #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D73055
Thomas Lively [Fri, 13 Dec 2019 18:41:25 +0000 (10:41 -0800)]
[WebAssembly][InstrEmitter] Foundation for multivalue call lowering
Summary:
WebAssembly is unique among upstream targets in that it does not at
any point use physical registers to store values. Instead, it uses
virtual registers to model positions in its value stack. This means
that some target-independent lowering activities that would use
physical registers need to use virtual registers instead for
WebAssembly and similar downstream targets. This CL generalizes the
existing `usesPhysRegsForPEI` lowering hook to
`usesPhysRegsForValues` in preparation for using it in more places.
One such place is in InstrEmitter for instructions that have variadic
defs. On register machines, it only makes sense for these defs to be
physical registers, but for WebAssembly they must be virtual registers
like any other values. This CL changes InstrEmitter to check the new
target lowering hook to determine whether variadic defs should be
physical or virtual registers.
These changes are necessary to support a generalized CALL instruction
for WebAssembly that is capable of returning an arbitrary number of
arguments. Fully implementing that instruction will require additional
changes that are described in comments here but left for a follow up
commit.
Reviewers: aheejin, dschuff, qcolombet
Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71484
Lei Zhang [Fri, 17 Jan 2020 21:39:59 +0000 (16:39 -0500)]
[mlir][ods] Fix StringRef initialization in builders
For the generated builder taking in unwrapped attribute values,
if the argument is a string, we should avoid wrapping it in quotes;
otherwise we are always setting the string attribute to contain
the string argument's name. The quotes come from StrinAttr's
`constBuilderCall`, which is reasonable for string literals, but
not function arguments containing strings.
Differential Revision: https://reviews.llvm.org/D72977
Francesco Petrogalli [Tue, 21 Jan 2020 18:50:34 +0000 (18:50 +0000)]
[lldb] Add a setting to not install the main executable
Summary:
Add setting target.auto-install-main-executable that controls whether
the main executable should be automatically installed when connected to
a remote platform even if it does not have an explicit install path
specified. The default is true as the current behaviour.
Reviewers: omjavaid, JDevlieghere, srhines, labath, clayborg
Reviewed By: clayborg
Subscribers: kevin.brodsky, lldb-commits, llvm-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D71761
Reid Kleckner [Sat, 18 Jan 2020 20:38:08 +0000 (12:38 -0800)]
[TableGen] Use a table to lookup MVE intrinsic names
Summary:
Speeds up compilation of SemaDeclAttr.cpp by nine seconds:
0m49.555s - > 0m40.249s
Reviewers: simon_tatham, dmgreen, ostannard, MarkMurrayARM
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D72984
Vedant Kumar [Tue, 21 Jan 2020 19:03:58 +0000 (11:03 -0800)]
[debugserver] Delete stale code referencing ppc
Ehud Katz [Tue, 21 Jan 2020 19:02:00 +0000 (21:02 +0200)]
[APFloat] Add support for operations on Signaling NaN
Fix PR30781
Differential Revision: https://reviews.llvm.org/D69774
Vedant Kumar [Tue, 21 Jan 2020 18:59:38 +0000 (10:59 -0800)]
[debugserver] Delete macOS/PPC debug server implementation
macOS/PPC support was dropped in 10.6 (Snow Leopard).
Differential Revision: https://reviews.llvm.org/D69524
Alexey Bader [Tue, 21 Jan 2020 11:43:18 +0000 (14:43 +0300)]
[Attr][Doc][NFC] Fix code snippet formatting for attribute documentation
Reviewers: aaron.ballman, Fznamznon
Subscribers: ebevhan, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D73104
Fangrui Song [Tue, 21 Jan 2020 18:33:48 +0000 (10:33 -0800)]
[APFloat][unittest] Fix -Wunused-variable after D69773
Alexey Bataev [Tue, 21 Jan 2020 18:01:23 +0000 (13:01 -0500)]
[OpenMP][Offloading] Fix the issue that omp_get_num_devices returns wrong number of devices, by Shiley Tian.
Summary:
This patch is to fix issue in the following simple case:
#include <omp.h>
#include <stdio.h>
int main(int argc, char *argv[]) {
int num = omp_get_num_devices();
printf("%d\n", num);
return 0;
}
Currently it returns 0 even devices exist. Since this file doesn't contain any
target region, the host entry is empty so further actions like initialization
will not be proceeded, leading to wrong device number returned by runtime
function call.
Reviewers: jdoerfert, ABataev, protze.joachim
Reviewed By: ABataev
Subscribers: protze.joachim
Tags: #openmp
Differential Revision: https://reviews.llvm.org/D72576
Ehud Katz [Tue, 21 Jan 2020 18:17:42 +0000 (20:17 +0200)]
[APFloat] Extend conversion from special strings
Add support for converting Signaling NaN, and a NaN Payload from string.
The NaNs (the string "nan" or "NaN") may be prefixed with 's' or 'S' for defining a Signaling NaN.
A payload for a NaN can be specified as a suffix.
It may be a octal/decimal/hexadecimal number in parentheses or without.
Differential Revision: https://reviews.llvm.org/D69773
Roman Lebedev [Tue, 21 Jan 2020 18:18:29 +0000 (21:18 +0300)]
[NFC][Codegen] Use MaybeAlign + APInt::getLimitedValue() when creating Alignment attr
Summary: Just an NFC code cleanup i stumbled upon when stumbling through clang alignment attribute handling.
Reviewers: erichkeane, gchatelet, courbet, jdoerfert
Reviewed By: gchatelet
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D72993
Roman Lebedev [Tue, 21 Jan 2020 18:18:27 +0000 (21:18 +0300)]
[Codegen] Emit both AssumeAlignedAttr and AllocAlignAttr assumptions if they exist
Summary:
We shouldn't be just giving up if we find one of them
(like we currently do with `AssumeAlignedAttr`),
we should emit them all.
As the tests show, even if we materialized good knowledge
from `__attribute__((assume_aligned(32)`, it doesn't mean
`__attribute__((alloc_align([...])))` info won't be useful.
It might be, but that isn't given.
Reviewers: erichkeane, jdoerfert, aaron.ballman
Reviewed By: erichkeane
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D72979
Jonas Devlieghere [Tue, 21 Jan 2020 17:47:02 +0000 (09:47 -0800)]
[lldb/tools] Update lldb-test's system initializer
After
a731c6ba94d0 the initializer only has to call the PlatformMacOSX
to initialize all the macOS platforms.
Fangrui Song [Thu, 2 Jan 2020 06:47:15 +0000 (22:47 -0800)]
[PowerPC] Delete PPCSubtarget::isDarwin and isDarwinABI
http://lists.llvm.org/pipermail/llvm-dev/2018-August/125614.html developers have agreed to remove Darwin support from POWER backends.
Reviewed By: sfertile
Differential Revision: https://reviews.llvm.org/D72067
Jonas Devlieghere [Tue, 21 Jan 2020 17:49:59 +0000 (09:49 -0800)]
[lldb/Hexagon] Include <mutex>
Fixes compiler error on macOS: error: no type named 'mutex' in namespace
'std'.
Fangrui Song [Mon, 20 Jan 2020 19:24:58 +0000 (11:24 -0800)]
[StackColoring] Remap PseudoSourceValue frame indices via MachineFunction::getPSVManager()
Reviewed By: dantrushin
Differential Revision: https://reviews.llvm.org/D73063
Kevin P. Neal [Fri, 20 Dec 2019 18:36:03 +0000 (13:36 -0500)]
[FPEnv][SystemZ] Platform-specific builtin constrained FP enablement
When constrained floating point is enabled the SystemZ-specific builtins
don't use constrained intrinsics in some cases. Fix that.
Differential Revision: https://reviews.llvm.org/D72722
Holger Wünsche [Tue, 21 Jan 2020 17:27:56 +0000 (09:27 -0800)]
[HIP] use GetProgramPath for executable discovery
This change replaces the manual building of executable paths
using llvm::sys::path::append with GetProgramPath.
This enables adding other paths in case executables reside
in different directories and makes the code easier to read.
Differential Revision: https://reviews.llvm.org/D72903
Jonas Devlieghere [Tue, 21 Jan 2020 17:40:06 +0000 (09:40 -0800)]
[lldb/Initializers] Move all macOS initializers into PlatformMacOSX
PlatformMacOSX is the main entry point to the plugin with the same name.
This is part of a greater refactoring to auto generate the initializers.
Differential revision: https://reviews.llvm.org/D73116
Krzysztof Parzyszek [Mon, 13 Jan 2020 22:07:30 +0000 (16:07 -0600)]
[Hexagon] Add support for Hexagon v67t microarchitecture (tiny core)
Sergej Jaskiewicz [Tue, 21 Jan 2020 16:40:34 +0000 (19:40 +0300)]
[libcxx] Support Python 3.8 in the test suite
Summary: `platform.linux_distribution()` has been deprecated in Python 3.5 and removed in Python 3.8.
Reviewers: bcain, bcraig, jroelofs, EricWF, mclow.lists, ldionne
Reviewed By: jroelofs
Subscribers: dexonsmith, christof, ldionne, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D72501
Denis Khalikov [Tue, 21 Jan 2020 17:12:17 +0000 (12:12 -0500)]
[mlir][spirv] Simplify scalar type size calculation.
Simplify scalar type size calculation and reject boolean memrefs.
Differential Revision: https://reviews.llvm.org/D72999
Alexandre Ganea [Tue, 21 Jan 2020 16:58:11 +0000 (11:58 -0500)]
[Clang] Un-break scan-build after integrated-cc1 change
Differential Revision: https://reviews.llvm.org/D72982
Krzysztof Parzyszek [Tue, 21 Jan 2020 15:47:35 +0000 (09:47 -0600)]
Update spelling of {analyze,insert,remove}Branch in strings and comments
These names have been changed from CamelCase to camelCase, but there were
many places (comments mostly) that still used the old names.
This change is NFC.
Kadir Cetinkaya [Tue, 21 Jan 2020 15:49:32 +0000 (16:49 +0100)]
[clangd] Drop returntype/type when hovering over type-ish names
Summary:
Some names, e.g. constructor/destructor/conversions, already contain
the type info, no need to duplicate them in the hoverinfo.
Fixes https://github.com/clangd/clangd/issues/252
Reviewers: sammccall, ilya-biryukov
Subscribers: MaskRay, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D73110
Zakk Chen [Wed, 15 Jan 2020 14:41:08 +0000 (06:41 -0800)]
[RISCV] Check the target-abi module flag matches the option
Reviewers: lenary, asb
Reviewed By: lenary
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D72768
Diogo Sampaio [Tue, 21 Jan 2020 15:31:33 +0000 (15:31 +0000)]
Revert "[ARM] Follow AACPS standard for volatile bit-fields access width"
This reverts commit
6a24339a45246b66bd3de88cc9c6a5b5e77c0645.
Submitted using ide button by mistake
Diogo Sampaio [Tue, 21 Jan 2020 15:13:24 +0000 (15:13 +0000)]
[ARM] Follow AACPS standard for volatile bit-fields access width
Summary:
This patch resumes the work of D16586.
According to the AAPCS, volatile bit-fields should
be accessed using containers of the widht of their
declarative type. In such case:
```
struct S1 {
short a : 1;
}
```
should be accessed using load and stores of the width
(sizeof(short)), where now the compiler does only load
the minimum required width (char in this case).
However, as discussed in D16586,
that could overwrite non-volatile bit-fields, which
conflicted with C and C++ object models by creating
data race conditions that are not part of the bit-field,
e.g.
```
struct S2 {
short a;
int b : 16;
}
```
Accessing `S2.b` would also access `S2.a`.
The AAPCS Release 2019Q1.1
(https://static.docs.arm.com/ihi0042/g/aapcs32.pdf)
section 8.1 Data Types, page 35, "Volatile bit-fields -
preserving number and width of container accesses" has been
updated to avoid conflict with the C++ Memory Model.
Now it reads in the note:
```
This ABI does not place any restrictions on the access widths
of bit-fields where the container overlaps with a non-bit-field member.
This is because the C/C++ memory model defines these as being separate
memory locations, which can be accessed by two threads
simultaneously. For this reason, compilers must be permitted to use a
narrower memory access width (including splitting the access
into multiple instructions) to avoid writing to a different memory location.
```
I've updated the patch D16586 to follow such behavior by verifying that we
only change volatile bit-field access when:
- it won't overlap with any other non-bit-field member
- we only access memory inside the bounds of the record
Regarding the number of memory accesses, that should be preserved, that will
be implemented by D67399.
Reviewers: rsmith, rjmccall, eli.friedman, ostannard
Subscribers: ostannard, kristof.beyls, cfe-commits, carwil, olista01
Tags: #clang
Differential Revision: https://reviews.llvm.org/D72932
Simon Pilgrim [Tue, 21 Jan 2020 15:11:46 +0000 (15:11 +0000)]
[TargetLowering] SimplifyDemandedBits ISD::SRA multi-use handling
Call SimplifyMultipleUseDemandedBits to peek through extended source args with multiple uses
Benjamin Kramer [Tue, 21 Jan 2020 14:54:48 +0000 (15:54 +0100)]
Make dropTriviallyDeadConstantArrays not quadratic
Only look at the operands of dead constant arrays instead of all
constant arrays again.
Jinsong Ji [Mon, 20 Jan 2020 20:16:56 +0000 (20:16 +0000)]
[PowerPC][NFC] Reclaim TSFlags bit 6
We removed UseVSXReg flag in https://reviews.llvm.org/D58685
But we did not reclain the bit 6 it was assigned,
this will become confusing and a hole later..
We should reclaim it as early as possible before new bits.
Reviewed By: sfertile
Differential Revision: https://reviews.llvm.org/D72649
Simon Pilgrim [Tue, 21 Jan 2020 14:39:00 +0000 (14:39 +0000)]
[SelectionDAG] GetDemandedBits - remove ANY_EXTEND handling
Rely on SimplifyMultipleUseDemandedBits fallback instead.
Simon Pilgrim [Tue, 21 Jan 2020 14:24:34 +0000 (14:24 +0000)]
[X86] combineBT - use SimplifyDemandedBits instead of GetDemandedBits
Another step towards removing SelectionDAG::GetDemandedBits entirely
Haojian Wu [Tue, 21 Jan 2020 10:50:57 +0000 (11:50 +0100)]
[clangd] Capture the missing injected class names in findExplicitReferences.
Summary: Fixes https://github.com/clangd/clangd/issues/237.
Reviewers: kadircet, kbobyrev
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D73088
Simon Pilgrim [Tue, 21 Jan 2020 13:49:56 +0000 (13:49 +0000)]
[TargetLowering] SimplifyDemandedBits ANY_EXTEND/ANY_EXTEND_VECTOR_INREG multi-use handling
Call SimplifyMultipleUseDemandedBits to peek through extended source args with multiple uses
Pavel Labath [Tue, 21 Jan 2020 14:03:36 +0000 (15:03 +0100)]
[lldb/breakpad] Use new line table constructor
The old construction method can be quadratic for some inputs. This
approach guarantees a reasonable performance.
Pavel Labath [Tue, 21 Jan 2020 13:42:39 +0000 (14:42 +0100)]
[lldb/DWARF] Fix a leak in line table construction
We were creating a bunch of LineSequence objects but never deleting
them.
This fixes the leak and changes the code to use std::unique_ptr, to make
it harder to make the same mistake again.
LLVM GN Syncbot [Tue, 21 Jan 2020 13:36:16 +0000 (13:36 +0000)]
[gn build] Port
fccd0da5ee6
Adam Balogh [Wed, 4 Dec 2019 09:48:13 +0000 (10:48 +0100)]
[clang-tidy] New check: bugprone-misplaced-pointer-arithmetic-in-alloc
Finds cases where an integer expression is added to the result
of a memory allocation function instead of its argument.
Differential Revision: https://reviews.llvm.org/D71001
Matt Arsenault [Tue, 21 Jan 2020 13:18:39 +0000 (08:18 -0500)]
AMDGPU/GlobalISel: Add some baseline tests for unmerge legalization
Guillaume Chatelet [Mon, 20 Jan 2020 16:11:00 +0000 (17:11 +0100)]
[Alignment][NFC] Use Align with CreateElementUnorderedAtomicMemMove
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: hiraditya, jfb, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73050
Georgii Rymar [Tue, 21 Jan 2020 11:40:10 +0000 (14:40 +0300)]
[llvm-readobj] - Remove rpath.test.
rpath.test checks that DT_RPATH is dumped.
We have dynamic-tags.test that tests all dynamic
tags and it is better, because also checks llvm-readelf
and does not use precompiled binaries.
Differential revision: https://reviews.llvm.org/D73093
Guillaume Chatelet [Tue, 21 Jan 2020 10:21:31 +0000 (11:21 +0100)]
[Alignment][NFC] Use Align with CreateMaskedLoad
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: hiraditya, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D73087
Pavel Labath [Tue, 21 Jan 2020 13:04:59 +0000 (14:04 +0100)]
[lldb] Use llvm::stable_sort in Line
This addresses some post-commit feedback on D72909.
Tres Popp [Fri, 17 Jan 2020 14:18:23 +0000 (15:18 +0100)]
Create a gpu.module operation for the GPU Dialect.
Summary:
This is based on the use of code constantly checking for an attribute on
a model and instead represents the distinct operaion with a different
op. Instead, this op can be used to provide better filtering.
Reverts "Revert "[mlir] Create a gpu.module operation for the GPU Dialect.""
This reverts commit
ac446302ca4145cdc89f377c0c364c29ee303be5 after
fixing internal Google issues.
This additionally updates ROCDL lowering to use the new gpu.module.
Reviewers: herhut, mravishankar, antiagainst, nicolasvasilache
Subscribers: jholewinski, mgorny, mehdi_amini, jpienaar, burmako, shauheen, csigg, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, llvm-commits, mravishankar, rriddle, antiagainst, bkramer
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D72921
Clement Courbet [Tue, 21 Jan 2020 10:58:51 +0000 (11:58 +0100)]
[llvm-exegesis] Fix support for LEA64_32r.
Summary:
Add unit test to show the issue: We must select an *aliasing* output
register, not the exact register.
Reviewers: gchatelet
Subscribers: tschuett, mstojanovic, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73095
Raphael Isemann [Tue, 21 Jan 2020 12:12:50 +0000 (13:12 +0100)]
[lldb][NFC] Convert LLDB_LOGF to LLDB_LOG in ClangASTSource.cpp
Andrew Ng [Thu, 16 Jan 2020 13:23:08 +0000 (13:23 +0000)]
[ELF] Refactor uses of getInputSections to improve efficiency NFC
Add new method getFirstInputSection and use instead of getInputSections
where appropriate to avoid creation of an unneeded vector of input
sections.
Differential Revision: https://reviews.llvm.org/D73047
Gabor Marton [Tue, 21 Jan 2020 10:39:36 +0000 (11:39 +0100)]
[analyzer] Enable PlacementNewChecker by default
Georgii Rymar [Thu, 16 Jan 2020 14:38:02 +0000 (17:38 +0300)]
[llvm-readelf][llvm-readobj] - Fix the indentation when printing dynamic tags.
This change is similar to one made for llvm-objdump in D72838.
llvm-readelf/llvm-readobj tools do not align the "Name/Value" column properly.
This patch adds a logic to calculate the size of indentation on fly
to fix such issues.
Differential revision: https://reviews.llvm.org/D72843
Simon Pilgrim [Tue, 21 Jan 2020 10:56:55 +0000 (10:56 +0000)]
[DAG] Fold extract_vector_elt (scalar_to_vector), K to undef (K != 0)
This was unconditionally folding this to the source operand, even if the access was out of bounds. Use undef instead of the extract is not the first element.
This helps with some cases where 3-vectors are legalized and avoids processing the 4th component.
Original Patch by: arsenm (Matt Arsenault)
Differential Revision: https://reviews.llvm.org/D51589
Clement Courbet [Tue, 21 Jan 2020 09:12:13 +0000 (10:12 +0100)]
[llvm-exegesis] Add support for AVX512 explicit rounding operands.
Reviewers: gchatelet
Subscribers: tschuett, mstojanovic, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73083
Simon Pilgrim [Mon, 20 Jan 2020 17:37:20 +0000 (17:37 +0000)]
[TargetLowering] SimplifyDemandedBits - Pull out InDemandedMask variable to ISD::SHL. NFCI.
Matches ISD::SRA + ISD::SRL variants.
Simon Pilgrim [Mon, 20 Jan 2020 17:35:14 +0000 (17:35 +0000)]
Regenerate rotated uxt tests
Peter Smith [Wed, 15 Jan 2020 09:38:00 +0000 (09:38 +0000)]
[LLD][ELF] Add support for INPUT_SECTION_FLAGS
The INPUT_SECTION_FLAGS linker script command is used to constrain the
section pattern matching to sections that match certain combinations of
flags.
There are two ways to express the constraint.
withFlags: Section must have these flags.
withoutFlags: Section must not have these flags.
The syntax of the command is:
INPUT_SECTION_FLAGS '(' sect_flag_list ')'
sect_flag_list: NAME
| sect_flag_list '&' NAME
Where NAME matches a section flag name such as SHF_EXECINSTR, or the
integer value of a section flag. If the first character of NAME is ! then
it means must not contain flag.
We do not support the rare case of { INPUT_SECTION_FLAGS(flags) filespec }
where filespec has no input section description like (.text).
As an example from the ld man page:
SECTIONS {
.text : { INPUT_SECTION_FLAGS (SHF_MERGE & SHF_STRINGS) *(.text) }
.text2 : { INPUT_SECTION_FLAGS (!SHF_WRITE) *(.text) }
}
.text will match sections called .text that have both the SHF_MERGE and
SHF_STRINGS flag.
.text2 will match sections called .text that don't have the SHF_WRITE flag.
The flag names accepted are the generic to all targets and SHF_ARM_PURECODE
as it is very useful to filter all the pure code sections into a single
program header that can be marked execute never.
fixes PR44265
Differential Revision: https://reviews.llvm.org/D72756
Igor Kudrin [Tue, 14 Jan 2020 13:05:27 +0000 (20:05 +0700)]
Reapply: [MachO] Add a test for detecting reserved unit length.
The test in the origin patch did not create a __debug_str section.
An UBSan check triggered when the corresponding pointer was dereferenced.
Differential Revision: https://reviews.llvm.org/D72695
This reapplies
fcc08aa835de1e0c1f3e7e479917575e55433b68
which was reverted in
b16f82ad3b095070729cde2873bd3a2e8ab35c0e.
Anna Welker [Tue, 21 Jan 2020 09:44:31 +0000 (09:44 +0000)]
[ARM][MVE] Enable masked scatter
Extends the gather/scatter pass in MVEGatherScatterLowering.cpp to
enable the transformation of masked scatters into calls to MVE's masked
scatter intrinsic.
Differential Revision: https://reviews.llvm.org/D72856
Frank Laub [Tue, 21 Jan 2020 08:22:01 +0000 (00:22 -0800)]
[MLIR] LLVM Dialect: add llvm.cmpxchg and improve llvm.atomicrmw custom parser
Summary:
Add a `llvm.cmpxchg` op as a counterpart to LLVM IR's `cmpxchg` instruction.
Note that the `weak`, `volatile`, and `syncscope` attributes are not yet supported.
This will be useful for upcoming parallel versions of affine.for and generally
for reduction-like semantics (especially for reductions that can't make use
of `atomicrmw`, e.g. `fmax`).
Reviewers: ftynse, nicolasvasilache
Reviewed By: ftynse
Subscribers: merge_guards_bot, jfb, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, arpith-jacob, mgester, lucyrfox, liufengdb, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D72995
LLVM GN Syncbot [Tue, 21 Jan 2020 08:19:25 +0000 (08:19 +0000)]
[gn build] Port
a80291ce10b
Nicolai Hähnle [Tue, 21 Jan 2020 08:17:25 +0000 (09:17 +0100)]
Revert "[AMDGPU] Invert the handling of skip insertion."
This reverts commit
0dc6c249bffac9f23a605ce4e42a84341da3ddbd.
The commit is reported to cause a regression in piglit/bin/glsl-vs-loop for
Mesa.
Zakk Chen [Mon, 30 Dec 2019 15:14:37 +0000 (07:14 -0800)]
[RISCV] Pass target-abi via module flag metadata
Reviewers: lenary, asb
Reviewed By: lenary
Tags: #clang
Differential Revision: https://reviews.llvm.org/D72755
Fangrui Song [Tue, 21 Jan 2020 07:12:45 +0000 (23:12 -0800)]
[MC] Improve a report_fatal_error
Fangrui Song [Tue, 21 Jan 2020 06:41:13 +0000 (22:41 -0800)]
Mitch Phillips [Tue, 21 Jan 2020 06:36:59 +0000 (22:36 -0800)]
Revert "[MachO] Add a test for detecting reserved unit length."
This change broke the UBSan buildbots. More information available in the
original Phabricator review: https://reviews.llvm.org/D72695
This reverts commit
fcc08aa835de1e0c1f3e7e479917575e55433b68.