OSDN Git Service

android-x86/external-llvm.git
7 years ago[codeview] YAMLize all section offsets and indices in symbol records
Reid Kleckner [Tue, 20 Jun 2017 21:19:22 +0000 (21:19 +0000)]
[codeview] YAMLize all section offsets and indices in symbol records

We forgot to serialize these because llvm-readobj didn't dump them. They
are typically all zeros in an object file. The linker fills them in with
relocations before adding them to the PDB. Now we can properly round
trip these symbols through pdb2yaml -> yaml2pdb.

I made these fields optional with a zero default so that we can elide
them from our test cases.

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

7 years agoRevert "Add previously accidentally uncommitted testcase for r305599."
Adrian Prantl [Tue, 20 Jun 2017 21:14:29 +0000 (21:14 +0000)]
Revert "Add previously accidentally uncommitted testcase for r305599."

This reverts commit r305852.

The testcase already exists but I moved it to the X86 directory on a
using a different machine and got confused...

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

7 years agoMake this test a bit more strict. NFC.
Rafael Espindola [Tue, 20 Jun 2017 21:11:58 +0000 (21:11 +0000)]
Make this test a bit more strict. NFC.

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

7 years agoFix a crash in DwarfDebug::validThroughout.
Adrian Prantl [Tue, 20 Jun 2017 21:08:52 +0000 (21:08 +0000)]
Fix a crash in DwarfDebug::validThroughout.

The instruction it falls over on is an IMPLICT_DEF that also happens
to be the only instruction in its lexical scope. That LexicalScope has
never been created because its range is empty. This patch skips over
all meta-instructions instead of just DBG_VALUEs.

Thanks to David Blaikie for providing a testcase!

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

7 years agoAdd previously accidentally uncommitted testcase for r305599.
Adrian Prantl [Tue, 20 Jun 2017 21:08:19 +0000 (21:08 +0000)]
Add previously accidentally uncommitted testcase for r305599.

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

7 years agoChange llvm-objdump with Mach-O files and the -info-plist option with the
Kevin Enderby [Tue, 20 Jun 2017 21:00:25 +0000 (21:00 +0000)]
Change llvm-objdump with Mach-O files and the -info-plist option with the
-no-leading-headers option so that it does not print the leading header.

rdar://27378808

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

7 years ago[Statepoint] Add helper functions for GCRelocate and GCResult
Anna Thomas [Tue, 20 Jun 2017 20:54:57 +0000 (20:54 +0000)]
[Statepoint] Add helper functions for GCRelocate and GCResult

These functions isGCRelocate and isGCResult are
similar to isStatepoint(const Value*).

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

7 years agoSupport: chunk writing on Linux
Saleem Abdulrasool [Tue, 20 Jun 2017 20:51:51 +0000 (20:51 +0000)]
Support: chunk writing on Linux

This is a workaround for large file writes.  It has been witnessed that
write(2) failing with EINVAL (22) due to a large value (>2G).  Thanks to
James Knight for the help with coming up with a sane test case.

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

7 years agoAMDGPU: Allow vectorization of packed types
Matt Arsenault [Tue, 20 Jun 2017 20:38:06 +0000 (20:38 +0000)]
AMDGPU: Allow vectorization of packed types

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

7 years ago[codeview] Fully initialize DataSym when mapping from YAML
Reid Kleckner [Tue, 20 Jun 2017 20:34:37 +0000 (20:34 +0000)]
[codeview] Fully initialize DataSym when mapping from YAML

In the object file, the section index and relative offset are typically
zero, so make these YAML fields optional with a default.

It looks like there may be more partially initialized symbol records,
but this should fix the msan bot.

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

7 years ago[AMDGPU] Fix illegal shrink of V_SUBB_U32 and V_ADDC_U32
Stanislav Mekhanoshin [Tue, 20 Jun 2017 20:33:44 +0000 (20:33 +0000)]
[AMDGPU] Fix illegal shrink of V_SUBB_U32 and V_ADDC_U32

If there is an immediate operand we shall not shrink V_SUBB_U32
and V_ADDC_U32, it does not fit e32 encoding.

Differential Revison: https://reviews.llvm.org/D34291

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

7 years ago[cmake] Add support for using the standalone leaks sanitizer with LLVM.
Michael Gottesman [Tue, 20 Jun 2017 20:28:07 +0000 (20:28 +0000)]
[cmake] Add support for using the standalone leaks sanitizer with LLVM.

This commit causes LLVM_USE_SANITIZER to now accept the "Leaks" option. This
will cause cmake to pass in -fsanitize=leak in all of the appropriate places.

I am making this change so that I can setup a linux bot that only detects
leaks.

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

7 years agoAMDGPU: Start adding global_* instructions
Matt Arsenault [Tue, 20 Jun 2017 19:54:14 +0000 (19:54 +0000)]
AMDGPU: Start adding global_* instructions

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

7 years ago[GISel]: NFC. Add comment to G_FMA opcode as requested in rL305824
Aditya Nandakumar [Tue, 20 Jun 2017 19:52:29 +0000 (19:52 +0000)]
[GISel]: NFC. Add comment to G_FMA opcode as requested in rL305824

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

