]> granicus.if.org Git - llvm/log
llvm
7 years ago[COFF, ARM64, CodeView] Add support to emit CodeView debug info for ARM64 COFF
Mandeep Singh Grang [Thu, 20 Jul 2017 20:20:00 +0000 (20:20 +0000)]
[COFF, ARM64, CodeView] Add support to emit CodeView debug info for ARM64 COFF

Reviewers: compnerd, ruiu, rnk, zturner

Reviewed By: rnk

Subscribers: majnemer, aemerson, aprantl, javed.absar, kristof.beyls, llvm-commits

Differential Revision: https://reviews.llvm.org/D35518

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308665 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[PEI] Separate saving and restoring CSRs into different functions. NFC
Francis Visoiu Mistrih [Thu, 20 Jul 2017 20:17:17 +0000 (20:17 +0000)]
[PEI] Separate saving and restoring CSRs into different functions. NFC

Split insertCSRSpillsAndRestores into insertCSRSaves + insertCSRRestores.

This is mostly useful for future shrink-wrapping improvements where we
want to save / restore a specific part of the CSRs in a specific block.

Differential Revision: https://reviews.llvm.org/D35644

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308664 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[libFuzzer] delete stale code
Kostya Serebryany [Thu, 20 Jul 2017 20:15:13 +0000 (20:15 +0000)]
[libFuzzer] delete stale code

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308663 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[SPARC] Clean up the support for disabling fsmuld and fmuls instructions.
James Y Knight [Thu, 20 Jul 2017 20:09:11 +0000 (20:09 +0000)]
[SPARC] Clean up the support for disabling fsmuld and fmuls instructions.

Summary:
Also enable no-fsmuld for sparcv7 (which doesn't have the
instruction).

The previous code which used a post-processing pass to do this was
unnecessary; disabling the instruction is entirely sufficient.

Reviewers: jacob_hansen, ekedaigle

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D35576

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308661 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoImplement LaneBitmask::getNumLanes and LaneBitmask::getHighestLane
Krzysztof Parzyszek [Thu, 20 Jul 2017 19:43:19 +0000 (19:43 +0000)]
Implement LaneBitmask::getNumLanes and LaneBitmask::getHighestLane

This should eliminate most uses of countPopulation and Log2_32 on
the lane mask values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308658 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86] Allow masks with more than 6 bits set on the x << (y & mask) optimization for...
Craig Topper [Thu, 20 Jul 2017 19:29:58 +0000 (19:29 +0000)]
[X86] Allow masks with more than 6 bits set on the x << (y & mask) optimization for the 64-bit memory shifts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308657 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86] Add test case to demonstrate that we don't allow masks wider than 6 bits in...
Craig Topper [Thu, 20 Jul 2017 19:29:56 +0000 (19:29 +0000)]
[X86] Add test case to demonstrate that we don't allow masks wider than 6 bits in the (shift x, (and y, mask)) patterns for the 64-bit memory form.

We allow wider than 5 bits in the 16 and 32 bit store forms. And we allow wider than 6 bits on the 64-bit regsiter form.:w

I'm assuming this was a mistake made back in r148024.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308656 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoUse LaneBitmask::getLane in a few more places
Krzysztof Parzyszek [Thu, 20 Jul 2017 19:15:56 +0000 (19:15 +0000)]
Use LaneBitmask::getLane in a few more places

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308655 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[libFuzzer] make sure CheckExitOnSrcPosOrItem is called after the new input is saved...
Kostya Serebryany [Thu, 20 Jul 2017 18:53:25 +0000 (18:53 +0000)]
[libFuzzer] make sure CheckExitOnSrcPosOrItem is called after the new input is saved to the corpus

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308653 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[DAG] Commit missed nit cleanup from r308617. NFC.
Nirav Dave [Thu, 20 Jul 2017 18:07:57 +0000 (18:07 +0000)]
[DAG] Commit missed nit cleanup from r308617. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308645 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoLowerTypeTests: Drop function type metadata only if we're going to replace it.
Peter Collingbourne [Thu, 20 Jul 2017 18:02:05 +0000 (18:02 +0000)]
LowerTypeTests: Drop function type metadata only if we're going to replace it.

Previously we were (mis)handling jump table members with a prevailing
definition in a full LTO module and a non-prevailing definition in a
ThinLTO module by dropping type metadata on those functions entirely,
which would cause type tests involving such functions to fail.

This patch causes us to drop metadata only if we are about to replace
it with metadata from cfi.functions.

We also want to replace metadata for available_externally functions,
which can arise in the opposite scenario (prevailing ThinLTO
definition, non-prevailing full LTO definition). The simplest way
to handle that is to remove the definition; there's little value in
keeping it around at this point (i.e. after most optimization passes
have already run) and later code will try to use the function's linkage
to create an alias, which would result in invalid IR if the function
is available_externally.

Fixes PR33832.

