Commit Graph

152325 Commits

Author SHA1 Message Date
Adrian Prantl
e22b98a6ed Debug Info: Support fragmented variables in the MMI side table
This reapplies commit r309034 with a bugfix+test for inlined variables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309057 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 23:32:59 +00:00
Davide Italiano
67d8465a23 [gold] Enable function-sections by default.
This is needed, among others, to respect --section-ordering-file
with LTO. I'll follow up with a similar change for data sections.

I hope every version of gold available on the bots has support for
--section-ordering file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309056 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 23:32:50 +00:00
Eric Beckmann
0c862f5c0f Revert "llvm-mt: implement simple merging of manifests, not factoring namespaces."
This reverts commit 813308e240792ca70ed2f998f21df24a5061ada0.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309050 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 23:06:46 +00:00
Eric Beckmann
b0707e1a0d llvm-mt: implement simple merging of manifests, not factoring namespaces.
Summary:
Does a simple merge, where mergeable elements are combined, all others
are appended.  Does not apply trickly namespace rules.

Subscribers: llvm-commits, hiraditya

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309047 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 22:50:25 +00:00
Petr Hosek
2f55a43107 Revert "Reland "[LLVM][llvm-objcopy] Added basic plumbing to get things started""
This reverts commit 0d9d9250483761eb2f50236830161b0e2137d483.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309045 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 22:39:52 +00:00
Michal Gorny
5b4c3ec15d [lit] Fix UnboundLocalError for invalid shtest redirects
Replace the incorrect variable reference when invalid redirect is used.
This fixes the following issue:

  File "/usr/src/llvm/utils/lit/lit/TestRunner.py", line 316, in processRedirects
    raise InternalShellError(cmd, "Unsupported redirect: %r" % (r,))
UnboundLocalError: local variable 'r' referenced before assignment

which in turn broke shtest-shell.py and max-failures.py lit tests.

The breakage was introduced during refactoring in rL307310.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309044 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 22:38:31 +00:00
Petr Hosek
50f00d6e8d Reland "[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@309043 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 22:38:08 +00:00
Eric Christopher
dd35be2805 Update the comments on default subtargets based on feedback.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309041 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 22:21:08 +00:00
Kostya Serebryany
8330752796 [libFuzzer] don't disable msan for TracePC::CollectFeatures: this started to cause false positives in msan. No tests for libFuzzer+msan yet -- tests will need to wait until we move libFuzzer to compiler-rt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309038 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 22:05:31 +00:00
Petr Hosek
6d5fc4344c Revert "Reland "[LLVM][llvm-objcopy] Added basic plumbing to get things started""
This reverts commit 960873b10d.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309037 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 21:55:00 +00:00
Adrian Prantl
7cfa553c07 Revert "Debug Info: Support fragmented variables in the MMI side table"
This reverts commit r309034 because of a sanitizer issue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309035 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 21:50:45 +00:00
Adrian Prantl
2522046447 Debug Info: Support fragmented variables in the MMI side table
<rdar://problem/17816343>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309034 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 21:29:22 +00:00
Petr Hosek
960873b10d Reland "[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@309032 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 21:16:33 +00:00
Don Hinton
9ed22432b4 [CMAKE] Speedup developer builds when passing LLVM_APPEND_VC_REV = OFF
Make sure multiple targets don't get rebuilt unnecessarily when LLVM_APPEND_VC_REV = OFF.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309031 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 21:13:18 +00:00
Chris Bieneman
35647a1478 [CMake] Fix broken builds from r309029
Fixing the mismatched beginning if and endif contents.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309030 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 20:58:14 +00:00
Chris Bieneman
02829e6c9c [CMake] Allow TableGen.cmake to be included multiple times
This patch allows TableGen.cmake to be safely included multiple times in sub-projects.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309029 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 20:53:31 +00:00
Marek Olsak
6044a148c6 AMDGPU/SI: Fix Depth and Height computation for SI scheduler
Patch by: Axel Davy

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309028 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 20:37:03 +00:00
Marek Olsak
343cb90d28 AMDGPU/SI: Force exports at the end for SI scheduler
Patch by: Axel Davy

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309027 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 20:36:58 +00:00
Martin Storsjo
5b3e8fe6d9 [AArch64] Update a comment in a test
The comment ended up outdated when the test was rewritten in SVN r192281.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309016 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 19:57:26 +00:00
Martin Storsjo
d4147fa3ab [AArch64] Add a test for float argument passing to win64 vararg functions
The existing tests only tested how a va_start is lowered.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309015 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 19:57:22 +00:00
Teresa Johnson
a63ab3c9ea [LTO] Prevent dead stripping and internalization of symbols with sections
Summary:
ELF linkers generate __start_<secname> and __stop_<secname> symbols
when there is a value in a section <secname> where the name is a valid
C identifier.  If dead stripping determines that the values declared
in section <secname> are dead, and we then internalize (and delete)
such a symbol, programs that reference the corresponding start and end
section symbols will get undefined reference linking errors.

