Anastasia Stulova [Fri, 3 Jan 2020 11:59:19 +0000 (11:59 +0000)]
[OpenCL] Add link to C++ for OpenCL documentation
Remove description of language mode from the language
extensions and add a link to pdf document.
Tags: #clang
Differential Revision: https://reviews.llvm.org/D72076
Ilya Biryukov [Fri, 3 Jan 2020 11:05:14 +0000 (12:05 +0100)]
[Syntax] Build spanning SimpleDecalration for classes, structs, etc
When they are free-standing, e.g. `struct X;` or `struct X {};`.
Although this complicates the common case (of free-standing class
declarations), this ensures the less common case (e.g. `struct X {} a;`)
are handled uniformly and produce similar syntax trees.
James Henderson [Fri, 20 Dec 2019 12:40:20 +0000 (12:40 +0000)]
[test][llvm-dwarfdump] Use --implicit-check-not to simplify test checks
This removes the need to duplicate the LASTONLY check pattern and the
last part of the NONFATAL pattern in the modified test.
Reviewed By: MaskRay, JDevlieghere
Differential Revision: https://reviews.llvm.org/D71757
James Henderson [Fri, 20 Dec 2019 12:30:23 +0000 (12:30 +0000)]
[test][llvm-dwarfdump] Normalise contents and checks for line tables
The line tables in debug_line_malformed.s had contents that varied more
than was necessary for the testing, making it harder to follow what was
important. This patch normalises them so that they all share
more-or-less the same body. Additionally, it makes the testing for what
was printed more consistent, to show that the right parts of the line
table prologue and body are/are not parsed and printed.
Reviewed By: JDevlieghere
Differential Revision: https://reviews.llvm.org/D71755
James Henderson [Fri, 20 Dec 2019 11:57:38 +0000 (11:57 +0000)]
[test][llvm-dwarfdump] Add missing checks for table dumping
Some of the tables in debug_line_malformed.s were not being checked in
the NONFATAL checks in debug_line_invalid.test (only the warnings coming
from them were being checked). This made the test harder to follow.
Additionally, a later change will change the way the errors are handled
such that more of the line table will be printed. That will require
checks for these tables (or something equivalent) so that the difference
in behaviour can be observed. This patch adds checks for the three
tables that were missing checks.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D71753
Roman Lebedev [Fri, 3 Jan 2020 09:50:00 +0000 (12:50 +0300)]
[DAGCombine][X86][AArch64] 'A - (A & (B - 1))' -> 'A & (0 - B)' fold (PR44448)
While we do manage to fold integer-typed IR in middle-end,
we can't do that for the main motivational case of pointers.
There is @llvm.ptrmask() intrinsic which may or may not be helpful,
but i'm not sure it is fully considered canonical yet,
not everything is fully aware of it likely.
https://rise4fun.com/Alive/ZVdp
Name: ptr - (ptr & (alignment-1)) -> ptr & (0 - alignment)
%mask = add i64 %alignment, -1
%bias = and i64 %ptr, %mask
%r = sub i64 %ptr, %bias
=>
%highbitmask = sub i64 0, %alignment
%r = and i64 %ptr, %highbitmask
See
https://bugs.llvm.org/show_bug.cgi?id=44448
https://reviews.llvm.org/D71499
Roman Lebedev [Fri, 3 Jan 2020 09:46:52 +0000 (12:46 +0300)]
[NFC][DAGCombine][X86][AArch64] Tests for 'A - (A & (B - 1))' pattern (PR44448)
https://rise4fun.com/Alive/ZVdp
Name: ptr - (ptr & (alignment-1)) -> ptr & (0 - alignment)
%mask = add i64 %alignment, -1
%bias = and i64 %ptr, %mask
%r = sub i64 %ptr, %bias
=>
%highbitmask = sub i64 0, %alignment
%r = and i64 %ptr, %highbitmask
The main motivational pattern involes pointer-typed values,
so this transform can't really be done in middle-end.
See
https://bugs.llvm.org/show_bug.cgi?id=44448
https://reviews.llvm.org/D71499
Raphael Isemann [Fri, 3 Jan 2020 10:24:12 +0000 (11:24 +0100)]
[lldb][NFC] Remove forward declaration for non-existent type clang::Action and delete references to it
There is no clang::Action anymore so our forward decl for it and the obsolete pointer in the
ASTStructExtractor can both go (that code anyway didn't do anything).
Raphael Isemann [Fri, 3 Jan 2020 09:36:31 +0000 (10:36 +0100)]
[lldb][NFC] Document TypeSystem and related Compiler* classes
Sam Parker [Fri, 3 Jan 2020 08:48:33 +0000 (03:48 -0500)]
[ARM][NFC] Move tail predication checks
Extract the tail predication validation checks out into their own
LowOverHeadLoop method.
Craig Topper [Fri, 3 Jan 2020 07:27:51 +0000 (23:27 -0800)]
[X86] Reorder X86any* PatFrags to put the strict node first so that chain property will be inferred for the instruction by the tablegen backend.
Also use X86any_vfpround instead of X86vfpround in some instruction
definitions so the strict version can be used to infer the chain
property.
Without these changes we don't propagate strict FP chain through
isel for some instructions.
Kadir Cetinkaya [Wed, 18 Dec 2019 10:23:47 +0000 (11:23 +0100)]
[clangd] Replace shortenNamespace with getQualification
Reviewers: ilya-biryukov
Subscribers: MaskRay, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D71652
TH3CHARLie [Fri, 3 Jan 2020 06:04:01 +0000 (14:04 +0800)]
[llvm-size] print a blank line between archieve members when using sysv format
Summary: This patch is related to https://bugs.llvm.org/show_bug.cgi?id=42967 and it fixes llvm-size's sysv format output by adding a blank line between archieve members
Reviewers: jhenderson, Jim, MaskRay
Reviewed By: jhenderson, Jim, MaskRay
Subscribers: MaskRay, Jim, rupprecht, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71957
Craig Topper [Fri, 3 Jan 2020 04:51:13 +0000 (20:51 -0800)]
[X86] Re-enable lowerUINT_TO_FP_vXi32 under fast-math by using an FSUB instead of an FADD.
Summary:
We previously disabled this under fast math due to aggressive
reassociation by the machine combiner. But I think we can work
around this by using a FSUB instead of FADD for the first
operation.
This matches the similar algorithm we do for uint_to_fp i64->f64
in TargetLowering::expandUINT_TO_FP. If reassociation hasn't
been a problem for that, hopefully its not a problem here.
Reviewers: RKSimon, spatel, scanon
Reviewed By: spatel
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71968
QingShan Zhang [Fri, 3 Jan 2020 03:26:41 +0000 (03:26 +0000)]
[DAGCombine] Initialize the default operation action for SIGN_EXTEND_INREG for vector type as 'expand' instead of 'legal'
For now, we didn't set the default operation action for SIGN_EXTEND_INREG for
vector type, which is 0 by default, that is legal. However, most target didn't
have native instructions to support this opcode. It should be set as expand by
default, as what we did for ANY_EXTEND_VECTOR_INREG.
Differential Revision: https://reviews.llvm.org/D70000
Wang, Pengfei [Fri, 3 Jan 2020 02:57:27 +0000 (10:57 +0800)]
[X86] Enable strict FP by default and remove option -disable-strictnode-mutation. NFCI.
Kazuaki Ishizaki [Fri, 3 Jan 2020 02:25:06 +0000 (10:25 +0800)]
[mlir] NFC: Fix broken links in docs
Summary: This commit fixes missing links that are caused by the repository movement.
Reviewers: Jim, rriddle, jpienaar
Reviewed By: Jim, rriddle, jpienaar
Subscribers: arpith-jacob, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D72065
Hideto Ueno [Fri, 3 Jan 2020 02:03:56 +0000 (11:03 +0900)]
Revert "[Attributor] AAValueConstantRange: Value range analysis using constant range"
This reverts commit
e9963034314edf49a12ea5e29f694d8f9f52734a.
Kamil Rytarowski [Fri, 3 Jan 2020 01:35:33 +0000 (02:35 +0100)]
[compiler-rt] [netbsd] Switch to syscall for ThreadSelfTlsTcb()
This change avoids using internal, namespaced per-CPU calls that
are not a stable interface to read the TSL base value.
Justin Hibbits [Fri, 20 Sep 2019 16:22:49 +0000 (11:22 -0500)]
[PowerPC]: Fix predicate handling with SPE
SPE floating-point compare instructions only update the GT bit in the CR
field. All predicates must therefore be reduced to GT/LE.
Justin Hibbits [Thu, 2 Jan 2020 22:00:43 +0000 (16:00 -0600)]
Run update_llc_test_checks against SPE tests.
This is in preparation for further tests which are better generated with
the script. No functional change.
Wang, Pengfei [Fri, 3 Jan 2020 01:04:44 +0000 (09:04 +0800)]
[X86] Optimization of inserting vxi1 sub vector into vXi1 vector
Summary:
After bugfix the undef value case here, we used more operations to implement inserting vxi1 sub vector into vXi1 vector, I optimize it by use less operations.
The history information at https://reviews.llvm.org/D68311
Reviewers: craig.topper, LuoYuanke, yubing, annita.zhang, pengfei, LiuChen3, RKSimon
Reviewed By: craig.topper
Subscribers: hiraditya, llvm-commits
Patch by Xiang Zhang (xiangzhangllvm)
Differential Revision: https://reviews.llvm.org/D71917
Med Ismail Bennani [Fri, 3 Jan 2020 01:14:45 +0000 (02:14 +0100)]
Revert "[lldb/Command] Add --force option for `watchpoint delete` command"
This reverts commit
3620e5f28a4d2800fb6c325ec24b3d660e48b9ba.
Jonas Devlieghere [Fri, 3 Jan 2020 00:14:35 +0000 (16:14 -0800)]
[lldb/Python] Remove unused imports (NFC)
Jonas Devlieghere [Fri, 3 Jan 2020 00:13:44 +0000 (16:13 -0800)]
[lldb/Python] Remove unused support file (NFC)
Med Ismail Bennani [Sat, 28 Dec 2019 13:47:51 +0000 (14:47 +0100)]
[lldb/Command] Add --force option for `watchpoint delete` command
Currently, there is no option to delete all the watchpoint without LLDB
asking for a confirmation. Besides making the watchpoint delete command
homogeneous with the breakpoint delete command, this option could also
become handy to trigger automated watchpoint deletion i.e. using
breakpoint actions.
rdar://
42560586
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
Petr Hosek [Thu, 2 Jan 2020 22:45:07 +0000 (14:45 -0800)]
[CMake] clang-scan-deps in Fuchsia distribution
We would like to use clang-scan-deps in Fuchsia build so include it
in the toolchain distribution.
Differential Revision: https://reviews.llvm.org/D72113
Sean Fertile [Fri, 3 Jan 2020 00:29:56 +0000 (19:29 -0500)]
[PowerPC][AIX] Enable sret arguments.
Removes the fatal error for sret arguments and adds lit testing.
Differential Revision: https://reviews.llvm.org/D71504
Reid Kleckner [Mon, 25 Nov 2019 19:36:47 +0000 (11:36 -0800)]
[PDB] Print the most redundant type record indices with /summary
Summary:
I used this information to motivate splitting up the Intrinsic::ID enum
(
5d986953c8b917bacfaa1f800fc1e242559f76be) and adding a key method to
clang::Sema (
586f65d31f32ca6bc8cfdb8a4f61bee5057bf6c8) which saved a
fair amount of object file size.
Example output for clang.pdb:
Top 10 types responsible for the most TPI input bytes:
index total bytes count size
0x3890: 8,671,220 = 1,805 * 4,804
0xE13BE: 5,634,720 = 252 * 22,360
0x6874C: 5,181,600 = 408 * 12,700
0x2A1F: 4,520,528 = 1,574 * 2,872
0x64BFF: 4,024,020 = 469 * 8,580
0x1123: 4,012,020 = 2,157 * 1,860
0x6952: 3,753,792 = 912 * 4,116
0xC16F: 3,630,888 = 633 * 5,736
0x69DD: 3,601,160 = 985 * 3,656
0x678D: 3,577,904 = 319 * 11,216
In this case, we can see that record 0x3890 is responsible for ~8MB of
total object file size for objects in clang.
The user can then use llvm-pdbutil to find out what the record is:
$ llvm-pdbutil dump -types -type-index 0x3890
Types (TPI Stream)
============================================================
Showing 1 records.
0x3890 | LF_FIELDLIST [size = 4804]
- LF_STMEMBER [name = `WORDTYPE_MAX`, type = 0x1001, attrs = public]
- LF_MEMBER [name = `U`, Type = 0x37F0, offset = 0, attrs = private]
- LF_MEMBER [name = `BitWidth`, Type = 0x0075 (unsigned), offset = 8, attrs = private]
- LF_METHOD [name = `APInt`, # overloads = 8, overload list = 0x3805]
...
In this case, we can see that these are members of the APInt class,
which is emitted in 1805 object files.
The next largest type is ASTContext:
$ llvm-pdbutil dump -types -type-index 0xE13BE bin/clang.pdb
0xE13BE | LF_FIELDLIST [size = 22360]
- LF_BCLASS
type = 0x653EA, offset = 0, attrs = public
- LF_MEMBER [name = `Types`, Type = 0x653EB, offset = 8, attrs = private]
- LF_MEMBER [name = `ExtQualNodes`, Type = 0x653EC, offset = 24, attrs = private]
- LF_MEMBER [name = `ComplexTypes`, Type = 0x653ED, offset = 48, attrs = private]
- LF_MEMBER [name = `PointerTypes`, Type = 0x653EE, offset = 72, attrs = private]
...
ASTContext only appears 252 times, but the list of members is long, and
must be repeated everywhere it is used.
This was the output before I split Intrinsic::ID:
Top 10 types responsible for the most TPI input:
0x686C: 69,823,920 = 1,070 * 65,256
0x686D: 69,819,640 = 1,070 * 65,252
0x686E: 69,819,640 = 1,070 * 65,252
0x686B: 16,371,000 = 1,070 * 15,300
...
These records were all lists of intrinsic enums.
Reviewers: MaskRay, ruiu
Subscribers: mgrang, zturner, thakis, hans, akhuang, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71437
Lang Hames [Thu, 2 Jan 2020 23:47:47 +0000 (15:47 -0800)]
[lli] Add a filter to avoid importing the process's main symbol.
If JIT'd code fails to define a main function and we import the process's
definition then we will end up recursively calling lli's main until we overflow
the stack and crash. This filter fixes the issue by ensuring that the process's
main function is never imported. This results in lli producing a much friendlier
"symbol not found" error when JIT'd code fails to define main.
Evgenii Stepanov [Thu, 2 Jan 2020 23:26:07 +0000 (15:26 -0800)]
Fix llvm-symbolizer tests on Windows, one more time.
River Riddle [Thu, 2 Jan 2020 22:28:37 +0000 (14:28 -0800)]
[mlir] Rewrite the internal representation of OpResult to be optimized for memory.
Summary:
This changes the implementation of OpResult to have some of the results be represented inline in Value, via a pointer int pair of Operation*+result number, and the rest being trailing objects on the main operation. The full details of the new representation is detailed in the proposal here:
https://groups.google.com/a/tensorflow.org/g/mlir/c/XXzzKhqqF_0/m/v6bKb08WCgAJ
The only difference between here and the above proposal is that we only steal 2-bits for the Value kind instead of 3. This means that we can only fit 2-results inline instead of 6. This allows for other users to steal the final bit for PointerUnion/etc. If necessary, we can always steal this bit back in the future to save more space if 3-6 results are common enough.
Reviewed By: jpienaar
Differential Revision: https://reviews.llvm.org/D72020
Evgenii Stepanov [Tue, 31 Dec 2019 01:46:22 +0000 (17:46 -0800)]
Add C source to two debug info tests.
Reviewers: dblaikie, jhenderson
Subscribers: aprantl, rupprecht, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D72024
Evgenii Stepanov [Tue, 31 Dec 2019 02:06:25 +0000 (18:06 -0800)]
Change dbg-*-tag-offset tests to use llvm-dwarfdump.
Reviewers: dblaikie
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D72023
Matt Arsenault [Thu, 2 Jan 2020 18:40:20 +0000 (13:40 -0500)]
AMDGPU/GlobalISel: Remove manual G_FENCE selection
The tablegen emitter now handles the immediate operand correctly, so
let the generatedd matcher works.
Matt Arsenault [Thu, 2 Jan 2020 21:20:26 +0000 (16:20 -0500)]
DAG: Use TargetConstant for FENCE operands
Alexey Bataev [Fri, 27 Dec 2019 14:44:43 +0000 (09:44 -0500)]
[OPENMP50]Codegen for lastprivate conditional list items.
Added codegen support for lastprivate conditional. According to the
standard, if when the conditional modifier appears on the clause, if an
assignment to a list item is encountered in the construct then the
original list item is assigned the value that is assigned to the new
list item in the sequentially last iteration or lexically last section
in which such an assignment is encountered.
We look for the assignment operations and check if the left side
references lastprivate conditional variable. Then the next code is
emitted:
if (last_iv_a <= iv) {
last_iv_a = iv;
last_a = lp_a;
}
At the end the implicit barrier is generated to wait for the end of all
threads and then in the check for the last iteration the private copy is
assigned the last value.
if (last_iter) {
lp_a = last_a; // <--- new code
a = lp_a; // <--- store of private value to the original variable.
}
Jonas Devlieghere [Thu, 2 Jan 2020 21:36:05 +0000 (13:36 -0800)]
[lldb/CMake] Print whether an optional dependency was enabled.
Use a status message to convey whether an optional dependency was found
or not. With the auto-detection code it's not longer as simple as
checking the CMake cache.
Jonas Devlieghere [Thu, 2 Jan 2020 21:31:32 +0000 (13:31 -0800)]
[lldb/CMake] Fix variable naming in FindLibEdit
The current FOUND_VAR for FindLibEdit is libedit_FOUND but wasn't set by
find_package_handle_standard_args. However this isn't valid for the
package name.
The argument for FOUND_VAR is "libedit_FOUND", but only "LibEdit_FOUND" and
"LIBEDIT_FOUND" are valid names.
This fixes all the variables set by FindLibEdit to match the desired
naming scheme.
Jonas Paulsson [Mon, 30 Dec 2019 21:14:43 +0000 (22:14 +0100)]
[SystemZ] Create brcl 0,0 instead of brcl 0,3 in EmitNop for 6 bytes.
For consistency with GCC, the target label is moved to the brcl itself
instead of the next instruction.
Review: Ulrich Weigand
Alexey Bataev [Thu, 2 Jan 2020 20:49:08 +0000 (15:49 -0500)]
[OPENMP] Restore allowing of braced initializers in the declare reduction
init.
Braced initializers were not accepted after the last fix in the initialier.Restored previous functionality.
Jonas Devlieghere [Thu, 2 Jan 2020 21:00:02 +0000 (13:00 -0800)]
[lldb/CMake] Use PYTHON_LIBRARIES instead of PYTHON_LIBRARY
PYTHON_LIBRARIES is the canonical variable set by FindPythonLibs while
PYTHON_LIBRARY is an implementation detail. This replaces the uses of
the latter with the former.
Matt Arsenault [Thu, 2 Jan 2020 20:31:26 +0000 (15:31 -0500)]
AMDGPU/GlobalISel: Correct MMO sizes in some tests
There intended to test non-extloads, but the memory size did not match
the result size.
Matt Arsenault [Thu, 2 Jan 2020 19:56:50 +0000 (14:56 -0500)]
AMDGPU/GlobalISel: Regenerate check lines
This avoids diff noise in a future commit from the check name change
from the G_GEP->G_PTR_ADD rename.
Saleem Abdulrasool [Thu, 2 Jan 2020 20:55:01 +0000 (12:55 -0800)]
build: disable zlib by default on Windows
zlib usage on Windows has caused issues in the past. Furthermore, the
GNUWin32 library can be detected and used although the headers are not
available. Require Windows to explicitly opt in.
Jacques Pienaar [Thu, 2 Jan 2020 20:53:43 +0000 (12:53 -0800)]
[mlir] Only generate default for uncovered cases
Have to explicitly check if all cases are covered instead.
Sanjay Patel [Thu, 2 Jan 2020 19:32:18 +0000 (14:32 -0500)]
[InstCombine] add tests for vector icmp with undef constant elements; NFC
Jacques Pienaar [Thu, 2 Jan 2020 20:32:41 +0000 (12:32 -0800)]
[mlir] Revert default case that was needed
This one isn't always complete.
Jacques Pienaar [Thu, 2 Jan 2020 20:27:09 +0000 (12:27 -0800)]
[mlir] Add parenthesis to avoid -Wparentheses
Craig Topper [Thu, 2 Jan 2020 20:26:31 +0000 (12:26 -0800)]
[X86] Move STRICT_ ISD nodes into the new section of X86ISelLowering.h where STRICT nodes are collected after D71841
Jacques Pienaar [Thu, 2 Jan 2020 20:22:12 +0000 (12:22 -0800)]
[mlir] Remove redudant default cases
These provide no value and trigger -Wcovered-switch-default.
David Blaikie [Thu, 2 Jan 2020 20:13:38 +0000 (12:13 -0800)]
Polly: Fix a tag type mismatch (struct/class)
Nemanja Ivanovic [Thu, 2 Jan 2020 19:37:34 +0000 (13:37 -0600)]
[PowerPC] Only legalize FNEARBYINT with unsafe fp math
Commit
0f0330a78709 legalized these nodes on PPC without consideration of
unsafe math which means that we get inexact exceptions raised for nearbyint.
Since this doesn't conform to the standard, switch this legalization to depend
on unsafe fp math.
Saleem Abdulrasool [Thu, 2 Jan 2020 19:40:49 +0000 (11:40 -0800)]
X86: remove unused variable
Remove the now unused-variable from
aa17d31edb00c66461093b5a7cd2f4a35dc143e9. This breaks `-Werror` builds.
Nico Weber [Thu, 2 Jan 2020 19:39:17 +0000 (14:39 -0500)]
Reland "[gn build] (manually) merge
68a235d07f9e70"
This reverts commit
70342641b3c064b1cdf90d16902b937e7a21ecf2.
68a235d relanded in
abb00753069, so this relands the gn port of it.
Saleem Abdulrasool [Wed, 1 Jan 2020 23:01:04 +0000 (15:01 -0800)]
build: reduce CMake handling for zlib
Rather than handling zlib handling manually, use `find_package` from CMake
to find zlib properly. Use this to normalize the `LLVM_ENABLE_ZLIB`,
`HAVE_ZLIB`, `HAVE_ZLIB_H`. Furthermore, require zlib if `LLVM_ENABLE_ZLIB` is
set to `YES`, which requires the distributor to explicitly select whether
zlib is enabled or not. This simplifies the CMake handling and usage in
the rest of the tooling.
This restores
68a235d07f9e7049c7eb0c8091f37e385327ac28,
e6c7ed6d2164a0659fd9f6ee44f1375d301e3cad. The problem with the windows
bot is a need for clearing the cache.
Craig Topper [Thu, 2 Jan 2020 18:15:36 +0000 (10:15 -0800)]
[X86] Remove FP0-6 operands from call instructions in FPStackifier pass. Only count defs as returns.
All FP0-6 operands should be removed by the FP stackifier. By
removing these we fix the machine verifier error in PR39437.
I've also made it so that only defs are counted for STReturns
which removes what I think were extra stack cleanup instructions.
And I've removed the regcall assert because it was checking the
attributes of the caller, but here we're concerned with the
attributes of the callee. But I don't know how to get that
information from this level.
Lei Zhang [Thu, 2 Jan 2020 19:08:30 +0000 (14:08 -0500)]
[mlir][spirv] Update SPIR-V enums and ops with availability spec
This commit updates gen_spirv_dialect.py to query the grammar and
generate availability spec for various enum attribute definitions
and all defined ops.
Reviewed By: mravishankar
Differential Revision: https://reviews.llvm.org/D72095
Fangrui Song [Thu, 2 Jan 2020 17:52:59 +0000 (09:52 -0800)]
[ELF][Hexagon][test] Use llvm-readobj to check relocations. NFC
Reviewed By: sidneym
Differential Revision: https://reviews.llvm.org/D72093
Nicolas Vasilache [Tue, 31 Dec 2019 14:28:18 +0000 (09:28 -0500)]
[mlir][Linalg] Extend generic ops to allow tensors
Summary:
This diff adds support to allow `linalg.generic` and
`linalg.indexed_generic` to take tensor input and output
arguments.
The subset of output tensor operand types must appear
verbatim in the result types after an arrow. The parser,
printer and verifier are extended to accomodate this
behavior.
The Linalg operations now support variadic ranked tensor
return values. This extension exhibited issues with the
current handling of NativeCall in RewriterGen.cpp. As a
consequence, an explicit cast to `SmallVector<Value, 4>`
is added in the proper place to support the new behavior
(better suggestions are welcome).
Relevant cleanups and name uniformization are applied.
Relevant invalid and roundtrip test are added.
Reviewers: mehdi_amini, rriddle, jpienaar, antiagainst, ftynse
Subscribers: burmako, shauheen, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D72022
Nico Weber [Thu, 2 Jan 2020 18:44:54 +0000 (13:44 -0500)]
Make mangled_names.test and update_cc_test_checks.py work with Python 2.
Differential Revision: https://reviews.llvm.org/D71565
Kazuaki Ishizaki [Thu, 2 Jan 2020 18:41:43 +0000 (13:41 -0500)]
Fix trivial typos in comments; NFC
Nathan James [Thu, 2 Jan 2020 18:37:41 +0000 (13:37 -0500)]
Handle init statements in readability-else-after-return
Adds a new ASTMatcher condition called 'hasInitStatement()' that matches if,
switch and range-for statements with an initializer. Reworked clang-tidy
readability-else-after-return to handle variables in the if condition or init
statements in c++17 ifs. Also checks if removing the else would affect object
lifetimes in the else branch.
Fixes PR44364.
Lei Zhang [Thu, 2 Jan 2020 18:19:19 +0000 (13:19 -0500)]
[mlir][spirv] Allow specifying availability on enum attribute cases
Lots of SPIR-V ops take enum attributes and certain enum cases
need extra capabilities or extensions to be available. This commit
extends to allow specifying availability spec on enum cases.
Extra utility functions are generated for the corresponding enum
classes to return the availability requirement. The availability
interface implemention for a SPIR-V op now goes over all enum
attributes to collect the availability requirements.
Reviewed By: mravishankar
Differential Revision: https://reviews.llvm.org/D71947
Sterling Augustine [Mon, 30 Dec 2019 16:20:24 +0000 (08:20 -0800)]
Check for aarch64 when not using .init_arrays
Reviewers: vvereschaka
Subscribers: kristof.beyls, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D72005
River Riddle [Thu, 2 Jan 2020 17:58:16 +0000 (09:58 -0800)]
Fix some corner cases missed by D71955
* replaceAllUsesWith may be supplied with a null value.
* some compilers fail to implicitly convert single result operations to
OpaqueValue, so add an explicit OpOperand::set(Value) method.
James Henderson [Fri, 20 Dec 2019 14:30:31 +0000 (14:30 +0000)]
[DebugInfo][NFC] Use function_ref consistently in debug line parsing
This patch fixes an inconsistency where we were using std::function in
some places and function_ref in others to pass around the error handling
callback.
Reviewed by: MaskRay
Differential Revision: https://reviews.llvm.org/D71762
Alex Richardson [Thu, 2 Jan 2020 17:21:57 +0000 (17:21 +0000)]
[llvm-ranlib] Update expected error message check for Windows
On Windows hosts, the error message will be something like
`c:\src\llvm-project\out\gn\bin\llvm-ranlib.exe: error: Invalid option: '--D'`.
Due to the .exe after llvm-ranlib the existing CHECK lines do not match.
Fix this by ignoring the program name and starting the check line at "error:".
Fangrui Song [Mon, 30 Dec 2019 05:53:34 +0000 (21:53 -0800)]
[SelectionDAG] Simplify SelectionDAGBuilder::visitInlineAsm
Alina Sbirlea [Thu, 2 Jan 2020 12:17:27 +0000 (04:17 -0800)]
[NewPassManager] Rename AM to OuterAM in the OuterAnalysisManagerProxy [NFCI].
Provides clarity and consistency with the InnerAnalysisManagerProxy.
Nico Weber [Thu, 2 Jan 2020 17:22:04 +0000 (12:22 -0500)]
[gn build] (manually) merge
24ab9b537e61b3 yet more, to fix redef warnings
Sid Manning [Thu, 2 Jan 2020 16:27:05 +0000 (10:27 -0600)]
Add TPREL relocation support to Hexagon
Differential Revision: https://reviews.llvm.org/D71069
James Y Knight [Sat, 21 Dec 2019 22:18:38 +0000 (17:18 -0500)]
update_test_checks: match CHECK-EMPTY lines for replacement.
In
a8a89c77ea3c16b45763fca6940bbfd3bef7884f, the script started adding
CHECK-EMPTY lines, but the regex for which lines to replace was not
updated.
James Henderson [Fri, 20 Dec 2019 13:51:18 +0000 (13:51 +0000)]
[test][ELF] Verify debug line corruption messages are printed once
LLD warns if it encounters malformed debug data when parsing line
information for an undefined reference. We only want to warn once.
This patch adds additional checking to make sure the warnings are
printed only once, both for variables within the same program and
variables in later line programs.
Reviewed by: grimar, MaskRay
Differential Revision: https://reviews.llvm.org/D71759
Kevin P. Neal [Mon, 23 Dec 2019 19:05:06 +0000 (14:05 -0500)]
[SystemZ] Use FNeg in s390x clang builtins
The s390x builtins are still using FSub instead of FNeg. Correct that.
Nico Weber [Thu, 2 Jan 2020 17:11:59 +0000 (12:11 -0500)]
fix doc grammar-o to cycle bots
James Henderson [Fri, 20 Dec 2019 12:32:43 +0000 (12:32 +0000)]
[test][llvm-dwarfdump][NFC] Remove unused check
Reviewed by: JDevlieghere
Differential Revision: https://reviews.llvm.org/D71756
Sam McCall [Thu, 2 Jan 2020 16:59:10 +0000 (17:59 +0100)]
[clangd] Reorder FindTarget.h - group targetDecl() stuff and findExplicitReferences(). NFC
James Henderson [Fri, 20 Dec 2019 11:30:37 +0000 (11:30 +0000)]
[test][llvm-dwarfdump][NFC] Improve test readability
This patch adds and improves comments in the debug_line_invalid.test and
its associated input file so that it is easier to follow. It uses '##'
to make comments stand out from lit and FileCheck commands.
It also reflows some commands so that the lines are not so long and are
easier to read and fixes some copy/paste errors.
Reviewed by: JDevlieghere
Differential Revision: https://reviews.llvm.org/D71752
Nico Weber [Thu, 2 Jan 2020 16:44:07 +0000 (11:44 -0500)]
[gn build] (manually) merge
24ab9b537e61b3 more
serge-sans-paille [Thu, 2 Jan 2020 16:16:48 +0000 (17:16 +0100)]
Add intrinsics_gen *dependency* on Bye example
serge-sans-paille [Thu, 2 Jan 2020 16:05:59 +0000 (17:05 +0100)]
Add intrinsics_gen dependency on Bye example
This fixes build error introduced by commit
24ab9b537e61b3fe5e6a1019492ff6530d82a3ee
Nico Weber [Thu, 2 Jan 2020 16:07:31 +0000 (11:07 -0500)]
Revert "[gn build] (manually) merge
68a235d07f9e70"
This reverts commit
6ff6d32ebfec3150aa462cd31042b5719edb84da,
because
68a235d07f9e70 was reverted in
e406cca5f9.
Nico Weber [Thu, 2 Jan 2020 16:06:09 +0000 (11:06 -0500)]
[gn build] (manually) merge
24ab9b537e61b3
James Henderson [Thu, 2 Jan 2020 15:35:22 +0000 (15:35 +0000)]
Revert "build: reduce CMake handling for zlib"
This reverts commit
68a235d07f9e7049c7eb0c8091f37e385327ac28.
This commit broke the clang-x64-windows-msvc build bot and a follow-up
commit did not fix it. Reverting to fix the bot.
James Henderson [Thu, 2 Jan 2020 15:34:40 +0000 (15:34 +0000)]
Revert "build: make `LLVM_ENABLE_ZLIB` a tri-bool for users"
This reverts commit
e6c7ed6d2164a0659fd9f6ee44f1375d301e3cad.
This commit was an attempt to fix the build bots, but it still left the
clang-x64-windows-msvc bot in a broken state.
Ulrich Weigand [Thu, 2 Jan 2020 15:54:49 +0000 (16:54 +0100)]
[FPEnv] Default NoFPExcept SDNodeFlag to false
The NoFPExcept bit in SDNodeFlags currently defaults to true, unlike all
other such flags. This is a problem, because it implies that all code that
transforms SDNodes without copying flags can introduce a correctness bug,
not just a missed optimization.
This patch changes the default to false. This makes it necessary to move
setting the (No)FPExcept flag for constrained intrinsics from the
visitConstrainedIntrinsic routine to the generic visit routine at the
place where the other flags are set, or else the intersectFlagsWith
call would erase the NoFPExcept flag again.
In order to avoid making non-strict FP code worse, whenever
SelectionDAGISel::SelectCodeCommon matches on a set of orignal nodes
none of which can raise FP exceptions, it will preserve this property
on all results nodes generated, by setting the NoFPExcept flag on
those result nodes that would otherwise be considered as raising
an FP exception.
To check whether or not an SD node should be considered as raising
an FP exception, the following logic applies:
- For machine nodes, check the mayRaiseFPException property of
the underlying MI instruction
- For regular nodes, check isStrictFPOpcode
- For target nodes, check a newly introduced isTargetStrictFPOpcode
The latter is implemented by reserving a range of target opcodes,
similarly to how memory opcodes are identified. (Note that there a
bit of a quirk in identifying target nodes that are both memory nodes
and strict FP nodes. To simplify the logic, right now all target memory
nodes are automatically also considered strict FP nodes -- this could
be fixed by adding one more range.)
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D71841
serge_sans_paille [Sat, 8 Jun 2019 15:37:47 +0000 (17:37 +0200)]
Generalize the pass registration mechanism used by Polly to any third-party tool
There's quite a lot of references to Polly in the LLVM CMake codebase. However
the registration pattern used by Polly could be useful to other external
projects: thanks to that mechanism it would be possible to develop LLVM
extension without touching the LLVM code base.
This patch has two effects:
1. Remove all code specific to Polly in the llvm/clang codebase, replaicing it
with a generic mechanism
2. Provide a generic mechanism to register compiler extensions.
A compiler extension is similar to a pass plugin, with the notable difference
that the compiler extension can be configured to be built dynamically (like
plugins) or statically (like regular passes).
As a result, people willing to add extra passes to clang/opt can do it using a
separate code repo, but still have their pass be linked in clang/opt as built-in
passes.
Differential Revision: https://reviews.llvm.org/D61446
Sam McCall [Mon, 16 Dec 2019 18:08:51 +0000 (19:08 +0100)]
Revert "Revert "[clangd] Implement "textDocument/documentLink" protocol support""
This reverts commit
079ef783dd5530b5f87beefe624b9179547ded7e.
The revert describes a test failure without details, after offline
discussion this in in a private/unsupported build system and doesn't
seem to reflect a real upstream bug.
Nicolas Vasilache [Thu, 2 Jan 2020 15:06:46 +0000 (10:06 -0500)]
[mlir][Linalg] NFC - Make consistent use of op.emitOpError
Summary: This is part of an ongoing cleanup and uniformization work.
Reviewers: ftynse
Subscribers: mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D72084
Nicolas Vasilache [Thu, 2 Jan 2020 14:54:47 +0000 (09:54 -0500)]
[mlir][Linalg] NFC - Cleanup Linalg Declarative Transformations
Summary:
This is part of an ongoing cleanup and uniformization work.
This diff performs 3 types of cleanups:
1. Uniformize transformation names.
2. Replace all pattern operands that need not be captured by `$_`
3. Replace all usage of pattern captured op by the normalized `op` name (instead of positional parameters such as `$0`)
Reviewers: ftynse
Subscribers: mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D72081
Alexey Bataev [Thu, 2 Jan 2020 14:26:32 +0000 (09:26 -0500)]
[OpenMP] Fix formatting of OpenMP error message, by Wang Tianqing.
Summary: `getListOfPossibleValues()` formatted incorrectly when there is only one value, emitting something like `expected 'conditional' or in OpenMP clause 'lastprivate'`.
Reviewers: jdoerfert, ABataev
Reviewed By: jdoerfert
Subscribers: guansong, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D71884
Alex Richardson [Thu, 2 Jan 2020 14:53:33 +0000 (14:53 +0000)]
[llvm-ranlib] Relax D-flag.test to allow it to pass on Windows hosts
It appears that Windows hosts always report rwxrwxrwx even with the
chmod 644 invocation. As this test only cares about the timestamps
and not the permissions, use a regex wildcard instead.
Sanjay Patel [Thu, 2 Jan 2020 14:33:50 +0000 (09:33 -0500)]
[InstCombine] remove uses before deleting instructions (PR43723)
This is a less ambitious alternative to previous attempts to fix
this bug with:
rG56b2aee1875a
rGef02831f0a4e
rG56b2aee1875a
...because those all failed bot testing with use-after-free or
other problems.
The original crashing/assert problem is still showing up on
various fuzzers, so I've added a new minimal test based on
another one of those failures.
Instead of trying to manage and coordinate the logic in
isAllocSiteRemovable() with the deletion loops, just loosen
the existing code that handles casts and GEP by replacing
with undef to allow other opcodes. That means that no
instructions with uses should assert on deletion, and there
are hopefully no non-obvious sanitizer bugs induced.
Nicolas Vasilache [Thu, 2 Jan 2020 14:22:44 +0000 (09:22 -0500)]
[mlir][Linalg] NFC - Rename ViewTraits -> StructuredOpTraits
Summary: This is part of an ongoing cleanup and uniformization work.
Reviewers: ftynse
Subscribers: mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D72079
Nicolas Vasilache [Thu, 2 Jan 2020 14:14:23 +0000 (09:14 -0500)]
[mlir][Linalg] NFC - Rename LinalgGeneric -> GenericLinalg
Summary: This is part of an ongoing cleanup and uniformization work.
Subscribers: mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D72078
Jay Foad [Thu, 2 Jan 2020 14:14:27 +0000 (14:14 +0000)]
Remove unneeded extra variable realArgIdx. NFC.
Dmitri Gribenko [Thu, 2 Jan 2020 14:18:35 +0000 (15:18 +0100)]
Make the llvm-ranlib/help-message.test test pass in unusual configurations
The version string can be customized by CMake options, so the 'LLVM
version' substring is not guaranteed to appear (see
VersionPrinter::print in llvm/lib/Support/CommandLine.cpp).
David Green [Thu, 2 Jan 2020 11:43:37 +0000 (11:43 +0000)]
[ARM] Update ifcvt test target triples and opcodes. NFC
Some of the instructions in these tests were technically invalid
combinations (using ARM opcodes in Thumb mode, for example). Update the
targets and the instructions used to be more correct.
Raphael Isemann [Thu, 2 Jan 2020 13:46:39 +0000 (14:46 +0100)]
[lldb] Fix crash in AccessDeclContextSanity when copying FunctionTemplateDecl inside a record.
Summary:
We currently don't set access specifiers for function template declarations. This seems to be fine
as long as the function template is not declared inside any record in which case Clang asserts
with the following once we try to query it's access:
```
Assertion failed: (Access != AS_none && "Access specifier is AS_none inside a record decl"), function AccessDeclContextSanity,
```
This patch just marks these function template declarations as public to make Clang happy.
Reviewers: shafik, teemperor
Reviewed By: teemperor
Subscribers: JDevlieghere, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D71909