Differential Revision: https://reviews.llvm.org/D35604

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308642 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAMDGPU: Add encoding for carryless add/sub instructions
Matt Arsenault [Thu, 20 Jul 2017 17:42:47 +0000 (17:42 +0000)]
AMDGPU: Add encoding for carryless add/sub instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308639 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAMDGPU: Add encodings for global atomics
Matt Arsenault [Thu, 20 Jul 2017 17:31:56 +0000 (17:31 +0000)]
AMDGPU: Add encodings for global atomics

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308638 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRemove unnecessary prefix from comment lines in a .test file.
David Blaikie [Thu, 20 Jul 2017 17:20:36 +0000 (17:20 +0000)]
Remove unnecessary prefix from comment lines in a .test file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308636 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agorevert: [llvm] r308609 - This patch added some test cases to demonsrate the issues...
Simon Pilgrim [Thu, 20 Jul 2017 15:17:15 +0000 (15:17 +0000)]
revert: [llvm] r308609 - This patch added some test cases to demonsrate the issues described in Bug 33848 - X86 Asm does not support symbolic names inside address calculation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308622 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[DAG] Handle missing transform in fold of value extension case.
Nirav Dave [Thu, 20 Jul 2017 13:57:32 +0000 (13:57 +0000)]
[DAG] Handle missing transform in fold of value extension case.

Summary:
When pushing an extension of a constant bitwise operator on a load
into the load, change other uses of the load value if they exist to
prevent the old load from persisting.

Reviewers: spatel, RKSimon, efriedma

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D35030

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308618 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[DAG] Optimize away degenerate INSERT_VECTOR_ELT nodes.
Nirav Dave [Thu, 20 Jul 2017 13:48:17 +0000 (13:48 +0000)]
[DAG] Optimize away degenerate INSERT_VECTOR_ELT nodes.

Summary:
Add missing vector write of vector read reduction, i.e.:

(insert_vector_elt x (extract_vector_elt x idx) idx) to x

Reviewers: spatel, RKSimon, efriedma

Reviewed By: RKSimon

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D35563

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308617 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[globalisel][tablegen] Fix an unintended fallthrough that is currently unreachable...
Daniel Sanders [Thu, 20 Jul 2017 13:10:17 +0000 (13:10 +0000)]
[globalisel][tablegen] Fix an unintended fallthrough that is currently unreachable. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308613 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoReland r308585
Stefan Maksimovic [Thu, 20 Jul 2017 13:08:18 +0000 (13:08 +0000)]
Reland r308585

Builder clang-x86_64-linux-abi-test apparently failed due
to a spurious error unrelated to the changes r308585
introduced.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308612 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86][AVX512] Improve vector rotation constant folding tests
Simon Pilgrim [Thu, 20 Jul 2017 13:07:37 +0000 (13:07 +0000)]
[X86][AVX512] Improve vector rotation constant folding tests

Test constant folding both on node creation (which already works) and once the input nodes have been folded themselves (not working yet).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308611 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoThis patch added some test cases to demonsrate the issues described in Bug 33848...
Andrew V. Tischenko [Thu, 20 Jul 2017 12:46:02 +0000 (12:46 +0000)]
This patch added some test cases to demonsrate the issues described in Bug 33848 - X86 Asm does not support symbolic names inside address calculation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308609 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[ARM] Simplify ExpandPseudoInst. NFC.
Javed Absar [Thu, 20 Jul 2017 12:35:37 +0000 (12:35 +0000)]
[ARM] Simplify ExpandPseudoInst. NFC.

Remove headers not required and convert to range-loop

Reviewed by: @mcrosier
Differential Revision: https://reviews.llvm.org/D35626

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308607 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[mips] Support `long_call/far/near` attributes passed by front-end
Simon Atanasyan [Thu, 20 Jul 2017 12:19:26 +0000 (12:19 +0000)]
[mips] Support `long_call/far/near` attributes passed by front-end

This patch adds handling of the `long_call`, `far`, and `near`
attributes passed by front-end. The patch depends on D35479.

Differential revision: https://reviews.llvm.org/D35480.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308606 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRevert "GlobalISel: select G_EXTRACT and G_INSERT instructions on AArch64."
Diana Picus [Thu, 20 Jul 2017 11:36:03 +0000 (11:36 +0000)]
Revert "GlobalISel: select G_EXTRACT and G_INSERT instructions on AArch64."

This reverts commit 36c6a2ea9669bc3bb695928529a85d12d1d3e3f9 because it
broke the test-suite on the GlobalISel bot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308603 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[DAGCombiner] Match ISD::SRL non-uniform constant vectors patterns using predicates.
Simon Pilgrim [Thu, 20 Jul 2017 11:03:30 +0000 (11:03 +0000)]
[DAGCombiner] Match ISD::SRL non-uniform constant vectors patterns using predicates.

Use predicate matchers introduced in D35492 to match more ISD::SRL constant folds

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308602 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRemove trailing whitespace. NFCI.
Simon Pilgrim [Thu, 20 Jul 2017 10:43:52 +0000 (10:43 +0000)]
Remove trailing whitespace. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308601 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[DAGCombiner] Match ISD::SRA non-uniform constant vectors patterns using predicates.
Simon Pilgrim [Thu, 20 Jul 2017 10:43:05 +0000 (10:43 +0000)]
[DAGCombiner] Match ISD::SRA non-uniform constant vectors patterns using predicates.

Use predicate matchers introduced in D35492 to match more ISD::SRA constant folds

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308600 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[globalisel][tablegen] Fix an issue with lambdas when compiling with older GCC's
Daniel Sanders [Thu, 20 Jul 2017 10:25:00 +0000 (10:25 +0000)]
[globalisel][tablegen] Fix an issue with lambdas when compiling with older GCC's

It seems that G++ 4.8 doesn't accept the 'enum A' in code of the form:
  enum A { ... };
  const auto &F = []() -> enum A { ... };
