OSDN Git Service

android-x86/external-llvm.git
8 years agoARM target does not use printAliasInstr machinery which
Sjoerd Meijer [Fri, 3 Jun 2016 13:19:43 +0000 (13:19 +0000)]
ARM target does not use printAliasInstr machinery which
forces having special checks in ArmInstPrinter::printInstruction. This
patch addresses this issue.

Not all special checks could be removed: either they involve elaborated
conditions under which the alias is emitted (e.g. ldm/stm on sp may be
pop/push but only if the number of registers is >= 2) or the number
of registers is multivalued (like happens again with ldm/stm) and they
do not match the InstAlias pattern which assumes single-valued operands
in the pattern.

Patch by: Roger Ferrer Ibanez

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271667 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAsmWriterEmitter.cpp assumes that all operands of a printed alias
Sjoerd Meijer [Fri, 3 Jun 2016 13:17:37 +0000 (13:17 +0000)]
AsmWriterEmitter.cpp assumes that all operands of a printed alias
will appear after a blank. This assumption does not hold in the ARM
target.

Patch by: Roger Ferrer Ibanez

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271666 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoCurrently AsmWriterEmiter.cpp (used by tblgen -gen-asm-writer) does not
Sjoerd Meijer [Fri, 3 Jun 2016 13:14:19 +0000 (13:14 +0000)]
Currently AsmWriterEmiter.cpp (used by tblgen -gen-asm-writer) does not
consider the Predicates attached to InstAlias when generating printAliasInstr.
This forces users of printAliasInstr to check those predicates beforehand.

This commit adds them in the condition set of the IAPrinter object.

Patch by: Roger Ferrer Ibanez

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271665 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AMDGPU] Assembler: More tests for SDWA instructions. Fix for SDWA float modifiers.
Sam Kolton [Fri, 3 Jun 2016 11:43:09 +0000 (11:43 +0000)]
[AMDGPU] Assembler: More tests for SDWA instructions. Fix for SDWA float modifiers.

Summary: Depends on D20625

Reviewers: tstellarAMD, vpykhtin, artem.tamazov

Subscribers: arsenm, kzhuravl

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271662 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSE] Added nontemporal load tests
Simon Pilgrim [Fri, 3 Jun 2016 11:00:55 +0000 (11:00 +0000)]
[X86][SSE] Added nontemporal load tests

These currently all lower to regular loads, generic nontemporal load support will be added in a future patch

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271659 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[mips] EABI CodeGen is completely untested and seems to have bitrotted. Remove it.
Daniel Sanders [Fri, 3 Jun 2016 10:38:09 +0000 (10:38 +0000)]
[mips] EABI CodeGen is completely untested and seems to have bitrotted. Remove it.

Summary:
There are no tests*, no EABI buildbots, and simple test cases do not work.

* There is a single MIPS16 test using a mips*-gnueabi triple but this test
  doesn't test EABI and the triple doesn't cause EABI to be used.

Reviewers: sdardis

Subscribers: tberghammer, danalbert, srhines, dsanders, sdardis, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271658 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "[LPM] Replace the CALL_ONCE_... macro in the legacy pass manager with the...
Benjamin Kramer [Fri, 3 Jun 2016 10:36:10 +0000 (10:36 +0000)]
Revert "[LPM] Replace the CALL_ONCE_... macro in the legacy pass manager with the new llvm::call_once facility."

Fallback path doesn't compile. This reverts commit r271652.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271657 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Added nontemporal scalar store tests
Simon Pilgrim [Fri, 3 Jun 2016 10:30:54 +0000 (10:30 +0000)]
[X86] Added nontemporal scalar store tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271656 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AMDGPU] Assembler: Custom converters for SDWA instructions. Support for _dpp and...
Sam Kolton [Fri, 3 Jun 2016 10:27:37 +0000 (10:27 +0000)]
[AMDGPU] Assembler: Custom converters for SDWA instructions. Support for _dpp and _sdwa suffixes in mnemonics.

Summary:
Added custom converters for SDWA instruction to support optional operands and modifiers.
Support for _dpp and _sdwa suffixes that allows to force DPP or SDWA encoding for instructions.

Reviewers: tstellarAMD, vpykhtin, artem.tamazov

Subscribers: arsenm, kzhuravl

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271655 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSE] Regenerated nontemporal vector store tests and added extra target types
Simon Pilgrim [Fri, 3 Jun 2016 10:24:24 +0000 (10:24 +0000)]
[X86][SSE] Regenerated nontemporal vector store tests and added extra target types

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271654 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[mips] Remove CPU-only triples from llvm-objdump commands.
Daniel Sanders [Fri, 3 Jun 2016 10:22:22 +0000 (10:22 +0000)]
[mips] Remove CPU-only triples from llvm-objdump commands.

Summary: They aren't necessary since llvm-objdump can auto-detect the architecture.

Reviewers: sdardis

Subscribers: jfb, dsanders, llvm-commits, sdardis

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271653 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LPM] Replace the CALL_ONCE_... macro in the legacy pass manager with
Chandler Carruth [Fri, 3 Jun 2016 10:20:02 +0000 (10:20 +0000)]
[LPM] Replace the CALL_ONCE_... macro in the legacy pass manager with
the new llvm::call_once facility.

This facility matches the standard APIs and when the platform supports
it actually directly uses the standard provided functionality. This is
both more efficient on some platforms and much more TSan friendly.

The only remaining user of the cas_flag and home-rolled atomics is the
fallback implementation of call_once. I have a patch that removes them
entirely, but it needs a Windows patch to land first.

