128374 Commits

Author SHA1 Message Date
Colin LeMahieu
9371f402bc [Hexagon] Modifying r262258 to only be in effect in the hand assembler path, not the integrated assembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262400 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 21:37:41 +00:00
Matthias Braun
3b1588aa81 TableGen: Display helpfull message for incomplete models.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262399 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 21:36:12 +00:00
Simon Pilgrim
b6e5058d1b [X86][AVX] Fixed triple/arch clash in test case
We were specifying a x64 triple and then overriding with a x86 arch. 

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262398 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 21:33:08 +00:00
Matt Arsenault
d06f393d79 DAGCombiner: Turn truncate of a bitcasted vector to an extract
On AMDGPU where operations i64 operations are often bitcasted to v2i32
and back, this pattern shows up regularly where it breaks some
expected combines on i64, such as load width reducing.

This fixes some test failures in a future commit when i64 loads
are changed to promote.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262397 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 21:31:53 +00:00
Rafael Espindola
b2d0b15d68 Add LLVMBuild for ObjectYAML.
Should fix the DBUILD_SHARED_LIBS bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262396 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 21:29:33 +00:00
David Blaikie
c9b39e6bdd Revert "llvm-dwp: Keep ObjectFiles alive until object emission their contents can be referenced directly rather than copied"
Accidentally committed.

This reverts commit r262389.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262395 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 21:24:04 +00:00
Jacques Pienaar
e0accec873 [lanai] Add ELF enum value and relocations.
Add ELF enum value and relocations for Lanai backed.

