141911 Commits

Author SHA1 Message Date
Matthias Braun
f3e629e3ec LivePhysReg: Use reference instead of pointer in init(); NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289002 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-08 00:15:51 +00:00
Quentin Colombet
aff0caeac1 [InlineSpiller] Don't call TargetInstrInfo::foldMemoryOperand with an empty list.
Since r287792 if we try to do that we will hit an assert.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289001 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-08 00:06:51 +00:00
Filipe Cabecinhas
8302e1c946 [asan] Split load and store checks in test. NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288991 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 22:37:11 +00:00
Chris Bieneman
581f04c40e [yaml2obj] Refactor and abstract yaml2dwarf functions
This abstracts the code for emitting DWARF binary from the DWARFYAML types into reusable interfaces that could be used by ELF and COFF.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288990 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 22:30:15 +00:00
Eugene Zelenko
553d8c8203 [ADT, IR] Fix some Clang-tidy modernize-use-equals-delete and Include What You Use warnings; other minor fixes (NFC).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288989 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 22:06:02 +00:00
Davide Italiano
4e51983ffa [BDCE] Skip metadata while replacing uses.
The fix committed in r288851 doesn't cover all the cases.
In particular, if we have an instruction with side effects
which has a no non-dbg use not depending on the bits, we still
perform RAUW destroying the dbg.value's first argument.
Prevent metadata from being replaced here to avoid the issue.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288987 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 21:47:32 +00:00
Chris Bieneman
1523505168 [obj2yaml] Refactor and abstract dwarf2yaml
This makes the dwarf2yaml code separated and reusable allowing ELF and COFF to share implementations with MachO.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288986 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 21:47:28 +00:00
Tim Northover
4f7586098b GlobalISel: use correct builder for ConstantExprs.
ConstantExpr instances were emitting code into the current block rather than
the entry block. This meant they didn't necessarily dominate all uses, which is
clearly wrong.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288985 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 21:29:15 +00:00
Chris Bieneman
31adbb659a [ObjectYAML] Pull DWARF support into DWARFYAML namespace
Since DWARF formatting is agnostic to the object file it is stored in, it doesn't make sense for this to be in the MachOYAML implementation. Pulling it into its own namespace means we could modify the ELF and COFF YAML tools to emit DWARF as well.

In a follow-up patch I will better abstract this in obj2yaml and yaml2obj so that the DWARF bits in the tools can be re-used too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288984 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 21:26:32 +00:00
Tim Northover
66746a7ae1 GlobalISel: store the current MachineFunction as direct state. NFC.
Having to ask the MIRBuilder for the current function is a little awkward, and
I'm intending to improve how that's threaded through anyway.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288983 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 21:17:47 +00:00
Chris Bieneman
c19200ceed [ObjectYAML] Rename DWARF entries to match section names
This change makes the yaml tags for the members of the DWARF data match the names of the DWARF sections.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288981 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 21:09:37 +00:00
Tim Northover
06bfcf3df9 GlobalISel: simplify MachineIRBuilder interface.
MachineIRBuilder had weird before/after and beginning/end flags for the insert
point. Unfortunately the non-default means that instructions will be inserted
in reverse order which is almost never what anyone wants.

Really, I think we just want (like IRBuilder has) the ability to insert at any
C++ iterator-style point (i.e. before any instruction or before MBB.end()). So
this fixes MIRBuilders to behave like IRBuilders in this respect.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288980 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 21:05:38 +00:00
Kostya Serebryany
152208fcde [libFuzzer] include FuzzerIO.h and hopefully fix the Mac build. reported by Dejan Mircevski
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288979 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 21:02:48 +00:00
Matt Arsenault
98b1edd6bb InstCombine: Fold bitcast of vector to FP scalar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288978 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 20:56:11 +00:00
Chris Bieneman
c14b21af97 [CMake] Add check for HAVE_CRASHREPORTER_INFO
This was also explicitly undef in CMake for some unknown reason.

Hopefully this one won't kill all the bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288977 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 20:55:38 +00:00
Eli Friedman
b60c7b1f61 [GVNHoist] Invalidate MemDep when an instruction is moved.
See also r279907.

Fixes https://llvm.org/bugs/show_bug.cgi?id=30991 .

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288968 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 19:55:59 +00:00
Michael Kuperstein
30fb413876 [X86] Skip over DEBUG_VALUE while looking for start of call sequence
If we don't skip over DEBUG_VALUEs, we get differences between -g and non-g
code.