This alone substantially cleans up the macros for the legacy pass
manager, and should subsume some of the work Mehdi was doing to clear
the path for TSan testing of ThinLTO, a really important step to have
reliable upstream testing of ThinLTO in all forms.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271652 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Regenerated nontemporal store tests and added tests for all 128-bit vector...
Simon Pilgrim [Fri, 3 Jun 2016 10:15:36 +0000 (10:15 +0000)]
[X86] Regenerated nontemporal store tests and added tests for all 128-bit vector types

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271651 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRemove bogus initialization of the PPC and Hexagon SelectionDAGISel
Chandler Carruth [Fri, 3 Jun 2016 10:13:31 +0000 (10:13 +0000)]
Remove bogus initialization of the PPC and Hexagon SelectionDAGISel
subclasses. These are not passes proper. We don't support registering
them, they can't be constructed with default arguments, and the ID is
actually in a base class.

Only these two targets even had any boiler plate to try to do this, and
it had to be munged out of the INITIALIZE_PASS macros to work. What's
worse, the boiler plate has rotted and the "name" of the pass is
actually the description string now!!! =/ All of this is completely
unnecessary. No other target bothers, and nothing breaks if you don't
initialize them because CodeGen has an entirely separate initialization
path that is somewhat more durable than relying on the implicit
initialization the way the 'opt' tool does for registered passes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271650 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUse the standard INITIALIZE_PASS macro rather than hand rolling a (not
Chandler Carruth [Fri, 3 Jun 2016 10:13:29 +0000 (10:13 +0000)]
Use the standard INITIALIZE_PASS macro rather than hand rolling a (not
entirely correct) version of its contents.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271649 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReformat the macros in Passes.h with clang-format before editting them.
Chandler Carruth [Fri, 3 Jun 2016 10:13:26 +0000 (10:13 +0000)]
Reformat the macros in Passes.h with clang-format before editting them.
No functionality changed here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271648 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][AVX2] Relaxed alignment on nontemporal store tests
Simon Pilgrim [Fri, 3 Jun 2016 10:06:59 +0000 (10:06 +0000)]
[X86][AVX2] Relaxed alignment on nontemporal store tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271646 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][AVX2] Regenerated nontemporal store tests and added tests for all 256-bit vecto...
Simon Pilgrim [Fri, 3 Jun 2016 09:56:24 +0000 (09:56 +0000)]
[X86][AVX2] Regenerated nontemporal store tests and added tests for all 256-bit vector types

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271645 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[mips] Implement 'la' macro in PIC mode for O32.
Daniel Sanders [Fri, 3 Jun 2016 09:53:06 +0000 (09:53 +0000)]
[mips] Implement 'la' macro in PIC mode for O32.

Summary:
N32 support will follow in a later patch since the symbol version of 'la'
incorrectly believes N32 to have 64-bit pointers and rejects it early.

This fixes the three incorrectly expanded 'la' macros found in bionic.

Reviewers: sdardis

Subscribers: dsanders, llvm-commits, sdardis

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271644 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRun clang-format over PassSupport.h, mostly to get the macros all
Chandler Carruth [Fri, 3 Jun 2016 08:46:16 +0000 (08:46 +0000)]
Run clang-format over PassSupport.h, mostly to get the macros all
formatted fancily.

I'm working on rewriting these macros to use the new call_once stuff,
but really want to have clang-format work on the edits, so just
re-baselining the entire file here. No changes other than clang-format.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271635 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][XOP] Support for VPERMIL2PD/VPERMIL2PS 2-input shuffle instructions
Simon Pilgrim [Fri, 3 Jun 2016 08:06:03 +0000 (08:06 +0000)]
[X86][XOP] Support for VPERMIL2PD/VPERMIL2PS 2-input shuffle instructions

This patch begins adding support for lowering to the XOP VPERMIL2PD/VPERMIL2PS shuffle instructions - adding the X86ISD::VPERMIL2 opcode and cleaning up the usage.

The internal llvm intrinsics were assuming the shuffle mask operand was the same type as the float/double input operands (I guess to simplify the intrinsic definitions in X86InstrXOP.td to a single value type). These needed changing to integer types (matching the clang builtin and the AMD intrinsics definitions), an auto upgrade path is added to convert old calls.

Mask decoding/target shuffle support will be added in future patches.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271633 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Fix some isel patterns to remove an operand from some multiclasses. NFC
Craig Topper [Fri, 3 Jun 2016 05:58:52 +0000 (05:58 +0000)]
[X86] Fix some isel patterns to remove an operand from some multiclasses. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271631 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[pdb] Print out file names instead of file offsets.
Zachary Turner [Fri, 3 Jun 2016 05:52:57 +0000 (05:52 +0000)]
[pdb] Print out file names instead of file offsets.

