Commit Graph

267894 Commits

Author SHA1 Message Date
George Rimar 84941ef158 [ELF] - Change way how we handle --noinhibit-exec
Previously we handled this option implicitly, only
for infering unresolved symbols handling policy.

ld man says: "--noinhibit-exec Retain the executable
output file whenever it is still usable",
and we may want to handle other cases too.

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

llvm-svn: 309091
2017-07-26 09:46:59 +00:00
Diana Picus b1fd784936 [ARM] GlobalISel: Mark G_GLOBAL_VALUE as legal
llvm-svn: 309090
2017-07-26 09:25:15 +00:00
George Rimar 6977ec6899 [ELF] - Print options aliases in --help
This is PR30422,
previously LLD did not render all option aliases in --help.
With this patch it will.

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

llvm-svn: 309089
2017-07-26 09:21:10 +00:00
George Rimar 5dbfa4e65b Update after LLVM change r309087
llvm-svn: 309088
2017-07-26 09:10:17 +00:00
George Rimar 4530dffbc7 [libOption] - Add flag allowing to print options aliases in help text.
By default, we display only options that are not
hidden and have help texts. This patch adds flag
allowing to display aliases that have no help text.
In this case help text of aliased option used instead.

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

llvm-svn: 309087
2017-07-26 09:09:56 +00:00
Michael Zuckerman c1918ad571 [X86][LLVM]Expanding Supports lowerInterleavedStore() in X86InterleavedAccess.
This patch expands the support of lowerInterleavedStore to 32x8i stride 4.

LLVM creates suboptimal shuffle code-gen for AVX2. In overall, this patch is a specific fix for the pattern (Strid=4 VF=32) and we plan to include more patterns in the future. To reach our goal of "more patterns". We include two mask creators. The first function creates shuffle's mask equivalent to unpacklo/unpackhi instructions. The other creator creates mask equivalent to a concat of two half vectors(high/low).

The patch goal is to optimize the following sequence:
At the end of the computation, we have ymm2, ymm0, ymm12 and ymm3 holding
each 32 chars:

c0, c1, , c31
m0, m1, , m31
y0, y1, , y31
k0, k1, ., k31

And these need to be transposed/interleaved and stored like so:

c0 m0 y0 k0 c1 m1 y1 k1 c2 m2 y2 k2 c3 m3 y3 k3 ....

Reviewers:
dorit
Farhana
RKSimon
guyblank
DavidKreitzer

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

llvm-svn: 309086
2017-07-26 08:10:14 +00:00
Zvi Rackover 1b73682243 TargetLowering: Change isShuffleMaskLegal's mask argument type to ArrayRef<int>. NFCI.
Changing mask argument type from const SmallVectorImpl<int>& to
ArrayRef<int>.

This came up in D35700 where a mask is received as an ArrayRef<int> and
we want to pass it to TargetLowering::isShuffleMaskLegal().
Also saves a few lines of code.

llvm-svn: 309085
2017-07-26 08:06:58 +00:00
Michael Zuckerman 60bc7e0f0a [X86][LLVM]Expanding Supports lowerInterleavedStore() in X86InterleavedAccess part1.
splitting patch D34601 into two part. This part changes the location of two functions. 
The second part will be based on that patch. This was requested by @RKSimon.

Reviewers:
1. dorit	
2. Farhana	
3. RKSimon	
4. guyblank	
5. DavidKreitzer

llvm-svn: 309084
2017-07-26 07:45:02 +00:00
Petr Hosek 3243a13f0a Revert "[sanitizer] Support compiler-rt builtins"
This reverts commit fd63314d6770e0da62572a3fea2c41c4cc0fc58a.

llvm-svn: 309083
2017-07-26 06:46:11 +00:00
Petr Hosek cc9559f515 Revert "[sanitizer] Support libc++abi in addition to libstdc++"
This reverts commit d1997bff31cf6b484eb59c2ee1fc3155442e338c.