To fix this, add the section name to the IRSymtab entry when a symbol is
defined in a specific section. Then use this in the gold-plugin to mark
the symbol as external and visible from outside the summary when the
section name is a valid C identifier.

Reviewers: pcc

Subscribers: mehdi_amini, inglorion, eraman, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309009 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 19:42:32 +00:00
Eric Christopher
94c534f4bd Revert "This patch enables the usage of constant Enum identifiers within Microsoft style inline assembly statements."
This reverts commit r308966.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309005 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 19:22:09 +00:00
Nemanja Ivanovic
57a32cdffd [PowerPC] Pretty-print CR bits the way the binutils disassembler does
This patch just adds printing of CR bit registers in a more human-readable
form akin to that used by the GNU binutils.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309001 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 18:26:35 +00:00
Nemanja Ivanovic
84cbf60689 [PowerPC] - Recommit r304907 now that the issue has been fixed
This is just a recommit since the issue that the commit exposed is now
resolved.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308995 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 17:54:51 +00:00
Stephen Hines
75c17877dc [docs] Fix a typo: iteratation -> iteration
Reviewers: dgross

Reviewed By: dgross

Subscribers: dgross, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308994 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 17:52:55 +00:00
Simon Pilgrim
902fe6e6a0 [X86][CGP] Reduce memcmp() expansion to 2 load pairs (PR33914)
D35067/rL308322 attempted to support up to 4 load pairs for memcmp inlining which resulted in regressions for some optimized libc memcmp implementations (PR33914).

Until we can match these more optimal cases, this patch reduces the memcmp expansion to a maximum of 2 load pairs (which matches what we do for -Os).

This patch should be considered for the 5.0.0 release branch as well

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308986 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 17:04:37 +00:00
Simon Pilgrim
ae9f3ffd87 [DAG] Move DAGCombiner::GetDemandedBits to SelectionDAG
This patch moves the DAGCombiner::GetDemandedBits function to SelectionDAG::GetDemandedBits as a first step towards making it easier for targets to get to the source of any demanded bits without the limitations of SimplifyDemandedBits.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308983 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 16:36:44 +00:00
Simon Pilgrim
7d8deb856a [X86] Regenerate test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308981 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 16:10:32 +00:00
Simon Pilgrim
a7461f4539 [X86] Regenerate test with broadcast comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308980 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 16:09:56 +00:00
Fedor Sergeev
a964c1f9b7 [Sparc] invalid adjustments in TLS_LE/TLS_LDO relocations removed
Summary:
Some SPARC TLS relocations were applying nontrivial adjustments
to zero value, leading to unexpected non-zero values in ELF and then
Solaris linker failures.

Getting rid of these adjustments.

Fixes PR33825.

Reviewers: rafael, asb, jyknight

Subscribers: joerg, jyknight, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308978 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 15:28:28 +00:00
Andrew V. Tischenko
b398702175 X86 Asm uses assertions instead of proper diagnostic. This patch fixes that.
Differential Revision: https://reviews.llvm.org/D35115


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308972 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 13:05:12 +00:00
Chandler Carruth
2dcaf78ab6 [LIR] Teach LIR to avoid extending the BE count prior to adding one to
it when safe.

Very often the BE count is the trip count minus one, and the plus one
here should fold with that minus one. But because the BE count might in
theory be UINT_MAX or some such, adding one before we extend could in
some cases wrap to zero and break when we scale things.

This patch checks to see if it would be safe to add one because the
specific case that would cause this is guarded for prior to entering the
preheader. This should handle essentially all of the common loop idioms
coming out of C/C++ code once canonicalized by LLVM.

Before this patch, both forms of loop in the added test cases ended up
subtracting one from the size, extending it, scaling it up by 8 and then
adding 8 back onto it. This is really silly, and it turns out made it
all the way into generated code very often, so this is a surprisingly
important cleanup to do.

Many thanks to Sanjoy for showing me how to do this with SCEV.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308968 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 10:48:32 +00:00
Matan Haroush
0000a717e9 This patch enables the usage of constant Enum identifiers within Microsoft style inline assembly statements.
Differential Revision:
https://reviews.llvm.org/D33277
https://reviews.llvm.org/D33278



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308966 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 10:44:09 +00:00
Michael Zolotukhin
8641ab97a4 [tests] Cleanup vect.omp.persistence.ll test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308964 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 10:35:16 +00:00
Simon Pilgrim
ee5c36fd59 [X86] Add 24-byte memcmp tests (PR33914)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308963 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 10:33:36 +00:00
Francois Pichet
12b7f90cfc Fix endianness bug in DAGCombiner::visitTRUNCATE and visitEXTRACT_VECTOR_ELT
Summary:
Do not assume little endian architecture in DAGCombiner::visitTRUNCATE and DAGCombiner::visitEXTRACT_VECTOR_ELT.
PR33682