When printing line information and file checksums, we were printing
the file offset field from the struct header.  This teaches
llvm-pdbdump how to turn those numbers into the filename.  In the
case of file checksums, this is done by looking in the global
string table.  In the case of line contributions, this is done
by indexing into the file names buffer of the DBI stream.  Why
they use a different technique I don't know.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271630 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] Ensure EVEX vpshufd, vpshuflw, and vpshufhw have isel priority over the...
Craig Topper [Fri, 3 Jun 2016 05:31:04 +0000 (05:31 +0000)]
[AVX512] Ensure EVEX vpshufd, vpshuflw, and vpshufhw have isel priority over the VEX encoded ones.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271629 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] Fix shuffle comment printing for EVEX encoded PSHUFD, PSHUFHW, and PSHUFLW.
Craig Topper [Fri, 3 Jun 2016 05:31:00 +0000 (05:31 +0000)]
[AVX512] Fix shuffle comment printing for EVEX encoded PSHUFD, PSHUFHW, and PSHUFLW.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271628 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Simplify a multiclass to remove a parameter. NFC
Craig Topper [Fri, 3 Jun 2016 05:30:56 +0000 (05:30 +0000)]
[X86] Simplify a multiclass to remove a parameter. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271627 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Remove unnecessary pattern predicates from the vector bit cast patterns. The...
Craig Topper [Fri, 3 Jun 2016 04:15:27 +0000 (04:15 +0000)]
[X86] Remove unnecessary pattern predicates from the vector bit cast patterns. The types have to be legal and there are no alternative patterns. Saves almost 200 bytes in isel table.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271625 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Cleanup formatting a bit to align similar parts of adjacent lines.
Craig Topper [Fri, 3 Jun 2016 04:15:25 +0000 (04:15 +0000)]
[X86] Cleanup formatting a bit to align similar parts of adjacent lines.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271624 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Remove redundant bitcast patterns for 128/256-bit vectors. These only differ...
Craig Topper [Fri, 3 Jun 2016 04:15:22 +0000 (04:15 +0000)]
[X86] Remove redundant bitcast patterns for 128/256-bit vectors. These only differ from the SSE/AVX versions by the register class, but register class has no bearing on isel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271623 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[pdb] Dump file checksums from pdb codeview line info.
Zachary Turner [Fri, 3 Jun 2016 04:01:48 +0000 (04:01 +0000)]
[pdb] Dump file checksums from pdb codeview line info.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271622 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[codeview] Dump line number and column information.
Zachary Turner [Fri, 3 Jun 2016 03:25:59 +0000 (03:25 +0000)]
[codeview] Dump line number and column information.

To facilitate this, a couple of changes had to be made:

1. `ModuleSubstream` got moved from `DebugInfo/PDB` to
`DebugInfo/CodeView`, and various codeview related types are defined
there.  It turns out `DebugInfo/CodeView/Line.h` already defines many of
these structures, but this is really old code that is not endian aware,
doesn't interact well with `StreamInterface` and not very helpful for
getting stuff out of a PDB.  Eventually we should migrate the old readobj
`COFFDumper` code to these new structures, or at least merge their
functionality somehow.

2. A `ModuleSubstream` visitor is introduced.  Depending on where your
module substream array comes from, different subsets of record types can
be expected.  We are already hand parsing these substream arrays in many
places especially in `COFFDumper.cpp`.  In the future we can migrate these
paths to the visitor as well, which should reduce a lot of code in
`COFFDumper.cpp`.

Differential Revision: http://reviews.llvm.org/D20936
Reviewed By: ruiu, majnemer

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271621 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix indentation.
Rui Ueyama [Fri, 3 Jun 2016 02:42:30 +0000 (02:42 +0000)]
Fix indentation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271620 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[esan|cfrag] Instrument GEP instr for struct field access.
Qin Zhao [Fri, 3 Jun 2016 02:33:04 +0000 (02:33 +0000)]
[esan|cfrag] Instrument GEP instr for struct field access.

Summary:
Instrument GEP instruction for counting the number of struct field
address calculation to approximate the number of struct field accesses.

Adds test struct_field_count_basic.ll to test the struct field
instrumentation.

Reviewers: bruening, aizatsky

Subscribers: junbuml, zhaoqin, llvm-commits, eugenis, vitalybuka, kcc, bruening

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271619 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "Testcase cleanup: Remove an unused input file."
Adrian Prantl [Fri, 3 Jun 2016 00:24:38 +0000 (00:24 +0000)]
Revert "Testcase cleanup: Remove an unused input file."

This reverts commit r271612.
I somehow managed to remove the wrong file m-(

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271616 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LoopUnroll] Set correct thresholds for new recently enabled unrolling heuristic.
Michael Zolotukhin [Fri, 3 Jun 2016 00:16:46 +0000 (00:16 +0000)]
[LoopUnroll] Set correct thresholds for new recently enabled unrolling heuristic.

In r270478, where I enabled the new heuristic I posted testing results,
which I got when explicitly passed the thresholds values via CL options.
However, setting the CL options init-values is not enough to change the
default values of thresholds, so I'm changing them in another place now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271615 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoTestcase cleanup: remove an unused RUN line in an input file.
Adrian Prantl [Thu, 2 Jun 2016 23:58:52 +0000 (23:58 +0000)]
Testcase cleanup: remove an unused RUN line in an input file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271614 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "[yaml2obj] Sort MachO LinkEdit write operations based on offset"
Chris Bieneman [Thu, 2 Jun 2016 23:58:13 +0000 (23:58 +0000)]
Revert "[yaml2obj] Sort MachO LinkEdit write operations based on offset"

This reverts commit r271611 because it broke a bot:

http://bb.pgr.jp/builders/cmake-llvm-x86_64-linux/builds/38184

I don't currently have a handle on what went wrong, so I'll revert while I investigate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271613 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoTestcase cleanup: Remove an unused input file.
Adrian Prantl [Thu, 2 Jun 2016 23:57:42 +0000 (23:57 +0000)]
Testcase cleanup: Remove an unused input file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271612 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[yaml2obj] Sort MachO LinkEdit write operations based on offset
Chris Bieneman [Thu, 2 Jun 2016 23:52:08 +0000 (23:52 +0000)]
[yaml2obj] Sort MachO LinkEdit write operations based on offset

