Commit Graph

232405 Commits

Author SHA1 Message Date
David Majnemer a6d93fd73b [llvm-readobj] Validate the string table offset before using it
llvm-svn: 271139
2016-05-28 19:45:49 +00:00
Saleem Abdulrasool 442b88b9ec CodeGen: support blocks on COFF targets in DLLs
This extends the blocks support to support blocks with a dynamically linked
blocks runtime.  The previous code generation would work only for static builds
of the blocks runtime.  Mark the block "isa" pointers and functions as dllimport
if no explicit declaration marked with __declspec(dllexport) is found.  This
additional check allows for the use of the functionality in the runtime library
if desired.

llvm-svn: 271138
2016-05-28 19:41:35 +00:00
David Majnemer 78b0d72769 Use consume instead of manually using drop_front
llvm-svn: 271137
2016-05-28 19:17:48 +00:00
Yaxun Liu e54d7c44d0 [OpenCL] Add the default header file opencl-c.h for OpenCL C language
OpenCL has large number of "builtin" functions ("builtin" in the sense of OpenCL spec) which are defined in header files. To compile OpenCL kernels using these builtin functions, a header file is needed.

This header file is based on the Khronos implementation (https://github.com/KhronosGroup/SPIR/blob/spirv-1.0/lib/Headers/opencl.h) with heavy refactoring.

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

llvm-svn: 271136
2016-05-28 19:09:01 +00:00
David Majnemer 8d106d5ea4 Update test to deal with non-zero exit codes
llvm-svn: 271135
2016-05-28 19:02:12 +00:00
Craig Topper cbdbbac875 [AVX512] Add masked v16i32 and v8i64 unaligned store tests.
llvm-svn: 271134
2016-05-28 18:59:06 +00:00
Rui Ueyama 8b972d221e Simplify. NFC.
llvm-svn: 271133
2016-05-28 18:40:38 +00:00
David Majnemer c165c889ab llvm-pdbdump should have a non-zero exit code on error
llvm-svn: 271132
2016-05-28 18:25:15 +00:00
Simon Pilgrim 9602d678cb [X86][SSE] (Reapplied) Replace (V)PMOVSX and (V)PMOVZX integer extension intrinsics with generic IR (llvm)
This patch removes the llvm intrinsics VPMOVSX and (V)PMOVZX sign/zero extension intrinsics and auto-upgrades to SEXT/ZEXT calls instead. We already did this for SSE41 PMOVSX sometime ago so much of that implementation can be reused.

Reapplied now that the the companion patch (D20684) removes/auto-upgrade the clang intrinsics has been committed.

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

llvm-svn: 271131
2016-05-28 18:03:41 +00:00
David Majnemer 328b6d3903 Tighten some of the name map checks further
llvm-svn: 271130
2016-05-28 18:03:37 +00:00
Mehdi Amini bcc47419d9 ValueMapper: fix assertion when null-mapping a constant for linking metadata
Summary:
When RF_NullMapMissingGlobalValues is set, mapValue can return null
for GlobalValue. When mapping the operands of a constant that is
referenced from metadata, we need to handle this case and actually
return null instead of mapping this constant.

Reviewers: dexonsmith, rafael

Subscribers: llvm-commits

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

llvm-svn: 271129
2016-05-28 17:26:03 +00:00
Roman Gareev 9c3eb5960a Determination of statements that contain matrix multiplication
Add determination of statements that contain, in particular,
matrix multiplications and can be optimized with [1] to try to
get close-to-peak performance. It can be enabled
via polly-pm-based-opts, which is false by default.

Refs:
[1] - http://www.cs.utexas.edu/users/flame/pubs/TOMS-BLIS-Analytical.pdf

Contributed-by: Roman Gareev <gareevroman@gmail.com>
Reviewed-by: Tobias Grosser <tobias@grosser.es>

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

llvm-svn: 271128
2016-05-28 16:17:58 +00:00
Sanjay Patel 395eca8d26 [InstCombine] add tests to show bitcast interference
llvm-svn: 271125
2016-05-28 16:10:37 +00:00
Rafael Espindola 52bd330500 Fix production of R_X86_64_GOTPCRELX/R_X86_64_REX_GOTPCRELX.
We were producing R_X86_64_GOTPCRELX for invalid instructions and
sometimes producing R_X86_64_GOTPCRELX instead of
R_X86_64_REX_GOTPCRELX.

llvm-svn: 271118
2016-05-28 15:51:38 +00:00
Sanjay Patel f49c7b1570 regenerate checks
llvm-svn: 271117
2016-05-28 15:44:28 +00:00
Rafael Espindola 3b1ecb563f Make test more realistic.
It doesn't make mach sense to fetch less than 64 bits from a got
entry.

llvm-svn: 271116
2016-05-28 15:38:13 +00:00
Sanjay Patel cbc4aa6bdd join RUN lines; NFC
llvm-svn: 271115
2016-05-28 15:34:05 +00:00
Sanjay Patel 97c2c108fd [x86] avoid printing unnecessary sign bits of hex immediates in asm comments (PR20347)
It would be better to check the valid/expected size of the immediate operand, but this is
generally better than what we print right now.

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

llvm-svn: 271114
2016-05-28 14:58:37 +00:00
Ahmed Bougacha a3dc1ba142 [X86] Try to zero elts when lowering 256-bit shuffle with PSHUFB.
Otherwise we fallback to a blend of PSHUFBs later on.

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

llvm-svn: 271113
2016-05-28 14:38:04 +00:00
Rafael Espindola 2d39bb3c6a Simplify and clang-format a table.
llvm-svn: 271112
2016-05-28 11:13:34 +00:00
Rafael Espindola fe796dca90 Fix default reloc model on ARM.
llvm-svn: 271111
2016-05-28 10:41:15 +00:00
Simon Atanasyan 96d06c6972 [driver][mips] Fix local variable naming. NFC
llvm-svn: 271110
2016-05-28 09:44:15 +00:00
Simon Atanasyan 4de8e6d283 [driver][mips] Revert support for CodeSourcery MIPS toolchain
This is revert of r270366. The support for CS toolchain were dropped too early.

llvm-svn: 271109
2016-05-28 09:44:04 +00:00
Asiri Rathnayake 6edc12c886 [libcxx] Improve tests to use the UNSUPPORTED lit directive
Quite a few libcxx tests seem to follow the format:
 #if _LIBCPP_STD_VER > X
   // Do test.
 #else
   // Empty test.
 #endif
We should instead use the UNSUPPORTED lit directive to exclude the test on
earlier C++ standards. This gives us a more accurate number of test passes
for those standards and avoids unnecessary conflicts with other lit
directives on the same tests.

Reviewers: bcraig, ericwf, mclow.lists

Differential revision: http://reviews.llvm.org/D20730

llvm-svn: 271108
2016-05-28 08:57:35 +00:00
Petr Hosek 6abd38bf6e [MC] Return early when .fill size is negative
Rather than invoking emitFill with negative size, which may trigger
an undefined behavior, return immediately after emitting the warning.

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

llvm-svn: 271107
2016-05-28 08:20:08 +00:00
Simon Pilgrim 91b77ceaed [X86][SSE] Replace VPMOVSX and (V)PMOVZX integer extension intrinsics with generic IR (clang)
The VPMOVSX and (V)PMOVZX sign/zero extension intrinsics can be safely represented as generic __builtin_convertvector calls instead of x86 intrinsics.

This patch removes the clang builtins and their use in the sse2/avx headers - a companion patch will remove/auto-upgrade the llvm intrinsics.

Note: We already did this for SSE41 PMOVSX sometime ago.

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

llvm-svn: 271106
2016-05-28 08:12:45 +00:00
David Majnemer 869631f987 Bounds check the number of bitmap blocks in the name map
llvm-svn: 271105
2016-05-28 05:59:25 +00:00
David Majnemer a429581787 An empty record cannot be null-terminated
llvm-svn: 271104
2016-05-28 05:59:22 +00:00
David Majnemer 7e950b261a Make sure the directory contains info for all streams
llvm-svn: 271103
2016-05-28 05:59:19 +00:00
Petr Hosek 67a94a795d [MC] Support symbolic expressions in assembly directives
This matches the behavior of GNU assembler which supports symbolic
expressions in absolute expressions used in assembly directives.

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

llvm-svn: 271102
2016-05-28 05:57:48 +00:00
Zachary Turner 0d43c1c339 [pdb] Finish conversion to zero copy pdb access.
This converts remaining uses of ByteStream, which was still
left in the symbol stream and type stream, to using the new
StreamInterface zero-copy classes.

RecordIterator is finally deleted, so this is the only way left
now.  Additionally, more error checking is added when iterating
the various streams.

With this, the transition to zero copy pdb access is complete.

llvm-svn: 271101
2016-05-28 05:21:57 +00:00
Simon Atanasyan 9a9a3169e3 [ELF][MIPS] Always resolve MIPS GP-relative relocations to 'local' definitions
In case of MIPS, GP-relative relocations always resolve to a definition
in a regular input file, ignoring the one-definition rule. Such
relocations are used to setup GP relative offsets in a function's
prologue. So we, for example, should not attempt to create a dynamic
relocation even if the target symbol is preemptible.

Fixes bug 27880.

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

llvm-svn: 271100
2016-05-28 04:49:57 +00:00
Renato Golin 9be88629d5 Revert "Revert "Map DynamicNoPIC to Static on non-darwin.""
This reverts commit r271096, as reverting it broke even more buildbots!

But that also means I'll break on ARM again... :(

llvm-svn: 271099
2016-05-28 04:47:13 +00:00
Xinliang David Li 9ab45cf1eb Move test only for the relevant platform
llvm-svn: 271098
2016-05-28 04:26:06 +00:00
Sean Silva 42cc3422eb Add a comment about why we need to buffer the attribute changes.
llvm-svn: 271097
2016-05-28 04:24:39 +00:00
Renato Golin 4f22c51b09 Revert "Map DynamicNoPIC to Static on non-darwin."
This reverts commit r271052, as it broke some ARM buildbots.

llvm-svn: 271096
2016-05-28 04:24:26 +00:00
Kostya Serebryany 311cc8378e [libFuzzer] fix a failure that occurs when running individual inputs
llvm-svn: 271095
2016-05-28 04:19:46 +00:00
Sean Silva 8c7e12136c Small cleanup.
Centralize assertion.
Clean up max loop.

llvm-svn: 271094
2016-05-28 04:19:45 +00:00
Sean Silva 2e8f095b2a Inline this into its only use. NFC.
The name was out of date at this point and it seems simple enough to
have in-line.

llvm-svn: 271093
2016-05-28 04:19:40 +00:00
Sean Silva 02b9d892c5 Bring back r271090 in a way that doesn't depend on r271089.
llvm-svn: 271092
2016-05-28 04:05:36 +00:00
Sean Silva 9dd4b5c51d Revert r271089 and r271090.
It was triggering an msan bot.

Revert "[IRPGO] Set the function entry count metadata."

This reverts commit r271090.

Revert "[IRPGO] Centralize the function attribute inliner hint logic. NFC."

This reverts commit r271089.

llvm-svn: 271091
2016-05-28 03:56:25 +00:00
Sean Silva 7884633c5b [IRPGO] Set the function entry count metadata.
llvm-svn: 271090
2016-05-28 03:02:54 +00:00
Sean Silva 2a73019f3e [IRPGO] Centralize the function attribute inliner hint logic. NFC.
This keeps the logic in the same function.

llvm-svn: 271089
2016-05-28 03:02:50 +00:00
Krzysztof Parzyszek 07d7518540 [Hexagon] Add option to enable subregister liveness tracking
llvm-svn: 271088
2016-05-28 02:02:51 +00:00
Krzysztof Parzyszek 96bb4fe539 [Hexagon] Separate C8 and USR to avoid unwanted subregister composition
Composing subreg_loreg with subreg_oveflow leads to strange results with
lane masks for register classes with subreg_loreg. In particular, dead
lane detection generates incorrect code.

llvm-svn: 271087
2016-05-28 01:51:16 +00:00
Michael Zolotukhin d69cd1e086 [LoopUnrollAnalyzer] Add a comment to visitCastInst.
llvm-svn: 271086
2016-05-28 01:40:14 +00:00
Kostya Serebryany e31e778160 [sanitizers] introduce a common run-time option dedup_token_length to help with report deduplication, off by default for now. See https://github.com/google/sanitizers/issues/684
llvm-svn: 271085
2016-05-28 01:25:44 +00:00
Matthias Braun bcfd23673b AArch64: Fix indentation
llvm-svn: 271084
2016-05-28 01:06:51 +00:00
Sean Silva 84d1922f0d [docs] Be a bit more precise.
llvm-svn: 271083
2016-05-28 01:03:36 +00:00
Matt Arsenault 1ff389a7bf AMDGPU: Cleanup vector insert/extract tests
This mostly makes sure that 3-vector dynamic inserts
and extracts are covered.

llvm-svn: 271082
2016-05-28 00:51:06 +00:00