Commit Graph

224217 Commits

Author SHA1 Message Date
Michael Zuckerman 433b241570 [LLVM][AVX512] PSRL{DI|QI} Change imm8 to int
Differential Revision: http://reviews.llvm.org/D17713

llvm-svn: 262353
2016-03-01 17:46:32 +00:00
Hans Wennborg e64cf9dddb [X86] Check that attribute parameters match for tail calls (PR26590)
In the code below on 32-bit targets, x would previously get forwarded to g()
without sign-extension to 32 bits as required by the parameter attribute.

  void g(signed short);
  void f(unsigned short x) {
    g(x);
  }

llvm-svn: 262352
2016-03-01 17:45:23 +00:00
Sanjay Patel 2ca144f14c fix documentation comments; NFC
llvm-svn: 262351
2016-03-01 17:25:35 +00:00
Daniel Sanders 946b556c88 Explicitly select IAS in new embed-bitcode.c test.
This should fix clang-cmake-mips builder since MIPS does not have IAS enabled
by default (yet).

llvm-svn: 262350
2016-03-01 17:15:11 +00:00
Petar Jovanovic 6315f3f9b7 Revert "calculate builtin_object_size if argument is a removable pointer"
Revert r262337 as "check-llvm ubsan" step failed on
sanitizer-x86_64-linux-fast buildbot.

llvm-svn: 262349
2016-03-01 16:50:08 +00:00
George Rimar aa4dc20f09 [ELF] - Create _DYNAMIC symbol for dynamic output
lld needs to provide _DYNAMIC symbol when creating a shared library
both bfd and gold do that.

This should fix the https://llvm.org/bugs/show_bug.cgi?id=26732

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

llvm-svn: 262348
2016-03-01 16:23:13 +00:00
Sanjay Patel 9fea531fec function names start with a lowercase letter; NFC
llvm-svn: 262347
2016-03-01 16:17:48 +00:00
Nikolay Haustov e309e1415d [AMDGPU] Remove unused disassembler code.
llvm-svn: 262346
2016-03-01 16:02:40 +00:00
Rafael Espindola 393877d51b Fix BUILD_SHARED_LIBS build.
llvm-svn: 262345
2016-03-01 15:56:53 +00:00
Rafael Espindola 5cd721ae12 Refactor duplicated code for linking with pthread.
llvm-svn: 262344
2016-03-01 15:54:40 +00:00
Dmitry Vyukov a029b79e1a tsan: describe heap/data locations in Go
llvm-svn: 262343
2016-03-01 15:38:12 +00:00
Dmitry Vyukov f5fcdd268f sanitizer_common: silence compiler warning
llvm-svn: 262342
2016-03-01 15:36:42 +00:00
Filipe Cabecinhas 08830c705e [cmake] Add a few more compiler-rt check-* targets for EXTERNAL_COMPILER_RT
llvm-svn: 262341
2016-03-01 15:33:52 +00:00
Filipe Cabecinhas e5bee80802 [cmake] Try to appease the buildbots.
llvm-svn: 262340
2016-03-01 15:07:19 +00:00
Tamas Berghammer f46c5259bd DWARFExpression: Don't resolve load address in DW_OP_plus
If we have a TargetLoadAddress on the top of the DWARF stack then a
DW_OP_plus or a DW_OP_plus_ucons sholudn't dereference (resolve) it
and then add the value to the dereferenced value but it should offset
the load address by the specified constant.

llvm-svn: 262339
2016-03-01 15:01:05 +00:00
Nikolay Haustov 47a115cd41 [AMDGPU] Fix build warnings.
llvm-svn: 262338
2016-03-01 14:50:59 +00:00
Petar Jovanovic 8aef99aa86 calculate builtin_object_size if argument is a removable pointer
This patch fixes calculating correct value for builtin_object_size function
when pointer is used only in builtin_object_size function call and never
after that.

Patch by Strahinja Petrovic.

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

llvm-svn: 262337
2016-03-01 14:39:55 +00:00
Filipe Cabecinhas 2cc9d4795f [cmake] Pass through the cmake_3_2_USES_TERMINAL variable so we get progress bars on an external compiler-rt build
llvm-svn: 262336
2016-03-01 14:10:38 +00:00
Filipe Cabecinhas a3c4f2f479 [cmake] Use CMake's USES_TERMINAL for the test targets.
llvm-svn: 262335
2016-03-01 14:08:18 +00:00
Filipe Cabecinhas 03ca68d6a6 [cmake] Fallback to LLVM_EXTERNAL_COMPILER_RT_SOURCE_DIR if COMPILER_RT_SRC_ROOT doesn't exist.
llvm-svn: 262334
2016-03-01 14:08:13 +00:00
Pavel Labath 0ddfde44ce Slightly improve logging in LLGS tests
we're sometimes getting an exception here, and I want to see why...

llvm-svn: 262333
2016-03-01 14:04:41 +00:00
Nikolay Haustov ac106add0f [AMDGPU] Disassembler code refactored + error messages.
Idea behind this change is to make code shorter and as much common for all targets as possible. Let's even accept more code than is valid for a particular target, leaving it for the assembler to sort out.