Reviewers: hfinkel, sdardis, RKSimon

Reviewed By: sdardis, RKSimon

Subscribers: uabelho, RKSimon, sdardis, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308960 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 09:40:35 +00:00
Sam Parker
e46d723b12 [ARM] Enable partial and runtime unrolling
Enable runtime and partial loop unrolling of simple loops without
calls on M-class cores. The thresholds are calculated based on
whether the target is Thumb or Thumb-2.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308956 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 08:51:30 +00:00
Martin Storsjo
9319e27ba7 [COFF] ARM64 support for COFFImportFile
A test will be committed separately in the lld repo.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308951 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 06:05:49 +00:00
Martin Storsjo
a663d7321b [AArch64] Reserve a 16 byte aligned amount of fixed stack for win64 varargs
Create a dummy 8 byte fixed object for the unused slot below the first
stored vararg.

Alternative ideas tested but skipped: One could try to align the whole
fixed object to 16, but I haven't found how to add an offset to the stack
frame used in LowerWin64_VASTART.

If only the size of the fixed stack object size is padded but not the offset, via
MFI.CreateFixedObject(alignTo(GPRSaveSize, 16), -(int)GPRSaveSize, false),
PrologEpilogInserter crashes due to "Attempted to reset backwards range!".

This fixes misconceptions about where registers are spilled, since
AArch64FrameLowering.cpp assumes the offset from fixed objects is
aligned to 16 bytes (and the Win64 case there already manually aligns
the offset to 16 bytes).

This fixes cases where local stack allocations could overwrite callee
saved registers on the stack.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308950 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 05:20:01 +00:00
NAKAMURA Takumi
2250b309ad DWARFVerifier.cpp: Fix -m32 in r308928. Use PRIx64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308949 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 05:03:17 +00:00
Kostya Serebryany
74b6501bc4 [libFuzzer] make one test faster, fix compiler warnings in tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308945 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 02:09:46 +00:00
Kostya Serebryany
977be98e0f [sanitizer-coverage] simplify the code, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308944 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 02:07:38 +00:00
Spyridoula Gravani
8e0c70de6e [DWARF] Modified test for die ranges verification so that it doesn't fail on windows hosts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308943 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 01:58:27 +00:00
NAKAMURA Takumi
cabe5b590e llvm/test/CMakeLists.txt: Add llvm-rc to LLVM_TEST_DEPENDS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308942 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 01:44:38 +00:00
NAKAMURA Takumi
bb03079832 llvm-rc: Fixup for r308940. This should use LLVMSupport.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308941 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 00:51:40 +00:00
Marek Sokolowski
c6f54fec9f Add an empty shell of llvm-rc.
This starts the development on one of MS Visual Studio binutils,
Resource Converter. The tool compiles resource scripts (.rc)
into binary resource files (.res).

The current implementation does nothing but parse the command
line arguments. It is going to be extended in the future.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308940 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 00:25:18 +00:00
Eugene Zelenko
4114bcf1b9 [Analysis] 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@308936 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-24 23:16:33 +00:00
Spyridoula Gravani
ef55e4c1a3 [DWARF] Added verification check for die ranges. If highPC is an address, then it should be greater than lowPC for each range.
Differential Revision: https://reviews.llvm.org/D35733

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308928 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-24 21:04:11 +00:00
Reid Kleckner
c2060a50ef Revert "[X86][InlineAsm][Ms Compatibility]Prefer variable name over a register when the two collides"
This reverts r308867 and r308866.

It broke the sanitizer-windows buildbot on C++ code similar to the
following:

  namespace cl { }
  void f() {
    __asm {
      mov al, cl
    }
  }

t.cpp(4,13):  error: unexpected namespace name 'cl': expected expression
    mov al, cl
            ^

In this case, MSVC parses 'cl' as a register, not a namespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308926 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-24 20:48:15 +00:00
Kevin Enderby
04cdb2eeb4 Small tweak to one check in error handling to the dyld compact export
entries in libObject (done in r308690).  In the case when the last node
has no children setting State.Current = Children + 1; where that would be past
Trie.end() is actually ok since the pointer is not used with zero children.

rdar://33490512


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308924 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-24 20:33:41 +00:00