7 years ago[GISel]: Add G_FMA opcode for fused multiply adds
Aditya Nandakumar [Tue, 20 Jun 2017 19:25:23 +0000 (19:25 +0000)]
[GISel]: Add G_FMA opcode for fused multiply adds

https://reviews.llvm.org/D34372

Reviewed by dsanders

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

7 years agoAMDGPU: Do operand folding in program order
Matt Arsenault [Tue, 20 Jun 2017 18:56:32 +0000 (18:56 +0000)]
AMDGPU: Do operand folding in program order

Before it was possible to partially fold use instructions
before the defs. After the xor is folded into a copy, the same
mov can end up in the fold list twice, so on the second attempt
it will fail expecting to see a register to fold.

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

7 years ago[PDB] Don't write uninitialized bytes to a PDB file.
Zachary Turner [Tue, 20 Jun 2017 18:50:55 +0000 (18:50 +0000)]
[PDB] Don't write uninitialized bytes to a PDB file.

There were certain fields that we didn't know how to write, as
well as various padding bytes that we would ignore.  This leads
to garbage data in the PDB.  While not strictly necessary, we
should initialize these bytes to something meaningful, as it
makes for easier binary comparison between PDBs.

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

7 years agoRemove diff pedantic mode.
Zachary Turner [Tue, 20 Jun 2017 18:50:30 +0000 (18:50 +0000)]
Remove diff pedantic mode.

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

7 years agoRegisterScavenging: Followup to r305625
Matthias Braun [Tue, 20 Jun 2017 18:43:14 +0000 (18:43 +0000)]
RegisterScavenging: Followup to r305625

This does some improvements/cleanup to the recently introduced
scavengeRegisterBackwards() functionality:

- Rewrite findSurvivorBackwards algorithm to use the existing
  LiveRegUnit::accumulateBackward() code. This also avoids the Available
  and Candidates bitset and just need 1 LiveRegUnit instance
  (= 1 bitset).
- Pick registers in allocation order instead of register number order.

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

7 years agoAMDGPU: Preserve undef when folding register operands
Matt Arsenault [Tue, 20 Jun 2017 18:41:31 +0000 (18:41 +0000)]
AMDGPU: Preserve undef when folding register operands

If the source was a copy of an undef register, this would
produce a read of an undefined register which is a verifier
error.

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

7 years ago[AMDGPU] Eliminate SGPR to VGPR copy when possible
Stanislav Mekhanoshin [Tue, 20 Jun 2017 18:32:42 +0000 (18:32 +0000)]
[AMDGPU] Eliminate SGPR to VGPR copy when possible

SGPRs are generally cheaper, so try to use them over VGPRs.

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

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

7 years agoAMDGPU: Fix crash with undef vreg input operand
Matt Arsenault [Tue, 20 Jun 2017 18:28:02 +0000 (18:28 +0000)]
AMDGPU: Fix crash with undef vreg input operand

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

7 years ago[PowerPC] fix trivial typos in comment, NFC
Hiroshi Inoue [Tue, 20 Jun 2017 17:53:33 +0000 (17:53 +0000)]
[PowerPC] fix trivial typos in comment, NFC

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

7 years ago[CostModel][X86] Add scalar arithmetic cost tests
Simon Pilgrim [Tue, 20 Jun 2017 17:10:27 +0000 (17:10 +0000)]
[CostModel][X86] Add scalar arithmetic cost tests

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

7 years ago[CostModel][X86] Declare costs variables based on type
Simon Pilgrim [Tue, 20 Jun 2017 17:04:46 +0000 (17:04 +0000)]
[CostModel][X86] Declare costs variables based on type

The alphabetical progression isn't that useful

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

7 years ago[TableGen] Take a parameter by reference instead of pointer so we don't have to add...
Craig Topper [Tue, 20 Jun 2017 16:34:37 +0000 (16:34 +0000)]
[TableGen] Take a parameter by reference instead of pointer so we don't have to add & on both callers. NFC

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

7 years ago[TableGen] Use range based for loop. NFC
Craig Topper [Tue, 20 Jun 2017 16:34:35 +0000 (16:34 +0000)]
[TableGen] Use range based for loop. NFC

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

7 years ago[GSoC] Flag value completion for clang
Yuka Takahashi [Tue, 20 Jun 2017 16:31:31 +0000 (16:31 +0000)]
[GSoC] Flag value completion for clang

This is patch for GSoC project, bash-completion for clang.

To use this on bash, please run `source clang/utils/bash-autocomplete.sh`.
bash-autocomplete.sh is code for bash-completion.

In this patch, Options.td was mainly changed in order to add value class
in Options.inc.

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

7 years ago[x86] enable CGP memcmp() expansion for 2/4/8 byte sizes
Sanjay Patel [Tue, 20 Jun 2017 15:58:30 +0000 (15:58 +0000)]
[x86] enable CGP memcmp() expansion for 2/4/8 byte sizes

There are a couple of potential improvements as seen in the IR and asm:
1. We're unnecessarily extending to a larger type to compare values.
2. The codegen for (select cond, 1, -1) could avoid a cmov.
(or we could change the order of the compares, so we have a select with 0 operand)

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

