Alexey Bataev [Tue, 8 Oct 2019 15:56:43 +0000 (15:56 +0000)]
[OPENMP50]Prohibit multiple context selector sets in context selectors.
According to OpenMP 5.0, 2.3.2 Context Selectors, Restrictions, each
trait-set-selector-name can only be specified once. Added check to
implement this restriction.
llvm-svn: 374072
Konrad Kleine [Tue, 8 Oct 2019 15:56:02 +0000 (15:56 +0000)]
[lldb] Avoid resource leak
Summary:
Before the pointer variable `args_dict` was assigned the result of an
allocation with `new` and then `args_dict` is passed to
`GetValueForKeyAsDictionary` which immediatly and unconditionally
assigns `args_dict` to `nullptr`:
```
bool GetValueForKeyAsDictionary(llvm::StringRef key,
Dictionary *&result) const {
result = nullptr;
```
This caused a memory leak which was found in my coverity scan instance
under CID 224753: https://scan.coverity.com/projects/kwk-llvm-project.
Reviewers: jankratochvil, teemperor
Reviewed By: teemperor
Subscribers: teemperor, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68638
llvm-svn: 374071
David Carlier [Tue, 8 Oct 2019 15:45:35 +0000 (15:45 +0000)]
[builtins] Unbreak build on FreeBSD armv7 after D60351
headers include reordering.
Reviewers: phosek, echristo
Reviewed-By: phosek
Differential Revsion: https://reviews.llvm.org/D68045
llvm-svn: 374070
Konrad Kleine [Tue, 8 Oct 2019 15:43:29 +0000 (15:43 +0000)]
Simplify LZMA decoding by using ArrayRef::take_back
Summary: Follow-up for D66791#inline-616303
Reviewers: labath
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68647
llvm-svn: 374069
Nikola Prica [Tue, 8 Oct 2019 15:43:12 +0000 (15:43 +0000)]
[DebugInfo][If-Converter] Update call site info during the optimization
During the If-Converter optimization pay attention when copying or
deleting call instructions in order to keep call site information in
valid state.
Reviewers: aprantl, vsk, efriedma
Reviewed By: vsk, efriedma
Differential Revision: https://reviews.llvm.org/D66955
llvm-svn: 374068
Frederic Riss [Tue, 8 Oct 2019 15:35:59 +0000 (15:35 +0000)]
Add pretty printing of Clang "bitfield" enums
Summary:
Using enumerators as flags is standard practice. This patch adds
support to LLDB to display such enum values symbolically, eg:
(E) e1 = A | B
If enumerators don't cover the whole value, the remaining bits are
displayed as hexadecimal:
(E) e4 = A | 0x10
Detecting whether an enum is used as a bitfield or not is
complicated. This patch implements a heuristic that assumes that such
enumerators will either have only 1 bit set or will be a combination
of previous values.
This patch doesn't change the way we currently display enums which the
above heuristic would not consider as bitfields.
Reviewers: jingham, labath
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D67520
llvm-svn: 374067
Frederic Riss [Tue, 8 Oct 2019 15:35:58 +0000 (15:35 +0000)]
Extract and simplify DumpEnumValue
llvm-svn: 374066
GN Sync Bot [Tue, 8 Oct 2019 15:34:52 +0000 (15:34 +0000)]
gn build: Merge r374062
llvm-svn: 374065
GN Sync Bot [Tue, 8 Oct 2019 15:28:36 +0000 (15:28 +0000)]
gn build: Merge r374061
llvm-svn: 374064
Hideto Ueno [Tue, 8 Oct 2019 15:25:56 +0000 (15:25 +0000)]
[Attributor][MustExec] Deduce dereferenceable and nonnull attribute using MustBeExecutedContextExplorer
Summary:
In D65186 and related patches, MustBeExecutedContextExplorer is introduced. This enables us to traverse instructions guaranteed to execute from function entry. If we can know the argument is used as `dereferenceable` or `nonnull` in these instructions, we can mark `dereferenceable` or `nonnull` in the argument definition:
1. Memory instruction (similar to D64258)
Trace memory instruction pointer operand. Currently, only inbounds GEPs are traced.
```
define i64* @f(i64* %a) {
entry:
%add.ptr = getelementptr inbounds i64, i64* %a, i64 1
; (because of inbounds GEP we can know that %a is at least dereferenceable(16))
store i64 1, i64* %add.ptr, align 8
ret i64* %add.ptr ; dereferenceable 8 (because above instruction stores into it)
}
```
2. Propagation from callsite (similar to D27855)
If `deref` or `nonnull` are known in call site parameter attributes we can also say that argument also that attribute.
```
declare void @use3(i8* %x, i8* %y, i8* %z);
declare void @use3nonnull(i8* nonnull %x, i8* nonnull %y, i8* nonnull %z);
define void @parent1(i8* %a, i8* %b, i8* %c) {
call void @use3nonnull(i8* %b, i8* %c, i8* %a)
; Above instruction is always executed so we can say that@parent1(i8* nonnnull %a, i8* nonnull %b, i8* nonnull %c)
call void @use3(i8* %c, i8* %a, i8* %b)
ret void
}
```
Reviewers: jdoerfert, sstefan1, spatel, reames
Reviewed By: jdoerfert
Subscribers: xbolva00, hiraditya, jfb, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65402
llvm-svn: 374063
Cyndy Ishida [Tue, 8 Oct 2019 15:24:37 +0000 (15:24 +0000)]
Revert [TextAPI] Introduce TBDv4
This reverts r374058 (git commit
5d566c5a46aeaa1fa0e5c0b823c9d5f84036dc9a)
llvm-svn: 374062
Puyan Lotfi [Tue, 8 Oct 2019 15:23:14 +0000 (15:23 +0000)]
[clang][ifs] Clang Interface Stubs ToolChain plumbing.
Second Landing Attempt:
This patch enables end to end support for generating ELF interface stubs
directly from clang. Now the following:
clang -emit-interface-stubs -o libfoo.so a.cpp b.cpp c.cpp
will product an ELF binary with visible symbols populated. Visibility attributes
and -fvisibility can be used to control what gets populated.
* Adding ToolChain support for clang Driver IFS Merge Phase
* Implementing a default InterfaceStubs Merge clang Tool, used by ToolChain
* Adds support for the clang Driver to involve llvm-ifs on ifs files.
* Adds -emit-merged-ifs flag, to tell llvm-ifs to emit a merged ifs text file
instead of the final object format (normally ELF)
Differential Revision: https://reviews.llvm.org/D63978
llvm-svn: 374061
Hideto Ueno [Tue, 8 Oct 2019 15:20:19 +0000 (15:20 +0000)]
[Attributor] Add helper class to compose two structured deduction.
Summary: This patch introduces a generic way to compose two structured deductions. This will be used for composing generic deduction with `MustBeExecutedExplorer` and other existing generic deduction.
Reviewers: jdoerfert, sstefan1
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66645
llvm-svn: 374060
GN Sync Bot [Tue, 8 Oct 2019 15:12:38 +0000 (15:12 +0000)]
gn build: Merge r374058
llvm-svn: 374059
Cyndy Ishida [Tue, 8 Oct 2019 15:07:36 +0000 (15:07 +0000)]
[TextAPI] Introduce TBDv4
Summary:
This format introduces new features and platforms
The motivation for this format is to support more than 1 platform since previous versions only supported additional architectures and 1 platform,
for example ios + ios-simulator and macCatalyst.
Reviewers: ributzka, steven_wu
Reviewed By: ributzka
Subscribers: mgorny, hiraditya, mgrang, dexonsmith, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67529
llvm-svn: 374058
Alexey Bataev [Tue, 8 Oct 2019 14:56:20 +0000 (14:56 +0000)]
[OPENMP50]Allow functions in declare variant directive to have different
C linkage.
After some discussion with OpenMP developers, it was decided that the
functions with the different C linkage can be used in declare variant
directive.
llvm-svn: 374057
Louis Dionne [Tue, 8 Oct 2019 14:53:11 +0000 (14:53 +0000)]
[libc++] TAKE 2: Make system libraries PRIVATE dependencies of libc++
We tried doing that previously (in r373487) and failed (reverted in
r373506) because the benchmarks needed to link against system libraries
and relied on libc++'s dependencies being propagated. Now that this has
been fixed (in r374053), this commit marks the system libraries as
PRIVATE dependencies of libc++.
llvm-svn: 374056
Mirko Brkusanin [Tue, 8 Oct 2019 14:32:03 +0000 (14:32 +0000)]
[Mips] Emit proper ABI for _mcount calls
When -pg option is present than a call to _mcount is inserted into every
function. However since the proper ABI was not followed then the generated
gmon.out did not give proper results. By inserting needed instructions
before every _mcount we can fix this.
Differential Revision: https://reviews.llvm.org/D68390
llvm-svn: 374055
Clement Courbet [Tue, 8 Oct 2019 14:30:24 +0000 (14:30 +0000)]
[llvm-exegesis] Add options to SnippetGenerator.
Summary:
This adds a `-max-configs-per-opcode` option to limit the number of
configs per opcode.
Reviewers: gchatelet
Subscribers: tschuett, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68642
llvm-svn: 374054
Louis Dionne [Tue, 8 Oct 2019 14:28:56 +0000 (14:28 +0000)]
[libc++] Add missing link-time dependencies to the benchmarks
Since the benchmarks build with -nostdlib, they need to manually link
against some system libraries that are used by the benchmarks and the
GoogleBenchmark library itself.
Previously, we'd rely on the fact that these libraries were linked
through the PUBLIC dependencies of cxx_shared/cxx_static. However,
if we were to make these dependencies PRIVATE (as they should be
because they are implementation details of libc++), the benchmarks
would fail to link. This commit remediates that.
llvm-svn: 374053
Sid Manning [Tue, 8 Oct 2019 14:23:49 +0000 (14:23 +0000)]
[lld][Hexagon] Support PLT relocation R_HEX_B15_PCREL_X/R_HEX_B9_PCREL_X
These are sometimes generated by tail call optimizations.
Differential Revision: https://reviews.llvm.org/D66542
llvm-svn: 374052
Pavel Labath [Tue, 8 Oct 2019 14:15:32 +0000 (14:15 +0000)]
Object/minidump: Add support for the MemoryInfoList stream
Summary:
This patch adds the definitions of the constants and structures
necessary to interpret the MemoryInfoList minidump stream, as well as
the object::MinidumpFile interface to access the stream.
While the code is fairly simple, there is one important deviation from
the other minidump streams, which is worth calling out explicitly.
Unlike other "List" streams, the size of the records inside
MemoryInfoList stream is not known statically. Instead it is described
in the stream header. This makes it impossible to return
ArrayRef<MemoryInfo> from the accessor method, as it is done with other
streams. Instead, I create an iterator class, which can be parameterized
by the runtime size of the structure, and return
iterator_range<iterator> instead.
Reviewers: amccarth, jhenderson, clayborg
Subscribers: JosephTremoulet, zturner, markmentovai, lldb-commits, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68210
llvm-svn: 374051
Louis Dionne [Tue, 8 Oct 2019 14:10:55 +0000 (14:10 +0000)]
[libc++] Use PRIVATE to link benchmark dependencies
It's better style to use PRIVATE when linking libraries to executables,
and it doesn't make a difference since executables don't need to propagate
their link-time dependencies anyway.
llvm-svn: 374050
Kevin P. Neal [Tue, 8 Oct 2019 14:10:26 +0000 (14:10 +0000)]
Nope, I'm wrong. It looks like someone else removed these on purpose and
it just happened to break the bot right when I did my push. So I'm undoing
this mornings incorrect push. I've also kicked off an email to hopefully
get the bot fixed the correct way.
llvm-svn: 374049
Ilya Biryukov [Tue, 8 Oct 2019 14:03:45 +0000 (14:03 +0000)]
[clangd] Disable expand auto on decltype(auto)
Summary: Applying it produces incorrect code at the moment.
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: kuhnel, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D68630
llvm-svn: 374048
Kadir Cetinkaya [Tue, 8 Oct 2019 13:54:03 +0000 (13:54 +0000)]
[clangd] Bump timeouts in speculative completion tests
llvm-svn: 374047
Pavel Labath [Tue, 8 Oct 2019 13:51:05 +0000 (13:51 +0000)]
Tweak minidebuginfo-set-and-hit-breakpoint.test
On my system, llvm-objcopy was refusing to remove the .dynsym section
because it was still referenced from .rela.plt. Remove that section too,
and clarify that this is needed only because llvm-objcopy
--only-keep-debug does not work (does not set the sections to
SHT_NOBITS). Also, ensure that the test is not creating temporary files
in the source tree.
llvm-svn: 374046
Kevin P. Neal [Tue, 8 Oct 2019 13:38:42 +0000 (13:38 +0000)]
Restore documentation that 'svn update' unexpectedly yanked out from under me.
llvm-svn: 374045
Sebastian Pop [Tue, 8 Oct 2019 13:23:57 +0000 (13:23 +0000)]
fix fmls fp16
Tim Northover remarked that the added patterns for fmls fp16
produce wrong code in case the fsub instruction has a
multiplication as its first operand, i.e., all the patterns FMLSv*_OP1:
> define <8 x half> @test_FMLSv8f16_OP1(<8 x half> %a, <8 x half> %b, <8 x half> %c) {
> ; CHECK-LABEL: test_FMLSv8f16_OP1:
> ; CHECK: fmls {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
> entry:
>
> %mul = fmul fast <8 x half> %c, %b
> %sub = fsub fast <8 x half> %mul, %a
> ret <8 x half> %sub
> }
>
> This doesn't look right to me. The exact instruction produced is "fmls
> v0.8h, v2.8h, v1.8h", which I think calculates "v0 - v2*v1", but the
> IR is calculating "v2*v1-v0". The equivalent <4 x float> code also
> doesn't emit an fmls.
This patch generates an fmla and negates the value of the operand2 of the fsub.
Inspecting the pattern match, I found that there was another mistake in the
opcode to be selected: matching FMULv4*16 should generate FMLSv4*16
and not FMLSv2*32.
Tested on aarch64-linux with make check-all.
Differential Revision: https://reviews.llvm.org/D67990
llvm-svn: 374044
Amaury Sechet [Tue, 8 Oct 2019 13:08:51 +0000 (13:08 +0000)]
Add test for rotating truncated vectors. NFC
llvm-svn: 374043
Graham Hunter [Tue, 8 Oct 2019 12:53:54 +0000 (12:53 +0000)]
[SVE][IR] Scalable Vector size queries and IR instruction support
* Adds a TypeSize struct to represent the known minimum size of a type
along with a flag to indicate that the runtime size is a integer multiple
of that size
* Converts existing size query functions from Type.h and DataLayout.h to
return a TypeSize result
* Adds convenience methods (including a transparent conversion operator
to uint64_t) so that most existing code 'just works' as if the return
values were still scalars.
* Uses the new size queries along with ElementCount to ensure that all
supported instructions used with scalable vectors can be constructed
in IR.
Reviewers: hfinkel, lattner, rkruppe, greened, rovka, rengolin, sdesmalen
Reviewed By: rovka, sdesmalen
Differential Revision: https://reviews.llvm.org/D53137
llvm-svn: 374042
Nicolai Haehnle [Tue, 8 Oct 2019 12:46:32 +0000 (12:46 +0000)]
AMDGPU: Propagate undef flag during pre-RA exec mask optimizations
Summary: Issue: https://github.com/GPUOpen-Drivers/llpc/issues/204
Reviewers: arsenm, rampitec
Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68184
llvm-svn: 374041
Nicolai Haehnle [Tue, 8 Oct 2019 12:46:20 +0000 (12:46 +0000)]
MachineSSAUpdater: insert IMPLICIT_DEF at top of basic block
Summary:
When getValueInMiddleOfBlock happens to be called for a basic block
that has no incoming value at all, an IMPLICIT_DEF is inserted in that
block via GetValueAtEndOfBlockInternal. This IMPLICIT_DEF must be at
the top of its basic block or it will likely not reach the use that
the caller intends to insert.
Issue: https://github.com/GPUOpen-Drivers/llpc/issues/204
Reviewers: arsenm, rampitec
Subscribers: jvesely, wdng, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68183
llvm-svn: 374040
Sanjay Patel [Tue, 8 Oct 2019 12:43:46 +0000 (12:43 +0000)]
[SLP] add test with prefer-vector-width function attribute; NFC
llvm-svn: 374039
Andrey Churbanov [Tue, 8 Oct 2019 12:39:04 +0000 (12:39 +0000)]
Don't assume Type from `readelf -d` has parentheses
Patch by jbeich (Jan Beich)
Differential Revision: https://reviews.llvm.org/D68053
llvm-svn: 374038
Andrey Churbanov [Tue, 8 Oct 2019 12:23:25 +0000 (12:23 +0000)]
Don't link libm with -Wl,--as-needed on FreeBSD
Patch by jbeich (Jan Beich)
Differential Revision: https://reviews.llvm.org/D68051
llvm-svn: 374037
Florian Hahn [Tue, 8 Oct 2019 11:54:42 +0000 (11:54 +0000)]
[LoopRotate] Unconditionally get DomTree.
LoopRotate is a loop pass and the DomTree should always be available.
Similar to
a70c5261436322a53187d67b8bdc0445d0463a9a
llvm-svn: 374036
James Clarke [Tue, 8 Oct 2019 11:34:02 +0000 (11:34 +0000)]
[Diagnostics] Silence -Wsizeof-array-div for character buffers
Summary:
Character buffers are sometimes used to represent a pool of memory that
contains non-character objects, due to them being synonymous with a stream of
bytes on almost all modern architectures. Often, when interacting with hardware
devices, byte buffers are therefore used as an intermediary and so we can end
Character buffers are sometimes used to represent a pool of memory that
contains non-character objects, due to them being synonymous with a stream of
bytes on almost all modern architectures. Often, when interacting with hardware
devices, byte buffers are therefore used as an intermediary and so we can end
up generating lots of false-positives.
Moreover, due to the ability of character pointers to alias non-character
pointers, the strict aliasing violations that would generally be implied by the
calculations caught by the warning (if the calculation itself is in fact
correct) do not apply here, and so although the length calculation may be
wrong, that is the only possible issue.
Reviewers: rsmith, xbolva00, thakis
Reviewed By: xbolva00, thakis
Subscribers: thakis, lebedev.ri, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D68526
llvm-svn: 374035
Andrea Di Biagio [Tue, 8 Oct 2019 10:46:01 +0000 (10:46 +0000)]
[MCA][LSUnit] Track loads and stores until retirement.
Before this patch, loads and stores were only tracked by their corresponding
queues in the LSUnit from dispatch until execute stage. In practice we should be
more conservative and assume that memory opcodes leave their queues at
retirement stage.
Basically, loads should leave the load queue only when they have completed and
delivered their data. We conservatively assume that a load is completed when it
is retired. Stores should be tracked by the store queue from dispatch until
retirement. In practice, stores can only leave the store queue if their data can
be written to the data cache.
This is mostly a mechanical change. With this patch, the retire stage notifies
the LSUnit when a memory instruction is retired. That would triggers the release
of LDQ/STQ entries. The only visible change is in memory tests for the bdver2
model. That is because bdver2 is the only model that defines the load/store
queue size.
This patch partially addresses PR39830.
Differential Revision: https://reviews.llvm.org/D68266
llvm-svn: 374034
Nikola Prica [Tue, 8 Oct 2019 09:43:05 +0000 (09:43 +0000)]
[ISEL][ARM][AARCH64] Tracking simple parameter forwarding registers
Support for tracking registers that forward function parameters into the
following function frame. For now we only support cases when parameter
is forwarded through single register.
Reviewers: aprantl, vsk, t.p.northover
Reviewed By: vsk
Differential Revision: https://reviews.llvm.org/D66953
llvm-svn: 374033
Sylvestre Ledru [Tue, 8 Oct 2019 09:17:46 +0000 (09:17 +0000)]
Remove an useless allocation (from by clang-analyzer/scan-build)
https://llvm.org/reports/scan-build/report-TargetInfo.cpp-detectFPCCEligibleStruct-9-1.html#EndPath
llvm-svn: 374032
Clement Courbet [Tue, 8 Oct 2019 09:06:48 +0000 (09:06 +0000)]
[llvm-exegesis] Finish plumbing the `Config` field.
Summary:
Right now there are no snippet generators that emit the `Config` Field,
but I plan to add it to investigate LEA operands for PR32326.
What was broken was:
- `Config` Was not propagated up until the BenchmarkResult::Key.
- Clustering should really consider different configs as measuring
different things, so we should stabilize on (Opcode, Config) instead of
just Opcode.
Reviewers: gchatelet
Subscribers: tschuett, llvm-commits, lebedev.ri
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68629
llvm-svn: 374031
Pavel Labath [Tue, 8 Oct 2019 09:05:31 +0000 (09:05 +0000)]
Revert "[lldb-server/android] Show more processes and package name when necessary"
This reverts r373758 because it causes several to test to be flaky (=
failing ~90% of the time) on linux.
llvm-svn: 374030
Pavel Labath [Tue, 8 Oct 2019 09:05:25 +0000 (09:05 +0000)]
Fix a -Wpedantic warning
namespace-closing '}' don't need ';'.
llvm-svn: 374029
George Rimar [Tue, 8 Oct 2019 08:59:12 +0000 (08:59 +0000)]
[llvm-readobj/llvm-readelf] - Add checks for GNU-style to "all.test" test case.
We do not check the GNU-style output when -all is given.
This patch does that.
Differential revision: https://reviews.llvm.org/D68462
llvm-svn: 374028
Zi Xuan Wu [Tue, 8 Oct 2019 08:49:15 +0000 (08:49 +0000)]
[NFC] Add REQUIRES for r374017 in testcase
llvm-svn: 374027
Florian Hahn [Tue, 8 Oct 2019 08:46:38 +0000 (08:46 +0000)]
[LoopRotate] Unconditionally get ScalarEvolution.
Summary: LoopRotate is a loop pass and SE should always be available.
Reviewers: anemet, asbirlea
Reviewed By: asbirlea
Differential Revision: https://reviews.llvm.org/D68573
llvm-svn: 374026
Kristof Beyls [Tue, 8 Oct 2019 08:25:42 +0000 (08:25 +0000)]
[ARM] Generate vcmp instead of vcmpe
Based on the discussion in
http://lists.llvm.org/pipermail/llvm-dev/2019-October/135574.html, the
conclusion was reached that the ARM backend should produce vcmp instead
of vcmpe instructions by default, i.e. not be producing an Invalid
Operation exception when either arguments in a floating point compare
are quiet NaNs.
In the future, after constrained floating point intrinsics for floating
point compare have been introduced, vcmpe instructions probably should
be produced for those intrinsics - depending on the exact semantics
they'll be defined to have.
This patch logically consists of the following parts:
- Revert http://llvm.org/viewvc/llvm-project?rev=294945&view=rev and
http://llvm.org/viewvc/llvm-project?rev=294968&view=rev, which
implemented fine-tuning for when to produce vcmpe (i.e. not do it for
equality comparisons). The complexity introduced by those patches
isn't needed anymore if we just always produce vcmp instead. Maybe
these patches need to be reintroduced again once support is needed to
map potential LLVM-IR constrained floating point compare intrinsics to
the ARM instruction set.
- Simply select vcmp, instead of vcmpe, see simple changes in
lib/Target/ARM/ARMInstrVFP.td
- Adapt lots of tests that tested for vcmpe (instead of vcmp). For all
of these test, the intent of what is tested for isn't related to
whether the vcmp should produce an Invalid Operation exception or not.
Fixes PR43374.
Differential Revision: https://reviews.llvm.org/D68463
llvm-svn: 374025
Kai Nacke [Tue, 8 Oct 2019 08:21:20 +0000 (08:21 +0000)]
[Tools] Mark output of tools as text if it is text
Several LLVM tools write text files/streams without using OF_Text.
This can cause problems on platforms which distinguish between
text and binary output. This PR adds the OF_Text flag for the
following tools:
- llvm-dis
- llvm-dwarfdump
- llvm-mca
- llvm-mc (assembler files only)
- opt (assembler files only)
- RemarkStreamer (used e.g. by opt)
Reviewers: rnk, vivekvpandya, Bigcheese, andreadb
Differential Revision: https://reviews.llvm.org/D67696
llvm-svn: 374024
Rui Ueyama [Tue, 8 Oct 2019 08:03:44 +0000 (08:03 +0000)]
Use /dev/null for tests that we do not need outputs
llvm-svn: 374023
Rui Ueyama [Tue, 8 Oct 2019 08:03:40 +0000 (08:03 +0000)]
Report error if -export-dynamic is used with -r
The combination of the two flags doesn't make sense. And other linkers
seem to just ignore --export-dynamic if --relocatable is given, but
we probably should report it as an error to let users know that is
an invalid combination.
Fixes https://bugs.llvm.org/show_bug.cgi?id=43552
Differential Revision: https://reviews.llvm.org/D68441
llvm-svn: 374022
Kadir Cetinkaya [Tue, 8 Oct 2019 07:39:50 +0000 (07:39 +0000)]
[LoopVectorize] Fix non-debug builds after rL374017
llvm-svn: 374021
Clement Courbet [Tue, 8 Oct 2019 07:08:48 +0000 (07:08 +0000)]
[llvm-exegesis] Add stabilization test with config
In preparation for D68629.
llvm-svn: 374020
Bill Wendling [Tue, 8 Oct 2019 04:39:52 +0000 (04:39 +0000)]
[IA] Recognize hexadecimal escape sequences
Summary:
Implement support for hexadecimal escape sequences to match how GNU 'as'
handles them. I.e., read all hexadecimal characters and truncate to the
lower 16 bits.
Reviewers: nickdesaulniers, jcai19
Subscribers: llvm-commits, hiraditya
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68598
llvm-svn: 374018
Zi Xuan Wu [Tue, 8 Oct 2019 03:28:33 +0000 (03:28 +0000)]
[LoopVectorize][PowerPC] Estimate int and float register pressure separately in loop-vectorize
In loop-vectorize, interleave count and vector factor depend on target register number. Currently, it does not
estimate different register pressure for different register class separately(especially for scalar type,
float type should not be on the same position with int type), so it's not accurate. Specifically,
it causes too many times interleaving/unrolling, result in too many register spills in loop body and hurting performance.
So we need classify the register classes in IR level, and importantly these are abstract register classes,
and are not the target register class of backend provided in td file. It's used to establish the mapping between
the types of IR values and the number of simultaneous live ranges to which we'd like to limit for some set of those types.
For example, POWER target, register num is special when VSX is enabled. When VSX is enabled, the number of int scalar register is 32(GPR),
float is 64(VSR), but for int and float vector register both are 64(VSR). So there should be 2 kinds of register class when vsx is enabled,
and 3 kinds of register class when VSX is NOT enabled.
It runs on POWER target, it makes big(+~30%) performance improvement in one specific bmk(503.bwaves_r) of spec2017 and no other obvious degressions.
Differential revision: https://reviews.llvm.org/D67148
llvm-svn: 374017
Chen Zheng [Tue, 8 Oct 2019 03:00:31 +0000 (03:00 +0000)]
[ConstantRange] [NFC] replace addWithNoSignedWrap with addWithNoWrap.
llvm-svn: 374016
Heejin Ahn [Tue, 8 Oct 2019 02:50:27 +0000 (02:50 +0000)]
[WebAssembly] Add REQUIRES: asserts to cfg-stackify-eh.ll
This was missing in D68552.
llvm-svn: 374015
James Clarke [Tue, 8 Oct 2019 02:28:57 +0000 (02:28 +0000)]
[ItaniumMangle] Fix mangling of GNU __null in an expression to match GCC
Reviewers: rsmith
Reviewed By: rsmith
Subscribers: erik.pilkington, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D68368
llvm-svn: 374013
Jan Korous [Tue, 8 Oct 2019 02:26:17 +0000 (02:26 +0000)]
[NFC] Fix ubsan-blacklist test
Restored original test and marked tests for VFS as unsupported on Windows.
llvm-svn: 374011
Vitaly Buka [Tue, 8 Oct 2019 02:00:53 +0000 (02:00 +0000)]
[sanitizer] Fix signal_trap_handler.cpp on android
llvm-svn: 374010
Andrew Trick [Tue, 8 Oct 2019 01:31:02 +0000 (01:31 +0000)]
[LitConfig] Silenced notes/warnings on quiet.
Lit has a "quiet" option, -q, which is documented to "suppress no
error output". Previously, LitConfig displayed notes and warnings when
the quiet option was specified. The result was that it was not
possible to get only pertinent file/line information to be used by an
editor to jump to the location where checks were failing without
passing a number of unhelpful locations first. Here, the
implementations of LitConfig.note and LitConfig.warning are modified
to account for the quiet flag and avoid displaying if the flag has
indeed been set.
Patch by Nate Chandler
Reviewed by yln
Differential Revision: https://reviews.llvm.org/D68044
llvm-svn: 374009
Jonas Devlieghere [Tue, 8 Oct 2019 01:16:59 +0000 (01:16 +0000)]
Revert "ProcessInstanceInfoMatch: Don't match processes with no name if a name match was requested"
This breaks TestProcessAttach and TestHelloWorld on Darwin.
llvm-svn: 374008
Lawrence D'Anna [Tue, 8 Oct 2019 01:16:29 +0000 (01:16 +0000)]
test fix: TestLoadUsingPaths should use realpath
Summary:
TestLoadUsingPaths will fail if the build directory has
symlinks in its path, because the real paths reported by
the debugger won't match the symlink-laden paths it's expecting.
This can be solved just by using os.path.realpath on the base
path for the test.
Reviewers: JDevlieghere, jasonmolenda, labath
Reviewed By: JDevlieghere
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68618
llvm-svn: 374007
Jan Korous [Tue, 8 Oct 2019 01:13:17 +0000 (01:13 +0000)]
Reland 'Add VFS support for sanitizers' blacklist'
The original patch broke the test for Windows.
Trying to fix as per Reid's suggestions outlined here:
https://reviews.llvm.org/rC371663
Differential Revision: https://reviews.llvm.org/D67742
llvm-svn: 374006
Antonio Afonso [Tue, 8 Oct 2019 01:10:03 +0000 (01:10 +0000)]
Fixing missing lldb-scripts rename from D68370
llvm-svn: 374005
Jonas Devlieghere [Tue, 8 Oct 2019 00:44:54 +0000 (00:44 +0000)]
[CMake] Add two more uses of add_lldb_test_dependency
llvm-svn: 374000
Jan Korous [Tue, 8 Oct 2019 00:36:19 +0000 (00:36 +0000)]
Revert "Add VFS support for sanitizers' blacklist"
Fix tests on Windows for now.
This reverts commit
96ac97a4213287003f08636d0c372b3f71e9cfca.
llvm-svn: 373999
Haibo Huang [Tue, 8 Oct 2019 00:33:26 +0000 (00:33 +0000)]
[lldb] Reverts part of 61f471a
Seems I wrongly merged an old patch.
Reverts the change related to python dir for windows.
FileSpec should always contain normalized path. I.e. using '/' even in
windows.
llvm-svn: 373998
Lawrence D'Anna [Tue, 8 Oct 2019 00:26:53 +0000 (00:26 +0000)]
DWIMy filterspecs for dotest.py
Summary:
dotest.py currently requires a filterspec to be of the
form `TestCase.test_method`. This patch makes it more
flexible, so you can pass `TestModule.TestCase.test_method`
or `TestModule.TestCase` or `TestCase.test_method` or just
`test_method`.
This makes it more convenient to just copy a test name
out of the terminal after running a bunch of tests and use
it as a filterspec.
Reviewers: JDevlieghere, jasonmolenda, labath
Reviewed By: JDevlieghere
Subscribers: jingham, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68545
llvm-svn: 373997
Jonas Devlieghere [Tue, 8 Oct 2019 00:21:34 +0000 (00:21 +0000)]
[CMake] Track test dependencies with add_lldb_test_dependency
I often use `ninja lldb-test-deps` to build all the test dependencies
before running a subset of the tests with `lit --filter`. This
functionality seems to break relatively often because test dependencies
are tracked in an ad-hoc way acrooss cmake files. This patch adds a
helper function `add_lldb_test_dependency` to unify test dependency
tracking by adding dependencies to lldb-test-deps.
Differential revision: https://reviews.llvm.org/D68612
llvm-svn: 373996
Jonas Devlieghere [Tue, 8 Oct 2019 00:14:02 +0000 (00:14 +0000)]
[CMake] Remove stale comment
llvm-svn: 373995
Jonas Devlieghere [Tue, 8 Oct 2019 00:13:59 +0000 (00:13 +0000)]
[MachO] Fix symbol merging during symtab parsing.
The symtab parser in ObjectFileMachO has logic to coalesce debug (STAB)
and non-debug symbols, based on the address and the symbol name for
static (STSYM) and global symbols (GSYM) respectively. It makes the
assumption that the debug variant is always encountered first. Rather
than creating a second entry in the symbol table for the non-debug
symbol, the latter gets merged into the existing debug symbol.
This breaks when the linker emits the non-debug symbol first. We'd end
up with two entries in the symbol table, each containing part of the
information LLDB relies on. Indeed, commenting out the merging logic
breaks the test suite spectacularly.
This patch solves that problem by always parsing the debug symbols
first. This guarantees that the assumption for merging holds.
I'm not particularly happy with adding a lambda, but after numerous
attempts this is the best solution I could come up with. The symtab
parsing logic is pretty complex in that it touches a lot of things. I've
experienced first hand that it's very easy to break things. I believe
this approach strikes a balance between fixing the issue while limiting
the risk of regressions.
Differential revision: https://reviews.llvm.org/D68536
llvm-svn: 373994
Evgeniy Stepanov [Tue, 8 Oct 2019 00:00:30 +0000 (00:00 +0000)]
[msan] Add interceptors: crypt, crypt_r.
Reviewers: vitalybuka
Subscribers: srhines, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D68431
llvm-svn: 373993
Vitaly Buka [Mon, 7 Oct 2019 23:57:11 +0000 (23:57 +0000)]
[clang] Accept -ftrivial-auto-var-init in clang-cl
Reviewers: eugenis, rnk
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D68608
llvm-svn: 373992
Haibo Huang [Mon, 7 Oct 2019 23:49:01 +0000 (23:49 +0000)]
[lldb] Unifying lldb python path
Based on mgorny@'s D67890
There are 3 places where python site-package path is calculated
independently:
1. finishSwigPythonLLDB.py where files are written to site-packages.
2. lldb/scripts/CMakeLists.txt where site-packages are installed.
3. ScriptInterpreterPython.cpp where site-packages are added to
PYTHONPATH.
This change creates the path once and use it everywhere. So that they
will not go out of sync.
Also it provides a chance for cross compiling users to specify the right
path for site-packages.
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68442
llvm-svn: 373991
Alex Langford [Mon, 7 Oct 2019 23:43:33 +0000 (23:43 +0000)]
[Symbol] Remove unused method ClangASTContext::GetObjCClassName
llvm-svn: 373990
Matt Arsenault [Mon, 7 Oct 2019 23:33:08 +0000 (23:33 +0000)]
AMDGPU/GlobalISel: Clamp G_SITOFP/G_UITOFP sources
llvm-svn: 373989
Johannes Doerfert [Mon, 7 Oct 2019 23:30:04 +0000 (23:30 +0000)]
[Attributor][NFC] Add debug output
llvm-svn: 373988
Johannes Doerfert [Mon, 7 Oct 2019 23:28:54 +0000 (23:28 +0000)]
[Attributor][FIX] Remove initialize calls and add undefs
The initialization logic has become part of the Attributor but the
patches that introduced these calls here were in development when the
transition happened.
We also now clean up (undefine) the macros used to create attributes.
llvm-svn: 373987
Johannes Doerfert [Mon, 7 Oct 2019 23:21:52 +0000 (23:21 +0000)]
[Attributor] Use local linkage instead of internal
Local linkage is internal or private, and private is a specialization of
internal, so either is fine for all our "local linkage" queries.
llvm-svn: 373986
Johannes Doerfert [Mon, 7 Oct 2019 23:14:58 +0000 (23:14 +0000)]
[Attributor] Use abstract call sites for call site callback
Summary:
When we iterate over uses of functions and expect them to be call sites,
we now use abstract call sites to allow callback calls.
Reviewers: sstefan1, uenoku
Subscribers: hiraditya, bollu, hfinkel, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67871
llvm-svn: 373985
Vitaly Buka [Mon, 7 Oct 2019 23:11:07 +0000 (23:11 +0000)]
[tsan, go] fix Go windows build
Summary:
Don't use weak exports when building tsan into a shared library for Go. gcc can't handle the pragmas used to make the weak references.
Include files that have been added since the last update to build.bat. (We should really find a better way to list all the files needed.)
Add windows version defines (WINVER and _WIN32_WINNT) to get AcquireSRWLockExclusive and ReleaseSRWLockExclusive defined.
Define GetProcessMemoryInfo to use the kernel32 version. This is kind of a hack, the windows header files should do this translation for us. I think we're not in the right family partition (we're using Desktop, but that translation only happens for App and System partitions???), but hacking the family partition seems equally gross and I have no idea what the consequences of that might be.
Patch by Keith Randall.
Reviewers: dvyukov, vitalybuka
Reviewed By: vitalybuka
Subscribers: jfb, delcypher, #sanitizers, llvm-commits
Tags: #llvm, #sanitizers
Differential Revision: https://reviews.llvm.org/D68599
llvm-svn: 373984
Vitaly Buka [Mon, 7 Oct 2019 23:04:16 +0000 (23:04 +0000)]
[tsan, go] break commands into multiple lines
Summary: Patch by Keith Randall.
Reviewers: dvyukov, vitalybuka
Subscribers: delcypher, jfb, #sanitizers, llvm-commits
Tags: #llvm, #sanitizers
Differential Revision: https://reviews.llvm.org/D68596
llvm-svn: 373983
Craig Topper [Mon, 7 Oct 2019 23:03:12 +0000 (23:03 +0000)]
[X86] Shrink zero extends of gather indices from type less than i32 to types larger than i32.
Gather instructions can use i32 or i64 elements for indices. If
the index is zero extended from a type smaller than i32 to i64, we
can shrink the extend to just extend to i32.
llvm-svn: 373982
Craig Topper [Mon, 7 Oct 2019 23:02:03 +0000 (23:02 +0000)]
[X86] Add test cases for zero extending a gather index from less than i32 to i64.
We should be able to use a smaller zero extend.
llvm-svn: 373981
Joerg Sonnenberger [Mon, 7 Oct 2019 22:55:42 +0000 (22:55 +0000)]
Fix the spelling of my name.
llvm-svn: 373980
Vitaly Buka [Mon, 7 Oct 2019 22:43:19 +0000 (22:43 +0000)]
[sanitizer] Print SIGTRAP for corresponding signal
Reviewers: eugenis, jfb
Subscribers: #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D68603
llvm-svn: 373979
Vitaly Buka [Mon, 7 Oct 2019 22:43:17 +0000 (22:43 +0000)]
[tsan] Don't delay SIGTRAP handler
Reviewers: eugenis, jfb
Subscribers: #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D68604
llvm-svn: 373978
Jan Korous [Mon, 7 Oct 2019 22:36:19 +0000 (22:36 +0000)]
Add VFS support for sanitizers' blacklist
Differential Revision: https://reviews.llvm.org/D67742
llvm-svn: 373977
Reid Kleckner [Mon, 7 Oct 2019 22:28:58 +0000 (22:28 +0000)]
[X86] Add new calling convention that guarantees tail call optimization
When the target option GuaranteedTailCallOpt is specified, calls with
the fastcc calling convention will be transformed into tail calls if
they are in tail position. This diff adds a new calling convention,
tailcc, currently supported only on X86, which behaves the same way as
fastcc, except that the GuaranteedTailCallOpt flag does not need to
enabled in order to enable tail call optimization.
Patch by Dwight Guth <dwight.guth@runtimeverification.com>!
Reviewed By: lebedev.ri, paquette, rnk
Differential Revision: https://reviews.llvm.org/D67855
llvm-svn: 373976
Heejin Ahn [Mon, 7 Oct 2019 22:19:40 +0000 (22:19 +0000)]
[WebAssembly] Fix unwind mismatch stat computation
Summary:
There was a bug when computing the number of unwind destination
mismatches in CFGStackify. When there are many mismatched calls that
share the same (original) destination BB, they have to be counted
separately.
This also fixes a typo and runs `fixUnwindMismatches` only when the wasm
exception handling is enabled. This is to prevent unnecessary
computations and does not change behavior.
Reviewers: dschuff
Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68552
llvm-svn: 373975
Heejin Ahn [Mon, 7 Oct 2019 22:11:30 +0000 (22:11 +0000)]
[llvm-lipo] Add TextAPI to LINK_COMPONENTS
Summary:
D68319 uses `MachO::getCPUTypeFromArchitecture` and without this builds
with `-DBUILD_SHARED_LIBS=ON` fail.
Reviewers: alexshap
Subscribers: mgorny, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68594
llvm-svn: 373974
David Bolvansky [Mon, 7 Oct 2019 21:57:03 +0000 (21:57 +0000)]
[Diagnostics] Emit better -Wbool-operation's warning message if we known that the result is always true
llvm-svn: 373973
Johannes Doerfert [Mon, 7 Oct 2019 21:48:08 +0000 (21:48 +0000)]
[Attributor][FIX] Remove assertion wrong for on invalid IRPositions
llvm-svn: 373972
Zoe Carver [Mon, 7 Oct 2019 21:41:15 +0000 (21:41 +0000)]
[libc++] Remove C++03 variadics in shared_ptr (v2)
Summary: In my last patch (D67675) I forgot a few variadics. This patch removes the remaining make_shared and allocate_shared C++03 variadics.
Reviewers: ldionne, EricWF, mclow.lists
Subscribers: christof, dexonsmith, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D68000
llvm-svn: 373971
Davide Italiano [Mon, 7 Oct 2019 21:38:30 +0000 (21:38 +0000)]
[CMake] We only want to copy the headers for macOS.
<rdar://problem/
55916729>
llvm-svn: 373970
Cameron McInally [Mon, 7 Oct 2019 21:33:39 +0000 (21:33 +0000)]
[llvm-c] Add UnaryOperator to LLVM_FOR_EACH_VALUE_SUBCLASS macro
Note that we are not sure where the tests for these functions lives. This was discussed in the Phab Diff.
Differential Revision: https://reviews.llvm.org/D68588
llvm-svn: 373969
Adrian Prantl [Mon, 7 Oct 2019 21:23:19 +0000 (21:23 +0000)]
Mark constructor as default and remove implementation (NFC)
llvm-svn: 373968
Heejin Ahn [Mon, 7 Oct 2019 21:14:45 +0000 (21:14 +0000)]
[WebAssembly] Add memory intrinsics handling to mayThrow()
Summary:
Previously, `WebAssembly::mayThrow()` assumed all inputs are global
addresses. But when intrinsics, such as `memcpy`, `memmove`, or `memset`
are lowered to external symbols in instruction selection and later
emitted as library calls. And these functions don't throw.
This patch adds handling to those memory intrinsics to `mayThrow`
function. But while most of libcalls don't throw, we can't guarantee all
of them don't throw, so currently we conservatively return true for all
other external symbols.
I think a better way to solve this problem is to embed 'nounwind' info
in `TargetLowering::CallLoweringInfo`, so that we can access the info
from the backend. This will also enable transferring 'nounwind'
properties of LLVM IR instructions. Currently we don't transfer that
info and we can only access properties of callee functions, if the
callees are within the module. Other targets don't need this info in the
backend because they do all the processing before isel, but it will help
us because that info will reduce code size increase in fixing unwind
destination mismatches in CFGStackify.
But for now we return false for these memory intrinsics and true for all
other libcalls conservatively.
Reviewers: dschuff
Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68553
llvm-svn: 373967
Alexander Shaposhnikov [Mon, 7 Oct 2019 21:14:22 +0000 (21:14 +0000)]
[llvm-lipo] Relax the check of the specified input file architecture
cctools lipo only compares the cputypes when it verifies that
the specified (via -arch) input file and the architecture match.
This diff adjusts the behavior of llvm-lipo accordingly.
Differential revision: https://reviews.llvm.org/D68319
Test plan: make check-all
llvm-svn: 373966