Commit Graph

218114 Commits

Author SHA1 Message Date
Manuel Klimek 66a4dae57f Make matchers thread compatible, so we can pass them to different threads and run them on multiple translation units in parallel.
llvm-svn: 255773
2015-12-16 15:48:58 +00:00
Alexander Kornienko 2a538309ac [clang-tidy] google-readability-namespace-comments: ignore stray semicolons
llvm-svn: 255772
2015-12-16 15:44:42 +00:00
Ed Maste f7fe3b99c7 Include -c, -core in the lldb(1) man page
llvm-svn: 255771
2015-12-16 15:37:21 +00:00
Alexander Kornienko 821ca470bb [clang-tidy] Add namespace support to add_new_check.py
Summary: Without namespace you can not create checks with same name in different modules

Reviewers: alexfh

Subscribers: cfe-commits

Patch by Cong Liu!

Differential Revision: http://reviews.llvm.org/D15571

llvm-svn: 255770
2015-12-16 15:05:27 +00:00
Ed Maste d4ff820fb8 Man page whitespace/formatting change to appease igor(1)
igor is a tool to detect common problems and style conformance issues in
man pages and other documents.  This is a non-content change to address
the items it reported, before making content changes.

See http://www.wonkity.com/~wblock/igor/igor.1.html for more information
about igor(1).

llvm-svn: 255769
2015-12-16 14:59:48 +00:00
Simon Atanasyan 09dae7c3e7 [ELF][MIPS] Handle R_MIPS_HI16/LO16 relocations against _gp_disp symbol
The `_gp_disp` is a magic symbol designates offset between start of
function and gp pointer into GOT. Only `R_MIPS_HI16` and `R_MIPS_LO16`
relocations are permitted with `_gp_disp`. The patch adds the `_gp_disp`
as an ignored symbol and adjusts symbol value before call the `relocateOne`
for `R_MIPS_HI16/LO16` relocations.

Differential Revision: http://reviews.llvm.org/D15480

llvm-svn: 255768
2015-12-16 14:45:09 +00:00
James Molloy 3d21dcf3ed [SimplifyCFG] Don't create unnecessary PHIs
In conditional store merging, we were creating PHIs when we didn't
need to. If the value to be predicated isn't defined in the block
we're predicating, then it doesn't need a PHI at all (because we only
deal with triangles and diamonds, any value not in the predicated BB
must dominate the predicated BB).

This fixes a large code size increase in some benchmarks in a popular embedded benchmark suite.

Now with a fix (and fixed tests) for the conformance issue seen in Chromium.

llvm-svn: 255767
2015-12-16 14:12:44 +00:00
Andrey Bokhanko 0b135e05ec [x86] Exclusion of incorrect include headers paths for MCU target
Exclusion of /usr/include and /usr/local/include headers paths for MCU target.

Differential Revision: http://reviews.llvm.org/D14954

llvm-svn: 255766
2015-12-16 13:27:38 +00:00
Alexander Kornienko d819364e81 [clang-tidy] Don't use diag() for debug output
llvm-svn: 255765
2015-12-16 13:19:08 +00:00
Oliver Stannard 2de8c16913 [ARM] Add ARMv8.2-A FP16 vector instructions
ARMv8.2-A adds 16-bit floating point versions of all existing SIMD
floating-point instructions. This is an optional extension, so all of
these instructions require the FeatureFullFP16 subtarget feature.

Note that VFP without SIMD is not a valid combination for any version of
ARMv8-A, but I have ensured that these instructions all depend on both
FeatureNEON and FeatureFullFP16 for consistency.

Differential Revision: http://reviews.llvm.org/D15039

llvm-svn: 255764
2015-12-16 12:37:39 +00:00
Pavel Labath 25e241b006 [test] Add ability to expect timeouts
Summary:
This adds ability to mark test that do not complete due to hangs, crashes, etc., as "expected",
to avoid flagging the build red for a known problem. Functionally, this extends the scope of the
existing expectedFailureXXX decorators to cover these states as well. Once this is in, I will
start replacing the magic list of failing tests in dosep.py with our regular annotations which
should hopefully make code simpler.

Reviewers: tfiala

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D15530

llvm-svn: 255763
2015-12-16 12:09:45 +00:00
Oliver Stannard 48568cbe18 [ARM] Add ARMv8.2-A FP16 scalar instructions
ARMv8.2-A adds 16-bit floating point versions of all existing VFP
floating-point instructions. This is an optional extension, so all of
these instructions require the FeatureFullFP16 subtarget feature.