However, it does accept:
  typedef enum { ... } A;
  const auto &F = []() -> A { ... };

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308599 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[DAGCombiner] Match non-uniform constant vectors using predicates.
Simon Pilgrim [Thu, 20 Jul 2017 10:13:40 +0000 (10:13 +0000)]
[DAGCombiner] Match non-uniform constant vectors using predicates.

Most combines currently recognise scalar and splat-vector constants, but not non-uniform vector constants.

This patch introduces a matching mechanism that uses predicates to check against BUILD_VECTOR of ConstantSDNode, as well as scalar ConstantSDNode cases.

I've changed a couple of predicates to demonstrate - the combine-shl changes add currently unsupported cases, while the MatchRotate replaces an existing mechanism.

Differential Revision: https://reviews.llvm.org/D35492

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308598 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRevert r308585
Stefan Maksimovic [Thu, 20 Jul 2017 09:57:14 +0000 (09:57 +0000)]
Revert r308585

Builder clang-x86_64-linux-abi-test seems to fail after this change

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308597 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[globalisel][tablegen] Add control-flow to the MatchTable.
Daniel Sanders [Thu, 20 Jul 2017 09:25:44 +0000 (09:25 +0000)]
[globalisel][tablegen] Add control-flow to the MatchTable.

Summary:
This will allow us to merge the various sub-tables into a single table. This is a
compile-time saving at this point. However, this will also enable the optimization
of a table so that similar instructions can be tested together, reducing the time
spent on the matching the code.

The bulk of this patch is a mechanical conversion to the new MatchTable object
which is responsible for tracking label definitions and filling in the index of
the jump targets. It is also responsible for nicely formatting the table.

This was necessary to support the new GIM_Try opcode which takes the index to
jump to if the match should fail. This value is unknown during table
construction and is filled in during emission. To support nesting try-blocks
(although we currently don't emit tables with nested try-blocks), GIM_Reject
has been re-introduced to explicitly exit a try-block or fail the overall match
if there are no active try-blocks.

Reviewers: ab, t.p.northover, qcolombet, rovka, aditya_nandakumar

Reviewed By: rovka

Subscribers: kristof.beyls, igorb, llvm-commits

Differential Revision: https://reviews.llvm.org/D35117

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308596 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[mips] Fix fp select machine verifier errors
Stefan Maksimovic [Thu, 20 Jul 2017 09:21:10 +0000 (09:21 +0000)]
[mips] Fix fp select machine verifier errors

Introduced FSELECT node necesary when lowering ISD::SELECT
which has i32, f64, f64 as its operands.
SEL_D instruction required that its output and first operand
of a SELECT node, which it used, have matching types.
MTC1_D64 node introduced to aid FSELECT lowering.

This fixes machine verifier errors on following tests:
CodeGen/Mips/llvm-ir/select-dbl.ll
CodeGen/Mips/llvm-ir/select-flt.ll
CodeGen/Mips/select.ll

Differential Revision: https://reviews.llvm.org/D35408

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308595 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoHandle clang-tools-extra project in docker scripts.
Ilya Biryukov [Thu, 20 Jul 2017 08:30:44 +0000 (08:30 +0000)]
Handle clang-tools-extra project in docker scripts.

Reviewers: klimek, mehdi_amini

Reviewed By: mehdi_amini

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D35418

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308594 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86] Use SARX/SHLX/SHLX instructions for (shift x (and y, (BitWidth-1)))
Craig Topper [Thu, 20 Jul 2017 06:19:55 +0000 (06:19 +0000)]
[X86] Use SARX/SHLX/SHLX instructions for (shift x (and y, (BitWidth-1)))

Fixes PR33841.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308591 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86] Add test cases for (shift x (and y, (BitWidth-1))) to the BMI2 shift test.
Craig Topper [Thu, 20 Jul 2017 06:19:54 +0000 (06:19 +0000)]
[X86] Add test cases for (shift x (and y, (BitWidth-1))) to the BMI2 shift test.

We should use SHLX and similar instructions for these patterns, but we currently don't.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308590 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86] Regenerate shift-and.ll and shift-bmi2.ll using update_llc_test_checks.py.
Craig Topper [Thu, 20 Jul 2017 06:19:53 +0000 (06:19 +0000)]
[X86] Regenerate shift-and.ll and shift-bmi2.ll using update_llc_test_checks.py.

I've stripped the checks for 64-bit types in 32-bit mode to match the existing tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308589 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86] Remove outdated bug comment from a test.
Craig Topper [Thu, 20 Jul 2017 06:19:52 +0000 (06:19 +0000)]
[X86] Remove outdated bug comment from a test.

The test issue was fixed and the test was updated in r244577, but the comment wasn't removed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308588 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAMDGPU: Correct encoding for global instructions
Matt Arsenault [Thu, 20 Jul 2017 05:17:54 +0000 (05:17 +0000)]
AMDGPU: Correct encoding for global instructions

The soffset field needs to be be set to 0x7f to disable it,
not 0. 0 is interpreted as an SGPR offset.

This should be enough to get basic usage of the global instructions
working. Technically it is possible to use an SGPR_32 offset,
but I'm not sure if it's correct with 64-bit pointers, but
that is not handled now. This should also be cleaned up
to be more similar to how different MUBUF modes are handled,
and to have InstrMappings between the different types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308583 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[LICM] Make sinkRegion and hoistRegion non-recursive
David Majnemer [Thu, 20 Jul 2017 03:27:02 +0000 (03:27 +0000)]
[LICM] Make sinkRegion and hoistRegion non-recursive