This fixes PR31242.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288965 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 19:31:08 +00:00
Michael Kuperstein
3ffda498ec [X86] Do not assume "ri" instructions always have an immediate operand
The second operand of an "ri" instruction may be an immediate, but it may
also be a globalvariable, so we should make any assumptions.

This fixes PR31271.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288964 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 19:29:18 +00:00
Chris Bieneman
746d96524f Fix the apple build issue caused by r288956
Should be checking if HAVE_CRASHREPORTERCLIENT_H is defined not relying on it having a value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288963 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 19:28:22 +00:00
Chris Bieneman
1b5c4be5f4 Revert "[CMake] Use cmakedefine01 instead of cmakedefine"
This reverts commit r288959.

Apparently using cmakedefine01 explodes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288961 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 19:25:38 +00:00
Chris Bieneman
5472e8e69f [CMake] Use cmakedefine01 instead of cmakedefine
Looks like we need a 01 value for HAVE_CRASHREPORTERCLIENT_H.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288959 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 19:13:32 +00:00
Sanjay Patel
8b90b13aa1 [InstCombine] add tests for smin+icmp; NFC
The tests that already work are folded in InstSimplify, so those
tests should be redundant and we can remove them if they don't
seem worthwhile for completeness.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288957 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 18:56:55 +00:00
Chris Bieneman
b7e5e7db85 [CMake] Add a check for HAVE_CRASHREPORTERCLIENT_H
The CMake build has been hardcoding this to undef forever, we shouldn't have been doing that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288956 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 18:53:04 +00:00
Chris Bieneman
cf24fcb20a [ObjectYAML] Support for DWARF __debug_abbrev section
This patch adds support for round-tripping DWARF debug abbreviations through the obj<->yaml tools.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288955 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 18:52:59 +00:00
Simon Pilgrim
aee7c6e2f5 [SelectionDAG] Add knownbits support for vector demandedelts in SMAX/SMIN/UMAX/UMIN opcodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288926 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 17:54:00 +00:00
Simon Pilgrim
7b24dd44c8 [X86] Add knownbits vector UMAX test
In preparation for demandedelts support

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288920 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 17:21:13 +00:00
Simon Pilgrim
3b9d4a0970 [X86][SSE] Remove AND -> VZEXT combine
This is now performed more generally by the target shuffle combine code.

Already covered by tests that were originally added in D7666/rL229480 to support combineVectorZext (or VectorZextCombine as it was known then....).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288918 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 17:02:41 +00:00
Simon Pilgrim
def95b9c34 [SelectionDAG] Add knownbits support for EXTRACT_VECTOR_ELT opcodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288916 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 16:28:21 +00:00
Simon Pilgrim
9b37990fd7 [SelectionDAG] Removed old knownbits TODO comment. NFCI.
EXTRACT_VECTOR_ELT does support demanded elts if the element index is known and in range.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288913 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 15:31:12 +00:00
Simon Pilgrim
b23f6fe812 [X86] Add test to show missed opportunities to calculate knownbits in INSERT_VECTOR_ELT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288912 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 15:27:18 +00:00
Simon Pilgrim
5ab68dcc0b [X86][SSE] Fix vpextrd/vpextrq checks
They were testing for the pre-vex versions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288911 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 15:10:05 +00:00
Simon Pilgrim
c57b7e50fc [X86][SSE] Force execution domain of 32-bit extractps/pextrd in the stack folding tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288910 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 15:06:14 +00:00
Matthew Simpson
b6b20e1aa2 [LV] Scalarize operands of predicated instructions
This patch attempts to scalarize the operand expressions of predicated
instructions if they were conditionally executed in the original loop. After
scalarization, the expressions will be sunk inside the blocks created for the
predicated instructions. The transformation essentially performs
un-if-conversion on the operands.