7 years ago[X86][SSE] Relax 0/-1 vector element insertion to work for any vector with >=16bit...
Simon Pilgrim [Tue, 20 Jun 2017 15:19:02 +0000 (15:19 +0000)]
[X86][SSE] Relax 0/-1 vector element insertion to work for any vector with >=16bit elements

Shuffle lowering/combining now does a good job for 256/512-bit vectors - we don't need to prevent this

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

7 years agoDAG: correctly legalize UMULO.
Tim Northover [Tue, 20 Jun 2017 15:01:38 +0000 (15:01 +0000)]
DAG: correctly legalize UMULO.

We were incorrectly sign extending into the high word (as you would for
SMULO) when legalizing UMULO in terms of a wider full multiplication.

Patch by James Duley.

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

7 years agoD33466: Make file non-executable.
Vassil Vassilev [Tue, 20 Jun 2017 14:20:48 +0000 (14:20 +0000)]
D33466: Make file non-executable.

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

7 years ago[InstCombine] fix code/test comments for r305792; NFC
Sanjay Patel [Tue, 20 Jun 2017 12:45:46 +0000 (12:45 +0000)]
[InstCombine] fix code/test comments for r305792; NFC

These diffs were in the last version of the patch in D33342,
but I accidentally committed the previous rev.

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

7 years ago[InstCombine] try to canonicalize xor-of-icmps to and-of-icmps
Sanjay Patel [Tue, 20 Jun 2017 12:40:55 +0000 (12:40 +0000)]
[InstCombine] try to canonicalize xor-of-icmps to and-of-icmps

We have a large portfolio of folds for and-of-icmps and or-of-icmps in InstSimplify and InstCombine,
but hardly anything for xor-of-icmps. Rather than trying to rethink and translate all of those folds,
we can use the truth table definition of xor:

X ^ Y --> (X | Y) & !(X & Y)

...to see if we can convert the xor to and/or and then use the existing folds.

http://rise4fun.com/Alive/J9v

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

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

7 years ago[globalisel][tablegen] Add support for COPY_TO_REGCLASS.
Daniel Sanders [Tue, 20 Jun 2017 12:36:34 +0000 (12:36 +0000)]
[globalisel][tablegen] Add support for COPY_TO_REGCLASS.

Summary:
As part of this
* Emitted instructions now have named MachineInstr variables associated
  with them. This isn't particularly important yet but it's a small step
  towards multiple-insn emission.
* constrainSelectedInstRegOperands() is no longer hardcoded. It's now added
  as the ConstrainOperandsToDefinitionAction() action. COPY_TO_REGCLASS uses
  an alternate constraint mechanism ConstrainOperandToRegClassAction() which
  supports arbitrary constraints such as that defined by COPY_TO_REGCLASS.

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

Reviewed By: ab

Subscribers: javed.absar, igorb, llvm-commits

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

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

7 years agoFix Wdocumentation warning
Simon Pilgrim [Tue, 20 Jun 2017 12:28:33 +0000 (12:28 +0000)]
Fix Wdocumentation warning

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

7 years ago[X86][SSE] Dropped old INSERT_VECTOR_ELT lowering TODO
Simon Pilgrim [Tue, 20 Jun 2017 10:33:34 +0000 (10:33 +0000)]
[X86][SSE] Dropped old INSERT_VECTOR_ELT lowering TODO

Target shuffle combining now supports the matching of INSERT_VECTOR_ELT/PINSRW/PINSRB for merging multiple insertions into shuffles/bitmasks.

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

7 years agoFixed test name. NFCI.
Simon Pilgrim [Tue, 20 Jun 2017 10:24:06 +0000 (10:24 +0000)]
Fixed test name. NFCI.

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

7 years ago[GlobalISel][X86] fix compilation error ( -Werror=unused-function )
Igor Breger [Tue, 20 Jun 2017 09:40:57 +0000 (09:40 +0000)]
[GlobalISel][X86] fix compilation error ( -Werror=unused-function )

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

7 years ago[SelectionDAG] Fix an use-after-free issue introduced in r305775.
Haojian Wu [Tue, 20 Jun 2017 09:29:43 +0000 (09:29 +0000)]
[SelectionDAG] Fix an use-after-free issue introduced in r305775.

vector.back() will be invalidated when memory reallocation happens.

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

7 years ago[GlobalISel][X86] Get correct RegClass for given RegBank.
Igor Breger [Tue, 20 Jun 2017 09:15:10 +0000 (09:15 +0000)]
[GlobalISel][X86] Get correct RegClass for given RegBank.

Summary:
In some cases RegClass depends on target feature. Hight (16-31) vector registers exist only if AVX512f available.
Split from https://reviews.llvm.org/D33665

Reviewers: qcolombet, t.p.northover, zvi, guyblank

Reviewed By: t.p.northover, guyblank

Subscribers: guyblank, rovka, llvm-commits, kristof.beyls

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

Conflicts:
test/CodeGen/X86/GlobalISel/select-memop-scalar.mir

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

7 years ago[GlobalISel] combine not symmetric merge/unmerge nodes.
Igor Breger [Tue, 20 Jun 2017 08:54:17 +0000 (08:54 +0000)]
[GlobalISel] combine not symmetric merge/unmerge nodes.

Summary:
In some cases legalization ends up with not symmetric merge/unmerge nodes.
Transform it to merge/unmerge nodes.