Large CFGs can cause us to blow up the stack because we would have a
recursive step for each basic block in a region.

Instead, create a worklist and iterate it. This limits the stack usage
to something more manageable.

Differential Revision: https://reviews.llvm.org/D35609

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308582 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRevert "[PEI] Simplify handling of targets with no phys regs. NFC"
Francis Visoiu Mistrih [Thu, 20 Jul 2017 02:47:05 +0000 (02:47 +0000)]
Revert "[PEI] Simplify handling of targets with no phys regs. NFC"

This reverts commit ce30ab6e5598f3c24f59ad016dc9526bc9a1d450.

sanitizer-ppc64le-linux seems to segfault when testing the sanitizers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308581 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRevert "[PEI] Separate saving and restoring CSRs into different functions. NFC"
Francis Visoiu Mistrih [Thu, 20 Jul 2017 02:47:04 +0000 (02:47 +0000)]
Revert "[PEI] Separate saving and restoring CSRs into different functions. NFC"

This reverts commit 540f6a26ae932469804a379ce9a8cbe715d59c23.

sanitizer-ppc64le-linux seems to segfault when testing the sanitizers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308580 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[DWARF] Added check that verifies that no abbreviation declaration has more than...
Spyridoula Gravani [Thu, 20 Jul 2017 02:06:52 +0000 (02:06 +0000)]
[DWARF] Added check that verifies that no abbreviation declaration has more than one attribute with the same name.

SUMMARY

This patch adds a verification check on the abbreviation declarations in the .debug_abbrev section.
The check makes sure that no abbreviation declaration has more than one attributes with the same name.

Differential Revision: https://reviews.llvm.org/D35643

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308579 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[libFuzzer] prototype implementation of recursion-depth coverage features (commented...
Kostya Serebryany [Thu, 20 Jul 2017 01:35:17 +0000 (01:35 +0000)]
[libFuzzer] prototype implementation of recursion-depth coverage features (commented out; real implementation needs to use inlined instrumentation)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308577 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoSupport, IR, ADT: Check nullptr after allocation with malloc/realloc or calloc
Matthias Braun [Thu, 20 Jul 2017 01:30:39 +0000 (01:30 +0000)]
Support, IR, ADT: Check nullptr after allocation with malloc/realloc or calloc

As a follow up of the bad alloc handler patch, this patch introduces nullptr checks on pointers returned from the
malloc/realloc/calloc functions.  In addition some memory size assignments  are moved behind the allocation
of the corresponding memory to fulfill exception safe memory management (RAII).

patch by Klaus Kretzschmar

Differential Revision: https://reviews.llvm.org/D35414

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308576 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[PEI] Separate saving and restoring CSRs into different functions. NFC
Francis Visoiu Mistrih [Thu, 20 Jul 2017 00:58:37 +0000 (00:58 +0000)]
[PEI] Separate saving and restoring CSRs into different functions. NFC

Split insertCSRSpillsAndRestores into insertCSRSaves + insertCSRRestores.

This is mostly useful for future shrink-wrapping improvements where we
want to save / restore a specific part of the CSRs in a specific block.

Differential Revision: https://reviews.llvm.org/D35644

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308573 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoReplace -print-whole-regmask with a threshold.
Matt Arsenault [Thu, 20 Jul 2017 00:37:31 +0000 (00:37 +0000)]
Replace -print-whole-regmask with a threshold.

The previous flag/default of printing everything is
not helpful when there are thousands of registers
in the mask.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308572 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[libFuzzer] add DeepRecursionTest, inspired by https://guidovranken.wordpress.com...
Kostya Serebryany [Thu, 20 Jul 2017 00:37:08 +0000 (00:37 +0000)]
[libFuzzer] add DeepRecursionTest, inspired by https://guidovranken.wordpress.com/2017/07/08/libfuzzer-gv-new-techniques-for-dramatically-faster-fuzzing/ (Stack-depth-guided fuzzing). libFuzzer does not solve it yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308571 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRevert "[LLVM][llvm-objcopy] Added basic plumbing to get things started"
Petr Hosek [Thu, 20 Jul 2017 00:13:32 +0000 (00:13 +0000)]
Revert "[LLVM][llvm-objcopy] Added basic plumbing to get things started"

This reverts commit 98f9792e7ca5bbd9eb43bda72bf497957cfb6eb8.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308569 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoTry to deflake fuzzer-oom.test on Windows
Reid Kleckner [Thu, 20 Jul 2017 00:11:39 +0000 (00:11 +0000)]
Try to deflake fuzzer-oom.test on Windows

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308568 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRevert "[PEI] Separate saving and restoring CSRs into different functions. NFC"
Francis Visoiu Mistrih [Thu, 20 Jul 2017 00:08:02 +0000 (00:08 +0000)]
Revert "[PEI] Separate saving and restoring CSRs into different functions. NFC"

This reverts commit a84d1fa6847e70ebf63594d41a00b473c941bd72.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308562 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[libFuzzer] simplify two more tests
Kostya Serebryany [Wed, 19 Jul 2017 23:52:54 +0000 (23:52 +0000)]
[libFuzzer] simplify two more tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308560 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[LLVM][llvm-objcopy] Added basic plumbing to get things started
Petr Hosek [Wed, 19 Jul 2017 23:51:13 +0000 (23:51 +0000)]
[LLVM][llvm-objcopy] Added basic plumbing to get things started

As discussed on llvm-dev I've implemented the first basic steps towards
llvm-objcopy/llvm-objtool (name pending).

This change adds the ability to copy (without modification) 64-bit
little endian ELF executables that have SHT_PROGBITS, SHT_NOBITS,
SHT_NULL and SHT_STRTAB sections.

Patch by Jake Ehrlich

Differential Revision: https://reviews.llvm.org/D33964

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308559 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AsmPrinter] Constify needsCFIMoves. NFC
Francis Visoiu Mistrih [Wed, 19 Jul 2017 23:47:33 +0000 (23:47 +0000)]
[AsmPrinter] Constify needsCFIMoves. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308557 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[PEI] Add basic opt-remarks support
Francis Visoiu Mistrih [Wed, 19 Jul 2017 23:47:32 +0000 (23:47 +0000)]
[PEI] Add basic opt-remarks support