64bit instructions decoding added.

Error\warning messages on unrecognized instructions operands added, InstPrinter allowed to print invalid operands helping to find invalid/unsupported code.

The change is massive and hard to compare with previous version, so it makes sense just to take a look on the new version. As a bonus, with a few TD changes following, it disassembles the majority of instructions. Currently it fully disassembles >300K binary source of some blas kernel.

Previous TODOs were saved whenever possible.

Patch by: Valery Pykhtin

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

llvm-svn: 262332
2016-03-01 13:57:29 +00:00
Rafael Espindola 9907eb0b0a Produce PT_NOTE program headers.
llvm-svn: 262331
2016-03-01 13:23:29 +00:00
Petr Pavlu 7ad9ec9fcf [LTO] Fix error reporting from lto_module_create_in_local_context()
Function lto_module_create_in_local_context() would previously
rely on the default LLVMContext being created for it by
LTOModule::makeLTOModule(). This context exits the program on
error and is not arranged to update sLastStringError in
tools/lto/lto.cpp.

Function lto_module_create_in_local_context() now creates an
LLVMContext by itself, sets it up correctly to its needs and then
passes it to LTOModule::createInLocalContext() which takes
ownership of the context and keeps it present for the lifetime of
the returned LTOModule.

Function LTOModule::makeLTOModule() is modified to take a
reference to LLVMContext (instead of a pointer) and no longer
creates a default context when nullptr is passed to it. Method
LTOModule::createInContext() that takes a pointer to LLVMContext
is removed because it allows to pass a nullptr to it. Instead
LTOModule::createFromBuffer() (that takes a reference to
LLVMContext) should be used.

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

llvm-svn: 262330
2016-03-01 13:13:49 +00:00
NAKAMURA Takumi 15765f5db7 FormatTests: Update libdeps corresponding to r262323.
llvm-svn: 262329
2016-03-01 13:11:36 +00:00
Johannes Doerfert 066dbf3f8e Track assumptions and restrictions separatly
In order to speed up compile time and to avoid random timeouts we now
  separately track assumptions and restrictions. In this context
  assumptions describe parameter valuations we need and restrictions
  describe parameter valuations we do not allow. During AST generation
  we create a runtime check for both, whereas the one for the
  restrictions is negated before a conjunction is build.

  Except the In-Bounds assumptions we currently only track restrictions.

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

llvm-svn: 262328
2016-03-01 13:06:28 +00:00
Johannes Doerfert abadd71da1 [FIX] Prevent compile time problems due to complex invariant loads
This cures the symptoms we see in h264 of SPEC2006 but not the cause.

llvm-svn: 262327
2016-03-01 13:05:14 +00:00
Michael Zuckerman 0165e7669c [CLANG][AVX512][BUILTIN] Adding PSRLV builtin
Differential Revision: http://reviews.llvm.org/D17718

llvm-svn: 262326
2016-03-01 13:03:45 +00:00
Manuel Klimek 0000eeceb6 Fix test breakage on windows where the default std is c++11 by forcing c++03 in the test.
llvm-svn: 262325
2016-03-01 12:53:18 +00:00
Manuel Klimek 2c50b312ea Fix DLL build by adding required dependency.
llvm-svn: 262324
2016-03-01 12:47:30 +00:00
Manuel Klimek b12e5a5ccd Add functions to apply replacements and reformat them.
This is a commonly useful feature to have, and we have implemented it
multiple times with different kinds of bugs. This implementation
centralizes the idea in a set of functions that we can then use from the various
tools.

Reverts r262234, which is a revert of r262232, and puts the functions
into FOrmat.h, as they are closely coupled to clang-format, and we
otherwise introduce a cyclic dependency between libFormat and
libTooling.

Patch by Eric Liu.

llvm-svn: 262323
2016-03-01 12:37:30 +00:00
Pavel Labath 109702ccb1 Fix warning in NSDictionary.cpp
llvm-svn: 262322
2016-03-01 11:40:47 +00:00
Michael Zuckerman 1ac360cca4 [CLANG] [AVX512] [BUILTIN] Adding PSRA{Q|D|QI|DI}{128|256|512} builtin
Differential Revision: http://reviews.llvm.org/D17693

llvm-svn: 262321
2016-03-01 11:38:16 +00:00
Michael Zuckerman 7878888690 [AVX512][PSRAQ][PSRAD] Change imm8 to int.
Differential Revision: http://reviews.llvm.org/D17692

llvm-svn: 262320
2016-03-01 11:36:23 +00:00
Amjad Aboud 719325fe11 Disallow generating vzeroupper before return instruction (iret) in interrupt handler function.
This resolves https://llvm.org/bugs/show_bug.cgi?id=26412

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