Reviewers: t.p.northover, qcolombet, zvi

Reviewed By: t.p.northover

Subscribers: rovka, kristof.beyls, guyblank, llvm-commits

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

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

7 years ago[SCEV][NFC] Fix a misleading description of AddOpsInlineThreshold
Max Kazantsev [Tue, 20 Jun 2017 08:37:31 +0000 (08:37 +0000)]
[SCEV][NFC] Fix a misleading description of AddOpsInlineThreshold

The description of this option was copy-pasted from another one and does not
correspond to reality.

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

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

7 years ago[GlobalISel][X86] add legalizer mir tests. NFC
Igor Breger [Tue, 20 Jun 2017 08:30:48 +0000 (08:30 +0000)]
[GlobalISel][X86] add legalizer mir tests. NFC

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

7 years agoWasmObjectWriter.cpp: Tweak a comment line. [-Wdocumentation]
NAKAMURA Takumi [Tue, 20 Jun 2017 07:21:19 +0000 (07:21 +0000)]
WasmObjectWriter.cpp: Tweak a comment line. [-Wdocumentation]

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

7 years ago[ARM] Support constant pools in data when generating execute-only code.
Alexandros Lamprineas [Tue, 20 Jun 2017 07:20:52 +0000 (07:20 +0000)]
[ARM] Support constant pools in data when generating execute-only code.

Resubmission of r305387, which was reverted at r305390. The Address
Sanitizer caught a stack-use-after-scope of a Twine variable. This
is now fixed by passing the Twine directly as a function parameter.

The ARM backend asserts against constant pool lowering when it generates
execute-only code in order to prevent the generation of constant pools in
the text section. It appears that target independent optimizations might
generate DAG nodes that represent constant pools. By lowering such nodes
as global addresses we don't violate the semantics of execute-only code
and also it is guaranteed that execute-only behaves correct with the
position-independent addressing modes that support execute-only code.

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

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

7 years ago[SelectionDAG] Get rid of recursion in CalcNodeSethiUllmanNumber
Max Kazantsev [Tue, 20 Jun 2017 07:07:09 +0000 (07:07 +0000)]
[SelectionDAG] Get rid of recursion in CalcNodeSethiUllmanNumber

The recursive implementation of CalcNodeSethiUllmanNumber may
overflow stack on extremely long pred chains. This patch replaces it
with an equivalent iterative implementation.

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

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

7 years agoFix unused function build error in lld
Sam Clegg [Tue, 20 Jun 2017 05:05:10 +0000 (05:05 +0000)]
Fix unused function build error in lld

The lld-x86_64-darwin13 is failing with:
 error: unused function 'operator<<'

Wrap the declation in ifndef NDEBUG, which matches
what is done in MipsELFObjectWriter.cpp.

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

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

7 years ago[WebAssembly] Fix build failures introduced in r305769
Sam Clegg [Tue, 20 Jun 2017 04:47:58 +0000 (04:47 +0000)]
[WebAssembly] Fix build failures introduced in r305769

This fixes two build failures that only occur in certain
configurations:
- error: unused function 'operator<<'
- error: control reaches end of non-void function

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

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

7 years ago[WebAssembly] Add support for weak symbols in the binary format
Sam Clegg [Tue, 20 Jun 2017 04:04:59 +0000 (04:04 +0000)]
[WebAssembly] Add support for weak symbols in the binary format

This also introduces the updated format for the
"linking" section which can represent extra
symbol information.  See:
https://github.com/WebAssembly/tool-conventions/pull/10

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

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

7 years ago[DAG] Simplify BaseIndexOffset. NFCI.
Nirav Dave [Tue, 20 Jun 2017 02:48:39 +0000 (02:48 +0000)]
[DAG] Simplify BaseIndexOffset. NFCI.

Remove tail calls and cleanup codeflow.

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

7 years ago[Coverage] PR33517: Check for failure to load func records
Vedant Kumar [Tue, 20 Jun 2017 02:05:35 +0000 (02:05 +0000)]
[Coverage] PR33517: Check for failure to load func records

With PR33517, it became apparent that symbol table creation can fail
when presented with malformed inputs. This patch makes that sort of
error detectable, so llvm-cov etc. can fail more gracefully.

Specifically, we now check that function records loaded from corrupted coverage
mapping data are rejected, e.g when the recorded function name is garbage.

Testing: check-{llvm,clang,profile}, some unit test updates.

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

7 years ago[ProfileData] PR33517: Check for failure of symtab creation
Vedant Kumar [Tue, 20 Jun 2017 01:38:56 +0000 (01:38 +0000)]
[ProfileData] PR33517: Check for failure of symtab creation

With PR33517, it became apparent that symbol table creation can fail
when presented with malformed inputs. This patch makes that sort of
error detectable, so llvm-cov etc. can fail more gracefully.

Specifically, we now check that function names within the symbol table
aren't empty.

Testing: check-{llvm,clang,profile}, some unit test updates.

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

7 years ago[test-release.sh] Enable Polly by default
Pengxuan Zheng [Tue, 20 Jun 2017 01:04:25 +0000 (01:04 +0000)]
[test-release.sh] Enable Polly by default

Reviewers: grosser, hans, zinob, bollu

Reviewed By: grosser, hans