Add optimization remarks support to the PrologueEpilogueInserter. For
now, emit the stack size as an analysis remark, but more additions wrt
shrink-wrapping may be added.

https://reviews.llvm.org/D35645

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308556 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[PEI] Simplify handling of targets with no phys regs. NFC
Francis Visoiu Mistrih [Wed, 19 Jul 2017 23:47:32 +0000 (23:47 +0000)]
[PEI] Simplify handling of targets with no phys regs. NFC

Make doSpillCalleeSavedRegs a member function, instead of passing most
of the members of PEI as arguments.

Differential Revision: https://reviews.llvm.org/D35642

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308555 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[PEI] Separate saving and restoring CSRs into different functions. NFC
Francis Visoiu Mistrih [Wed, 19 Jul 2017 23:47:31 +0000 (23:47 +0000)]
[PEI] Separate saving and restoring CSRs into different functions. NFC

Split insertCSRSpillsAndRestores into insertCSRSaves + insertCSRRestores.

This is mostly useful for future shrink-wrapping improvements where we
want to save / restore a specific part of the CSRs in a specific block.

Differential Revision: https://reviews.llvm.org/D35644

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308554 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[libFuzzer] change several tests to not limit the max len: with reduce_inputs=1 they...
Kostya Serebryany [Wed, 19 Jul 2017 23:45:46 +0000 (23:45 +0000)]
[libFuzzer] change several tests to not limit the max len: with reduce_inputs=1 they are now fast enough even w/o this

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308553 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoUse llvm::make_unique once more to avoid ADL ambiguity with std::make_unique
Reid Kleckner [Wed, 19 Jul 2017 23:42:53 +0000 (23:42 +0000)]
Use llvm::make_unique once more to avoid ADL ambiguity with std::make_unique

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308552 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoUse llvm::make_unique to try to fix the windows build.
Rafael Espindola [Wed, 19 Jul 2017 23:38:54 +0000 (23:38 +0000)]
Use llvm::make_unique to try to fix the windows build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308551 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRemove some leftover DWARFContextInMemory.
Rafael Espindola [Wed, 19 Jul 2017 23:34:59 +0000 (23:34 +0000)]
Remove some leftover DWARFContextInMemory.

Not sure how I missed these on the previous commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308550 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoFix fuzzer-flags.test on Windows
Reid Kleckner [Wed, 19 Jul 2017 23:22:06 +0000 (23:22 +0000)]
Fix fuzzer-flags.test on Windows

The optional external function callbacks have to be exported in order
for them to be called. The test was failing because libFuzzer wasn't
calling LLVMFuzzerInitialize.

We can reconsider if this is the best way to mark these optional
callbacks exported later.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308548 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoUpdate module map for RuntimeLibcalls
Derek Schuff [Wed, 19 Jul 2017 23:15:29 +0000 (23:15 +0000)]
Update module map for RuntimeLibcalls

The def file was created in r308531

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308547 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[NFC] Fix typo in comment
Francis Visoiu Mistrih [Wed, 19 Jul 2017 22:28:08 +0000 (22:28 +0000)]
[NFC] Fix typo in comment

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308545 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoUse delegation instead of inheritance.
Rafael Espindola [Wed, 19 Jul 2017 22:27:28 +0000 (22:27 +0000)]
Use delegation instead of inheritance.

This changes DwarfContext to delegate to DwarfObject instead of having
pure virtual methods.

With this DwarfContextInMemory is replaced with an implementation of
DwarfObject that is local to a .cpp file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308543 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoGlobalISel: partially revert r308540.
Tim Northover [Wed, 19 Jul 2017 22:11:08 +0000 (22:11 +0000)]
GlobalISel: partially revert r308540.

An unfinished and untested implementation of ISel for G_UNMERGE_VALUES crept in
by mistake.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308542 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[libFuzzer] enable reduce_inputs=1 by default (seems to be a big win usually)
Kostya Serebryany [Wed, 19 Jul 2017 22:10:30 +0000 (22:10 +0000)]
[libFuzzer] enable reduce_inputs=1 by default (seems to be a big win usually)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308541 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoGlobalISel: fix SUBREG_TO_REG implementation.
Tim Northover [Wed, 19 Jul 2017 22:08:08 +0000 (22:08 +0000)]
GlobalISel: fix SUBREG_TO_REG implementation.