The assembly for these instructions uses S registers (AArch32 does not
have H registers), but the instructions have ".f16" type specifiers
rather than ".f32" or ".f64". The top 16 bits of each source register
are ignored, and the top 16 bits of the destination register are set to
zero.

These instructions are mostly the same as the 32- and 64-bit versions,
but they use coprocessor 9 rather than 10 and 11.

Two new instructions, VMOVX and VINS, have been added to allow packing
and extracting two 16-bit floats stored in the top and bottom halves of
an S register.

New fixup kinds have been added for the PC-relative load and store
instructions, but no ELF relocations have been added as they have a
range of 512 bytes.

Differential Revision: http://reviews.llvm.org/D15038

llvm-svn: 255762
2015-12-16 11:35:44 +00:00
Michael Kuperstein e75e6e2a23 [X86] Improve shift combining
This folds (ashr (shl a, [56,48,32,24,16]), SarConst)
into       (shl, (sext (a), [56,48,32,24,16] - SarConst))
or into    (lshr, (sext (a), SarConst - [56,48,32,24,16]))
depending on sign of (SarConst - [56,48,32,24,16])

sexts in X86 are MOVs.
The MOVs have the same code size as above SHIFTs (only SHIFT by 1 has lower code size).
However the MOVs have 2 advantages to SHIFTs on x86:
1. MOVs can write to a register that differs from source.
2. MOVs accept memory operands.

This fixes PR24373.

Patch by: evgeny.v.stupachenko@intel.com
Differential Revision: http://reviews.llvm.org/D13161

llvm-svn: 255761
2015-12-16 11:22:37 +00:00
Keno Fischer 94f181a45f [SectionMemoryManager] Make better use of virtual memory
Summary: On Windows, the allocation granularity can be significantly
larger than a page (64K), so with many small objects, just clearing
the FreeMem list rapidly leaks quite a bit of virtual memory space
(if not rss). Fix that by only removing those parts of the FreeMem
blocks that overlap pages for which we are applying memory permissions,
rather than dropping the FreeMem blocks entirely.

Reviewers: lhames

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D15202

llvm-svn: 255760
2015-12-16 11:13:23 +00:00
Vikram TV 859ad29b52 Recommit LiveDebugValues pass after fixing a couple of minor issues.
llvm-svn: 255759
2015-12-16 11:09:48 +00:00
Alexander Kornienko 32032f5e64 [clang-tidy] Fix a crash in misc-new-delete-overloads
llvm-svn: 255758
2015-12-16 10:58:14 +00:00
Daniel Jasper d2629dc812 clang-format: Extend header sort category implementation.
Specifically, it is sometimes necessary to keep certain #includes as
the first #include, even before the main #include for a .cc file.
Switching the category to be signed instead of unsigned isn't ideal,
but it seems as good of an option as any and is fully backwards
compatible.

llvm-svn: 255757
2015-12-16 10:10:16 +00:00
Chen Li e2222fdf95 Remove FileCheck from test case token_landingpad.ll.
The test case only needs to make sure it does not crash LLVM.

llvm-svn: 255755
2015-12-16 06:27:09 +00:00
Akira Hatanaka 8ebd580cf5 [Objective-c] Fix a crash that occurs when ObjCTypeParamList::back() is
called on an empty list.

This commit makes Parser::parseObjCTypeParamListOrProtocolRefs return
nullptr if it sees an invalid type parameter (e.g., __kindof) in the
type parameter list.

rdar://problem/23068920

Differential Revision: http://reviews.llvm.org/D15463

llvm-svn: 255754
2015-12-16 06:25:38 +00:00
Craig Topper c82f896188 [CodeGen] Use llvm::CmpInst::Predicate instead of unsigned for parameter types in EmitCompare to eliminate some later explicit casts. NFC.
llvm-svn: 255753
2015-12-16 06:24:28 +00:00
Cong Hou 08ec3d91bb Minor change to TailDuplication.cpp to turn on normalization when removing successor
llvm-svn: 255752
2015-12-16 06:03:30 +00:00
George Burgess IV 500d3039d7 Minor cleanup of Attribute code. NFC.
llvm-svn: 255751
2015-12-16 05:21:02 +00:00
Chen Li 3e0da9de77 Fixed test case in rL255749: [SelectionDAGBuilder] Adds support for landingpads of token type.
llvm-svn: 255750
2015-12-16 05:05:18 +00:00
Chen Li 3e8330a1fe [SelectionDAGBuilder] Adds support for landingpads of token type
Summary: This patch adds a check in visitLandingPad to see if landingpad's result type is token type. If so, do not create DAG nodes for its exception pointer and selector value. This patch enables the back end to handle landingpads of token type.

