Daniel Sanders [Tue, 19 Sep 2017 12:56:36 +0000 (12:56 +0000)]
[globalisel] Add support for intrinsic_w_chain.
This maps directly to G_INTRINSIC_W_SIDE_EFFECTS.
llvm-svn: 313627
Nikolai Bozhenov [Tue, 19 Sep 2017 11:54:29 +0000 (11:54 +0000)]
[Nios2] Subtarget, basic infrastructure for frame, instructions and registers
This is the second minimal patch keeping Nios2 target buildable.
I'm adding subtarget here and other stuff for frame lowering, instruction,
register information methods. I do not add any test cases, as still there
are missing parts like DAG selector and assembly printing. I plan to include
them into the next patch.
Patch by Andrei Grischenko <andrei.l.grischenko@intel.com>
Differential Revision: https://reviews.llvm.org/D37256
llvm-svn: 313626
Jina Nahias [Tue, 19 Sep 2017 11:03:06 +0000 (11:03 +0000)]
[x86] Lowering Mask Set1 intrinsics to LLVM IR
This patch, together with a matching clang patch (https://reviews.llvm.org/D37668), implements the lowering of X86 mask set1 intrinsics to IR.
Differential Revision: https://reviews.llvm.org/D37669
llvm-svn: 313625
Jina Nahias [Tue, 19 Sep 2017 11:00:27 +0000 (11:00 +0000)]
Lowering Mask Set1 intrinsics to LLVM IR
This patch, together with a matching llvm patch (https://reviews.llvm.org/D37669), implements the lowering of X86 mask set1 intrinsics to IR.
Differential Revision: https://reviews.llvm.org/D37668
llvm-svn: 313624
Philipp Schaad [Tue, 19 Sep 2017 10:41:29 +0000 (10:41 +0000)]
[GPUJIT] Improved temporary file handling.
Summary: Imporved the way the GPUJIT handles temporary files for Intel's Beignet.
Reviewers: bollu, grosser
Reviewed By: grosser
Subscribers: philip.pfaffe, pollydev
Differential Revision: https://reviews.llvm.org/D37691
llvm-svn: 313623
Manuel Klimek [Tue, 19 Sep 2017 09:59:30 +0000 (09:59 +0000)]
Fix formatting of lambda introducers with initializers.
Most of the work was already done when we introduced a look-behind based
lambda introducer detection.
This patch finishes the transition by completely relying on the simple
lambda introducer detection and simply recursing into normal
brace-parsing code to parse until the end of the introducer.
This fixes initializers in lambdas, including nested lambdas.
Before:
auto a = [b = [c = 42]{}]{};
auto b = [c = &i + 23]{};
After:
auto a = [b = [c = 42] {}] {};
auto b = [c = &i + 23] {};
llvm-svn: 313622
George Rimar [Tue, 19 Sep 2017 09:40:31 +0000 (09:40 +0000)]
[ELF] - Do not merge sections from SHT_GROUP when -relocatable
This is PR34506.
Imagine we have 2 sections the same name but different COMDAT groups:
.section .foo,"axG",@progbits,bar,comdat
.section .foo,"axG",@progbits,zed,comdat
When linking relocatable we do not merge SHT_GROUP sections. But still would merge
both input sections .foo into single output section .foo.
As a result we will have 2 different SHT_GROUPs containing the same section, what
is wrong.
Patch fixes the issue, preventing merging SHF_GROUP sections with any others.
Differential revision: https://reviews.llvm.org/D37574
llvm-svn: 313621
George Rimar [Tue, 19 Sep 2017 09:28:03 +0000 (09:28 +0000)]
[ELF] - Don't crash when --emit-relocs is used with --gc-sections
We crashed when --emit-relocs was used
and relocated section was collected by GC.
Differential revision: https://reviews.llvm.org/D37561
llvm-svn: 313620
George Rimar [Tue, 19 Sep 2017 09:20:54 +0000 (09:20 +0000)]
[ELF] - Introduce std::vector<InputFile *> global arrays.
This patch removes lot of static Instances arrays from different input file
classes and introduces global arrays for access instead. Similar to arrays we
have for InputSections/OutputSectionCommands.
It allows to iterate over input files in a non-templated code.
Differential revision: https://reviews.llvm.org/D35987
llvm-svn: 313619
Roger Ferrer Ibanez [Tue, 19 Sep 2017 09:05:39 +0000 (09:05 +0000)]
[ARM] Use ADDCARRY / SUBCARRY
This is a preparatory step for D34515.
This change:
- makes nodes ISD::ADDCARRY and ISD::SUBCARRY legal for i32
- lowering is done by first converting the boolean value into the carry flag
using (_, C) ← (ARMISD::ADDC R, -1) and converted back to an integer value
using (R, _) ← (ARMISD::ADDE 0, 0, C). An ARMISD::ADDE between the two
operations does the actual addition.
- for subtraction, given that ISD::SUBCARRY second result is actually a
borrow, we need to invert the value of the second operand and result before
and after using ARMISD::SUBE. We need to invert the carry result of
ARMISD::SUBE to preserve the semantics.
- given that the generic combiner may lower ISD::ADDCARRY and
ISD::SUBCARRYinto ISD::UADDO and ISD::USUBO we need to update their lowering
as well otherwise i64 operations now would require branches. This implies
updating the corresponding test for unsigned.
- add new combiner to remove the redundant conversions from/to carry flags
to/from boolean values (ARMISD::ADDC (ARMISD::ADDE 0, 0, C), -1) → C
- fixes PR34045
- fixes PR34564
Differential Revision: https://reviews.llvm.org/D35192
llvm-svn: 313618
Andrei Elovikov [Tue, 19 Sep 2017 07:56:20 +0000 (07:56 +0000)]
Test commit.
llvm-svn: 313617
Matt Arsenault [Tue, 19 Sep 2017 07:40:11 +0000 (07:40 +0000)]
AMDGPU: Run internalize symbols at -O0
The relocations used for externally visible functions
aren't supported, so the direct call emitted ends
up hitting a linker error.
llvm-svn: 313616
Vedant Kumar [Tue, 19 Sep 2017 06:46:36 +0000 (06:46 +0000)]
[ubsan-minimal] Test exported symbol set against RTUBsan
Check that the symbol sets exported by the minimal runtime and the full
runtime match (making exceptions for special cases as needed).
This test uses some possibly non-standard nm options, and needs to
inspect the symbols in runtime dylibs. I haven't found a portable way to
do this, so it's limited to x86-64/Darwin for now.
llvm-svn: 313615
Vedant Kumar [Tue, 19 Sep 2017 06:46:36 +0000 (06:46 +0000)]
[ubsan-minimal] Make the interface more compatible with RTUBSan
This eliminates a few inconsistencies between the symbol sets exported
by RTUBSan and RTUBSan_minimal:
* Handlers for nonnull_return were missing from the minimal RT, and
are now added in.
* The minimal runtime exported recoverable handlers for
builtin_unreachable and missing_return. These are not supposed to
exist, and are now removed.
llvm-svn: 313614
Gadi Haber [Tue, 19 Sep 2017 06:19:27 +0000 (06:19 +0000)]
[X86][Skylake] Adding the scheduling information for the SkylakeClient target
This patch adds the instruction scheduling information for the SkylakeClient (SKL) architecture target by adding the file X86SchedSkylakeClient.td located under the X86 Target.
We used the scheduling information retrieved from the Skylake architects in order to create the file.
The scheduling information includes latency, number of micro-Ops and used ports by each SKL instruction.
The patch continues the scheduling replacement and insertion effort started with the SNB target in r307529 and r310792 and for HSW in r311879.
Please expect some performance fluctuations due to code alignment effects.
Reviewers: craig.topper, zvi, chandlerc, igorb, aymanmus, RKSimon, delena
Differential Revision: https://reviews.llvm.org/D37294
llvm-svn: 313613
Craig Topper [Tue, 19 Sep 2017 05:30:24 +0000 (05:30 +0000)]
[X86] Remove some unnecessary patterns for truncate with X86ISD::SELECT and undef preserved source.
We canonicalize undef preserved sources to zero during intrinsic lowering.
llvm-svn: 313612
Hongbin Zheng [Tue, 19 Sep 2017 04:59:27 +0000 (04:59 +0000)]
[LLVM] [RegionInfo] Introduce getExitingBlocks to get all predecessors of Exit in the current region.
This function will return true if all predecessors of Exit are in the current region, false otherwise.
Differential Revision: https://reviews.llvm.org/D36210
llvm-svn: 313611
Craig Topper [Tue, 19 Sep 2017 04:39:55 +0000 (04:39 +0000)]
[X86] Add VPERMPD/VPERMQ and VPERMPS/VPERMD to the execution domain fixing table.
llvm-svn: 313610
Tom Stellard [Tue, 19 Sep 2017 03:27:26 +0000 (03:27 +0000)]
docs: Fix formatting in HowToReleaseLLVM
This is a follow up to r313608.
llvm-svn: 313609
Tom Stellard [Tue, 19 Sep 2017 03:23:03 +0000 (03:23 +0000)]
docs: Add instructions for how to submit a merge request
Reviewers: hansw, hans
Reviewed By: hans
Subscribers: hans, llvm-commits
Differential Revision: https://reviews.llvm.org/D37936
llvm-svn: 313608
Zachary Turner [Tue, 19 Sep 2017 03:11:35 +0000 (03:11 +0000)]
Revert "Fix llvm-lit script generation in libcxx."
This reverts commit
4ad71811d45268d81b60f27e3b8b2bcbc23bd7b9.
There is a bot that is checking out libcxx and lit with nothing
else and then running lit.py against the test tree. Since there's
no LLVM source tree, there's no LLVM CMake. CMake actually
reports this as a warning saying unsupported libcxx configuration,
but I guess someone is depending on it anyway.
llvm-svn: 313607
Zachary Turner [Tue, 19 Sep 2017 02:46:28 +0000 (02:46 +0000)]
Fix llvm-lit script generation in libcxx.
Differential Revision: https://reviews.llvm.org/D37997
llvm-svn: 313606
Vlad Tsyrklevich [Tue, 19 Sep 2017 02:22:48 +0000 (02:22 +0000)]
Allow public Triple deduction from ObjectFiles.
Move logic that allows for Triple deduction from an ObjectFile object
out of llvm-objdump.cpp into a public factory, found in the ObjectFile
class.
This should allow other tools in the future to use this logic without
reimplementation.
Patch by Mitch Phillips
Differential Revision: https://reviews.llvm.org/D37719
llvm-svn: 313605
Vedant Kumar [Tue, 19 Sep 2017 02:00:12 +0000 (02:00 +0000)]
[llvm-cov] Make report metrics agree with line exec counts, fixes PR34615
Use the same logic as the line-oriented coverage view to determine the
number of covered lines in a function.
Fixes llvm.org/PR34615.
llvm-svn: 313604
Vedant Kumar [Tue, 19 Sep 2017 00:29:46 +0000 (00:29 +0000)]
[Coverage] Remove deferred region for trailing return, fixes PR34611
As a special case, throw away deferred regions for trailing returns.
This allows the closing curly brace to have a count, and is less
distracting.
llvm-svn: 313603
Vedant Kumar [Tue, 19 Sep 2017 00:15:18 +0000 (00:15 +0000)]
[profile] Update Linux-only tests after r313597
Addresses bot failure:
http://lab.llvm.org:8011/builders/clang-ppc64le-linux/builds/9803
llvm-svn: 313602
Zachary Turner [Tue, 19 Sep 2017 00:13:42 +0000 (00:13 +0000)]
Set svn:ignore property on *.pyc.
I think this is what is causing the build to constantly encounter tree conflicts.
llvm-svn: 313601
Hans Wennborg [Mon, 18 Sep 2017 23:54:43 +0000 (23:54 +0000)]
Drop -O1 case from nrvo-string.cpp
It relied on r313400 which was reverted in r313589.
llvm-svn: 313600
Vedant Kumar [Mon, 18 Sep 2017 23:37:32 +0000 (23:37 +0000)]
[profile] Update InstrProfData.inc
llvm-svn: 313599
Vedant Kumar [Mon, 18 Sep 2017 23:37:30 +0000 (23:37 +0000)]
[Coverage] Use a new API to label gap areas
This will make it possible for llvm-cov to pick better line execution
counts, and is part of the fix for llvm.org/PR34612.
llvm-svn: 313598
Vedant Kumar [Mon, 18 Sep 2017 23:37:28 +0000 (23:37 +0000)]
[Coverage] Use gap regions to select better line exec counts
After clang started emitting deferred regions (r312818), llvm-cov has
had a hard time picking reasonable line execuction counts. There have
been one or two generic improvements in this area (e.g r310012), but
line counts can still report coverage for whitespace instead of code
(llvm.org/PR34612).
To fix the problem:
* Introduce a new region kind so that frontends can explicitly label
gap areas.
This is done by changing the encoding of the columnEnd field of
MappingRegion. This doesn't substantially increase binary size, and
makes it easy to maintain backwards-compatibility.
* Don't set the line count to a count from a gap area, unless the count
comes from a wrapped segment.
* Don't highlight gap areas as uncovered.
Fixes llvm.org/PR34612.
llvm-svn: 313597
Vedant Kumar [Mon, 18 Sep 2017 23:37:27 +0000 (23:37 +0000)]
[llvm-cov] Repair a test. NFC.
The checks with the MARKER prefix were not being run over the right
input, because stderr was not redirected properly.
llvm-svn: 313596
Vedant Kumar [Mon, 18 Sep 2017 23:37:27 +0000 (23:37 +0000)]
[llvm-cov] Simplify code to find the first uncovered segment. NFC.
Now that that segment builder is guaranteed to produce segments in
sorted order, we don't need a linear scan to get the right result.
llvm-svn: 313595
Zachary Turner [Mon, 18 Sep 2017 23:36:35 +0000 (23:36 +0000)]
[lit] Use realpath when adding to the config map.
Since the path a user specifies to the llvm-lit script might be
different than the source tree they built from (since they could
be behind different symlinks), we need to use realpath to make
sure that path comparisons work as expected.
Even better would be to use a custom dictionary comparison with
actual file equivalence comparison semantics, but this is the
least friction to unbreak things for now.
llvm-svn: 313594
Yonghong Song [Mon, 18 Sep 2017 23:29:36 +0000 (23:29 +0000)]
bpf: add inline-asm support
Signed-off-by: Yonghong Song <yhs@fb.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
llvm-svn: 313593
Yi Kong [Mon, 18 Sep 2017 23:24:55 +0000 (23:24 +0000)]
[ThinLTO/gold] Implement ThinLTO cache pruning support
Differential Revision: https://reviews.llvm.org/D37993
llvm-svn: 313592
Yi Kong [Mon, 18 Sep 2017 23:24:01 +0000 (23:24 +0000)]
[Docs] Document cache pruning support for gold
Differential Revision: https://reviews.llvm.org/D37995
llvm-svn: 313591
Zachary Turner [Mon, 18 Sep 2017 23:14:15 +0000 (23:14 +0000)]
Fix inverted regex search.
I was using the pattern as the source string and vice versa
causing strange regular expression errors.
llvm-svn: 313590
Hans Wennborg [Mon, 18 Sep 2017 23:08:42 +0000 (23:08 +0000)]
Revert r313400 "[DebugInfo] Insert DW_OP_deref when spilling indirect DBG_VALUEs"
This caused asserts in Chromium. See http://crbug.com/766261
> Summary:
> This comes up in optimized debug info for C++ programs that pass and
> return objects indirectly by address. In these programs,
> llvm.dbg.declare survives optimization, which causes us to emit indirect
> DBG_VALUE instructions. The fast register allocator knows to insert
> DW_OP_deref when spilling indirect DBG_VALUE instructions, but the
> LiveDebugVariables did not until this change.
>
> This fixes part of PR34513. I need to look into why this doesn't work at
> -O0 and I'll send follow up patches to handle that.
>
> Reviewers: aprantl, dblaikie, probinson
>
> Subscribers: qcolombet, hiraditya, llvm-commits
>
> Differential Revision: https://reviews.llvm.org/D37911
llvm-svn: 313589
Rui Ueyama [Mon, 18 Sep 2017 23:07:33 +0000 (23:07 +0000)]
Rename EhSectionPiece::ID -> EhSectionPiece::Sec.
ID sounds like an identifier, but this is actually a pointer to a section.
llvm-svn: 313588
Rui Ueyama [Mon, 18 Sep 2017 23:07:21 +0000 (23:07 +0000)]
Do not use inheritance for EhSectionPiece.
EhSectionPiece inherited from SectionPiece, but we did not actually use
EhSectionPiece objects as SectionPiece ojbects. They were handled as
distinct types. So it didn't make much sense to use inheritance.
llvm-svn: 313587
Rui Ueyama [Mon, 18 Sep 2017 23:07:09 +0000 (23:07 +0000)]
Remove useless accessor.
llvm-svn: 313586
Vitaly Buka [Mon, 18 Sep 2017 22:47:36 +0000 (22:47 +0000)]
Revert "[ubsan] Split ubsan_init_standalone"
Breaks build.
This reverts commit r313583 and r313584.
llvm-svn: 313585
Vitaly Buka [Mon, 18 Sep 2017 22:43:28 +0000 (22:43 +0000)]
[ubsan] Add file missing from r313583
llvm-svn: 313584
Vitaly Buka [Mon, 18 Sep 2017 22:38:18 +0000 (22:38 +0000)]
[ubsan] Split ubsan_init_standalone
On Linux we may need preinit_array in static lib and
ubsan_standalone_initializer in shared lib.
llvm-svn: 313583
Zachary Turner [Mon, 18 Sep 2017 22:30:45 +0000 (22:30 +0000)]
[lit] Fix a Python 3 compatibility issue.
llvm-svn: 313580
Zachary Turner [Mon, 18 Sep 2017 22:26:48 +0000 (22:26 +0000)]
[lit] Update clang and lld to use new config helpers.
NFC intended here, this only updates clang and lld's lit configs
to use some helper functionality in the lit.llvm submodule.
llvm-svn: 313579
Adrian Prantl [Mon, 18 Sep 2017 22:11:33 +0000 (22:11 +0000)]
Replace for_each with a range-based for. NFC.
llvm-svn: 313578
Sanjay Patel [Mon, 18 Sep 2017 22:05:35 +0000 (22:05 +0000)]
[DAGCombiner] fold assertzexts separated by trunc
If we have an AssertZext of a truncated value that has already been AssertZext'ed,
we can assert on the wider source op to improve the zext-y knowledge:
assert (trunc (assert X, i8) to iN), i1 --> trunc (assert X, i1) to iN
This moves a fold from being Mips-specific to general combining, and x86 shows
improvements.
Differential Revision: https://reviews.llvm.org/D37017
llvm-svn: 313577
Eric Fiselier [Mon, 18 Sep 2017 22:01:18 +0000 (22:01 +0000)]
Fix failing ASAN test
llvm-svn: 313576
Sanjay Patel [Mon, 18 Sep 2017 21:57:56 +0000 (21:57 +0000)]
[InstCombine] auto-generate complete checks; NFC
The code responsible for these transforms has the potential to add 2
instructions and break min/max patterns (PR33301).
llvm-svn: 313575
Zachary Turner [Mon, 18 Sep 2017 21:52:02 +0000 (21:52 +0000)]
[cmake] Add a simple function to dump all variables.
This is useful when debugging CMake problems.
llvm-svn: 313574
Adrian Prantl [Mon, 18 Sep 2017 21:44:40 +0000 (21:44 +0000)]
llvm-dwarfdump: use more efficient API (NFC)
llvm-svn: 313573
Vitaly Buka [Mon, 18 Sep 2017 21:35:49 +0000 (21:35 +0000)]
[ubsan] Fix conflict with previous declaration on Mac
llvm-svn: 313572
Reid Kleckner [Mon, 18 Sep 2017 21:31:48 +0000 (21:31 +0000)]
[gcov] Emit errors when opening the notes file fails
No time to write a test case, on to the next bug. =P
Discovered while investigating PR34659
llvm-svn: 313571
Erich Keane [Mon, 18 Sep 2017 21:28:55 +0000 (21:28 +0000)]
[Sema] Fix a pair of crashes when generating exception specifiers with an
error'ed field for a template class' default ctor.
The two examples in the test would both cause a compiler assert when attempting
to calculate the exception specifier for the default constructor for the
template classes. The problem was that dependents of this function expect that
Field->getInClassInitializer (including canThrow) is not nullptr. However, if
the template's initializer has an error, exactly that situation happens.
This patch simply sets the field to be invalid.
Differential Revision: https://reviews.llvm.org/D37865
llvm-svn: 313569
Adrian Prantl [Mon, 18 Sep 2017 21:28:13 +0000 (21:28 +0000)]
Fix indentation.
llvm-svn: 313568
Adrian Prantl [Mon, 18 Sep 2017 21:27:44 +0000 (21:27 +0000)]
llvm-dwarfdump: add a --show-parents options when selectively dumping DIEs.
llvm-svn: 313567
Adrian Prantl [Mon, 18 Sep 2017 21:27:42 +0000 (21:27 +0000)]
Fix typo in testcase.
llvm-svn: 313566
Konstantin Zhuravlyov [Mon, 18 Sep 2017 21:22:45 +0000 (21:22 +0000)]
AMDGPU: Start selecting s_xnor_{b32, b64}
Differential Revision: https://reviews.llvm.org/D37981
llvm-svn: 313565
Sanjay Patel [Mon, 18 Sep 2017 20:54:26 +0000 (20:54 +0000)]
[DAG, x86] allow store merging before and after legalization (PR34217)
rL310710 allowed store merging to occur after legalization to catch stores that are created late,
but this exposes a logic hole seen in PR34217:
https://bugs.llvm.org/show_bug.cgi?id=34217
We will miss merging stores if the target lowers vector extracts into target-specific operations.
This patch allows store merging to occur both before and after legalization if the target chooses
to get maximum merging.
I don't think the potential regressions in the other tests are relevant. The tests are for
correctness of weird IR constructs rather than perf tests, and I think those are still correct.
Differential Revision: https://reviews.llvm.org/D37987
llvm-svn: 313564
Craig Topper [Mon, 18 Sep 2017 20:49:13 +0000 (20:49 +0000)]
[X86] Make sure we still emit zext for GR32 to GR64 when the source of the zext is AssertZext
The AssertZext we might see in this case is only giving information about the lower 32 bits. It isn't providing information about the upper 32 bits. So we should emit a zext.
This fixes PR28540.
Differential Revision: https://reviews.llvm.org/D37729
llvm-svn: 313563
Kostya Serebryany [Mon, 18 Sep 2017 20:48:35 +0000 (20:48 +0000)]
[libFuzzer] one more trophy
llvm-svn: 313562
Kostya Kortchinsky [Mon, 18 Sep 2017 20:31:57 +0000 (20:31 +0000)]
[scudo] Additional modifications for Android tests support
Summary:
With the recent move of `android_commands` to `sanitizer_common`, some things
have to be updated with regard to Scudo on Android.
Notably:
- `config.android` is dealt with in the common code
- `config.compile_wrapper` can be prepended to allow for the use of the android
commands
- `SCUDO_OPTIONS` must be passed with the environment when running a test
- `preinit.cpp` fails with some API levels, not sure why, I will have to dig
into this later.
Note that `check-scudo` is not enabled yet in the bots. It's all local testing
for now until everything looks good.
Reviewers: alekseyshl, vitalybuka
Reviewed By: vitalybuka
Subscribers: srhines, kubamracek, llvm-commits
Differential Revision: https://reviews.llvm.org/D37990
llvm-svn: 313561
Adrian Prantl [Mon, 18 Sep 2017 19:55:00 +0000 (19:55 +0000)]
llvm-dwarfdump: Sink the handling of ShowChildren into DWARFDie::dump(). NFC.
llvm-svn: 313560
Alexey Bataev [Mon, 18 Sep 2017 19:33:30 +0000 (19:33 +0000)]
[SLP] Add a test for PR34635, NFC.
llvm-svn: 313559
Craig Topper [Mon, 18 Sep 2017 19:21:21 +0000 (19:21 +0000)]
[X86] Don't emit COPY_TO_REG to ABCD registers before EXTRACT_SUBREG of sub_8bit
This is similar to D37843, but for sub_8bit. This fixes all of the patterns except for the 2 that emit only an EXTRACT_SUBREG. That causes a verifier error with global isel because global isel doesn't know to issue the ABCD when doing this extract on 32-bits targets.
Differential Revision: https://reviews.llvm.org/D37890
llvm-svn: 313558
Craig Topper [Mon, 18 Sep 2017 19:21:19 +0000 (19:21 +0000)]
[X86] Don't emit COPY_TO_REG to ABCD registers before EXTRACT_SUBREG of sub_8bit_hi
I'm pretty sure that InstrEmitter::EmitSubregNode will take care of this itself by calling ConstrainForSubReg which in turn calls TRI->getSubClassWithSubReg.
I think Jakob Stoklund Olesen alluded to this in his commit message for r141207 which added the code to EmitSubregNode.
Differential Revision: https://reviews.llvm.org/D37843
llvm-svn: 313557
Rui Ueyama [Mon, 18 Sep 2017 19:15:54 +0000 (19:15 +0000)]
Remove redundant cast<> and null check.
"Repl" member is guranteed to have a non-null pointer. If an input
section is not merged by ICF, "Repl" points to "this". Otherwise, it
points to some other section. It must not be NULL.
llvm-svn: 313556
Evandro Menezes [Mon, 18 Sep 2017 19:00:38 +0000 (19:00 +0000)]
[AArch64] Adjust the cost model for Exynos M1 and M2
Refine the model of FP loads and stores.
llvm-svn: 313555
Evandro Menezes [Mon, 18 Sep 2017 19:00:36 +0000 (19:00 +0000)]
[AArch64] Adjust the cost model for Exynos M1 and M2
Refine the model of loads and stores using the register offset addressing
modes.
llvm-svn: 313554
Evandro Menezes [Mon, 18 Sep 2017 19:00:31 +0000 (19:00 +0000)]
[AArch64] Adjust the cost model for Exynos M1 and M2
Fix formatting in the predicate function AArch64InstrInfo::isExynosShiftLeftFast().
llvm-svn: 313553
Ahmed Bougacha [Mon, 18 Sep 2017 18:50:09 +0000 (18:50 +0000)]
[GlobalISel] Only build expensive remarks if they're enabled. NFC.
r313390 taught 'allowExtraAnalysis' to check whether remarks are
enabled at all. Use that to only do the expensive instruction printing
if they are.
llvm-svn: 313552
Vitaly Buka [Mon, 18 Sep 2017 18:46:19 +0000 (18:46 +0000)]
[ubsan] Fix interface_symbols_windows test
Summary:
1. Update ubsan_interface.inc to make the test happy.
2. Switch interface_symbols_linux and interface_symbols_darwin to C++ to import __ubsan_handle_dynamic_type_cache_miss
3. Switch interface_symbols_windows to C++ for consistency.
Reviewers: rnk, zturner
Subscribers: llvm-commits, kubamracek
Differential Revision: https://reviews.llvm.org/D37986
llvm-svn: 313551
Davide Italiano [Mon, 18 Sep 2017 18:31:49 +0000 (18:31 +0000)]
[ELF] Remove default argument for lambda.
This is not really OK in C++11, and GCc triggers a warning.
We can switch back to default arguments when C++14 will be the
minimum version of the standard supported, see:
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#974
Ack'ed by Rafael.
llvm-svn: 313550
Vedant Kumar [Mon, 18 Sep 2017 18:13:47 +0000 (18:13 +0000)]
[cmake] Make it possible to build and test profile without sanitizers
This should fix an issue which arises when running check-compiler-rt on
the coverage bot:
http://green.lab.llvm.org/green/job/clang-stage2-coverage-R_build/1590/
The bot doesn't build the sanitizers, but the check-compiler-rt target
always expects the profile runtime to exist.
llvm-svn: 313549
Sanjay Patel [Mon, 18 Sep 2017 18:07:50 +0000 (18:07 +0000)]
[x86] add tests for PR34217; NFC
llvm-svn: 313548
Simon Pilgrim [Mon, 18 Sep 2017 17:58:31 +0000 (17:58 +0000)]
[X86][AVX] Improve (i8 bitcast (v8i1 x)) handling for 256-bit vector compare results.
As commented on D37849, AVX1 targets were missing a chance to use vmovmskps for v8f32/v8i32 results for bool vector bitcasts
llvm-svn: 313547
Michael Kruse [Mon, 18 Sep 2017 17:43:50 +0000 (17:43 +0000)]
[ForwardOpTree] Test the max operations quota.
cl::opt<unsigned long> is not specialized and hence the option
-polly-optree-max-ops impossible to use.
Replace by supported option cl::opt<unsigned>.
Also check for an error state when computing the written value, which
happens when the quota runs out.
llvm-svn: 313546
Sanjay Patel [Mon, 18 Sep 2017 17:33:47 +0000 (17:33 +0000)]
[x86] regenerate checks; NFC
llvm-svn: 313545
Manoj Gupta [Mon, 18 Sep 2017 17:28:15 +0000 (17:28 +0000)]
[LoopVectorizer] Add more testcases for PR33804.
Summary:
Add test cases when float <-> pointer types conversion is triggered
in presence of load instructions.
Reviewers: Ayal, srhines, mkuper, rengolin
Reviewed By: rengolin
Subscribers: javed.absar, llvm-commits
Differential Revision: https://reviews.llvm.org/D37967
llvm-svn: 313544
Simon Pilgrim [Mon, 18 Sep 2017 16:45:05 +0000 (16:45 +0000)]
[SelectionDAG] Add BITCAST handling to ComputeNumSignBits for splatted sign bits.
For cases where we are BITCASTing to vectors of smaller elements, then if the entire source was a splatted sign (src's NumSignBits == SrcBitWidth) we can say that the dst's NumSignBit == DstBitWidth, as we're just splitting those sign bits across multiple elements.
We could generalize this but at the moment the only use case I have is to peek through bitcasts to vector comparison results.
Differential Revision: https://reviews.llvm.org/D37849
llvm-svn: 313543
Craig Topper [Mon, 18 Sep 2017 16:39:49 +0000 (16:39 +0000)]
[X86] Fix two more places to prefer VPERMQ/PD over VPERM2X128 when AVX2 is enabled
The shuffle combining and lowerVectorShuffleAsLanePermuteAndBlend were both still trying to use VPERM2XF128 for unary shuffles when AVX2 is enabled. VPERM2X128 takes two inputs meaning when we use it for a unary shuffle one of those inputs is left undefined creating a false dependency on whatever register gets allocated there.
If we have VPERMQ/PD we should prefer those since they only have a single input.
Differential Revision: https://reviews.llvm.org/D37947
llvm-svn: 313542
Sanjay Patel [Mon, 18 Sep 2017 16:20:15 +0000 (16:20 +0000)]
[SLP] clean up for vector store case; NFCI
llvm-svn: 313541
Adrian McCarthy [Mon, 18 Sep 2017 15:59:44 +0000 (15:59 +0000)]
Revert "Fix for bug 34532 - A few rough corners related to post-mortem debugging (core/minidump)"
Broke Windows and FreeBSD (at least).
This reverts commit
628ca7052b4a5dbace0f6205409113e12c8a78fa.
llvm-svn: 313540
Francis Ricci [Mon, 18 Sep 2017 15:43:59 +0000 (15:43 +0000)]
Revert "Use ThreadLauncher to launch TaskPool threads"
This reverts commit r313537 because it fails to link on linux buildbots
llvm-svn: 313539
Kostya Kortchinsky [Mon, 18 Sep 2017 15:40:53 +0000 (15:40 +0000)]
[scudo] Android build support
Summary:
Mark Android as supported in the cmake configuration for Scudo.
Scudo is not added yet in the Android build bots, but code builds and tests
pass locally. It is for a later CL. I also checked that Scudo builds as part
of the Android toolchain.
A few modifications had to be made:
- Android defaults to `abort_on_error=1`, which doesn't work well with the
current tests. So change the default way to pass `SCUDO_OPTIONS` to the tests
to account for this, setting it to 0 by default;
- Disable the `valloc.cpp` & `random_shuffle.cpp` tests on Android;
- There is a bit of gymnatic to be done with the `SCUDO_TEST_TARGET_ARCH`
string, due to android using the `-android` suffix, and `i686` instead of
`i386`;
- Android doesn't need `-lrt`.
Reviewers: alekseyshl, eugenis
Reviewed By: alekseyshl
Subscribers: srhines, mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D37907
llvm-svn: 313538
Francis Ricci [Mon, 18 Sep 2017 15:18:48 +0000 (15:18 +0000)]
Use ThreadLauncher to launch TaskPool threads
Summary:
This allows for the stack size to be configured, which isn't
possible with std::thread. Prevents overflowing the stack when
performing complex operations in the task pool on darwin,
where the default pthread stack size is only 512kb.
Reviewers: labath, tberghammer, clayborg
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D37930
llvm-svn: 313537
Marc-Andre Laperle [Mon, 18 Sep 2017 15:02:59 +0000 (15:02 +0000)]
[clangd] Fix codeAction not decoded properly when sent from some clients
Summary:
Fix for bug https://bugs.llvm.org/show_bug.cgi?id=34559
Also log unknown fields instead of aborting the JSON parsing because it's
common that new optional fields are added either in new versions of the protocol
or extensions.
Reviewers: ilya-biryukov
Reviewed By: ilya-biryukov
Subscribers: ilya-biryukov
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D37754
llvm-svn: 313536
Sam Parker [Mon, 18 Sep 2017 14:46:14 +0000 (14:46 +0000)]
[AArch64] Add V8_2aOps feature to Cortex-A55 and 75
Add the missing hardware features the ProcA55 and ProcA75 feature.
These are already enabled via the target parser, but I had missed
them in the backend.
Differential Revision: https://reviews.llvm.org/D37974
llvm-svn: 313535
Alex Bradbury [Mon, 18 Sep 2017 14:33:39 +0000 (14:33 +0000)]
Add myself to CREDITS.txt
llvm-svn: 313534
Sam Parker [Mon, 18 Sep 2017 14:28:51 +0000 (14:28 +0000)]
[ARM] Implement isTruncateFree
Implement the isTruncateFree hooks, lifted from AArch64, that are
used by TargetTransformInfo. This allows simplifycfg to reduce the
test case into a single basic block.
Differential Revision: https://reviews.llvm.org/D37516
llvm-svn: 313533
Simon Pilgrim [Mon, 18 Sep 2017 14:23:23 +0000 (14:23 +0000)]
[X86][SSE] Improve support for vselect(Cond, 0, X) -> ANDN(Cond, X)
As discussed on PR28925 and D37849.
Differential Revision: https://reviews.llvm.org/D37975
llvm-svn: 313532
Sjoerd Meijer [Mon, 18 Sep 2017 14:17:57 +0000 (14:17 +0000)]
[ARM] Fix for indexed dot product instruction descriptions
The indexed dot product instructions only accept the lower 16 D-registers as
the indexed register, but we were e.g. incorrectly accepting:
vudot.u8 d16,d16,d18[0]
Differential Revision: https://reviews.llvm.org/D37968
llvm-svn: 313531
Jonas Devlieghere [Mon, 18 Sep 2017 14:15:57 +0000 (14:15 +0000)]
[dwarfdump] Make .eh_frame an alias for .debug_frame
This patch makes the `.eh_frame` extension an alias for `.debug_frame`.
Up till now it was only possible to dump the section using objdump, but
not with dwarfdump. Since the two are essentially interchangeable, we
dump whichever of the two is present.
As a workaround, this patch also adds parsing for 3 currently
unimplemented CFA instructions: `DW_CFA_def_cfa_expression`,
`DW_CFA_expression`, and `DW_CFA_val_expression`. Because I lack the
required knowledge, I just parse the fields without actually creating
the instructions.
Finally, this also fixes the typo in the `.debug_frame` section name
which incorrectly contained a trailing `s`.
Differential revision: https://reviews.llvm.org/D37852
llvm-svn: 313530
Simon Pilgrim [Mon, 18 Sep 2017 13:32:33 +0000 (13:32 +0000)]
[X86][SSE] Add vselect with zero tests (PR28925)
llvm-svn: 313529
Simon Pilgrim [Mon, 18 Sep 2017 12:55:54 +0000 (12:55 +0000)]
[X86] combineVSelectWithAllOnesOrZeros - cleanup variable names. NFCI.
We were reusing the 'false' select value 'is zero' variable name for the 'true' select value 'is zero' variable name.
llvm-svn: 313528
Michael Kruse [Mon, 18 Sep 2017 12:34:11 +0000 (12:34 +0000)]
[test] Enable -polly-codegen-verify for regression tests.
In r301670 IR verification was disabled. Since then, CodeGen writing
malformed IR would only be noticed by unpredictable behavior in
follow-up passes (e.g. segfaults, infinite loops) or IR verification in
the backend assert builds.
Re-enable -polly-codegen-verify at for the regression tests to ensure
that malformed IR is detected where Polly generated malformed IR in the
past and changes in CodeGen are at least partially covered by
check-polly
(otherwise malformed IR may only get noticed when the buildbots run the
test-suite).
Differential Revision: https://reviews.llvm.org/D37969
llvm-svn: 313527
Michael Kruse [Mon, 18 Sep 2017 12:28:07 +0000 (12:28 +0000)]
[ForwardOptTree] Remove redundant simplify(). NFC.
The result of computeKnown has already been simplified.
llvm-svn: 313526
Tamas Berghammer [Mon, 18 Sep 2017 10:24:48 +0000 (10:24 +0000)]
Fix Linux remote debugging after r313442
On Linux lldb-server sends an OK response to qfThreadInfo if no process
is started yet. I don't know why would LLDB issue a qfThreadInfo packet
before starting a process but creating a fake thread ID in case of an
OK or Error respoinse sounds bad anyway so lets not do it.
llvm-svn: 313525