The first argument needs to be an immediate rather than a register. Should fix
some crashes in the verifier bot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308540 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[opt-viewer] Reduce memory consumption by another 20-25%
Adam Nemet [Wed, 19 Jul 2017 22:04:59 +0000 (22:04 +0000)]
[opt-viewer] Reduce memory consumption by another 20-25%

The Args field of the remark which consists of a list of mappings in YAML is
translated into a list of (small) dicts on Python.  An empty dict is 280 bytes
on my system so we can save memory by using a tuple of tuples instead.

Making a tuple of tuples rather than a list of tuples allows Args to be shared
with the key of the remark.  This is actually an even greater saving. (Keys
are alive throughout the entire run in all_remarks.)

Here are a few opt-stats runs with different input sizes while measuring heap
usage with heapy.  Avg remark size is simply estimated as
heap-size / # of remarks:

  | # of files             |   60 |  114 |  308 |  605 | 1370 |
  | # of remarks           |  20K |  37K | 146K | 180K | 640K |
  | total file size (MB)   |   22 |   51 |  219 |  202 | 1034 |
  |------------------------+------+------+------+------+------|
  | Avg remark size before | 4339 | 4792 | 4761 | 4096 | 4607 |
  | Avg remark size after  | 3446 | 3641 | 3567 | 3146 | 3347 |
  | Rate                   | 0.79 | 0.76 | 0.75 | 0.77 | 0.73 |

Differential Revision: https://reviews.llvm.org/D35611

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308538 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[opt-viewer] Print allocated memory per remark in opt-stats.py
Adam Nemet [Wed, 19 Jul 2017 22:04:58 +0000 (22:04 +0000)]
[opt-viewer] Print allocated memory per remark in opt-stats.py

If heapy is installed print the "average" in-memory remark size.  This is
estimated by dividing the total heap size by the number of unique remarks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308537 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[opt-viewer] Reduce memory consumption
Adam Nemet [Wed, 19 Jul 2017 22:04:56 +0000 (22:04 +0000)]
[opt-viewer] Reduce memory consumption

The observation is that we have a lot of similar remarks with lots of
identical strings (e.g. file paths, text from the remark).  Storing a copy of
each of those strings in memory is wasteful.  This makes all the strings in
the remark interned which maintains a single immutable instance that is
referenced everywhere.

I get an average 20% heap size reduction with this but it's possible that this
varies with the typical length of the file paths used.  (I used heapy to
report the heap size.)  Runtime is same or a tiny bit better.

  | # of files            |   60 |  114 |  308 |  605 | 1370 |
  | # of remarks          |  20K |  37K | 146K | 180K | 640K |
  | total file size (MB)  |   22 |   51 |  219 |  202 | 1034 |
  |-----------------------+------+------+------+------+------|
  | Heap size before (MB) |  106 |  226 |  894 |  934 | 3573 |
  | Heap size after       |   86 |  179 |  694 |  739 | 2798 |
  | Rate                  | 0.81 | 0.79 | 0.78 | 0.79 | 0.78 |
  |-----------------------+------+------+------+------+------|
  | Average remark size   | 4.30 | 4.84 | 4.75 | 4.11 | 4.37 |
  | Mem2disk ratio        | 3.91 | 3.51 | 3.17 | 3.66 | 2.71 |

Differential Revision: https://reviews.llvm.org/D35534

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308536 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMove Runtime libcall definitions to a .def file
Derek Schuff [Wed, 19 Jul 2017 21:53:30 +0000 (21:53 +0000)]
Move Runtime libcall definitions to a .def file

This will allow eliminating the duplication of the names, and allow adding
extra information such as signatures in a future commit.

Differential Revision: https://reviews.llvm.org/D35522

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308531 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoForgot to add triple to test in r308513.
Wolfgang Pieb [Wed, 19 Jul 2017 21:45:21 +0000 (21:45 +0000)]
Forgot to add triple to test in r308513.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308527 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[TRE] Add another test for OptRemark.
Davide Italiano [Wed, 19 Jul 2017 21:39:51 +0000 (21:39 +0000)]
[TRE] Add another test for OptRemark.

This shows we emit a remark for tail recursion -> loop.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308525 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[TRE] Move to the new OptRemark API.
Davide Italiano [Wed, 19 Jul 2017 21:13:22 +0000 (21:13 +0000)]
[TRE] Move to the new OptRemark API.

Fixes PR33788.

Differential Revision:  https://reviews.llvm.org/D35570

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308524 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[yaml2obj][ELF] Add support for program headers
Petr Hosek [Wed, 19 Jul 2017 20:38:46 +0000 (20:38 +0000)]
[yaml2obj][ELF] Add support for program headers

This change adds basic support for program headers.

I need to do some testing which requires generating program headers but
I can't use ld.lld or clang to produce programs that have headers. I'd
also like to test some strange things that those programs may never
produce.

Patch by Jake Ehrlich

Differential Revision: https://reviews.llvm.org/D35276

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308520 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AArch64] Force relocations for all ADRP instructions
Martin Storsjo [Wed, 19 Jul 2017 20:14:32 +0000 (20:14 +0000)]
[AArch64] Force relocations for all ADRP instructions

This generalizes an existing fix from ELF to MachO and COFF.