General Lanai backend discussion on llvm-dev thread "[RFC] Lanai backend" (http://lists.llvm.org/pipermail/llvm-dev/2016-February/095118.html).

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262394 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 21:21:42 +00:00
Matthias Braun
083208e03e AArch64: Add missing schedinfo, check completeness for cyclone
This adds some missing generic schedule info definitions, enables
completeness checking for cyclone and fixes a typo uncovered by that.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262393 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 21:20:31 +00:00
Kit Barton
35cace5d36 [Power9] Implement new vector compare, extract, insert instructions
This change implements the following vector operations:

  - Vector Compare Not Equal
    - vcmpneb(.) vcmpneh(.) vcmpnew(.)
    - vcmpnezb(.) vcmpnezh(.) vcmpnezw(.)
  - Vector Extract Unsigned
    - vextractub vextractuh vextractuw vextractd
    - vextublx vextubrx vextuhlx vextuhrx vextuwlx vextuwrx
  - Vector Insert
    - vinsertb vinserth vinsertw vinsertd

26 instructions.

Phabricator: http://reviews.llvm.org/D15916

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262392 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 20:51:57 +00:00
Sanjay Patel
d64805562c [x86] use getBitcast()
This isn't quite NFC because some of the SDLocs may change which could
cause scheduling differences. But no regression tests are affected and
there is no functional change intended.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262391 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 20:47:02 +00:00
David Blaikie
d93c63989b Fix some warnings a bit harder/different
This is an alternate fix to 262378 and a fix to a pessimizing-move
warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262390 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 20:41:17 +00:00
David Blaikie
6475ea0b50 llvm-dwp: Keep ObjectFiles alive until object emission their contents can be referenced directly rather than copied
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262389 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 20:40:02 +00:00
Geoff Berry
5e5cb03708 Revert "[AArch64] Fix isLegalAddImmediate() to return true for valid negative values."
Revert r262248 in an attempt to fix the clang-native-aarch64-full
    bot and to investigate a performance regression in
    SingleSource/Benchmarks/CoyoteBench/huffbench

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262388 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 20:28:52 +00:00
Vasileios Kalintiris
6e09ce7e5f Revert "[mips] Promote the result of SETCC nodes to GPR width."
This reverts commit r262316.

It seems that my change breaks an out-of-tree chromium buildbot, so
I'm reverting this in order to investigate the situation further.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262387 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 20:25:43 +00:00
Kit Barton
609592b9c2 New file to track implementation status of new POWER9 instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262386 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 20:19:43 +00:00
Matthias Braun
eab2869a64 TableGen: Check scheduling models for completeness
TableGen checks at compiletime that for scheduling models with
"CompleteModel = 1" one of the following holds:

- Is marked with the hasNoSchedulingInfo flag
- The instruction is a subclass of Sched
- There are InstRW definitions in the scheduling model

Typical steps necessary to complete a model:

- Ensure all pseudo instructions that are expanded before machine
  scheduling (usually everything handled with EmitYYY() functions in
  XXXTargetLowering).
- If a CPU does not support some instructions mark the corresponding
  resource unsupported: "WriteRes<WriteXXX, []> { let Unsupported = 1; }".
- Add missing scheduling information.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262384 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 20:03:21 +00:00
Matthias Braun
279476d30d TableGen: Add hasNoSchedulingInfo to instructions
This introduces a new flag that indicates that a specific instruction
will never be present when the MachineScheduler runs and therefore needs
no scheduling information.

This is in preparation for an upcoming commit which checks completeness
of a scheduling model when tablegen runs.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262383 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 20:03:11 +00:00
Justin Lebar
47e3ade685 [NVPTX] Annotate param loads/stores as mayLoad/mayStore.
Summary:
Tablegen was unable to determine that param loads/stores were actually
reading or writing from memory.  I think this isn't a problem in
practice for param stores, because those occur in a block right before
we make our call.  But param loads don't have to at the very beginning
of a function, so should be annotated as mayLoad so we don't incorrectly
optimize them.

Reviewers: jholewinski

Subscribers: jholewinski, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262381 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 19:44:22 +00:00
Justin Lebar
13864a0465 [NVPTX] Remove workaround for tablegen crash in NVPTXInstrInfo.td.
Summary: Looks like this was caused by a typo.

Reviewers: jholewinski

Subscribers: jholewinski, llvm-commits, tra

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262380 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 19:44:20 +00:00
Reid Kleckner
ecaa1e76a7 Fix -Wnon-virtual-dtor warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262378 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 19:39:54 +00:00
Owen Anderson
2b8030cd97 Fix an issue where fast math flags were dropped during scalarization.
Most portions of InstCombine properly propagate fast math flags, but
apparently the vector scalarization section was overlooked.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262376 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 19:35:52 +00:00
Sanjoy Das
2a436300c1 [SCEV] Minor cleanup: rename method, C++11'ify; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262374 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 19:28:01 +00:00
Justin Lebar
e2c35f6c8b [NVPTX] Use different, convergent MIs for convergent calls.
Summary:
Calls sometimes need to be convergent.  This is already handled at the
LLVM IR level, but it also needs to be handled at the MI level.

Ideally we'd propagate convergence from instructions, down through the
selection DAG, and into MIs.  But this is Hard, and would affect
optimizations in the SDNs -- right now only SDNs with two operands have
any flags at all.

Instead, here's a much simpler hack: Add new opcodes for NVPTX for
convergent calls, and generate these when lowering convergent LLVM
calls.

Reviewers: jholewinski

Subscribers: jholewinski, chandlerc, joker.eph, jhen, tra, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262373 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 19:24:03 +00:00
Justin Lebar
eb3a3d7544 [NVPTX] Nix hack used to emit '{' and '}' for NVPTX calls.
Summary: Tablegen understands backslash as an escape char; that's sufficient.

Reviewers: jholewinski

Subscribers: llvm-commits, tra, jholewinski

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262372 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 19:24:00 +00:00
Justin Lebar
a3948bbf3d [NVPTX] Reformat NVPTXInstrInfo.td, and add additional comments.
Summary:
Also simplify some of the embedded C++ logic.

No functional changes.

Reviewers: jholewinski

Subscribers: llvm-commits, tra, jholewinski

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262371 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 19:23:30 +00:00
David Majnemer
17ddccf835 [X86] Elide references to _chkstk for dynamic allocas
The _chkstk function is called by the compiler to probe the stack in an
order consistent with Windows' expectations.  However, it is possible to
elide the call to _chkstk and manually adjust the stack pointer if we
can prove that the allocation is fixed size and smaller than the probe
size.

This shrinks chrome.dll, chrome_child.dll and chrome.exe by a
cummulative ~133 KB.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262370 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 19:20:23 +00:00
Rafael Espindola
18903ff9fb Move ObjectYAML code to a new library.
It is only ever used by obj2yaml and yaml2obj. No point in linking it
everywhere.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262368 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 19:15:06 +00:00
Sanjay Patel
6ff7d906f5 fix function names; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262367 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 19:14:09 +00:00
David Majnemer
d724de3510 [Verifier] Don't abort on invalid cleanuprets
Code in visitEHPadPredecessors assume a little too much about the
validity of a cleanupret with an invalid cleanuppad operand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262364 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 18:59:50 +00:00
Easwaran Raman
88e8bafbd5 Fix breakage caused by r262360.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262363 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 18:59:11 +00:00
Daniel Berlin
1627603e25 Add the beginnings of an update API for preserving MemorySSA
Summary:
This adds the beginning of an update API to preserve MemorySSA.  In particular,
this patch adds a way to remove memory SSA accesses when instructions are
deleted.

It also adds relevant unit testing infrastructure for MemorySSA's API.

(There is an actual user of this API, i will make that diff dependent on this one.  In practice, a ton of opt passes remove memory instructions, so it's hopefully an obviously useful API :P)

Reviewers: hfinkel, reames, george.burgess.iv

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262362 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 18:46:54 +00:00
Simon Atanasyan
b9c447406c [DebugInfo] Dump CIE augmentation data as a list of hex bytes
CIE augmentation data might contain non-printable characters.
The patch prints the data as a list of hex bytes.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262361 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 18:38:05 +00:00
Easwaran Raman
1283c1d7af Metadata support for profile summary.
This adds support to convert ProfileSummary object to Metadata and create a
ProfileSummary object from metadata. This would allow attaching profile summary
information to Module allowing optimization passes to use it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262360 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 18:30:58 +00:00
Matt Arsenault
8ba165a405 DAGCombiner: Turn extract of bitcasted integer into truncate
This reduces the number of bitcast nodes and generally cleans up the
DAG when bitcasting between integers and vectors everywhere.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262358 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 18:01:37 +00:00
Matt Arsenault
9a6db34754 Add isScalarInteger helper to EVT/MVT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262357 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 18:01:28 +00:00
Changpeng Fang
5bbcde0b92 AMDGPU/SI: Implement DS_PERMUTE/DS_BPERMUTE Instruction Definitions and Intrinsics
Summary:
  This patch impleemnts DS_PERMUTE/DS_BPERMUTE instruction definitions and intrinsics,
which are new since VI.

Reviewers: tstellarAMD, arsenm

Subscribers: llvm-commits, arsenm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262356 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 17:51:23 +00:00
Kostya Serebryany
8ca429497a [libFuzzer] remove FuzzerSanitizerOptions.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262354 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 17:46:32 +00:00
Michael Zuckerman
3827ef7a01 [LLVM][AVX512] PSRL{DI|QI} Change imm8 to int
Differential Revision: http://reviews.llvm.org/D17713



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262353 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 17:46:32 +00:00
Hans Wennborg
b4e63ec23a [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);
  }

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262352 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 17:45:23 +00:00
Sanjay Patel
449d0dcc2b fix documentation comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262351 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 17:25:35 +00:00
Petar Jovanovic
7a9adc7562 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262349 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 16:50:08 +00:00
Sanjay Patel
9079741ca7 function names start with a lowercase letter; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262347 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 16:17:48 +00:00
Nikolay Haustov
b7b6e74d4d [AMDGPU] Remove unused disassembler code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262346 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 16:02:40 +00:00
Rafael Espindola
93ed620d27 Refactor duplicated code for linking with pthread.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262344 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 15:54:40 +00:00
Nikolay Haustov
5d03751938 [AMDGPU] Fix build warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262338 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 14:50:59 +00:00
Petar Jovanovic
71c0d4c97d 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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262337 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 14:39:55 +00:00
Nikolay Haustov
d129fa6931 [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262332 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 13:57:29 +00:00
Petr Pavlu
3a3e8ddebb [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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262330 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 13:13:49 +00:00
Michael Zuckerman
b8e07ee5c0 [AVX512][PSRAQ][PSRAD] Change imm8 to int.
Differential Revision: http://reviews.llvm.org/D17692



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262320 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 11:36:23 +00:00
Amjad Aboud
45aa3f2e14 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262319 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 11:32:03 +00:00