llvm-svn: 309082
2017-07-26 06:46:10 +00:00
Mandeep Singh Grang 79249e1be7 [clang] Add ARM64 support to armintr.h for MSVC compatibility
Summary: This fixes compiling with headers from the Windows SDK for ARM64.

Reviewers: compnerd, ruiu, mstorsjo

Reviewed By: compnerd, mstorsjo

Subscribers: mgorny, aemerson, javed.absar, kristof.beyls, llvm-commits, cfe-commits

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

llvm-svn: 309081
2017-07-26 05:29:40 +00:00
Max Kazantsev f282aed428 [SCEV] Cache results of computeExitLimit
This patch adds a cache for computeExitLimit to save compilation time. A lot of examples of
tests that take extensive time to compile are attached to the bug 33494.

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

llvm-svn: 309080
2017-07-26 04:55:54 +00:00
Craig Topper 050c9c8f83 [X86] Prevent selecting masked aligned load instructions if the load should be non-temporal
Summary: The aligned load predicates don't  suppress themselves if the load is non-temporal the way the unaligned predicates do. For the most part this isn't a problem because the aligned predicates are mostly used for instructions that only load the the non-temporal loads have priority over those. The exception are masked loads.

Reviewers: RKSimon, zvi

Reviewed By: RKSimon

Subscribers: llvm-commits

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

llvm-svn: 309079
2017-07-26 04:31:04 +00:00
Dehao Chen 7b05a2712a Add test coverage for new PM PGOOpt handling.
Summary: This patch adds flags and tests to cover the PGOOpt handling logic in new PM.

Reviewers: chandlerc, davide

Reviewed By: chandlerc

Subscribers: sanjoy, llvm-commits

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

llvm-svn: 309076
2017-07-26 02:00:43 +00:00
Davide Italiano 557a0b3a9e [gold] Enable data-sections by default for the gold-plugin.
Follow up to r309056.

llvm-svn: 309075
2017-07-26 01:47:17 +00:00
Petr Hosek c2c3d6b87b [sanitizer] Support libc++abi in addition to libstdc++
This change adds sanitizer support for LLVM's libunwind and libc++abi
as an alternative to libstdc++. This allows using the in tree version
of libunwind and libc++abi which is useful when building a toolchain
for different target.

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

llvm-svn: 309074
2017-07-26 01:43:02 +00:00
Wei Mi c54b6c881b Add "REQUIRES: asserts" for test unswitch-equality-undef.ll.
llvm-svn: 309073
2017-07-26 01:34:46 +00:00
Sanjoy Das 469e740f2b [SCEV] Remove unnecessary call to forgetMemoizedResults
`SCEVUnknown::allUsesReplacedWith` does not need to call `forgetMemoizedResults`
since RAUW does a value-equivalent replacement by assumption.  If this
assumption was false then the later setValPtr(New) call would be incorrect too.

This is a non-trivial performance optimization for functions with a large number
of loops since `forgetMemoizedResults` walks all loop backedge taken counts to
see if any of them use the SCEVUnknown being RAUWed.  However, this improvement
is difficult to demonstrate without checking in an excessively large IR file.

llvm-svn: 309072
2017-07-26 01:32:19 +00:00
Reid Kleckner 2345dbbd54 [lit] Attempt to fix Python unittest adaptor logic
llvm-svn: 309071
2017-07-26 01:27:18 +00:00
Eric Beckmann 36be14cbfe Move manifest utils into separate lib, to reduce libxml2 deps.
Summary:
Previously were in support.  Since many many things depend on support,
were all forced to also depend on libxml2, which we only want in a few cases.
This puts all the libxml2 deps in a separate lib to be used only in a few
places.

Reviewers: ruiu, thakis, rnk

Subscribers: mgorny, hiraditya, llvm-commits

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