Test that an ADRP to a local symbol whose offset is known at assembly
time still produces relocations, both for MachO and COFF. Test that
an ADRP without a @page modifier on MachO fails (previously it
didn't).

Differential Revision: https://reviews.llvm.org/D35544

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308518 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AArch64, COFF] Interpret .align as power of two for COFF as well
Martin Storsjo [Wed, 19 Jul 2017 20:14:24 +0000 (20:14 +0000)]
[AArch64, COFF] Interpret .align as power of two for COFF as well

Differential Revision: https://reviews.llvm.org/D35545

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308517 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoFixing an issue with the initialization of LexicalScopes objects when mixing debug
Wolfgang Pieb [Wed, 19 Jul 2017 19:36:40 +0000 (19:36 +0000)]
Fixing an issue with the initialization of LexicalScopes objects when mixing debug
and non-debug units.

Patch by Andrea DiBiagio.

Differential Revision:  https://reviews.llvm.org/D35637

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308513 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[Hexagon] Fix a bug in r308502: post-inc offset is always 0
Krzysztof Parzyszek [Wed, 19 Jul 2017 19:17:32 +0000 (19:17 +0000)]
[Hexagon] Fix a bug in r308502: post-inc offset is always 0

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308510 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[cmake] GetSVN.cmake takes a list of arguments
Brian Gesiak [Wed, 19 Jul 2017 18:37:02 +0000 (18:37 +0000)]
[cmake] GetSVN.cmake takes a list of arguments

Summary:
GetSVN.cmake currently takes one or two pairs of <source directory path,
name>, then attempts to get the remote repository URL and source control
revision of the repositories at those one or two paths.

It takes two pairs in order for Clang to get the revision of both
itself, and its dependency LLVM.

For projects that rely upon both LLVM and Clang (Apple's Swift is one
example, but there are others), GetSVN.cmake is used to fetch *three*
revisions: Swift, Clang, and LLVM.

To support this use case, change GetSVN.cmake: instead of taking one or
two pairs (specified via `FIRST_SOURCE_DIR`/`FIRST_NAME`, have it take a list
of pairs (`SOURCE_DIRS`/`NAMES`).

In order to allow Clang to migrate, have GetSVN.cmake support both sets
of arguments for now. The old arguments can be removed once Clang begins
using the new arguments, and Swift can follow when it updates its
copy of LLVM.

Test Plan:
1. Perform a clean build of Clang, verify that `clang --version` still
   prints the correct LLVM and Clang revision information.
2. Modify Clang's CMake to use the new arguments, then perform another
   clean build. `clang --version` should still print the correct
   revision information.

Reviewers: jordan_rose, beanz, probinson

Subscribers: echristo, chapuni, llvm-commits, mgorny

Differential Revision: https://reviews.llvm.org/D35132

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308507 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoLTO: Export functions referenced by the CFI jump table.
Peter Collingbourne [Wed, 19 Jul 2017 18:18:19 +0000 (18:18 +0000)]
LTO: Export functions referenced by the CFI jump table.

If the LowerTypeTests pass decides to add a function to a jump
table for CFI, it will add its name to the set cfiFunctionDefs,
which among other things will cause the function to be renamed in
the ThinLTO backend.

One other thing that we must do with such functions is to not
internalize them, because the jump table in the full LTO object will
contain a reference to the actual function body in the ThinLTO object.

This patch handles that by ensuring that we export any functions
whose names appear in the cfiFunctionDefs set.

Fixes PR33831.

Differential Revision: https://reviews.llvm.org/D35605

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308504 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86] Don't try to scale down if that exceeds the bitwidth.
Davide Italiano [Wed, 19 Jul 2017 18:09:46 +0000 (18:09 +0000)]
[X86] Don't try to scale down if that exceeds the bitwidth.

Fixes the crash reported in PR33844.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308503 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[Hexagon] Handle subregisters in areMemAccessesTriviallyDisjoint
Krzysztof Parzyszek [Wed, 19 Jul 2017 18:03:46 +0000 (18:03 +0000)]
[Hexagon] Handle subregisters in areMemAccessesTriviallyDisjoint

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308502 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoThinLTOBitcodeWriter: Do not rewrite intrinsic functions when splitting modules.
Peter Collingbourne [Wed, 19 Jul 2017 17:54:29 +0000 (17:54 +0000)]
ThinLTOBitcodeWriter: Do not rewrite intrinsic functions when splitting modules.

Changing the type of an intrinsic may invalidate the IR.

Differential Revision: https://reviews.llvm.org/D35593

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308500 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoGlobalISel: select G_EXTRACT and G_INSERT instructions on AArch64.
Tim Northover [Wed, 19 Jul 2017 16:47:07 +0000 (16:47 +0000)]
GlobalISel: select G_EXTRACT and G_INSERT instructions on AArch64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308493 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[Solaris] enable --whole-archive for shared-library build, disable --version-script...
Sylvestre Ledru [Wed, 19 Jul 2017 16:07:51 +0000 (16:07 +0000)]
[Solaris] enable --whole-archive for shared-library build, disable --version-script for Solaris-ld
Shared-library build on Solaris requires --whole-archive to be specified (option accepted by all available linkers).

At the same time, --version-script can not be handled by Solaris-ld, so it should be skipped.
-M is of no use here, since there is no syntax in Solaris-ld mapfiles that allows to version all global symbols,
not just the named ones (at least this is my impression from digging deep into the docs).

