Commit Graph

266904 Commits

Author SHA1 Message Date
Shoaib Meenai c44edbcc94 [libc++] Remove unused _LIBCPP_FUNC_VIS_ONLY
This has been unused since r282644.

llvm-svn: 307965
2017-07-13 21:28:17 +00:00
Paul Robinson d23f2a8ad5 [PS4] Disable LTO unit features under ThinLTO, like for Darwin.
llvm-svn: 307964
2017-07-13 21:25:47 +00:00
Jakub Kuderski eb370adeb6 [Dominators] Add CFGBuilder testing utility
Summary:
This patch introduces a new testing utility for building and modifying CFG -- CFGBuilder. The primary use case for the utility is testing the upcoming incremental dominator tree update API.

The current design provides a simple mechanism of constructing arbitrary graphs and then applying series of updates to them. CFGBuilder takes care of creating empty functions, connecting and disconnecting basic blocks. Under the hood it uses SwitchInst and UnreachableInst.

It will be also possible to create a thin wrapper over CFGBuilder for parsing string input and to hook it up to other textual tools (e.g. opt used with FileCheck).

Reviewers: dberlin, sanjoy, grosser, dblaikie

Reviewed By: dblaikie

Subscribers: davide, mgorny, llvm-commits

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

llvm-svn: 307960
2017-07-13 21:16:01 +00:00
Lang Hames 971add5f07 Use getNameAsString instead of getName to get method names when dumping
overrides:  getName can fail if the decl's name isn't a simple identifier.

This is a more general replacement for the fix in r305860.

llvm-svn: 307959
2017-07-13 21:08:29 +00:00
Kostya Kortchinsky b44364dd15 [scudo] Do not grab a cache for secondary allocation & per related changes
Summary:
Secondary backed allocations do not require a cache. While it's not necessary
an issue when each thread has its cache, it becomes one with a shared pool of
caches (Android), as a Secondary backed allocation or deallocation holds a
cache that could be useful to another thread doing a Primary backed allocation.

We introduce an additional PRNG and its mutex (to avoid contention with the
Fallback one for Primary allocations) that will provide the `Salt` needed for
Secondary backed allocations.

I changed some of the code in a way that feels more readable to me (eg: using
some values directly rather than going  through ternary assigned variables,
using directly `true`/`false` rather than `FromPrimary`). I will let reviewers
decide if it actually is.

An additional change is to mark `CheckForCallocOverflow` as `UNLIKELY`.

Reviewers: alekseyshl

Reviewed By: alekseyshl

Subscribers: llvm-commits

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

llvm-svn: 307958
2017-07-13 21:01:19 +00:00
Chris Bieneman 7dc58b238d Fix debugserver accepting remote connections
While adding IPv6 support to debugserver I broke handling wildcard addresses and fully qualified address filtering. This patch resolves that bug and adds a test for matching the address "*".

<rdar://problem/32947613>

llvm-svn: 307957
2017-07-13 20:58:13 +00:00
Vedant Kumar 965f23fe84 [ubsan] Teach the pointer overflow check that "p - <unsigned> <= p" (compiler-rt)
Compiler-rt changes associated with: D34121

llvm-svn: 307956
2017-07-13 20:55:41 +00:00
Vedant Kumar 175b6d1f28 [ubsan] Teach the pointer overflow check that "p - <unsigned> <= p" (PR33430)
The pointer overflow check gives false negatives when dealing with
expressions in which an unsigned value is subtracted from a pointer.
This is summarized in PR33430 [1]: ubsan permits the result of the
subtraction to be greater than "p", but it should not.

To fix the issue, we should track whether or not the pointer expression
is a subtraction. If it is, and the indices are unsigned, we know to
expect "p - <unsigned> <= p".

I've tested this by running check-{llvm,clang} with a stage2
ubsan-enabled build. I've also added some tests to compiler-rt, which
are in D34122.

[1] https://bugs.llvm.org/show_bug.cgi?id=33430

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