llvm-svn: 309070
2017-07-26 01:21:55 +00:00
Reid Kleckner 037bcd9345 [PDB] Remove stale GSI.h header that I intended to remove in the previous commit
llvm-svn: 309069
2017-07-26 00:58:49 +00:00
Spyridoula Gravani dc635f40bb [DWARF] Generalized verification of .apple_names accelerator table to be applicable to any acceleration table. Added verification for .apple_types, .apple_namespaces and .apple_objc sections.
Differential Revision: https://reviews.llvm.org/D35853

llvm-svn: 309068
2017-07-26 00:52:31 +00:00
Felix Berger 603ea2df2a [clang-tidy] Do not issue fixit for explicit template specializations
Summary:

Do not issue fixit in UnnecessaryValueParamCheck if the function is an explicit template specialization as this could cause build breakages.

Reviewers: alexfh

Subscribers: JDevlieghere, xazax.hun, cfe-commits

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

llvm-svn: 309067
2017-07-26 00:45:41 +00:00
Reid Kleckner 14d90fd05c [PDB] Improve GSI hash table dumping for publics and globals
The PDB "symbol stream" actually contains symbol records for the publics
and the globals stream. The globals and publics streams are essentially
hash tables that point into a single stream of records. In order to
match cvdump's behavior, we need to only dump symbol records referenced
from the hash table. This patch implements that, and then implements
global stream dumping, since it's just a subset of public stream
dumping.

Now we shouldn't see S_PROCREF or S_GDATA32 records when dumping
publics, and instead we should see those record in the globals stream.

llvm-svn: 309066
2017-07-26 00:40:36 +00:00
Eric Beckmann b4dbe7231e Reapply "llvm-mt: implement simple merging of manifests, not factoring namespaces.
This time with correct #if.

This reverts commit 9cf4eca0e0383040c1ff1416815c7f649650c2a0.

llvm-svn: 309064
2017-07-26 00:25:12 +00:00
Eugene Zelenko 96d933da4f [AArch64] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 309062
2017-07-25 23:51:02 +00:00
Peter Szecsi d39a7ed1ac [StaticAnalyzer] LoopUnrolling - Attempt #2 to fix a crash in r309006.
llvm-svn: 309061
2017-07-25 23:49:16 +00:00
Petr Hosek b1305ce038 [sanitizer] Support compiler-rt builtins
This change adds support for compiler-rt builtins as an alternative
compiler runtime to libgcc.

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

llvm-svn: 309060
2017-07-25 23:38:25 +00:00
Wei Mi fc0e245464 Disable loop unswitching for some patterns containing equality comparison with undef.
This is a workaround for the bug described in PR31652 and
http://lists.llvm.org/pipermail/llvm-dev/2017-July/115497.html. The temporary
solution is to add a function EqualityPropUnSafe. In EqualityPropUnSafe, for
some simple patterns we can know the equality comparison may contains undef,
so we regard such comparison as unsafe and will not do loop-unswitching for
them. We also need to disable the select simplification when one of select
operand is undef and its result feeds into equality comparison.

The patch cannot clear the safety issue caused by the bug, but it can suppress
the issue from happening to some extent.

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

llvm-svn: 309059
2017-07-25 23:37:17 +00:00
David Majnemer 8f94a23505 [CodeGen] Correctly model std::byte's aliasing properties
std::byte, when defined as an enum, needs to be given special treatment
with regards to its aliasing properties. An array of std::byte is
allowed to be used as storage for other types.

This fixes PR33916.

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

llvm-svn: 309058
2017-07-25 23:33:58 +00:00
Adrian Prantl be66271f04 Debug Info: Support fragmented variables in the MMI side table
This reapplies commit r309034 with a bugfix+test for inlined variables.