Patch by Fedor Sergeev <fedor.sergeev@oracle.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308490 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[Hexagon] Handle subregisters and non-immediates in getBaseAndOffset
Krzysztof Parzyszek [Wed, 19 Jul 2017 15:39:28 +0000 (15:39 +0000)]
[Hexagon] Handle subregisters and non-immediates in getBaseAndOffset

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308485 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoDefeat another -Wunused-but-set-variable warning
Hans Wennborg [Wed, 19 Jul 2017 15:06:31 +0000 (15:06 +0000)]
Defeat another -Wunused-but-set-variable warning

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308484 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoDefeat a GCC -Wunused-result warning
Hans Wennborg [Wed, 19 Jul 2017 15:03:38 +0000 (15:03 +0000)]
Defeat a GCC -Wunused-result warning

It was warning like:

../llvm-project/llvm/lib/Support/ErrorHandling.cpp:172:51: warning:
ignoring return value of ‘ssize_t write(int, const void*, size_t)’,
         declared with attribute warn_unused_result [-Wunused-result]
            (void)::write(2, OOMMessage, strlen(OOMMessage));

Work around the warning by storing the return value in a variable and
casting that to void instead. We already did this for the other write()
call in this file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308483 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[docs] Document how to debug instruction scheduling model generation
Joel Jones [Wed, 19 Jul 2017 14:10:42 +0000 (14:10 +0000)]
[docs] Document how to debug instruction scheduling model generation

Describe:

+ Exact tablegen command and how to get it
+ tablegen command debug option for subtarget generation
+ Use of schedcover.py on the debug output to determine coverage

Differential Revision: https://reviews.llvm.org/D35058

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308476 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoClear release notes for 6.0.0
Hans Wennborg [Wed, 19 Jul 2017 14:09:16 +0000 (14:09 +0000)]
Clear release notes for 6.0.0

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308474 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago{DAGCombine] Convert (Val & Mask) == Mask to Mask.isSubsetof(Val). NFCI.
Simon Pilgrim [Wed, 19 Jul 2017 13:39:58 +0000 (13:39 +0000)]
{DAGCombine] Convert (Val & Mask) == Mask to Mask.isSubsetof(Val). NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308460 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[ARM] Unify handling of M-Class system registers
Javed Absar [Wed, 19 Jul 2017 12:57:16 +0000 (12:57 +0000)]
[ARM] Unify handling of M-Class system registers

This patch cleans up and fixes issues in the M-Class system register handling:

1. It defines the system registers and the encoding (SYSm values) in one place:
   a new ARMSystemRegister.td using SearchableTable, thereby removing the
   hand-coded values which existed in multiple places.

2. Some system registers e.g. BASEPRI_MAX_NS which do not exist were being allowed!
   Ref: ARMv6/7/8M architecture reference manual.

Reviewed by: @t.p.northover, @olist01, @john.brawn
Differential Revision: https://reviews.llvm.org/D35209

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308456 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoUpdate trunk version to 6.0.0svn
Hans Wennborg [Wed, 19 Jul 2017 12:19:01 +0000 (12:19 +0000)]
Update trunk version to 6.0.0svn

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308442 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRecommit r274270, [CMake] Module builds depend on target intrinsics_gen to be built...
NAKAMURA Takumi [Wed, 19 Jul 2017 11:27:31 +0000 (11:27 +0000)]
Recommit r274270, [CMake] Module builds depend on target intrinsics_gen to be built first.

The builder clang-x86_64-linux-selfhost-modules-2 complains. Investigating.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308439 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRevert r274270, "[CMake] Module builds depend on target intrinsics_gen to be built...
NAKAMURA Takumi [Wed, 19 Jul 2017 10:47:38 +0000 (10:47 +0000)]
Revert r274270, "[CMake] Module builds depend on target intrinsics_gen to be built first."

I think modulemap is sufficient for intrinsics_gen in trunk. I won't find any issues around that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308434 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86][XOP] Use default AVX2 lowering for v4i64 ashr by splat constants
Simon Pilgrim [Wed, 19 Jul 2017 10:29:31 +0000 (10:29 +0000)]
[X86][XOP] Use default AVX2 lowering for v4i64 ashr by splat constants

XOP shifts only support 128-bit vectors, so we were ending up with less optimal codegen requiring constants

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308430 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[SystemZ] Minor fixing in SystemZScheduleZ14.td
Jonas Paulsson [Wed, 19 Jul 2017 10:19:21 +0000 (10:19 +0000)]
[SystemZ]  Minor fixing in SystemZScheduleZ14.td

Some minor corrections for recently added instructions.

Review: Ulrich Weigand

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308429 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[LoopUtils] Add an extra parameter OpValue to propagateIRFlags function,
Dinar Temirbulatov [Wed, 19 Jul 2017 10:02:07 +0000 (10:02 +0000)]
[LoopUtils] Add an extra parameter OpValue to propagateIRFlags function,
If OpValue is non-null, we only consider operations similar to OpValue
when intersecting.

Differential Revision: https://reviews.llvm.org/D35292

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308428 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[globalisel][tablegen] 80-col corrections.
Daniel Sanders [Wed, 19 Jul 2017 09:28:20 +0000 (09:28 +0000)]
[globalisel][tablegen] 80-col corrections.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308424 91177308-0d34-0410-b5e6-96231b3b80d8