llvm-svn: 307955
2017-07-13 20:55:26 +00:00
Shoaib Meenai 982060b0a4 [libc++] Use proper template terminology. NFC
It's supposed to be "class template" and "function template" instead of
"template class" and "template function".

llvm-svn: 307954
2017-07-13 20:47:24 +00:00
Jakub Kuderski 5af07f5c1e [Dominators] Simplify templates
Summary: DominatorTreeBase and related classes used overcomplicated template machinery. This patch simplifies them and gets rid of DominatorTreeBaseTraits and DominatorTreeBaseByTraits, which weren't actually used outside the DomTree construction.

Reviewers: dberlin, sanjoy, davide, grosser

Reviewed By: dberlin, davide, grosser

Subscribers: llvm-commits

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

llvm-svn: 307953
2017-07-13 20:45:32 +00:00
Lang Hames 4284ed0894 [Orc] Fix some Error-related fixmes in CompileOnDemandLayer now that the layer
interface has been errorized.

llvm-svn: 307952
2017-07-13 20:44:46 +00:00
Sanjay Patel 71b02704c8 [InstCombine] put tests for commuted variants of the same fold together; NFC
llvm-svn: 307951
2017-07-13 20:35:45 +00:00
Jakub Kuderski 443d5cf1f1 [Dominators] Split SemiNCA into smaller functions
Summary:
This patch splits the SemiNCA algorithm into smaller functions. It also adds a new debug macro.

In order to perform incremental updates, we need to be able to refire SemiNCA on a subset of CFG nodes (determined by a DFS walk results). We also need to skip nodes that are not deep enough in a DomTree.

Reviewers: dberlin, davide, sanjoy, grosser

Reviewed By: dberlin, davide

Subscribers: llvm-commits

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

llvm-svn: 307950
2017-07-13 20:35:01 +00:00
Rui Ueyama 1e77ad1456 Move feature-specific functions out of Strings.cpp.
Functions declared in Strings.h should provide generic string operations
for the linker, but some of them are too specific to some features. This
patch moves them to the location where they are used.

llvm-svn: 307949
2017-07-13 20:30:35 +00:00
Reid Kleckner 3b8acb2c5a [COFF] Bounds check relocations
Summary:
This would have caught the invalid object file I used in my test case in
r307726. The OOB was only caught by ASan later, which is slow and
doesn't work on some platforms. LLD should do some basic input
validation itself. This check isn't perfect, so relocations can reach
OOB by up to seven bytes, but it's better than what we had and probably
cheap.

Reviewers: ruiu

Subscribers: llvm-commits

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

llvm-svn: 307948
2017-07-13 20:29:59 +00:00
Jakub Kuderski 34327d28fd [NFC] Move DEBUG_TYPE below includes in Hexagon
llvm-svn: 307947
2017-07-13 20:26:45 +00:00
Reid Kleckner 6597c28d76 [PDB] Fix type server handling for archives
Summary:
This fixes type indices for SDK or CRT static archives. Previously we'd
try to look next to the archive object file path, which would not exist
on the local machine.

Also error out if we can't resolve a type server record. Hypothetically
we can recover from this error by discarding debug info for this object,
but that is not yet implemented.

Reviewers: ruiu, amccarth

Subscribers: aprantl, hiraditya, llvm-commits

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

llvm-svn: 307946
2017-07-13 20:12:23 +00:00
Kuba Mracek f0c652a52e For Darwin's GetTaskInfoMaxAddress, define the real structure with real fields to avoid confusion. NFC.
llvm-svn: 307945
2017-07-13 20:02:45 +00:00
Jim Ingham 055e65f0d4 Enable parsing C++ names generated by lambda functions.
https://reviews.llvm.org/D34911 from Weng Xuetian.