Reviewers: JosephTremoulet, majnemer, rnk

Subscribers: sanjoy, llvm-commits

Differential Revision: http://reviews.llvm.org/D15405

llvm-svn: 255749
2015-12-16 04:48:42 +00:00
Xinliang David Li abfd553c2b [PGO] cleanup: unify prefix for portability macros
llvm-svn: 255748
2015-12-16 03:29:15 +00:00
Todd Fiala cd817ba2ef Disable test reruns on arm unless explicitly marked with --rerun-all-issues
Workaround part 2 for:
https://llvm.org/bugs/show_bug.cgi?id=25844

llvm-svn: 255747
2015-12-16 02:46:57 +00:00
Todd Fiala 9ce27bba29 Really fix Xcode build.
Fixes target membership settings from my last check-in.

llvm-svn: 255746
2015-12-16 02:18:56 +00:00
Peter Collingbourne 16c1978760 Fuzzer: Fix library dependencies.
Newer versions of libstdc++ (4.9+), as well as libc++, depend directly on
libpthread from the standard library headers, so libfuzzer needs to declare
a standard library dependency.

llvm-svn: 255745
2015-12-16 02:14:57 +00:00
Reid Kleckner 60103383f0 Print qualified display names when emitting CodeView
This is what debuggers expect.  Words towards fixing PR21528.

llvm-svn: 255744
2015-12-16 02:04:40 +00:00
Philip Reames 23319014a9 Speculative fix for windows build
llvm-svn: 255743
2015-12-16 01:24:05 +00:00
Todd Fiala 7236f32414 Xcode project changes for r255729.
llvm-svn: 255742
2015-12-16 01:20:08 +00:00
Enrico Granata b13293876c Add a symbolic link from the test directory to the actual - elsewhere located - path that contains the test cases - and teach the test suite driver to resolve paths that contain symbolic links to test cases
This is meant to reduce the typing that one needs to do to get from the test subdirectory to actual test cases. Now one can just do

$ ./dotest.py ./testcases/<yaddayaddayadda>

llvm-svn: 255741
2015-12-16 01:15:49 +00:00
Chris Bieneman ae5433907a [CMake] Add support for generating profdata for clang from training files
Summary:
This patch adds support for using LIT to drive generating PGO profile data for clang.

This first pass implementation should work on Linux and Unix based platforms. If you build clang using CMake with LLVM_BUILD_INSTRUMENTED=On the CMake build generates a generate-profdata target that will use the just-built clang to build any test files (see hello_world.cpp as an example). Each test compile will generate profraw files for each clang process. After all tests have run CMake will merge the profraw files using llvm-profdata.

Future opportunities for extension:
* Support for Build->Profile->Build bootstrapping
* Support for linker order file generation using a similar mechanism and the same training data
* Support for Windows

Reviewers: dexonsmith, friss, bogner, cmatthews, vsk, silvas

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D15462

llvm-svn: 255740
2015-12-16 01:02:44 +00:00
Philip Reames ae1f265bf1 [EarlyCSE] DSE of stores which write back loaded values
Extend EarlyCSE with an additional style of dead store elimination. If we write back a value just read from that memory location, we can eliminate the store under the assumption that the value hasn't changed.

I'm implementing this mostly because I noticed the omission when looking at the code. It seemed strange to have InstCombine have a peephole which was more powerful than EarlyCSE. :)

Differential Revision: http://reviews.llvm.org/D15397

llvm-svn: 255739
2015-12-16 01:01:30 +00:00
Eric Fiselier e2e332a50e Make noexcept specifications on __hash_table definitions match their declarations.
llvm-svn: 255738
2015-12-16 00:53:04 +00:00
Philip Reames 61a24ab6cc [IR] Add support for floating pointer atomic loads and stores
This patch allows atomic loads and stores of floating point to be specified in the IR and adds an adapter to allow them to be lowered via existing backend support for bitcast-to-equivalent-integer idiom.