llvm-svn: 262319
2016-03-01 11:32:03 +00:00
Manuel Klimek 016c024ca4 Optionally demote fatal errors to non-fatal errors.
This behavior is enabled when the new CXTranslationUnit_KeepGoing
option is passed to clang_parseTranslationUnit{,2}. It is geared
towards use by IDEs and similar consumers of the clang-c API where
fatal errors may arise when parsing incomplete code mid-edit, or
when include paths are not properly configured yet. In such situations
one still wants to get as much information as possible about a TU.
Previously, the semantic analysis would not instantiate templates
or report additional fatal errors after the first fatal error was
encountered.

Fixes PR24268.

Patch by Milian Wolff.

llvm-svn: 262318
2016-03-01 10:56:19 +00:00
Simon Atanasyan 255689c3ad [MC][YAML] Rangify the loop. NFC
llvm-svn: 262317
2016-03-01 10:11:27 +00:00
Vasileios Kalintiris 3a8f7f9e31 [mips] Promote the result of SETCC nodes to GPR width.
Summary:
This patch modifies the existing comparison, branch, conditional-move
and select patterns, and adds new ones where needed. Also, the updated
SLT{u,i,iu} set of instructions generate a GPR width result.

The majority of the code changes in the Mips back-end fix the wrong
assumption that the result of SETCC nodes always produce an i32 value.
The changes in the common code path account for the fact that in 64-bit
MIPS targets, i1 is promoted to i32 instead of i64.

Reviewers: dsanders

Subscribers: dsanders, llvm-commits

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

llvm-svn: 262316
2016-03-01 10:08:01 +00:00
George Rimar 6de3f63bb0 [ELF] use of already declared reference instead of indirect access to fields. NFC.
llvm-svn: 262315
2016-03-01 08:46:03 +00:00
Nikolay Haustov ea8febde04 [TableGen] AsmMatcher: Skip optional operands in the midle of instruction if it is not present
Previosy, if actual instruction have one of optional operands then other optional operands listed before this also should be presented.
For example instruction v_fract_f32 v0, v1, mul:2 have one optional operand - OMod and do not have optional operand clamp. Previously this was not allowed because clamp is listed before omod in AsmString:

string AsmString = "v_fract_f32$vdst, $src0_modifiers$clamp$omod";
Making this work required some hacks (both OMod and Clamp match classes have same PredicateMethod).

Now, if MatchInstructionImpl meets formal optional operand that is not presented in actual instruction it skips this formal operand and tries to match current actual operand with next formal.

Patch by: Sam Kolton

Review: http://reviews.llvm.org/D17568

[AMDGPU] Assembler: Check immediate types for several optional operands in predicate methods
With this change you should place optional operands in order specified by asm string:

clamp -> omod
offset -> glc -> slc -> tfe
Fixes for several tests.
Depends on D17568

Patch by: Sam Kolton

Review: http://reviews.llvm.org/D17644
llvm-svn: 262314
2016-03-01 08:34:43 +00:00
Nikolay Haustov 95b4fcd377 AsmParser: Fix nested .irp/.irpc
Count .irp/.irpc in parseMacroLikeBody similar to .rept
Update tests.

Review: http://reviews.llvm.org/D17707
llvm-svn: 262313
2016-03-01 08:18:28 +00:00
Craig Topper 073e947f1b [X86] Centralize the masking of TSFlags with FormMask into a variable earlier so we can stop masking in multiple places. NFC
llvm-svn: 262312
2016-03-01 07:15:59 +00:00
John McCall 62969a39fa Test template instantiation of ns_consumed and ns_returns_retained.
llvm-svn: 262311
2016-03-01 06:54:30 +00:00
Craig Topper 5c8dc5f064 [X86] Localize a temporary variable into the cases its need in. NFC
llvm-svn: 262310
2016-03-01 06:42:48 +00:00
Craig Topper b8c29b4ae9 [X86] Be consistent about using pre/post increment/decrement in nearby code. NFC
llvm-svn: 262309
2016-03-01 06:42:46 +00:00
John McCall 65a6fe0c66 Better comments for ExtParameterInfo.
llvm-svn: 262308
2016-03-01 06:27:40 +00:00
Mohit K. Bhakkad 1d1493219c [Compiler-rt][MIPS] Correct Dynamic Thread Vector offset for MIPS
Reviewers: samsonov

Subscribers: dsanders, jaydeep, sagar, llvm-commits

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

llvm-svn: 262303
2016-03-01 05:56:33 +00:00
Mohit K. Bhakkad 94aa4d7e83 [Compiler-rt][MSan] fix param_tls_limit test for platforms where big arguments are sliced in smaller ones
Reviewers: eugenis

Subscribers: dsanders, jaydeep, sagar, llvm-commits

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

llvm-svn: 262302
2016-03-01 05:53:30 +00:00
Craig Topper d40a55064f [X86] Combine some initialization code with variable declaration and comments. NFC
llvm-svn: 262301
2016-03-01 05:42:16 +00:00
Jason Molenda cc9e92eb41 Update the on-device arm specific code to match the API changes
that happened in other parts of this file so it builds cleanly
for arm again.

llvm-svn: 262300
2016-03-01 05:34:05 +00:00