Although ld64 always outputs linkedit data in the same order, it isn't actually required to. This change makes yaml2obj resilient if the offsets are in arbitrary order.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271611 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[lit] Improve readability of failing scripts.
Daniel Dunbar [Thu, 2 Jun 2016 23:49:42 +0000 (23:49 +0000)]
[lit] Improve readability of failing scripts.

 - This only applies to scripts executed by the _internal_ shell script
   interpreter.

 - This patch reworks the log to look more like a shell transcript, and be less
   verbose (but in the interest of calling attention to the important parts).

Here is an example of the new format, for commands with/without failures and
with/without output:
```
$ true
$ echo hi
hi

$ false
note: command had no output on stdout or stderr
error: command failed with exit status 1

```

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271610 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[lit] Factor out a helper for shell command results.
Daniel Dunbar [Thu, 2 Jun 2016 23:32:35 +0000 (23:32 +0000)]
[lit] Factor out a helper for shell command results.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271608 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[TailRecursionElimination] Refactor/cleanup.
Davide Italiano [Thu, 2 Jun 2016 23:02:44 +0000 (23:02 +0000)]
[TailRecursionElimination] Refactor/cleanup.

In preparation for porting to the new PM.
Patch by Jake VanAdrighem! (review mainly by me/Justin)

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271607 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "[WebAssembly] Emit type signatures for declared functions"
Derek Schuff [Thu, 2 Jun 2016 23:02:44 +0000 (23:02 +0000)]
Revert "[WebAssembly] Emit type signatures for declared functions"

This reverts r271599, it broke the integration tests.
More places than I expected had nontrival return types in imports, or
else the check was wrong.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271606 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[obj2yaml] [yaml2obj] Support for MachO nlist and string table
Chris Bieneman [Thu, 2 Jun 2016 22:54:06 +0000 (22:54 +0000)]
[obj2yaml] [yaml2obj] Support for MachO nlist and string table

This commit adds round tripping for MachO symbol data. Symbols are entries in the name list, that contain offsets into the string table which is at the end of the __LINKEDIT segment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271604 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[InstCombine] change tests to show a more obvious transform possibility
Sanjay Patel [Thu, 2 Jun 2016 22:45:49 +0000 (22:45 +0000)]
[InstCombine] change tests to show a more obvious transform possibility

The original tests were intended to show a missing transform that would
be solved by D20774:
http://reviews.llvm.org/D20774

But it's not clear that the transform for the simpler tests is a win for
all targets. Make the tests show a larger pattern that should be a win
regardless of the cost of bitcast instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271603 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PM] Schedule InstSimplify after late LICM run, to clean up LCSSA nodes.
Manuel Jacob [Thu, 2 Jun 2016 22:14:26 +0000 (22:14 +0000)]
[PM] Schedule InstSimplify after late LICM run, to clean up LCSSA nodes.

Summary:
The module pass pipeline includes a late LICM run after loop
unrolling.  LCSSA is implicitly run as a pass dependency of LICM.  However no
cleanup pass was run after this, so the LCSSA nodes ended in the optimized output.

Reviewers: hfinkel, mehdi_amini

Subscribers: majnemer, bruno, mzolotukhin, mehdi_amini, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271602 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PM] LoadCombine preserves GlobalsAA, doesn't depend on it.
Davide Italiano [Thu, 2 Jun 2016 22:05:59 +0000 (22:05 +0000)]
[PM] LoadCombine preserves GlobalsAA, doesn't depend on it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271601 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PM/LoadCombine] Inline getAnalysisUsage(). NFCI.
Davide Italiano [Thu, 2 Jun 2016 22:04:43 +0000 (22:04 +0000)]
[PM/LoadCombine] Inline getAnalysisUsage(). NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271600 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[WebAssembly] Emit type signatures for declared functions
Derek Schuff [Thu, 2 Jun 2016 21:34:18 +0000 (21:34 +0000)]
[WebAssembly] Emit type signatures for declared functions

Under emscripten, C code can take the address of a function implemented
in Javascript (which is exposed via an import in wasm). Because imports
do not have linear memory address in wasm, we need to generate a thunk
to be the target of the indirect call; it call the import directly.

To make this possible, LLVM needs to emit the type signatures for these
functions, because they may not be called directly or referred to other
than where the address is taken.

This uses s new .s directive (.functype) which specifies the signature.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271599 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago80-column fixup after last formatting change.
Eric Christopher [Thu, 2 Jun 2016 21:32:30 +0000 (21:32 +0000)]
80-column fixup after last formatting change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271598 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd comments.
Rui Ueyama [Thu, 2 Jun 2016 21:13:47 +0000 (21:13 +0000)]
Add comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271597 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix a couple of misformatted comments spotted in post-commit review.
Eric Christopher [Thu, 2 Jun 2016 21:09:17 +0000 (21:09 +0000)]
Fix a couple of misformatted comments spotted in post-commit review.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271596 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoThis patch is in preparation for a substantial refactoring of the
Eric Christopher [Thu, 2 Jun 2016 21:03:19 +0000 (21:03 +0000)]
This patch is in preparation for a substantial refactoring of the
code. To make the diffs easier to read, clang-format everything first.

No functionality changed.

Patch by Alina Sbirlea!