The cost model has been updated to determine if scalarization is profitable. It
compares the cost of a vectorized instruction, assuming it will be
if-converted, to the cost of the scalarized instruction, assuming that the
instructions corresponding to each vector lane will be sunk inside a predicated
block, possibly avoiding execution. If it's more profitable to scalarize the
entire expression tree feeding the predicated instruction, the expression will
be scalarized; otherwise, it will be vectorized. We only consider the cost of
the entire expression to accurately estimate the cost of the required
insertelement and extractelement instructions.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288909 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 15:03:32 +00:00
Benjamin Kramer
1517e2ed72 Try unbreaking the MSVC build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288907 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 13:35:11 +00:00
Simon Pilgrim
03f619110f [X86][SSE] Regenerate test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288906 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 13:05:04 +00:00
Dylan McKay
038449d896 [AVR] Expand 'SELECT_CC' nodes whereever possible
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288905 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 12:34:47 +00:00
Benjamin Kramer
fe16faa967 [LowerTypeTests] Use the TrailingObjects infrastructure for trailing objects.
Also avoid allocating ~3x as much memory as needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288904 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 12:31:45 +00:00
Andrea Di Biagio
4632c8a6b8 When GVN removes a redundant load, it should not modify the debug location of the dominating load.
In the case of a fully redundant load LI dominated by an equivalent load V, GVN
should always preserve the original debug location of V. Otherwise, we risk to
introduce an incorrect stepping.
If V has debug info, then clearly it should not be modified. If V has a null
debugloc, then it is still potentially incorrect to propagate LI's debugloc
because LI may not post-dominate V.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288903 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 12:31:36 +00:00
Simon Pilgrim
d2a4d816a1 [X86][SSE] Consistently set MOVD/MOVQ load/store/move instructions to integer domain
We are being inconsistent with these instructions (and all their variants.....) with a random mix of them using the default float domain.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288902 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 12:10:49 +00:00
Andrea Di Biagio
dbcb7adb03 [InlineFunction] Refactor code in function `fixupLineNumbers' as suggested by David in D27462. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288901 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 12:01:45 +00:00
Simon Dardis
17b733b5ee [mips][rtdyld] Merge code to write relocated values to the section. NFC
Preparation work for implementing N32 support.

Patch By: Daniel Sanders

Reviewers: vkalintiris, atanasyan

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288900 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 11:41:23 +00:00
Dylan McKay
f7450dd95f [AVR] Move a pseudo expansion test into a folder
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288899 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 11:21:45 +00:00
Simon Pilgrim
714162bb4f [X86][XOP] Fix VPERMIL2 non-constant pool shuffle decoding (PR31296)
The non-constant pool version of DecodeVPERMIL2PMask was not offsetting correctly for the second input. I've updated the code to match the implementation in the constant-pool version.

Annoyingly this bug was hidden for so long as it's tricky to combine to useful variable shuffle masks that don't become constant-pool entries.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288898 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 11:19:00 +00:00
Dylan McKay
0007d14057 [AVR] Allow loading from stack slots where src and dest registers are identical
Fixes PR 31256

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288897 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 11:08:56 +00:00
Andrea Di Biagio
0736f445e3 [InlineFunction] Do not propagate the callsite debug location to instructions inlined from functions with debug info.
When a function F is inlined, InlineFunction extends the debug location of every
instruction inlined from F by adding an InlinedAt.

However, if an instruction has a 'null' debug location, InlineFunction would
propagate the callsite debug location to it. This behavior existed since
revision 210459.

Revision 210459 was originally committed specifically to workaround the lack of
debug information for instructions inlined from intrinsic functions (which are
usually declared with attributes `__always_inline__, __nodebug__`).

The problem with revision 210459 is that it doesn't make any sort of distinction
between instructions inlined from a 'nodebug' function and instructions which
are inlined from a function built with debug info. This issue may lead to
incorrect stepping in the debugger.

This patch works under the assumption that a nodebug function does not have a
DISubprogram. When a function F is inlined into another function G,
InlineFunction checks if F has debug info associated with it.

For nodebug functions, the InlineFunction logic is unchanged (i.e. it would
still propagate the callsite debugloc to the inlined instructions). Otherwise,
InlineFunction no longer propagates the callsite debug location.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288895 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 10:37:26 +00:00
Chandler Carruth
9a9268b704 [PM] Add some more logging to make it more clear when the CGSCC
infrastrucutre is skipping SCCs and RefSCCs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288894 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 10:33:15 +00:00
Philip Reames
59d0d38b8d Reintroduce a check accidentally removed in 288873 to fix clang bots
I believe this is the cause of the failure, but have not been able to confirm.  Note that this is a speculative fix; I'm still waiting for a full build to finish as I synced and ended up doing a clean build which takes 20+ minutes on my machine.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288886 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 04:48:50 +00:00
Philip Reames
315dd3228b Fix a warning introduced in r288874
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288884 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 04:11:22 +00:00
Peter Collingbourne
99d6e95c74 LowerTypeTests: Add a test that covers "unsatisfiable" type metadata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288881 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 03:04:34 +00:00
Tom Stellard
c53f76cc0b AMDGPU : Add S_SETREG instructions to fix fdiv precision issues.
Patch By: Wei Ding

Summary: This patch fixes the fdiv precision issues.

Reviewers: b-sumner, cfang, wdng, arsenm

Subscribers: kzhuravl, nhaehnle, yaxunl, tony-tye

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288879 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 02:42:15 +00:00