llvm-svn: 309057
2017-07-25 23:32:59 +00:00
Davide Italiano 756feb2a51 [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.

llvm-svn: 309056
2017-07-25 23:32:50 +00:00
Rui Ueyama 8109789a33 Simplify ignored options.
Since the flag is ignored anyway, it doesn't matter whether
it is an alias or not.

llvm-svn: 309055
2017-07-25 23:32:05 +00:00
Richard Smith adae25d35d Reorder tests to match latest SD-6 draft.
llvm-svn: 309054
2017-07-25 23:31:42 +00:00
Rafael Espindola cb83c8c85f Simplify. NFC.
llvm-svn: 309053
2017-07-25 23:23:40 +00:00
NAKAMURA Takumi 3c7223837a clang/StaticAnalyzer/Core/PathSensitive/LoopUnrolling.h: Add a forward decl AnalysisManager, to unbreak modules build.
llvm-svn: 309052
2017-07-25 23:23:17 +00:00
Rafael Espindola d4fbe4fe82 Reduce templating. NFC.
llvm-svn: 309051
2017-07-25 23:15:35 +00:00
Eric Beckmann 455210e18f Revert "llvm-mt: implement simple merging of manifests, not factoring namespaces."
This reverts commit 813308e240792ca70ed2f998f21df24a5061ada0.

llvm-svn: 309050
2017-07-25 23:06:46 +00:00
Mandeep Singh Grang 8dc8394d5f [clang] Add abi-breaking-checks support to clang
Summary: You can now use REQUIRES:abi-breaking-checks in clang too

Reviewers: chapuni, probinson, ddunbar, jroelofs

Reviewed By: jroelofs

Subscribers: jroelofs, cfe-commits

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

llvm-svn: 309049
2017-07-25 23:00:02 +00:00
Rafael Espindola affe7209c0 LTO: Handle sections with valid C names.
These can be referenced with __start_/__stop_ symbols. I will try to make
this more precise in a followup patch.

llvm-svn: 309048
2017-07-25 22:51:05 +00:00
Eric Beckmann 780fd409fb 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

llvm-svn: 309047
2017-07-25 22:50:25 +00:00
Sean Callanan 3c023abe55 Skip test_unique_stacks on Darwin, because it doesn't terminate reliably.
rdar://problem/33462362

llvm-svn: 309046
2017-07-25 22:44:34 +00:00
Petr Hosek 76fb627baf Revert "Reland "[LLVM][llvm-objcopy] Added basic plumbing to get things started""
This reverts commit 0d9d9250483761eb2f50236830161b0e2137d483.

llvm-svn: 309045
2017-07-25 22:39:52 +00:00
Michal Gorny b715df6a73 [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

llvm-svn: 309044
2017-07-25 22:38:31 +00:00
Petr Hosek 5e87de3e4e 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

llvm-svn: 309043
2017-07-25 22:38:08 +00:00
Vedant Kumar 2d8de203f7 [ubsan] Update a test missed in r309008, NFC
llvm-svn: 309042
2017-07-25 22:33:28 +00:00
Eric Christopher 97ae58686f Update the comments on default subtargets based on feedback.
llvm-svn: 309041
2017-07-25 22:21:08 +00:00
Tobias Grosser 9ddcf8e6ac Revert accidental isl changes in 308923
It seems I still had some incomplete changes in the tree when committing.
In general, we only import changes from isl upstream. In this case, the
changes were especially unfortunate, as they broke the error management
in isl_flow.c and consequently caused regressions.

Thanks to Michael Kruse for spotting this mistake.

llvm-svn: 309039
2017-07-25 22:15:47 +00:00
Kostya Serebryany 6eab1a8ee6 [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
llvm-svn: 309038
2017-07-25 22:05:31 +00:00
Petr Hosek a1ddfbb119 Revert "Reland "[LLVM][llvm-objcopy] Added basic plumbing to get things started""
This reverts commit 960873b10dd071298c817ba74ef2228f94ead7a1.

llvm-svn: 309037
2017-07-25 21:55:00 +00:00