http://reviews.llvm.org/D20926

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271595 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFixup r271533, or check-clang didn't find llvm-lto as the target.
NAKAMURA Takumi [Thu, 2 Jun 2016 20:39:24 +0000 (20:39 +0000)]
Fixup r271533, or check-clang didn't find llvm-lto as the target.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271585 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agofix documentation comments; NFC
Sanjay Patel [Thu, 2 Jun 2016 20:37:52 +0000 (20:37 +0000)]
fix documentation comments; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271584 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-pdbdump] Dump CodeView line information.
Zachary Turner [Thu, 2 Jun 2016 20:11:22 +0000 (20:11 +0000)]
[llvm-pdbdump] Dump CodeView line information.

This first pass only splits apart the records and dumps the line
info kinds and binary data.  Subsequent patches will parse out
the binary data into more useful information and dump it in
detail.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271576 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Handle flat in getMemOpBaseRegImmOfs
Matt Arsenault [Thu, 2 Jun 2016 20:05:20 +0000 (20:05 +0000)]
AMDGPU: Handle flat in getMemOpBaseRegImmOfs

It can still report the base register, and the uses give up when it
fails.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271575 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ASMParser] Parse FP constants in non-C locales
Meador Inge [Thu, 2 Jun 2016 20:04:44 +0000 (20:04 +0000)]
[ASMParser] Parse FP constants in non-C locales

This patch fixes PR25788, which allows for the parsing of
floating-point constants in non-C locales.

Patch by Antoine Pitrou!

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271574 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agotransform obscured FP sign bit ops into a fabs/fneg using TLI hook
Sanjay Patel [Thu, 2 Jun 2016 20:01:37 +0000 (20:01 +0000)]
transform obscured FP sign bit ops into a fabs/fneg using TLI hook

This is effectively a revert of:
http://reviews.llvm.org/rL249702 - [InstCombine] transform masking off of an FP sign bit into a fabs() intrinsic call (PR24886)
and:
http://reviews.llvm.org/rL249701 - [ValueTracking] teach computeKnownBits that a fabs() clears sign bits
and a reimplementation as a DAG combine for targets that have IEEE754-compliant fabs/fneg instructions.

This is intended to resolve the objections raised on the dev list:
http://lists.llvm.org/pipermail/llvm-dev/2016-April/098154.html
and:
https://llvm.org/bugs/show_bug.cgi?id=24886#c4

In the interest of patch minimalism, I've only partly enabled AArch64. PowerPC, MIPS, x86 and others can enable later.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271573 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Cleanup load tests
Matt Arsenault [Thu, 2 Jun 2016 19:54:26 +0000 (19:54 +0000)]
AMDGPU: Cleanup load tests

There are a lot of different kinds of loads to test for,
and these were scattered around inconsistently with
some redundancy. Try to comprehensively test all loads
in a consistent way.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271571 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[codeview] Fix a nasty use after free.
Zachary Turner [Thu, 2 Jun 2016 19:51:48 +0000 (19:51 +0000)]
[codeview] Fix a nasty use after free.

StreamRef was designed to be a thin wrapper over an abstract
stream interface that could itself be treated the same as any
other stream interface.  For this reason, it inherited publicly
from StreamInterface, and stored a StreamInterface* internally.

But StreamRef was also designed to be lightweight and easily
copyable, similar to ArrayRef.  This led to two misuses of
the classes.

1) When creating a StreamRef A from another StreamRef B, it was
   possible to end up with A storing a pointer to B, even when
   B was a temporary object, leading to use after free.
2) The above situation could be repeated ad nauseum, so that
   A stores a pointer to B, which itself stores a pointer to
   another StreamRef C, and so on and so on, creating an
   unnecessarily level of nesting depth.

This patch removes the public inheritance relationship between
StreamRef and StreamInterface, making it so that we can never
accidentally convert a StreamRef to a StreamInterface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271570 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Temporary fix for broken store combine
Matt Arsenault [Thu, 2 Jun 2016 19:00:55 +0000 (19:00 +0000)]
AMDGPU: Temporary fix for broken store combine

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271567 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CodeView] Use None instead of Void if there is no subprogram
David Majnemer [Thu, 2 Jun 2016 18:51:24 +0000 (18:51 +0000)]
[CodeView] Use None instead of Void if there is no subprogram

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271566 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix the use of sys::MemoryFence after including WindowsSupport.h that
Chandler Carruth [Thu, 2 Jun 2016 18:42:23 +0000 (18:42 +0000)]
Fix the use of sys::MemoryFence after including WindowsSupport.h that
r271558 introduced.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271563 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUse false for bool instead of 0
Matt Arsenault [Thu, 2 Jun 2016 18:37:21 +0000 (18:37 +0000)]
Use false for bool instead of 0

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271562 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Fix crashes on unknown processor name
Matt Arsenault [Thu, 2 Jun 2016 18:37:16 +0000 (18:37 +0000)]
AMDGPU: Fix crashes on unknown processor name

If the processor name failed to parse for amdgcn,
the resulting output would have R600 ISA in it.

If the processor name was missing or invalid for R600,
the wavefront size would not be set and there would be
crashes from missing itinerary data.

Fixes crashes in future commit caused by dividing by the unset/0
wavefront size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271561 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Define segment MI operands as regs instead of i8imm.
Ahmed Bougacha [Thu, 2 Jun 2016 18:29:15 +0000 (18:29 +0000)]
[X86] Define segment MI operands as regs instead of i8imm.