llvm-svn: 307944
2017-07-13 19:48:43 +00:00
Jim Ingham 61949c9f6f Convert a few more tests to use run_to_source_breakpoint.
llvm-svn: 307943
2017-07-13 19:46:21 +00:00
Jim Ingham 30bac79162 Fix a deadlock in the Python interpreter vrs. SIGINT.
The interpreter gets invoked in the sigint handler to cancel
long-running Python operations.  That requires the interpreter
lock, but that may be held by the Python operation that's getting
interrupted, so the mutex needs to be recursive.

<rdar://problem/33179086>

llvm-svn: 307942
2017-07-13 19:45:54 +00:00
Erik Pilkington 28a4d0b981 [demangler] Respect try_to_parse_template_args
Fixes an exponential parse found by oss-fuzz.

llvm-svn: 307941
2017-07-13 19:37:37 +00:00
Jakub Kuderski 1d2dc681b1 [NFC] Move DEBUG_TYPE macro below includes...
in MachineCombiner.cpp.

llvm-svn: 307940
2017-07-13 19:30:52 +00:00
Simon Dardis 1558ee3365 Revert "[mips][mt][6/7] Add support for mftr, mttr instructions."
This reverts r307836, it broke one of the buildbots. Reverting
while I investigate.

llvm-svn: 307939
2017-07-13 19:27:41 +00:00
George Karpenkov dfa6c20f4b [lit] add a -vv option to echo all executed commands.
Debugging LIT scripts can be rather painful, as LIT directly does not
specify which line has failed.
Rather, FileCheck is expected to report the failing location, but it can
be often ambiguous if multiple commands are tested against the same
prefix.  This change adds a -vv option, which echoes all output.
Then detecting the error becomes straightforward: last printed line is
the failing one.