Previously, the only way to specify a atomic float operation was to bitcast the pointer to a i32, load the value as an i32, then bitcast to a float. At it's most basic, this patch simply moves this expansion step to the point we start lowering to the backend.

This patch does not add canonicalization rules to convert the bitcast idioms to the appropriate atomic loads. I plan to do that in the future, but for now, let's simply add the support. I'd like to get instruction selection working through at least one backend (x86-64) without the bitcast conversion before canonicalizing into this form.

Similarly, I haven't yet added the target hooks to opt out of the lowering step I added to AtomicExpand. I figured it would more sense to add those once at least one backend (x86) was ready to actually opt out.

As you can see from the included tests, the generated code quality is not great. I plan on submitting some patches to fix this, but help from others along that line would be very welcome. I'm not super familiar with the backend and my ramp up time may be material.

Differential Revision: http://reviews.llvm.org/D15471

llvm-svn: 255737
2015-12-16 00:49:36 +00:00
Evgeniy Stepanov e3fb51cf5a [cfi] Exclude ubsan runtime library from non-diag CFI builds (driver changes).
Split the CFI runtime in two: cfi and cfi_diag. The latter includes
UBSan runtime to allow printing diagnostics.

llvm-svn: 255736
2015-12-16 00:38:42 +00:00
Evgeniy Stepanov 72b0111ce6 [cfi] Exclude ubsan runtime library from non-diag CFI builds.
Split the CFI runtime in two: cfi and cfi_diag. The latter includes
UBSan runtime to allow printing diagnostics.

llvm-svn: 255735
2015-12-16 00:38:41 +00:00
Eric Fiselier af5b54a249 Workaround nasty GCC bug that caused testsuite to hang
llvm-svn: 255734
2015-12-16 00:35:45 +00:00
Evgeniy Stepanov 702a773988 [cfi] Fix GCC build.
llvm-svn: 255733
2015-12-16 00:34:30 +00:00
Mike Aizatsky 2ad650ea4f [sancov] blacklist support.
Summary:
Using the blacklist the user can filter own unwanted functions
from all outputs. By default blacklist contains "fun:__sancov*" line.

Differential Revision: http://reviews.llvm.org/D15364

llvm-svn: 255732
2015-12-16 00:31:48 +00:00
Reid Kleckner 39329d57b5 Reland "[SEH] Use llvm.x86.seh.recoverfp for SEH filters on x64 as well as 32bit"
I forgot to initialize RecoverFP.

llvm-svn: 255731
2015-12-16 00:26:37 +00:00
Evgeniy Stepanov 65c3a4b9c0 [cfi] Limit cross-dso tests to Linux.
Mac is missing the driver support to link the CFI runtime library.

llvm-svn: 255730
2015-12-16 00:24:18 +00:00
Siva Chandra d8335e9ab4 Read macro info from .debug_macro section and use it for expression evaluation.
Summary:
DWARF 5 proposes a reinvented .debug_macro section. This change follows
that spec.

Currently, only GCC produces the .debug_macro section and hence
the added test is annottated with expectedFailureClang.

Reviewers: spyffe, clayborg, tberghammer

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D15437

llvm-svn: 255729
2015-12-16 00:22:08 +00:00
Reid Kleckner d8f719fa1c Revert "[SEH] Use llvm.x86.seh.recoverfp for SEH filters on x64 as well as 32bit"
This reverts commit r255710.

llvm-svn: 255728
2015-12-16 00:20:21 +00:00
Richard Smith 9043d75e75 Fix grammar.
llvm-svn: 255727
2015-12-16 00:19:23 +00:00
Richard Smith e873686e3c Update our claims about GCC's diagnostics quality to reflect recent improvements to GCC.
llvm-svn: 255726
2015-12-16 00:18:47 +00:00
Evgeniy Stepanov b99d6c8b2a [cfi] Fix shadow sanity check.
The current check may break if the starting address in fill_shadow is
not page-aligned.

llvm-svn: 255725
2015-12-16 00:18:04 +00:00
Justin Bogner e0fde5c6d0 Fix typo in r255720
llvm-svn: 255724
2015-12-16 00:17:34 +00:00
Richard Smith 90ae7922b5 These days, GCC has at least minimal documentation for its VLAIS extension.
llvm-svn: 255723
2015-12-16 00:09:57 +00:00