We've been pretending that segments are i8imm since the initial
support (r68645), predating the addition of the SEGMENT_REG class
(r81895).  That happens to works, but is wrong, and inconsistent
with how we print (e.g., X86ATTInstPrinter::printMemReference)
and parse them (e.g., X86Operand::addMemOperands).

This change shouldn't affect any tool users, but is visible to
library users or out-of-tree tablegen backends: this causes
MCOperandInfo for the segment op to have an RC instead of "unknown",
and TII::getRegClass to actually return something.  As the registers
are reserved and no vregs of the class ever created, that shouldn't
change anything.

No test change; no suspicious getRegClass() in X86 and CodeGen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271559 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoThis is yet another attempt to re-instate r220932 as discussed in
Chandler Carruth [Thu, 2 Jun 2016 18:22:12 +0000 (18:22 +0000)]
This is yet another attempt to re-instate r220932 as discussed in
D19271.

Previous attempt was broken by NetBSD, so in this version I've made the
fallback path generic rather than Windows specific and sent both Windows
and NetBSD to it.

I've also re-formatted the code some, and used an exact clone of the
code in PassSupport.h for doing manual call-once using our atomics
rather than rolling a new one.

If this sticks, we can replace the fallback path for Windows with
a Windows-specific implementation that is more reliable.

Original commit message:
This patch adds an llvm_call_once which is a wrapper around
std::call_once on platforms where it is available and devoid
of bugs. The patch also migrates the ManagedStatic mutex to
be allocated using llvm_call_once.

These changes are philosophically equivalent to the changes
added in r219638, which were reverted due to a hang on Win32
which was the result of a bug in the Windows implementation
of std::call_once.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271558 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agopdbdump: print out COFF section headers.
Rui Ueyama [Thu, 2 Jun 2016 18:20:20 +0000 (18:20 +0000)]
pdbdump: print out COFF section headers.

Unlike other sections that can grow to any size, the COFF section header
stream has maximum length because each record is fixed size and the COFF
file format limits the maximum number of sections. So I decided to not
create a specific stream class for it. Instead, I added a member function
to DbiStream class which returns a vector of COFF headers.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271557 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMake APInt negate just do a 2's complement negate instead of subtract. NFC.
Pete Cooper [Thu, 2 Jun 2016 18:11:54 +0000 (18:11 +0000)]
Make APInt negate just do a 2's complement negate instead of subtract.  NFC.

This is part of an effort to shave allocations from APInt heavy paths.  I'll
be moving many of the other operators to r-value references soon and this is
a step towards doing that without too much duplication.

Saves 15k allocations when doing 'opt -O2 verify-uselistorder.bc'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271556 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAArch64: Do not test for CPUs, use SubtargetFeatures
Matthias Braun [Thu, 2 Jun 2016 18:03:53 +0000 (18:03 +0000)]
AArch64: Do not test for CPUs, use SubtargetFeatures

Testing for specific CPUs has a number of problems, better use subtarget
features:
- When some tweak is added for a specific CPU it is often desirable for
  the next version of that CPU as well, yet we often forget to add it.
- It is hard to keep track of checks scattered around the target code;
  Declaring all target specifics together with the CPU in the tablegen
  file is a clear representation.
- Subtarget features can be tweaked from the command line.

To discourage people from using CPU checks in the future I removed the
isCortexXX(), isCyclone(), ... functions. I added an getProcFamily()
function for exceptional circumstances but made it clear in the comment
that usage is discouraged.

Reformat feature list in AArch64.td to have 1 feature per line in
alphabetical order to simplify merging and sorting for out of tree
tweaks.

No functional change intended.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271555 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[InstCombine] remove guard for generating a vector select
Sanjay Patel [Thu, 2 Jun 2016 18:03:05 +0000 (18:03 +0000)]
[InstCombine] remove guard for generating a vector select

This is effectively NFC because we already do this transform after r175380:
http://reviews.llvm.org/rL175380

and also via foldBoolSextMaskToSelect().

This change should just make it a bit more efficient to match the pattern.
The original guard was added in r95058:
http://reviews.llvm.org/rL95058

A sampling of codegen for current in-tree targets shows no problems. This
makes sense given that we're already producing the vector selects via the
other transforms.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271554 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PowerPC] Run reg2mem on tests to simplify them.
Geoff Berry [Thu, 2 Jun 2016 18:02:50 +0000 (18:02 +0000)]
[PowerPC] Run reg2mem on tests to simplify them.

Summary:
Also convert test/CodeGen/PowerPC/vsx-ldst-builtin-le.ll to use
FileCheck instead of two grep and count runs.

This change is needed to avoid spurious diffs in these tests when
EarlyCSE is improved to use MemorySSA and can do more load elimination.

Reviewers: hfinkel

Subscribers: mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271553 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSE] Added SSE41/AVX2 non-temporal tests
Simon Pilgrim [Thu, 2 Jun 2016 18:01:21 +0000 (18:01 +0000)]
[X86][SSE] Added SSE41/AVX2 non-temporal tests

Useful for when we add MOVNTDQA support

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271552 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[codeview] Fix crash when handling qualified void types
Reid Kleckner [Thu, 2 Jun 2016 17:40:51 +0000 (17:40 +0000)]
[codeview] Fix crash when handling qualified void types

The DIType* for void is the null pointer. A null DIType can never be a
qualified type, so we can just exit the loop at this point and go to
getTypeIndex(BaseTy).