Subscribers: tstellar, llvm-commits

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

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

7 years agoThe change to llvm-nm in r305733 added fields to the struct NMSymbol
Kevin Enderby [Tue, 20 Jun 2017 00:41:04 +0000 (00:41 +0000)]
The change to llvm-nm in r305733 added fields to the struct NMSymbol
that are not set on the main path.  This diff does a memset to 0 the structs
so this change is to hopefully fix the sanitizer-x86_64-linux-fast bot.

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

7 years agoAMDGPU: Fix scratch wave offset relative FI expansion
Matt Arsenault [Mon, 19 Jun 2017 23:47:21 +0000 (23:47 +0000)]
AMDGPU: Fix scratch wave offset relative FI expansion

The offset may not be an inline immediate, so this needs
to be materialized into a register. The post-RA run of
SIShrinkInstructions is able to fold it later if it can.

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

7 years ago[ExecutionEngine] Fix some Clang-tidy modernize-use-using and Include What You Use...
Eugene Zelenko [Mon, 19 Jun 2017 23:37:52 +0000 (23:37 +0000)]
[ExecutionEngine] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC).

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

7 years ago[AMDGPU] Add infer address spaces pass before SROA
Stanislav Mekhanoshin [Mon, 19 Jun 2017 23:17:36 +0000 (23:17 +0000)]
[AMDGPU] Add infer address spaces pass before SROA

It adds it for the target after inlining but before SROA where
we can get most out of it.

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

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

7 years ago[Target] Fix some Clang-tidy modernize-use-using and Include What You Use warnings...
Eugene Zelenko [Mon, 19 Jun 2017 22:43:19 +0000 (22:43 +0000)]
[Target] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC).

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

7 years agoFix machine instruction in test case
Sanjoy Das [Mon, 19 Jun 2017 22:35:48 +0000 (22:35 +0000)]
Fix machine instruction in test case

The AMD64rm instruction used in the test case was incorrect.  Since
the first input register to AND64rm is tied to output register, they
must be the same.

Thanks for Jesper Antonsson for pointing this out!

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

7 years ago[IR] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC).
Eugene Zelenko [Mon, 19 Jun 2017 22:05:08 +0000 (22:05 +0000)]
[IR] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC).

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

7 years agoMark LLVMTestingSupport as not installed in LLVMBuild.
Zachary Turner [Mon, 19 Jun 2017 22:01:50 +0000 (22:01 +0000)]
Mark LLVMTestingSupport as not installed in LLVMBuild.

This is causing downstream issues with llvm-config.

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

7 years agoTry to fix uninitialized read in unit test.
Zachary Turner [Mon, 19 Jun 2017 21:59:09 +0000 (21:59 +0000)]
Try to fix uninitialized read in unit test.

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

