Florian Hahn [Thu, 21 Nov 2019 09:18:58 +0000 (09:18 +0000)]
[compiler-rt] Don't check XCR0 when detecting avx512 on Darwin.
Darwin lazily saves the AVX512 context on first use [1]: instead of checking
that it already does to figure out if the OS supports AVX512, trust that
the kernel will do the right thing and always assume the context save
support is available.
[1] https://github.com/apple/darwin-xnu/blob/xnu-4903.221.2/osfmk/i386/fpu.c#L174
Reviewers: ab, RKSimon, craig.topper
Reviewed By: craig.topper
Subscribers: dberris, JDevlieghere, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D70454
Florian Hahn [Thu, 21 Nov 2019 09:03:16 +0000 (09:03 +0000)]
[Support] Don't check XCR0 when detecting avx512 on Darwin.
Darwin lazily saves the AVX512 context on first use [1]: instead of checking
that it already does to figure out if the OS supports AVX512, trust that
the kernel will do the right thing and always assume the context save
support is available.
[1] https://github.com/apple/darwin-xnu/blob/xnu-4903.221.2/osfmk/i386/fpu.c#L174
Reviewers: ab, RKSimon, craig.topper
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D70453
Zakk Chen [Thu, 21 Nov 2019 09:12:48 +0000 (01:12 -0800)]
[RISCV] Support mutilib in baremetal environment
1. Currently only support the set of multilibs same to riscv-gnu-toolchain.
2. Fix testcase typo causes fail on Windows
Reviewers: espindola, asb, kito-cheng, lenary
Reviewed By: lenary
Differential Revision: https://reviews.llvm.org/D67508
Sergej Jaskiewicz [Thu, 21 Nov 2019 08:02:01 +0000 (11:02 +0300)]
[libcxx] Add Sergej Jaskiewicz to CREDITS.txt
Summary: Also, test commit access
Reviewers: EricWF
Subscribers: christof, ldionne, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D70526
Ilya Biryukov [Wed, 20 Nov 2019 14:51:18 +0000 (15:51 +0100)]
[clangd] Reland
b5135a86e0476: Fix a crash in expected types
Reverted in
6de45772e0910bf7fa626e5493a2798b071eb26c.
With a fix to Windows tests.
Differential Revision: https://reviews.llvm.org/D70481
Clement Courbet [Thu, 21 Nov 2019 07:47:10 +0000 (08:47 +0100)]
[DAGCombine][NFC] Use ArrayRef and correctly size SmallVectors.
In preparation for D70487.
James Y Knight [Thu, 21 Nov 2019 03:18:45 +0000 (22:18 -0500)]
D'oh. Fix assert after
a84922916e6eddf701b39fbd7fe0222cb0fee1d6.
(Which was attempting to fix unused variable warning in NDEBUG mode after
8ba56f322abf848cec78ff7f814f3ad84cd778be)
Puyan Lotfi [Thu, 21 Nov 2019 02:40:04 +0000 (21:40 -0500)]
[clang][IFS][test] GreenDragon and Fuchsia Darwin bot fix: BindArchClass Nest.
On Darwin the clang driver does not invoke Driver::BuildActions directly
due to the need to handle Universal apps. Because of this there is a
difference in code path where Driver::BuildUniversalActions is called
instead of Driver::BuildActions. BuildUniversalActions ends up calling
Driver::BuildAction but what it does differently is it takes the driver
actions returned and wraps them each into a BindArchAction.
In Driver::BuildJobs there is a check for '-o' to determine that
multiple files are not specified when passing -o, except for Clang
Interface Stub this need to be an exception as we actually want to write
out multiple files: for every libfoo.so we have a libfoo.ifso sidecar
ifso file, etc. To allow this to happen there is a check for
IfsMergeAction, which is permitted to write out a secondary file. Except
on Darwin, the IfsMergeAction gets wrapped in the BindArchAction by
Driver::BuildUniversalActions so the check fails.
This patch is to look inside a BindArchAction in Driver::BuildJobs to
determine if there is in fact an IfsMergeAction, and if-so (pun intended)
allow the secondary sidecard ifs/ifso file to be written out.
James Y Knight [Thu, 21 Nov 2019 03:04:54 +0000 (22:04 -0500)]
Fix unused variable warning in NDEBUG mode after
8ba56f322abf848cec78ff7f814f3ad84cd778be
River Riddle [Thu, 21 Nov 2019 02:21:50 +0000 (18:21 -0800)]
Tablegen: Remove the error for duplicate include files.
This error was originally added a while(7 years) ago when
including multiple files was basically always an error. Tablegen
now has preprocessor support, which allows for building nice
c/c++ style include guards. With the current error being
reported, we unfortunately need to double guard when including
files:
* In user of MyFile.td
#ifndef MYFILE_TD
include MyFile.td
#endif
* In MyFile.td
#ifndef MYFILE_TD
#define MYFILE_TD
...
#endif
Differential Revision: https://reviews.llvm.org/D70410
Lang Hames [Thu, 21 Nov 2019 01:50:22 +0000 (17:50 -0800)]
[Error] Remove a broken code fragment accidentally included in
76bcbaafab2.
Lang Hames [Thu, 21 Nov 2019 01:27:44 +0000 (17:27 -0800)]
[Orc][Modules] Fix Modules build fallout from
a34680a33eb.
In
a34680a33eb OrcError.h and Orc/RPC/*.h were split out from the rest of
ExecutionEngine in order to eliminate false dependencies for remote JIT
targets (see https://reviews.llvm.org/D68732), however this broke modules
builds (see https://reviews.llvm.org/D69817).
This patch splits these headers out into a separate module, LLVM_OrcSupport,
in order to fix the modules build.
Fixes <rdar://
56377508>.
Alina Sbirlea [Thu, 21 Nov 2019 00:09:37 +0000 (16:09 -0800)]
[MemorySSA] Moving at the end often means before terminator.
Moving accesses in MemorySSA at InsertionPlace::End, when an instruction is
moved into a block, almost always means insert at the end of the block, but
before the block terminator. This matters when the block terminator is a
MemoryAccess itself (an invoke), and the insertion must be done before
the terminator for the update to be correct.
Insert an additional position: InsertionPlace:BeforeTerminator and update
current usages where this applies.
Resolves PR44027.
Craig Topper [Thu, 21 Nov 2019 00:47:52 +0000 (16:47 -0800)]
[X86] Fix i16->f128 sitofp to promote the i16 to i32 before trying to form a libcall.
Previously one of the test cases added here gave an error.
Craig Topper [Thu, 21 Nov 2019 00:26:45 +0000 (16:26 -0800)]
[X86] Fix f128->i16 fptosi to promote the i16 to i32 before trying to form a libcall.
Previously one of the test cases added here gave an error.
Adrian Prantl [Wed, 20 Nov 2019 21:02:23 +0000 (13:02 -0800)]
Fix an offset underflow bug in DwarfExpression when describing small values with subregisters
DwarfExpression::addMachineReg() knows how to build a larger register
that isn't expressible in DWARF by combining multiple
subregisters. However, if the entire value fits into just one
subregister, it would still emit the other subregisters, leading to
all sorts of inconsistencies down the line.
This patch fixes that by moving an already existing(!) check whether
the subregister's offset is before the end of the value to the right
place.
rdar://problem/
57294211
Differential Revision: https://reviews.llvm.org/D70508
Philip Reames [Thu, 21 Nov 2019 01:02:04 +0000 (17:02 -0800)]
Precommit tests for forthcoming widenable.condition transforms
Josh Kunz [Thu, 21 Nov 2019 00:33:18 +0000 (16:33 -0800)]
[docs] Tiny rewording in the portability FAQ entry
The entry reads better with these two words swapped.
Alina Sbirlea [Wed, 20 Nov 2019 21:44:51 +0000 (13:44 -0800)]
[MemorySSA] Update analysis when the terminator is a memory instruction.
Update MemorySSA when moving the terminator instruction, as that may be a memory touching instruction.
Resolves PR44029.
Reid Kleckner [Wed, 20 Nov 2019 23:59:16 +0000 (15:59 -0800)]
[ADT] Move to_vector from STLExtras.h to SmallVector.h
Nothing breaks, so this probably has zero impact, but it seems nice,
since to_vector is more like makeArrayRef, and should really live in
SmallVector.h.
Erik Pilkington [Wed, 20 Nov 2019 23:39:22 +0000 (15:39 -0800)]
[Sema] Add a 'Semantic' parameter to Expr::isKnownToHaveBooleanValue
Some clients of this function want to know about any expression that is known
to produce a 0/1 value, and others care about expressions that are semantically
boolean.
This fixes a -Wswitch-bool regression I introduced in
8bfb353bb33c, pointed out
by Chris Hamilton!
Peter Collingbourne [Thu, 21 Nov 2019 00:25:28 +0000 (16:25 -0800)]
gn build: check-clang depends on llvm-cxxfilt.
Eric Christopher [Thu, 21 Nov 2019 00:04:52 +0000 (16:04 -0800)]
Revert "[AArch64] Add the pipeline model for Exynos M5"
as it's causing test failures in llvm-mca.
This reverts commit
9bdfee2a3bd13d405ce1592930182f23849d2897.
Eric Christopher [Thu, 21 Nov 2019 00:00:53 +0000 (16:00 -0800)]
Temporarily Revert "[SLP] allow forming 2-way reduction patterns" and update testcases.
After speaking with Sanjay - seeing a number of miscompiles and working
on tracking down a testcase. None of the follow on patches seem to
have helped so far.
This reverts commit
8a0aa5310bccbb42d16d11db090419fcefdd1376.
Eric Christopher [Wed, 20 Nov 2019 23:39:47 +0000 (15:39 -0800)]
Temporarily Revert "Temporarily Revert "[SLP] allow forming 2-way reduction patterns""
as there were testcase changes after that need to also be reverted.
This reverts commit
cd8748a15f2d18861b3548eb26ed2b52e5ee50b4.
Yonghong Song [Wed, 20 Nov 2019 17:52:29 +0000 (09:52 -0800)]
[BPF] Fix a bug in peephole optimization
One of current peephole optimiations is to remove SLL/SRL if
the sub register has been zero extended. This phase has two bugs
and one limitations.
First, for the physical subregister used in pseudo insn COPY
like below, it permits incorrect optimization.
%0:gpr32 = COPY $w0
...
%4:gpr = MOV_32_64 %0:gpr32
%5:gpr = SLL_ri %4:gpr(tied-def 0), 32
%6:gpr = SRA_ri %5:gpr(tied-def 0), 32
The $w0 could be from the return value of a previous function call
and its upper 32-bit value might contain some non-zero values.
The same applies to function arguments.
Second, the current code may permits removing SLL/SRA like below:
%0:gpr32 = COPY $w0
%1:gpr32 = COPY %0:gpr32
...
%4:gpr = MOV_32_64 %1:gpr32
%5:gpr = SLL_ri %4:gpr(tied-def 0), 32
%6:gpr = SRA_ri %5:gpr(tied-def 0), 32
The reason is that it did not follow def-use chain to skip all
intermediate 32bit-to-32bit COPY instructions.
The current implementation is also very conservative for PHI
instructions. If any PHI insn component is another PHI or COPY insn,
it will just permit SLL/SRA.
This patch fixed the issue as follows:
- During def/use chain traversal, if any physical register is read,
SLL/SRA will be preserved as these physical registers are mostly
from function return values or current function arguments.
- Recursively visit all COPY and PHI instructions.
Eric Christopher [Wed, 20 Nov 2019 23:18:08 +0000 (15:18 -0800)]
Temporarily Revert "[SLP] allow forming 2-way reduction patterns"
After speaking with Sanjay - seeing a number of miscompiles and working
on tracking down a testcase. None of the follow on patches seem to
have helped so far.
This reverts commit
7ff57705ba196ce649d6034614b3b9df57e1f84f.
Mitchell Balan [Wed, 20 Nov 2019 20:36:45 +0000 (15:36 -0500)]
[clang-tidy] modernize-use-equals-default avoid adding redundant semicolons
Summary:
`modernize-use-equals-default` replaces default constructors/destructors with `= default;`. When the optional semicolon after a member function is present, this results in two consecutive semicolons.
This patch checks to see if the next non-comment token after the code to be replaced is a semicolon, and if so offers a replacement of `= default` rather than `= default;`.
This patch adds trailing comments and semicolons to about 5 existing tests.
Reviewers: malcolm.parsons, angelgarcia, aaron.ballman, alexfh
Patch by: poelmanc
Subscribers: MyDeveloperDay, JonasToth, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D70144
Lang Hames [Wed, 20 Nov 2019 23:04:06 +0000 (15:04 -0800)]
[Support][Error] Unfriend FileError. It is not special.
FileError doesn't need direct access to Error's internals as it can access the
payload via handleErrors.
(ErrorList remains special: it is not possible to write a handler for it, due
to the special auto-unpacking treatment that it receives from handleErrors.)
Evandro Menezes [Mon, 23 Sep 2019 17:59:25 +0000 (12:59 -0500)]
[AArch64] Add the pipeline model for Exynos M5
Add the scheduling and cost models for Exynos M5.
Jonas Devlieghere [Wed, 20 Nov 2019 22:11:00 +0000 (14:11 -0800)]
[Reproducer] Limit signals to macro define sin <csignal>
SIGBUS is not part of the signal macros defined in the header <csignal>.
Jason Molenda [Wed, 20 Nov 2019 22:13:39 +0000 (14:13 -0800)]
Handle the case where the 'g' packet doesn't get all regs.
lldb would silently accept a response to the 'g' packet
(read all registers) which was too large; this handles the
case where it is too small.
Differential Revision: https://reviews.llvm.org/D70417
<rdar://problem/
34916465>
Evgenii Stepanov [Fri, 15 Nov 2019 19:30:14 +0000 (11:30 -0800)]
Cherry-pick gtest fix for asan tests.
Summary:
https://github.com/google/googletest/commit/
681454dae48f109abf68c424c9d2e6db9a092238
Clone+exec death test allocates a single page of stack to run chdir + exec on.
This is not enough when gtest is built with ASan and run on particular
hardware.
With ASan on x86_64, ExecDeathTestChildMain has frame size of 1728 bytes.
Call to chdir() in ExecDeathTestChildMain ends up in
_dl_runtime_resolve_xsavec, which attempts to save register state on the stack;
according to cpuid(0xd) XSAVE register save area size is 2568 on my machine.
This results in something like this in all death tests:
Result: died but not with expected error.
...
[ DEATH ] AddressSanitizer:DEADLYSIGNAL
[ DEATH ] =================================================================
[ DEATH ] ==178637==ERROR: AddressSanitizer: stack-overflow on address ...
PiperOrigin-RevId:
278709790
Reviewers: pcc
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70332
Piotr Sobczak [Wed, 20 Nov 2019 21:30:02 +0000 (22:30 +0100)]
[AMDGPU][SILoadStoreOptimizer] Merge TBUFFER loads/stores
Summary: Extend SILoadStoreOptimizer to merge tbuffer loads and stores.
Reviewers: nhaehnle
Reviewed By: nhaehnle
Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69794
Jonas Devlieghere [Wed, 20 Nov 2019 21:48:58 +0000 (13:48 -0800)]
[Driver] Fix missing space in lldb --help output.
Jonas Devlieghere [Wed, 20 Nov 2019 21:46:37 +0000 (13:46 -0800)]
[Docs] Fix Sphinx warning (treated as error)
Fixes "undefined label" warning: if the link has no caption the label
must precede a section header.
Puyan Lotfi [Wed, 20 Nov 2019 19:41:11 +0000 (14:41 -0500)]
[clang][IFS] Driver Pipeline: generate stubs after standard pipeline (3)
Third Landing Attempt (dropping any linker invocation from clang driver):
Up until now, clang interface stubs has replaced the standard
PP -> C -> BE -> ASM -> LNK pipeline. With this change, it will happen in
conjunction with it. So what when you build your code you will get an
a.out or lib.so as well as an interface stub file.
Example:
clang -shared -o libfoo.so -emit-interface-stubs ...
will generate both a libfoo.so and a libfoo.ifso. The .so file will
contain the code from the standard compilation pipeline and the .ifso
file will contain the ELF stub library.
Note: For driver-test.c I've added -S in order to prevent any bot failures on
bots that don't have the proper linker for their native triple. You could always
specify a triple like x86_64-unknown-linux-gnu and on bots like x86_64-scei-ps4
the clang driver would invoke regular ld instead of getting the error
'Executable "orbis-ld" doesn't exist!' but on bots like ppc64be and s390x you'd
get an error "/usr/bin/ld: unrecognised emulation mode: elf_x86_64"
Differential Revision: https://reviews.llvm.org/D70274
Jonas Devlieghere [Wed, 20 Nov 2019 01:28:46 +0000 (17:28 -0800)]
[Reproducer] Generate LLDB reproducer on crash
This patch hooks the reproducer infrastructure with the signal handlers.
When lldb crashes with reproducers capture enabled, it will now generate
the reproducer and print a short message the standard out. This doesn't
affect the pretty stack traces, which are still printed before.
This patch also introduces a new reproducer sub-command that
intentionally raises a given signal to test the reproducer signal
handling.
Currently the signal handler is doing too much work. Instead of copying
over files into the reproducers in the signal handler, we should
re-invoke ourselves with a special command line flag that looks at the
VFS mapping and performs the copy.
This is a NO-OP when reproducers are disabled.
Differential revision: https://reviews.llvm.org/D70474
Krzysztof Parzyszek [Wed, 20 Nov 2019 21:04:41 +0000 (15:04 -0600)]
[Hexagon] Fix two testcase errors
This fixes issues discovered in https://reviews.llvm.org/D63973.
Craig Topper [Wed, 20 Nov 2019 21:01:29 +0000 (13:01 -0800)]
[X86] Mark vector STRICT_FP_ROUND as Legal instead of Custom.
The Custom handler doesn't do anything for these nodes anyway.
SelectionDAGISel won't mutate them if they are Legal or Custom.
X86 has custom code for mutating them due to missing isel patterns.
When the isel patterns are added Legal will be the right answer.
So go ahead a change it now since that's where we'll end up.
Philip Reames [Wed, 20 Nov 2019 20:51:37 +0000 (12:51 -0800)]
Move widenable branch formation into makeGuardControlFlowExplicit helper
This is mostly NFC, but I removed the setting of the guard's calling convention onto the WC call. Why? Because it was untested, and was producing an ill defined output as the declaration's convention wasn't been changed leaving a mismatch which is UB.
Vladimir Vereschaka [Wed, 20 Nov 2019 20:46:17 +0000 (12:46 -0800)]
[CMake] Fix the path to CrossWinToARMLinux.cmake CMake cache.
The comment was slightly misleading.
Behalf: broadwaylamb (Sergej Jaskiewicz)
Differential Revision: https://reviews.llvm.org/D70499
Stanislav Mekhanoshin [Wed, 20 Nov 2019 20:27:20 +0000 (12:27 -0800)]
[AMDGPU] Fixed mfma test check. NFC.
Davide Italiano [Wed, 20 Nov 2019 20:27:26 +0000 (12:27 -0800)]
[lldb] Fix NSURL data formatter truncation issue
Remove hardcoded string prefix length assumption causing issues when
concatenating summary for NSURL in NSURLSummaryProvider. Provider relies
on concatenation of NSStringProvider results for summary, and while the
strings are prefixed with '@' in Objective-C, that is not the case in
Swift causing part of the description to be truncated.
This will be tested in the downstream fork.
Patch by Martin Svensson!
Michał Górny [Wed, 20 Nov 2019 20:16:34 +0000 (21:16 +0100)]
[lldb] [test] Un-XFAIL one lldb-server test on NetBSD
Vedant Kumar [Wed, 20 Nov 2019 20:08:34 +0000 (12:08 -0800)]
[debugserver] Set arch based on TARGET_TRIPLE
Use TARGET_TRIPLE instead of LLVM_DEFAULT_TARGET_TRIPLE, as the latter
isn't exported by LLVMConfig.cmake, which means arch detection fails if
lldb is built separately from llvm.
Michael Liao [Tue, 19 Nov 2019 22:12:47 +0000 (17:12 -0500)]
[AMDGPU] Keep consistent check of legal addressing mode.
Summary:
- Add test cases for GFX10, which has narrower offset range compared to
GFX9.
Reviewers: rampitec, arsenm
Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70473
Richard Smith [Wed, 20 Nov 2019 19:58:34 +0000 (11:58 -0800)]
Fix parser bug that permitted 'private' as a (no-op) decl-specifier even outside OpenCL.
Nico Weber [Wed, 20 Nov 2019 19:38:35 +0000 (14:38 -0500)]
Revert "[clangd] Fix a crash in expected types"
This reverts commit
b5135a86e04761577494c70e7c0057136cc90b5b.
Test fails on Windows.
Peter Collingbourne [Tue, 19 Nov 2019 21:58:06 +0000 (13:58 -0800)]
scudo: Only use the Android reserved TLS slot when building libc's copy of the allocator.
When we're not building libc's allocator, just use a regular TLS variable. This
lets the unit tests pass on Android devices whose libc uses Scudo. Otherwise
libc's copy of Scudo and the unit tests' copy will both try to use the same
TLS slot, in likely incompatible ways.
This requires using ELF TLS, so start passing -fno-emulated-tls when building
the library and the unit tests on Android.
Differential Revision: https://reviews.llvm.org/D70472
Jonas Devlieghere [Wed, 20 Nov 2019 18:38:55 +0000 (10:38 -0800)]
[FileCollector] Ignore empty paths.
Don't insert empty strings into the StringSet<> because that triggers an
assert in its implementation.
Ulrich Weigand [Wed, 20 Nov 2019 18:49:34 +0000 (19:49 +0100)]
[SystemZ] Avoid mixing strict and non-strict FP operations in tests
This is to prepare for having the IR verifier reject mixed functions.
Note that fp-strict-mul-02.ll and fp-strict-mul-04.ll still remain
to be fixed.
Craig Topper [Wed, 20 Nov 2019 18:30:27 +0000 (10:30 -0800)]
[SelectionDAG][X86] Mutate strictFP nodes to non-strict in DoInstructionSelection when the node is marked Expand rather than when it is not Legal.
This allows operations that are marked Custom, but have some type
combinations that are legal to get past this code.
Add custom mutation code to X86's Select function for the nodes
that don't have isel patterns yet.
Ulrich Weigand [Wed, 20 Nov 2019 18:07:03 +0000 (19:07 +0100)]
[SystemZ] Use fneg in test cases
Now that we have fneg, prefer using it over "fsub -0.0, ...".
This helps in particular with strict FP tests, as fneg does
not raise any exceptions.
James Y Knight [Wed, 20 Nov 2019 17:10:14 +0000 (12:10 -0500)]
Rename 'DenormalMode' in CommandFlags.inc to 'DenormalFPMath', as its
option is actually named anyhow.
This avoids a conflict with the llvm::DenormalMode enum in
FloatingPointMode.h.
Xiangling Liao [Wed, 20 Nov 2019 16:26:08 +0000 (11:26 -0500)]
A fix of the bug introduced by previous lowering in asm patch.
Differential Revision: https://reviews.llvm.org/D70243
Xing Xue [Wed, 20 Nov 2019 16:01:45 +0000 (11:01 -0500)]
[AIX][XCOFF] Add support for generating assembly code for one-byte mergable strings
This patch adds support for generating assembly code for one-byte mergeable strings.
Generating assembly code for multi-byte mergeable strings and the `XCOFF` object code for mergeable strings will be supported later.
Reviewers: hubert.reinterpretcast, jasonliu, daltenty, sfertile, DiggerLin, Xiangling_L
Reviewed by: daltenty
Subscribers: wuzish, nemanjai, hiraditya, kbarton, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70310
Ilya Biryukov [Wed, 20 Nov 2019 14:51:18 +0000 (15:51 +0100)]
[clangd] Fix a crash in expected types
Reviewers: kadircet
Reviewed By: kadircet
Subscribers: merge_guards_bot, MaskRay, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D70481
LLVM GN Syncbot [Wed, 20 Nov 2019 15:28:09 +0000 (15:28 +0000)]
gn build: Merge
a03435ec8e2
Xiangling Liao [Thu, 14 Nov 2019 14:52:32 +0000 (09:52 -0500)]
[AIX] Lowering jump table, constant pool and block address in asm
This patch lowering jump table, constant pool and block address in assembly.
1. On AIX, jump table index is always relative;
2. Put CPI and JTI into ReadOnlySection until we support unique data sections;
3. Create the temp symbol for block address symbol;
4. Update MIR testcases and add related assembly part;
Differential Revision: https://reviews.llvm.org/D70243
Pavel Labath [Fri, 8 Nov 2019 14:24:11 +0000 (15:24 +0100)]
Recommit "[DWARF] Add an api to get "interpreted" location lists"
This recommits
089c0f581492cd6e2a3d2927be3fbf60ea2d7e62, which was
reverted due to failing tests on big endian machines. It includes a fix
which I believe (I don't have BE machine) should fix this issue. The fix
consists of correcting the invocation DWARFYAML::EmitDebugSections,
which was missing one (default) function arguments, and so didn't
actually force the little-endian mode.
The original commit message follows.
Summary:
This patch adds DWARFDie::getLocations, which returns the location
expressions for a given attribute (typically DW_AT_location). It handles
both "inline" locations and references to the external location list
sections (currently only of the DW_FORM_sec_offset type). It is
implemented on top of DWARFUnit::findLoclistFromOffset, which is also
added in this patch. I tried to make their signatures similar to the
equivalent range list functionality.
The actual location list interpretation logic is in
DWARFLocationTable::visitAbsoluteLocationList. This part is not
equivalent to the range list code, but this deviation is motivated by a
desire to reuse the same location list parsing code within lldb.
The functionality is tested via a c++ unit test of the DWARFDie API.
Reviewers: dblaikie, JDevlieghere, SouraVX
Subscribers: mgorny, hiraditya, cmtice, probinson, llvm-commits, aprantl
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70394
Sanjay Patel [Wed, 20 Nov 2019 14:31:17 +0000 (09:31 -0500)]
[SLP] reduce duplicate CHECK lines in tests; NFC
Raphael Isemann [Wed, 20 Nov 2019 14:58:07 +0000 (15:58 +0100)]
[lldb][NFC] Move searching for $__lldb_objc_class into its own function
Same as in commit
e7cc833ddafdca10be4ef1322ab96ffee774045b but with $__lldb_objc_class.
Dmitry Preobrazhensky [Wed, 20 Nov 2019 14:04:36 +0000 (17:04 +0300)]
[AMDGPU][GFX10] Disabled v_movrel*[sdwa|dpp] opcodes in codegen
These opcodes use indirect register addressing so they need special handling by codegen (currently missing).
Reviewers: vpykhtin, arsenm, rampitec
Differential Revision: https://reviews.llvm.org/D70400
Simon Atanasyan [Tue, 19 Nov 2019 14:32:13 +0000 (17:32 +0300)]
[mips] Define mem_simm# operands using tblgen `foreach` loop. NFC
David Zarzycki [Wed, 20 Nov 2019 13:52:24 +0000 (15:52 +0200)]
[SelectionDAG] Combine U{ADD,SUB}O diamonds into {ADD,SUB}CARRY
Summary:
Convert (uaddo (uaddo x, y), carryIn) into addcarry x, y, carryIn if-and-only-if the carry flags of the first two uaddo are merged via OR or XOR.
Work remaining: match ADD, etc.
Reviewers: craig.topper, RKSimon, spatel, niravd, jonpa, uweigand, deadalnix, nikic, lebedev.ri, dmgreen, chfast
Reviewed By: lebedev.ri
Subscribers: chfast, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70079
LLVM GN Syncbot [Wed, 20 Nov 2019 14:15:38 +0000 (14:15 +0000)]
gn build: Merge
72d2929c52a
Pavel Labath [Wed, 20 Nov 2019 14:13:34 +0000 (15:13 +0100)]
Revert "[DWARF] Add an api to get "interpreted" location lists"
The test fails on big endian machines.
This reverts commit
089c0f581492cd6e2a3d2927be3fbf60ea2d7e62 and the
subsequent attempt to fix in
82dc32e2d456c75d08bc9ffe97def409ee5a03cd.
Raphael Isemann [Wed, 20 Nov 2019 13:35:18 +0000 (14:35 +0100)]
[lldb][NFC] Move searching for $__lldb_class into its own function in ClangExpressionDeclMap
Anna Welker [Wed, 20 Nov 2019 13:57:54 +0000 (13:57 +0000)]
[ARM][MVE] Select vqabs
Adds a pattern to ARMInstrMVE.td to use a VQABS
instruction if an equivalent multi-instruction
construct is found.
Differential revision: https://reviews.llvm.org/D70181
Pavel Labath [Wed, 20 Nov 2019 13:35:41 +0000 (14:35 +0100)]
Big-endian fix to DWARFDieTest (
089c0f58)
Hardcode the DWARFContext to little-endian. I don't have a BE machine to
test this on, but I believe this should address the ppc64be failure.
Alex Richardson [Wed, 20 Nov 2019 13:20:15 +0000 (13:20 +0000)]
[update_cc_test_checks.py] Add the --function-signature flag
Summary:
This was added to update_test_checks.py in D68819 and I believe having it
in update_cc_test_checks.py is also useful.
Reviewers: jdoerfert, MaskRay
Reviewed By: MaskRay
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70429
Alex Richardson [Wed, 20 Nov 2019 13:19:48 +0000 (13:19 +0000)]
[UptestTestChecks][NFC] Share some common command line options code
Summary:
Add a function common.parse_commandline_args() that adds options common
to all tools (--verbose and --update-only) and returns the parsed
commandline arguments. I plan to use the shared parsing of --verbose in a
follow-up commit to remove most of the `if args.verbose:` checks in the
scripts.
Reviewers: xbolva00, MaskRay
Reviewed By: MaskRay
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70428
Alex Richardson [Wed, 20 Nov 2019 13:19:16 +0000 (13:19 +0000)]
Ignore R_MIPS_JALR relocations against non-function symbols
Summary:
Current versions of clang would erroneously emit this relocation not only
against functions (loaded from the GOT) but also against data symbols
(e.g. a table of function pointers). LLD was then changing this into a
branch-and-link instruction, causing the program to jump to the data
symbol at run time. I discovered this problem when attempting to boot
MIPS64 FreeBSD after updating the to the latest upstream master.
Reviewers: atanasyan, jrtc27, espindola
Reviewed By: atanasyan
Subscribers: emaste, sdardis, krytarowski, MaskRay, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70406
Tim Northover [Fri, 11 Oct 2019 12:46:47 +0000 (13:46 +0100)]
ARM-NEON: make type modifiers orthogonal and allow multiple modifiers.
The modifier system used to mutate types on NEON intrinsic definitions had a
separate letter for all kinds of transformations that might be needed, and we
were quite quickly running out of letters to use. This patch converts to a much
smaller set of orthogonal modifiers that can be applied together to achieve the
desired effect.
When merging with downstream it is likely to cause a conflict with any local
modifications to the .td files. There is a new script in
utils/convert_arm_neon.py that was used to convert all .td definitions and I
would suggest running it on the last downstream version of those files before
this commit rather than resolving conflicts manually.
Tim Northover [Wed, 30 Oct 2019 11:27:13 +0000 (11:27 +0000)]
NeonEmitter: remove special case on casting polymorphic builtins.
For some reason we were not casting a fairly obscure class of builtin calls we
expected to be polymorphic to vectors of char. It worked because the only
affected intrinsics weren't actually polymorphic after all, but is
unnecessarily complicated.
Tim Northover [Wed, 30 Oct 2019 09:26:58 +0000 (09:26 +0000)]
ARM-NEON: separate soon-to-be conflicting f16 patterns. NFC.
This separates some intrinsic definitions into multiple instantiations because
they use a modifier that forces the float size to a given value. That modifier
won't work in the new NeonEmitter modifier scheme and committing this
separately allows the Python script to be run on the .td files to perform the
conversion automatically.
Raphael Isemann [Wed, 20 Nov 2019 12:41:44 +0000 (13:41 +0100)]
[lldb][NFC] Move ClangExpressionDeclMap's persistent decl search into its own function
Searching persistent decls is a small subset of the things
FindExternalVisibleDecls does. It should be its own function instead
of being encapsulated in this `do { } while(false);` pattern.
Tim Northover [Wed, 20 Nov 2019 13:03:38 +0000 (13:03 +0000)]
Update tests after change to llvm-cxxfilt's underscore stripping behaviour.
Simon Atanasyan [Wed, 20 Nov 2019 12:27:27 +0000 (15:27 +0300)]
[mips] Put conditions when we need to expand memory operand into a separate function. NFC
`expandMemInst` expects instruction with 3 or 4 operands and the last
operand requires expanding. It's redundant to scan all operands in a
loop. We can check the last operands.
Simon Atanasyan [Wed, 20 Nov 2019 12:22:12 +0000 (15:22 +0300)]
[mips] Make MipsAsmParser::isEvaluated static function. NFC
Dmitry Preobrazhensky [Wed, 20 Nov 2019 12:09:08 +0000 (15:09 +0300)]
[AMDGPU][DPP] Corrected DPP combiner
Added a check to make sure that the selected dpp opcode is supported by target.
Reviewers: vpykhtin, arsenm, rampitec
Differential Revision: https://reviews.llvm.org/D70402
LLVM GN Syncbot [Wed, 20 Nov 2019 12:30:58 +0000 (12:30 +0000)]
gn build: Merge
089c0f58149
Clement Courbet [Wed, 20 Nov 2019 10:00:28 +0000 (11:00 +0100)]
[CodeGen][NFC] Regenerate load-combine test with update_llc_test.
To prepare for D27861.
Pavel Labath [Fri, 8 Nov 2019 14:24:11 +0000 (15:24 +0100)]
[DWARF] Add an api to get "interpreted" location lists
Summary:
This patch adds DWARFDie::getLocations, which returns the location
expressions for a given attribute (typically DW_AT_location). It handles
both "inline" locations and references to the external location list
sections (currently only of the DW_FORM_sec_offset type). It is
implemented on top of DWARFUnit::findLoclistFromOffset, which is also
added in this patch. I tried to make their signatures similar to the
equivalent range list functionality.
The actual location list interpretation logic is in
DWARFLocationTable::visitAbsoluteLocationList. This part is not
equivalent to the range list code, but this deviation is motivated by a
desire to reuse the same location list parsing code within lldb.
The functionality is tested via a c++ unit test of the DWARFDie API.
Reviewers: dblaikie, JDevlieghere, SouraVX
Subscribers: mgorny, hiraditya, cmtice, probinson, llvm-commits, aprantl
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70394
Djordje Todorovic [Wed, 20 Nov 2019 11:20:53 +0000 (12:20 +0100)]
[DebugInfo] Remove the DIFlagArgumentNotModified debug info flag
Due to changes in D68206, we remove the DIFlagArgumentNotModified
and its usage.
Differential Revision: https://reviews.llvm.org/D68207
LLVM GN Syncbot [Wed, 20 Nov 2019 12:10:51 +0000 (12:10 +0000)]
gn build: Merge
ea8678d1c78
Raphael Isemann [Wed, 20 Nov 2019 11:56:42 +0000 (12:56 +0100)]
[lldb][NFC] Remove unused ClangASTContext::GetUnknownAnyType
Sam McCall [Tue, 19 Nov 2019 15:57:31 +0000 (16:57 +0100)]
[clangd] Treat UserDefinedLiteral as a leaf in SelectionTree, sidestepping tokenization issues
Summary: Fixes https://github.com/clangd/clangd/issues/203
Reviewers: kadircet
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D70446
Serge Pavlov [Thu, 29 Aug 2019 12:29:11 +0000 (19:29 +0700)]
Move floating point related entities to namespace level
This is recommit of commit
e6584b2b7b2d, which was reverted in
30e7ee3c4bac together with
af57dbf12e54.
Original message is below.
Enumerations that describe rounding mode and exception behavior were
defined inside ConstrainedFPIntrinsic. It makes sense to use the same
definitions to represent the same properties in other cases, not only
in constrained intrinsics. It was however inconvenient as required to
include constrained intrinsics definitions even if they were not needed.
Also using long scope prefix reduced readability.
This change moves these definitioins to the namespace llvm::fp.
No functional changes.
Differential Revision: https://reviews.llvm.org/D69552
Raphael Isemann [Wed, 20 Nov 2019 11:40:08 +0000 (12:40 +0100)]
[lldb][NFC] Simplify ClangASTContext::GetBasicTypes
static convenience methods that do the clang::ASTContext -> ClangASTContext
conversion and handle errors by simply ignoring them are not a good idea.
Raphael Isemann [Wed, 20 Nov 2019 11:17:48 +0000 (12:17 +0100)]
[lldb][NFC] Remove ClangASTContext::GetAsDeclContext
Everything we pass to this function is already a DeclContext.
Raphael Isemann [Wed, 20 Nov 2019 11:09:19 +0000 (12:09 +0100)]
[lldb][NFC] Remove ClangASTContext::FieldIsBitfield overload
Raphael Isemann [Wed, 20 Nov 2019 10:36:15 +0000 (11:36 +0100)]
[lldb][NFC] Remove ClangASTContext::GetUniqueNamespaceDeclaration overload
This overload is only used in one place and having static overloads for
all methods that only do an additional clang::ASTContext -> ClangASTContext
conversion is just not sustainable.
Sameer Sahasrabuddhe [Tue, 19 Nov 2019 08:35:39 +0000 (14:05 +0530)]
[AMDGPU] add support for hostcall buffer pointer as hidden kernel argument
Hostcall is a service that allows a kernel to submit requests to the
host using shared buffers, and block until a response is
received. This will eventually replace the shared buffer currently
used for printf, and repurposes the same hidden kernel argument. This
change introduces a new ValueKind in the HSA metadata to represent the
hostcall buffer.
Differential Revision: https://reviews.llvm.org/D70038
Martin Storsjö [Wed, 20 Nov 2019 10:19:50 +0000 (12:19 +0200)]
[ExecutionEngine] Add a missing break to avoid warnings
This fixes buildbot errors since
dc3ee330891c2.
Georgii Rymar [Tue, 12 Nov 2019 09:46:44 +0000 (12:46 +0300)]
[llvm-readobj] - Improve dumping of the SHT_LLVM_LINKER_OPTIONS sections.
I've added a few tests that shows how the current code could overrun the section data
buffer while dumping. I had to rewrite the code to fix this.
Differential revision: https://reviews.llvm.org/D70112
Djordje Todorovic [Tue, 19 Nov 2019 13:47:08 +0000 (14:47 +0100)]
Reland "[clang] Remove the DIFlagArgumentNotModified debug info flag"
It turns out that the ExprMutationAnalyzer can be very slow when AST
gets huge in some cases. The idea is to move this analysis to the LLVM
back-end level (more precisely, in the LiveDebugValues pass). The new
approach will remove the performance regression, simplify the
implementation and give us front-end independent implementation.
Differential Revision: https://reviews.llvm.org/D68206
Adam Kallai [Wed, 20 Nov 2019 08:51:03 +0000 (10:51 +0200)]
ExecutionEngine: add preliminary support for COFF ARM64
Differential Revision: https://reviews.llvm.org/D69434
Georgii Rymar [Mon, 18 Nov 2019 14:43:50 +0000 (17:43 +0300)]
[llvm-readobj/llvm-readelf] - Improve dumping of versioning sections.
Our elf-versioninfo.test is not perfect. It does not properly test how
flags are dumped and also we have a bug: they are dumped as enums in
LLVM style now, i.e not dumped properly.
GNU style uses a `versionFlagToString` method to build a string from flags
which seems is consistent with GNU readelf.
In this patch I fixed the issues mentioned.
Differential revision: https://reviews.llvm.org/D70399