Fixes PR27984

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271550 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRename IMAGE_DEBUG_TYPE_NO_TIMESTAMP to IMAGE_DEBUG_TYPE_REPRO
David Majnemer [Thu, 2 Jun 2016 17:32:11 +0000 (17:32 +0000)]
Rename IMAGE_DEBUG_TYPE_NO_TIMESTAMP to IMAGE_DEBUG_TYPE_REPRO

This matches the COFF spec

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271549 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoOnly attempt to detect AVG if SSE2 is available
Dimitry Andric [Thu, 2 Jun 2016 17:30:49 +0000 (17:30 +0000)]
Only attempt to detect AVG if SSE2 is available

Summary:
In PR29973 Sanjay Patel reported an assertion failure when a certain
loop was optimized, for a target without SSE2 support.  It turned out
this was because of the AVG pattern detection introduced in rL253952.

Prevent the assertion failure by bailing out early in
`detectAVGPattern()`, if the target does not support SSE2.

Also add a minimized test case.

Reviewers: congh, eli.friedman, spatel

Subscribers: emaste, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271548 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[esan|cfrag] Create the cfrag struct array for the runtime
Qin Zhao [Thu, 2 Jun 2016 17:30:47 +0000 (17:30 +0000)]
[esan|cfrag] Create the cfrag struct array for the runtime

Summary:
Fills the cfrag struct variable with an array of struct information
variables.

Reviewers: aizatsky, bruening

Subscribers: bruening, kcc, vitalybuka, eugenis, llvm-commits, zhaoqin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271547 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ADT] Pass ArrayRef::slice size_t instead of unsigned.
Ahmed Bougacha [Thu, 2 Jun 2016 17:26:03 +0000 (17:26 +0000)]
[ADT] Pass ArrayRef::slice size_t instead of unsigned.

Also fix slice wrappers drop_front and drop_back.
The unittests are pretty awkward, but do the job; alternatives
welcome!

..and yes, I do have ArrayRefs with more than 4 billion elements.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271546 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoIgnore Lexing errors in macro body definitions
Nirav Dave [Thu, 2 Jun 2016 17:15:05 +0000 (17:15 +0000)]
Ignore Lexing errors in macro body definitions

Do not issue lexing errors found during the parsing of macro body
definitions and parseIdentifier function in AsmParser. This changes the
Parser to not issue a lexing error when we reach an error, but rather
when it is consumed allowing us time to examine and recover from an
error.

As a result, of this, we stop issuing a both lexing error and a parsing
error in floating-literals test. Minor tweak to parseDirectiveRealValue
to favor more meaningful lexing error over less helpful parse error.

Reviewers: rnk, majnemer

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271542 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CodeView] Implement function-type indices
David Majnemer [Thu, 2 Jun 2016 17:13:53 +0000 (17:13 +0000)]
[CodeView] Implement function-type indices

We still need to do something about member functions and calling
conventions.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271541 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRemove all of the legacy home-grown atomic operations LLVM provided
Chandler Carruth [Thu, 2 Jun 2016 17:11:11 +0000 (17:11 +0000)]
Remove all of the legacy home-grown atomic operations LLVM provided
except for CompareAndSwap. That is the only one still being used
anywhere now that statistics have been moved onto std::atomic.

Also, add a warning to the header that we shouldn't introduce more uses
of these old style atomics and instead should be using C++11's
std::atomic facilities.

Really hoping that we can hammer out the last couple of users here and
replace them with something more localized and/or principled, but
figured this was a pretty good start. =]

Note that this patch will need to be reverted if r271504 needs to be
reverted as that removes the last user of these. However, the biggest
risk for that patch was MSVC 2013 and at least one bot has already
passed where it would have failed there. I've tested MSVC 2015 using
their web interfaces and other platforms seem fine, so I'm optimistic.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271540 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[COFF] Expose the PE debug data directory and dump it
Reid Kleckner [Thu, 2 Jun 2016 17:10:43 +0000 (17:10 +0000)]
[COFF] Expose the PE debug data directory and dump it

This directory is used to find if there is a PDB associated with an
executable. I plan to use this functionality to teach llvm-symbolizer
whether it should use DIA or DWARF to symbolize a given DLL.

Reviewers: majnemer

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271539 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-cov] Use string getters (NFC)
Vedant Kumar [Thu, 2 Jun 2016 17:00:50 +0000 (17:00 +0000)]
[llvm-cov] Use string getters (NFC)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271537 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[profile] value profiling bug fix -- missing icall targets in profile-use
Xinliang David Li [Thu, 2 Jun 2016 16:33:41 +0000 (16:33 +0000)]
[profile] value profiling bug fix -- missing icall targets in profile-use

Inline virtual functions has linkeonceodr linkage (emitted in comdat on
supporting targets). If the vtable for the class is not emitted in the
defining module, function won't be address taken thus its address is not
recorded. At the mercy of the linker, if the per-func prf_data from this
module (in comdat) is picked at link time, we will lose mapping from
function address to its hash val. This leads to missing icall promotion.
The second test case (currently disabled) in compiler_rt (r271528):
instrprof-icall-prom.test demostrates the bug. The first profile-use
subtest is fine due to linker order difference.

With this change, no missing icall targets is found in instrumented clang's
raw profile.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271532 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[cmake] Fix builds with LLVM_ENABLE_PIC=0
Pavel Labath [Thu, 2 Jun 2016 16:29:07 +0000 (16:29 +0000)]
[cmake] Fix builds with LLVM_ENABLE_PIC=0