7 years ago[AArch64][Falkor] Fix MOVZ sched predicate to not assert on non-imm operands (e.g...
Geoff Berry [Mon, 19 Jun 2017 21:57:44 +0000 (21:57 +0000)]
[AArch64][Falkor] Fix MOVZ sched predicate to not assert on non-imm operands (e.g. blockaddress).

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

7 years ago[AArch64][Kryo] Add missing write latency for LDAXP, LDXP second destination.
Geoff Berry [Mon, 19 Jun 2017 21:57:42 +0000 (21:57 +0000)]
[AArch64][Kryo] Add missing write latency for LDAXP, LDXP second destination.

Fixes PR33491 and PR33512.

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

7 years ago[AArch64][Falkor] Refine load/store increment latencies.
Geoff Berry [Mon, 19 Jun 2017 21:56:21 +0000 (21:56 +0000)]
[AArch64][Falkor] Refine load/store increment latencies.

Also fix LDXP & LDAXP write latency to avoid similar assert as PR33491 and PR33512.

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

7 years agoFix typos
Matt Arsenault [Mon, 19 Jun 2017 21:54:25 +0000 (21:54 +0000)]
Fix typos

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

7 years agoAMDGPU: Cleanup CreateLiveInRegister
Matt Arsenault [Mon, 19 Jun 2017 21:52:45 +0000 (21:52 +0000)]
AMDGPU: Cleanup CreateLiveInRegister

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

7 years agoFix a FIXME in llvm-objdump for the -exports-trie option that was not adding
Kevin Enderby [Mon, 19 Jun 2017 21:23:07 +0000 (21:23 +0000)]
Fix a FIXME in llvm-objdump for the -exports-trie option that was not adding
in the base address.

Without this Mach-O files, like 64-bit executables, don’t have the correct
addresses printed for their exports.  As the default is to link at address
0x100000000 not zero.

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

7 years agoRevert r305598, "utils: Add a git-r utility for mapping svn revisions to git revision...
Peter Collingbourne [Mon, 19 Jun 2017 20:43:09 +0000 (20:43 +0000)]
Revert r305598, "utils: Add a git-r utility for mapping svn revisions to git revisions in the monorepo."

$ git revert `git r 305598`

We need to decide whether we want development tools to be written in
Go first.

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

7 years ago[BDCE] Add comments. NFC
Xin Tong [Mon, 19 Jun 2017 20:10:41 +0000 (20:10 +0000)]
[BDCE] Add comments. NFC

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

7 years ago [PATCH] [PGO] Fixed cast operation in emIntrinsicVisitor::instrumentOneMemIntrinsic.
Ana Pazos [Mon, 19 Jun 2017 20:04:33 +0000 (20:04 +0000)]
 [PATCH] [PGO] Fixed cast operation in  emIntrinsicVisitor::instrumentOneMemIntrinsic.

Reviewers: xur, efriedma, davidxl

Reviewed By: davidxl

Subscribers: llvm-commits

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

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

7 years agoRevert r305382, it caused PR33513.
Nico Weber [Mon, 19 Jun 2017 19:48:59 +0000 (19:48 +0000)]
Revert r305382, it caused PR33513.

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

7 years ago[CGP, PowerPC] try to constant fold before creating loads for memcmp expansion
Sanjay Patel [Mon, 19 Jun 2017 19:48:35 +0000 (19:48 +0000)]
[CGP, PowerPC] try to constant fold before creating loads for memcmp expansion

This is the last step needed to avoid regressions for x86 before we flip the switch to allow
expansion of the smallest set of memcpy() via CGP. The DAG version checks for constant strings,
so we need to do that here too.

FWIW, the 2 constant test is not handled by LibCallSimplifier::optimizeMemCmp() because that
code is limited to 8-bit constant arrays. LibCallSimplifier will also fail to optimize some 1
constant tests because its alignment requirements are too strict (shouldn't require alignment
for a constant operand).

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

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

7 years agoChange llvm-nm for Mach-O files to use dyld info in some cases when printing symbols.
Kevin Enderby [Mon, 19 Jun 2017 19:38:22 +0000 (19:38 +0000)]
Change llvm-nm for Mach-O files to use dyld info in some cases when printing symbols.

In order to reduce swift binary sizes, Apple is now stripping swift symbols
from the nlist symbol table.  llvm-nm currently only looks at the nlist symbol
table and misses symbols that are present in dyld info.   This makes it hard to
know the set of symbols for a binary using just llvm-nm.  Unless you know to
run llvm-objdump -exports-trie that can output the exported symbols in the dyld
info from the export trie, which does so but in a different format.

Also moving forward the time may come a when a fully linked Mach-O file that
uses dyld will no longer have an nlist symbol table to avoid duplicating the
symbol information.

This change adds three flags to llvm-nm, -add-dyldinfo, -no-dyldinfo, and
-dyldinfo-only.

The first, -add-dyldinfo, has the same effect as when the new bit in the Mach-O
header, MH_NLIST_OUTOFSYNC_WITH_DYLDINFO, appears in a binary.  In that it
looks through the dyld info from the export trie and adds symbols to be printed
that are not already in its internal SymbolList variable.  The -no-dyldinfo
option turns this behavior off.

The -dyldinfo-only option only looks at the dyld information and recreates the
symbol table from the dyld info from the export trie and binding information.
As if it the Mach-O file had no nlist symbol table.

Also fixed a few bugs with Mach-O N_INDR symbols not correctly printing the
indirect name, or in the same format as the old nm-classic program.

rdar://32021551

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

7 years agoRemove convenient but probably not worthwhile macro for lambda workaround
David Blaikie [Mon, 19 Jun 2017 19:01:08 +0000 (19:01 +0000)]
Remove convenient but probably not worthwhile macro for lambda workaround

Cleanup from r305405

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

7 years agoHave writeCOFFWriter return Expected<unique_ptr>.
Eric Beckmann [Mon, 19 Jun 2017 18:49:05 +0000 (18:49 +0000)]
Have writeCOFFWriter return Expected<unique_ptr>.

Summary: Have writeCOFFWriter return Expected<unique_ptr> instead of requiring being passed an uninitialized unique_ptr.

Reviewers: zturner, ruiu

Subscribers: hiraditya, llvm-commits

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

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

7 years agoImprove profile-guided heuristics to use estimated trip count.
Taewook Oh [Mon, 19 Jun 2017 18:48:58 +0000 (18:48 +0000)]
Improve profile-guided heuristics to use estimated trip count.

Summary:
Existing heuristic uses the ratio between the function entry
frequency and the loop invocation frequency to find cold loops. However,
even if the loop executes frequently, if it has a small trip count per
each invocation, vectorization is not beneficial. On the other hand,
even if the loop invocation frequency is much smaller than the function
invocation frequency, if the trip count is high it is still beneficial
to vectorize the loop.

This patch uses estimated trip count computed from the profile metadata
as a primary metric to determine coldness of the loop. If the estimated
trip count cannot be computed, it falls back to the original heuristics.

Reviewers: Ayal, mssimpso, mkuper, danielcdh, wmi, tejohnson

Reviewed By: tejohnson

Subscribers: tejohnson, mzolotukhin, llvm-commits

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

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

7 years ago[InstCombine] Make sure AddReachableCodeToWorklist sets MadeIRChange
Bjorn Pettersson [Mon, 19 Jun 2017 18:00:27 +0000 (18:00 +0000)]
[InstCombine] Make sure AddReachableCodeToWorklist sets MadeIRChange

Summary:
Some optimizations in AddReachableCodeToWorklist did not update
the MadeIRChange state. This could happen both when removing
trivially dead instructions (DCE) and at constant folds.

It is essential that changes to the IR is reported correctly,
since for example InstCombinePass::run() will indicate that all
analyses are preserved otherwise.
And the CGPassManager determines if the CallGraph is up-to-date
based on status from InstructionCombiningPass::runOnFunction().

The new test case early_dce_clobbers_callgraph.ll is a reproducer
for some asserts that started to trigger after changes in the
inliner in r305245. With this patch the test case passes again.

Reviewers: sanjoy, craig.topper, dblaikie

Reviewed By: craig.topper

Subscribers: llvm-commits

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

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

7 years agoRevert r304824 "Fix PR23384 (part 3 of 3)"
Hans Wennborg [Mon, 19 Jun 2017 17:57:15 +0000 (17:57 +0000)]
Revert r304824 "Fix PR23384 (part 3 of 3)"

This seems to be interacting badly with ASan somehow, causing false reports of
heap-buffer overflows: PR33514.

> Summary:
> The patch makes instruction count the highest priority for
> LSR solution for X86 (previously registers had highest priority).
>
> Reviewers: qcolombet
>
> Differential Revision: http://reviews.llvm.org/D30562
>
> From: Evgeny Stupachenko <evstupac@gmail.com>

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

7 years ago[Dominators] Clean up typedefs in GenericDomTreeConstruction. NFC.
Jakub Kuderski [Mon, 19 Jun 2017 17:24:56 +0000 (17:24 +0000)]
[Dominators] Clean up typedefs in GenericDomTreeConstruction. NFC.

Summary: This patch cleans up GenericDomTreeConstruction by replacing typedefs with usings and replaces `typename GraphT::NodeRef` with `NodePtr` to make the file more readable.

Reviewers: sanjoy, dberlin, chandlerc

Reviewed By: dberlin

Subscribers: llvm-commits

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

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

7 years ago[PDB] Start emitting source file and line information
Reid Kleckner [Mon, 19 Jun 2017 17:21:45 +0000 (17:21 +0000)]
[PDB] Start emitting source file and line information

Summary:
This is a first step towards getting line info to show up in VS and
windbg. So far, only llvm-pdbutil can parse the PDBs that we produce.
cvdump doesn't like something about our file checksum tables. I'll have
to dig into that next.

This patch adds a new DebugSubsectionRecordBuilder which takes bytes
directly from some other producer, such as a linker, and sticks it into
the PDB. Line tables only need to be relocated. No data needs to be
rewritten.

File checksums and string tables, on the other hand, need to be re-done.

Reviewers: zturner, ruiu

Subscribers: llvm-commits, hiraditya

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

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

7 years ago[Dominators] Clean up GenericDomTree.h. NFC.
Jakub Kuderski [Mon, 19 Jun 2017 16:59:20 +0000 (16:59 +0000)]
[Dominators] Clean up GenericDomTree.h. NFC.

Summary:
This patch cleans up GenericDomTree.h by:

- removing unnecessary <NodeT> in DomTreeNodeBase
- removing unnecessary std::move on bools
- changing type of DFSNumIn/DFSNumOut from int to unsigned (since the members were used as unsigned anyway)

The changes don't affect behavior -- everything works as before.

Reviewers: sanjoy, dberlin, chandlerc

Reviewed By: dberlin

Subscribers: davide, llvm-commits

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

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

7 years ago[CodeView] Fix dumping of public symbol record flags
Reid Kleckner [Mon, 19 Jun 2017 16:54:51 +0000 (16:54 +0000)]
[CodeView] Fix dumping of public symbol record flags

I noticed nonsensical type information while dumping PDBs produced by
MSVC.

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

7 years ago[NewGVN] Simplify findConditionEquivalence(). NFCI.
Davide Italiano [Mon, 19 Jun 2017 16:46:15 +0000 (16:46 +0000)]
[NewGVN] Simplify findConditionEquivalence(). NFCI.

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

7 years agoRemove brackets, NFC.
Dinar Temirbulatov [Mon, 19 Jun 2017 16:44:07 +0000 (16:44 +0000)]
Remove brackets, NFC.

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

7 years ago[InstCombine] Cleanup some duplicated one use checks
Craig Topper [Mon, 19 Jun 2017 16:23:49 +0000 (16:23 +0000)]
[InstCombine] Cleanup some duplicated one use checks

Summary:
These 4 patterns have the same one use check repeated twice for each. Once without a cast and one with. But the cast has no effect on what method is called.

For the OR case I believe it is always profitable regardless of the number of uses since we'll never increase the instruction count.

For the AND case I believe it is profitable if the pair of xors has one use such that we'll get rid of it completely. Or if the C value is something freely invertible, in which case the not doesn't cost anything.

Reviewers: spatel, majnemer

Reviewed By: spatel

Subscribers: llvm-commits

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

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

7 years ago[Reassociate] Support some reassociation of vector xors
Craig Topper [Mon, 19 Jun 2017 16:23:46 +0000 (16:23 +0000)]
[Reassociate] Support some reassociation of vector xors

Summary:
Currently we don't try to do anything with vector xors.

This patch adds support for removing duplicate pairs from a chain of vector xors as its pretty easy to support. We still dont' try to combine the xors with and/ors, but I might try that in a future patch.

Reviewers: mcrosier, davide, resistor

Reviewed By: mcrosier

Subscribers: llvm-commits

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

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

7 years ago[Reassociate] Make one of the helper methods static because it doesn't use any class...
Craig Topper [Mon, 19 Jun 2017 16:23:43 +0000 (16:23 +0000)]
[Reassociate] Make one of the helper methods static because it doesn't use any class variables. NFC

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

7 years ago[AMDGPU][mc][tests][NFC] Bulk ISA tests: Massive update. Add Gfx9 dasm tests.
Artem Tamazov [Mon, 19 Jun 2017 15:55:02 +0000 (15:55 +0000)]
[AMDGPU][mc][tests][NFC] Bulk ISA tests: Massive update. Add Gfx9 dasm tests.

A new Gfx9 dasm test added with approx 29000 cases.
Existing tests extended by (approx.):
* Gfx7 asm: 5000 test cases
* Gfx8 asm: 5000 test cases
* Gfx9 asm: 14400 test cases
* Gfx8 dasm: 5200 test cases

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

7 years agoAllow truncated and extend memory operations in Store Merge. NFCI.
Nirav Dave [Mon, 19 Jun 2017 15:32:28 +0000 (15:32 +0000)]
Allow truncated and extend memory operations in Store Merge. NFCI.

As all store merges checks are based on the memory operation
performed, allow use of truncated stores and extended loads as valid
input candidates for merging.

Relanding after fixing selection between truncated and normal store.

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

7 years ago[JumpThreading][LVI] Invalidate LVI information after blocks are merged
Anna Thomas [Mon, 19 Jun 2017 15:23:33 +0000 (15:23 +0000)]
[JumpThreading][LVI] Invalidate LVI information after blocks are merged

Summary:
After a single predecessor is merged into a basic block, we need to invalidate
the LVI information for the new merged block, when LVI is not provably true for
all of instructions in the new block.
The test cases added show the correct LVI information using the LVI printer
pass.

Reviewers: reames, dberlin, davide, sanjoy

Reviewed by: dberlin, davide

Subscribers: llvm-commits

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

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

7 years ago[TRE] Improve code motion in TRE, use AA to tell whether a load can be moved before...
Xin Tong [Mon, 19 Jun 2017 15:21:18 +0000 (15:21 +0000)]
[TRE] Improve code motion in TRE, use AA to tell whether a load can be moved before a call that writes to memory.

Summary: use AA to tell whether a load can be moved before a call that writes to memory.

Reviewers: dberlin, davide, sanjoy, hfinkel

Reviewed By: hfinkel

Subscribers: hfinkel, llvm-commits

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

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

7 years agoAdd test for store merge with noimplicitfloat
Nirav Dave [Mon, 19 Jun 2017 15:18:20 +0000 (15:18 +0000)]
Add test for store merge with noimplicitfloat

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

7 years ago[AArch64] Fix order of checks in shouldScheduleAdjacent.
Florian Hahn [Mon, 19 Jun 2017 13:45:41 +0000 (13:45 +0000)]
[AArch64] Fix order of checks in shouldScheduleAdjacent.

We need to check the opcode of FirstMI before accessing the operands. This
caused a buildbot failure during bootstrapping on AArch64.

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

7 years agoUse range for loops. NFCI.
Simon Pilgrim [Mon, 19 Jun 2017 13:24:12 +0000 (13:24 +0000)]
Use range for loops. NFCI.

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

7 years agoAMDGPU/GlobalISel: Mark G_BITCAST s32 <--> <2 x s16> legal
Tom Stellard [Mon, 19 Jun 2017 13:15:45 +0000 (13:15 +0000)]
AMDGPU/GlobalISel: Mark G_BITCAST s32 <--> <2 x s16> legal

Reviewers: arsenm

Reviewed By: arsenm

Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, igorb, dstuttard, tpr, t-tye, llvm-commits

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

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

7 years ago[GlobalISel][X86] Fold FI/G_GEP into LDR/STR instruction addressing mode.
Igor Breger [Mon, 19 Jun 2017 13:12:57 +0000 (13:12 +0000)]
[GlobalISel][X86] Fold FI/G_GEP into LDR/STR instruction addressing mode.

Summary: Implement some of the simplest addressing modes.It should help to test ABI.

Reviewers: zvi, guyblank

Reviewed By: guyblank

Subscribers: rovka, llvm-commits, kristof.beyls

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

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

7 years agoRecommit rL305677: [CodeGen] Add generic MacroFusion pass
Florian Hahn [Mon, 19 Jun 2017 12:53:31 +0000 (12:53 +0000)]
Recommit rL305677: [CodeGen] Add generic MacroFusion pass

Use llvm::make_unique to avoid ambiguity with MSVC.

This patch adds a generic MacroFusion pass, that is used on X86 and
AArch64, which both define target-specific shouldScheduleAdjacent
functions. This generic pass should make it easier for other targets to
implement macro fusion and I intend to add macro fusion for ARM shortly.

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

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

7 years ago[ARM] GlobalISel: Support G_ICMP for s8 and s16
Diana Picus [Mon, 19 Jun 2017 11:47:28 +0000 (11:47 +0000)]
[ARM] GlobalISel: Support G_ICMP for s8 and s16

Widen to s32 (like all other binary ops).

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