Of course, it could be desired to try to get failing line number
directly from bash, but it involves excessive hacks on older bash
versions (cf.
https://stackoverflow.com/questions/24398691/how-to-get-the-real-line-number-of-a-failing-bash-command)

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

llvm-svn: 307938
2017-07-13 19:26:27 +00:00
Andrew Zhogin af3d5fe83b [X86][tests] Added rotate_vec.ll CodeGen test. NFC precommit for bug 33691 fix.
llvm-svn: 307937
2017-07-13 18:57:40 +00:00
Jakub Kuderski 3064fae5a6 [Dominators] Improve reachability verification
Summary:
This patch improves verification by making `verifyReachablility` look for CFG not found in the DomTree.
It also makes the verification work with postdominators by handling virtual root.

Reviewers: dberlin, davide, grosser, sanjoy

Reviewed By: dberlin

Subscribers: llvm-commits

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

llvm-svn: 307936
2017-07-13 18:55:52 +00:00
Krzysztof Parzyszek 89b2d7c938 [Hexagon] Use VSPLAT instead of COMBINE for vectors of type v2i32, NFC
This cleans up the vector shift patterns.

llvm-svn: 307935
2017-07-13 18:17:58 +00:00
Nemanja Ivanovic 3c7e276d24 [PowerPC] Ensure displacements for DQ-Form instructions are multiples of 16
As outlined in the PR, we didn't ensure that displacements for DQ-Form
instructions are multiples of 16. Since the instruction encoding encodes
a quad-word displacement, a sub-16 byte displacement is meaningless and
ends up being encoded incorrectly.

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

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

llvm-svn: 307934
2017-07-13 18:17:10 +00:00
Martin Storsjo 502de22fda [AArch64] Produce the right kind of va_arg for windows
On windows on arm64, the va_list is a plain pointer.

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

llvm-svn: 307933
2017-07-13 17:59:14 +00:00
Simon Pilgrim 6c0eeffe71 Fix spelling mistakes in comments. NFCI.
llvm-svn: 307932
2017-07-13 17:34:44 +00:00
Simon Pilgrim f87eb880dd Fix -Wdocumentation warning. NFCI
llvm-svn: 307931
2017-07-13 17:29:48 +00:00
Sanjay Patel 6994530c37 [InstCombine] add descriptive comments for tests; NFC
Also, remove unnecessary function attributes.

llvm-svn: 307930
2017-07-13 17:24:57 +00:00
Simon Pilgrim f32f4be957 Fix unused variable warning on EXPENSIVE_CHECKS release builds. NFCI.
llvm-svn: 307929
2017-07-13 17:10:12 +00:00
Martin Storsjo 68266faa31 [AArch64] Implement support for windows style vararg functions
Pass parameters properly in calls to such functions (pass all
floats in integer registers), and handle va_start properly (allocate
stack immediately below the arguments on the stack, to save the
register arguments into a single continuous array).

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

llvm-svn: 307928
2017-07-13 17:03:12 +00:00
Martin Storsjo 8c0317da02 [llvm-objdump] Properly print MachO aarch64 addend relocations
Previously such relocations fell into the last case for local
symbols, using the relocation addend as symbol index, leading to
a crash.

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

llvm-svn: 307927
2017-07-13 17:03:02 +00:00
Rafael Espindola 64321a190e Documentation fix. NFC.
A MCFixup might not even be in an instruction.

llvm-svn: 307926
2017-07-13 17:00:30 +00:00
Reid Kleckner 1c0f6ed45a Put std::mutex usage behind #ifdefs to pacify the sanitizer buildbot
llvm-svn: 307925
2017-07-13 16:56:24 +00:00
Alex Lorenz e1088dc42b Extend -Wdeprecated-implementations to warn about unavailable methods
rdar://22867595

llvm-svn: 307924
2017-07-13 16:37:11 +00:00
Alex Lorenz f81d97e763 NFC, Cleanup the code for -Wdeprecated-implementations
and void capitalization of the warning message

rdar://22867595

llvm-svn: 307923
2017-07-13 16:35:59 +00:00
Frederich Munch 5e9d6d0c14 Support: Add llvm::center_justify.
Summary: Completes the set.

Reviewers: ruiu

Reviewed By: ruiu

Subscribers: ruiu, llvm-commits

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

llvm-svn: 307922
2017-07-13 16:11:08 +00:00
Davide Italiano c421dc00a9 [GlobalOpt] Autogenerate checks for the test in PR33686.
Also fix a typo while here.

llvm-svn: 307921
2017-07-13 15:55:34 +00:00
Davide Italiano c3dc055780 Reapply [GlobalOpt] Remove unreachable blocks before optimizing a function.
This commit reapplies r307215 now that we found out and fixed
the cause of the cfi test failure (in r307871).

llvm-svn: 307920
2017-07-13 15:40:59 +00:00
Amara Emerson ebe02904d4 [AArch64] Add support for handling the +sve target feature.
This also adds the appropriate predefine for SVE if enabled.

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

llvm-svn: 307919
2017-07-13 15:36:01 +00:00
Sjoerd Meijer fe3ff69faf [AArch64] Enable the mnemonic spell checker
The AsmParser mnemonic spell checker was introduced in r307148 and enabled only
for ARM. This patch enables it for AArch64.

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

llvm-svn: 307918
2017-07-13 15:29:13 +00:00
Amara Emerson 9f3a245e76 [AArch64] Add an SVE target feature to the backend and TargetParser.
The feature will be used properly once assembler/disassembler support
begins to land.

llvm-svn: 307917
2017-07-13 15:19:56 +00:00
Alexey Bataev c9dcaaae69 [OPENMP] Fix reduction tests, NFC.
llvm-svn: 307916
2017-07-13 15:15:25 +00:00
Alexey Bataev faede1d0d8 [OPENMP] Fix reduction tests, NFC.
llvm-svn: 307915
2017-07-13 15:09:05 +00:00
Alexey Bataev 280f308b71 [OPENMP] Further reduction test fix, NFC.
llvm-svn: 307914
2017-07-13 15:02:27 +00:00
Matthew Simpson 06e6a6bdff [AArch64] Add preliminary support for ARMv8.1 SUB/AND atomics
This patch is a follow-up to r305893 and adds preliminary support for the
fetch_sub and fetch_and operations.

llvm-svn: 307913
2017-07-13 15:01:23 +00:00