Summary:
When this flag is specified, the target llvm-lto is not built, but is still
used as a dependency of the test targets. cmake 2.8 silently ignored this
situation, but with cmake_minimum_required(3.4) it becomes an error. Fix this
by avoiding the inclusion of the target as a dependency.

Reviewers: beanz

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271530 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix uninitialized members in VarStreamArrayIterator.
Zachary Turner [Thu, 2 Jun 2016 16:28:52 +0000 (16:28 +0000)]
Fix uninitialized members in VarStreamArrayIterator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271529 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PEI, AArch64] Use empty spaces in stack area for local stack slot allocation.
Geoff Berry [Thu, 2 Jun 2016 16:22:07 +0000 (16:22 +0000)]
[PEI, AArch64] Use empty spaces in stack area for local stack slot allocation.

Summary:
If the target requests it, use emptry spaces in the fixed and
callee-save stack area to allocate local stack objects.

AArch64: Change last callee-save reg stack object alignment instead of
size to leave a gap to take advantage of above change.

Reviewers: t.p.northover, qcolombet, MatzeB

Subscribers: rengolin, mcrosier, llvm-commits, aemerson

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271527 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[DAG] use getBitcast() to reduce code
Sanjay Patel [Thu, 2 Jun 2016 16:01:15 +0000 (16:01 +0000)]
[DAG] use getBitcast() to reduce code

Although this was intended to be NFC, the test case wiggle shows a change in
code scheduling/RA caused by a difference in the SDLoc() generation.

Depending on how you look at it, this is the (dis)advantage of exact checking
in regression tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271526 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Hexagon] Expand COPY pseudo-instruction
Krzysztof Parzyszek [Thu, 2 Jun 2016 14:33:08 +0000 (14:33 +0000)]
[Hexagon] Expand COPY pseudo-instruction

Handle it locally instead of having the target-independent pass deal
with it. The generic pass does not preserve implicit uses, which may
be necessary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271520 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[RDF] Ignore implicit defs when resetting <kill> flags
Krzysztof Parzyszek [Thu, 2 Jun 2016 14:30:09 +0000 (14:30 +0000)]
[RDF] Ignore implicit defs when resetting <kill> flags

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271519 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSE] Added non-temporal load tests for vector types
Simon Pilgrim [Thu, 2 Jun 2016 13:51:50 +0000 (13:51 +0000)]
[X86][SSE] Added non-temporal load tests for vector types

These currently lower to regular loads instead of MOVNTDQA

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271516 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd assertions to MathExtras max/min functions
Dylan McKay [Thu, 2 Jun 2016 12:00:34 +0000 (12:00 +0000)]
Add assertions to MathExtras max/min functions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271515 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSE] Replace (V)CVTTPS2DQ and VCVTTPD2DQ truncating (round to zero) f32/f64...
Simon Pilgrim [Thu, 2 Jun 2016 10:55:21 +0000 (10:55 +0000)]
[X86][SSE] Replace (V)CVTTPS2DQ and VCVTTPD2DQ truncating (round to zero) f32/f64 to i32 with generic IR (llvm)

This patch removes the llvm intrinsics (V)CVTTPS2DQ and VCVTTPD2DQ truncation (round to zero) conversions and auto-upgrades to FP_TO_SINT calls instead.

Note: I looked at updating CVTTPD2DQ as well but this still requires a lot more work to correctly lower.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271510 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoThis adds support for Cortex-A73 as an available target.
Sjoerd Meijer [Thu, 2 Jun 2016 10:48:52 +0000 (10:48 +0000)]
This adds support for Cortex-A73 as an available target.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271508 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd tests to Support/MathExtras
Dylan McKay [Thu, 2 Jun 2016 09:00:53 +0000 (09:00 +0000)]
Add tests to Support/MathExtras

In r271380, I added several functions to get the minimum/maximum values
of n-width integers.

This just adds tests for them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271505 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoSwitch statistics to use relaxed updates to a std::atomic.
Chandler Carruth [Thu, 2 Jun 2016 08:44:05 +0000 (08:44 +0000)]
Switch statistics to use relaxed updates to a std::atomic.

This removes usage of the hacky, incorrect, and TSan-unfriendly
home-grown atomics. It should actually be more efficient in some cases.

Based on our existing usage of <atomic>, all of this is portably
available AFAICT. One small challenge is initializing the stastic, but
I've tried a comparable sample out on MSVC (the most likely to complain
here) and it seems to work. Will have to watch the build bots of course.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271504 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ADT] Remove unused multiply and divide operator overloads on
Chandler Carruth [Thu, 2 Jun 2016 08:37:14 +0000 (08:37 +0000)]
[ADT] Remove unused multiply and divide operator overloads on
statistics.

Scaling statistics atomically doesn't make any sense anyways, and none
were using these. If you find yourself wanting to do this, you should
probably keep a local count that you scale and then apply that after
scaling to the shared statistic object.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271503 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CodeView] Use the right type index for long long
David Majnemer [Thu, 2 Jun 2016 07:02:32 +0000 (07:02 +0000)]
[CodeView] Use the right type index for long long

We used T_INT8 instead of T_QUAD.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271497 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CodeView] Take the StreamRef::readBytes offset into account when validating
David Majnemer [Thu, 2 Jun 2016 06:21:44 +0000 (06:21 +0000)]
[CodeView] Take the StreamRef::readBytes offset into account when validating

We only considered the length of the operation and the length of the
StreamRef without considered what it meant for the offset to be at a
non-zero position.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271496 91177308-0d34-0410-b5e6-96231b3b80d8