134378 Commits

Author SHA1 Message Date
Krzysztof Parzyszek
a40782d826 [Docs][CodeGenerator] Don't specify the number of operands in BuildMI
Patch by Visoiu Mistrih Francis.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274128 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-29 14:14:59 +00:00
Simon Pilgrim
38b2095b3e [X86][SSE2] Added _mm_loadu_si64 test to match llvm\tools\clang\test\CodeGen\sse2-builtins.c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274127 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-29 14:05:33 +00:00
Simon Pilgrim
d28b49f9ae [X86] Regenerated popcnt combine tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274124 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-29 13:54:03 +00:00
Elena Demikhovsky
f7282f8ee5 Reverted patch 273864
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274115 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-29 10:01:06 +00:00
Marcin Koscielnicki
d565c876ef [SystemZ] Add floating-point test data class instructions.
These are not used by CodeGen yet - ISD combiners creating the new node
will come in subsequent patches.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274108 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-29 07:29:07 +00:00
Vedant Kumar
174360e19a Revert "[Coverage] Move logic to encode filenames and mappings into llvm (NFC)"
This reverts commit 520a8298d8ef676b5da617ba3d2c7fa37381e939 (r273055).

This is breaking stage2 instrumented builds with "malformed coverage
data" errors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274106 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-29 05:33:26 +00:00
Vedant Kumar
0282a55d99 Revert "[Coverage] Clarify ownership of a MemoryBuffer in the reader (NFC)"
This reverts commit 1037ef2574adde2103ad221d63834c3e1df4a776.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274105 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-29 05:33:24 +00:00
Craig Topper
c590a00f89 Revert "[ValueTracking] Teach computeKnownBits for PHI nodes to compute sign bit for a recurrence with a NSW addition."
This is breaking an optimizaton remark test in clang. I've identified a couple fixes for that, but want to understand it better before I commit to anything.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274102 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-29 04:57:00 +00:00
Adam Nemet
6818d39eeb [Diag] Add getter shouldAlwaysPrint. NFC
For the new hotness attribute, the API will take the pass rather than
the pass name so we can no longer play the trick of AlwaysPrint being a
special pass name. This adds a getter to help the transition.

There is also a corresponding clang patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274100 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-29 04:55:19 +00:00
Craig Topper
d68165e548 [ValueTracking] Teach computeKnownBits for PHI nodes to compute sign bit for a recurrence with a NSW addition.
If a operation for a recurrence is an addition with no signed wrap and both input sign bits are 0, then the result sign bit must also be 0. Similar for the negative case.

I found this deficiency while playing around with a loop in the x86 backend that contained a signed division that could be optimized into an unsigned division if we could prove both inputs were positive. One of them being the loop induction variable. With this patch we can perform the conversion for this case. One of the test cases here is a contrived variation of the loop I was looking at.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274098 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-29 03:46:47 +00:00
Craig Topper
7268ea5189 [DAGCombine] Teach DAG combine to handle ORs of shuffles involving zero vectors where the zero vector is the first operand to the shuffle instead of the second.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274097 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-29 03:29:12 +00:00
Craig Topper
a48b5609d3 [DAGCombine] Add test cases to show that DAG combining an OR of two shuffles with zero vectors doesn't work if the zero vector is the first operand of the shuffle. Fix coming in a follow up patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274096 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-29 03:29:09 +00:00
Craig Topper
4cd293caf8 [CodeGen] Make ShuffleVectorSDNode::commuteMask take a MutableArrayRef instead of SmallVectorImpl. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274095 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-29 03:29:06 +00:00
Eric Christopher
e2f7f59e27 Revert "[InstCombine] Avoid combining the bitcast of a var that is used as both address and result of load instructions"
Revert "[InstCombine] Combine A->B->A BitCast"

as this appears to cause PR27996 and as discussed in http://reviews.llvm.org/D20847

This reverts commits r270135 and r263734.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274094 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-29 03:05:58 +00:00
Philip Reames
bb79b8e5de [bugpoint] Delete a stale comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274093 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-29 03:02:01 +00:00
Philip Reames
c29dedcdc7 [bugpoint] Unwrap one level of wrapper functions [NFC]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274092 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-29 03:01:13 +00:00
Davide Italiano
997e1fa9b4 [Triple] Add isLittleEndian().
This allows us to query about the endianness without having to
look at DataLayout. The API will be used (and tested) in lld,
in order to find out the endianness of BitcodeFiles.

Briefly discussed with Rafael.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274090 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-29 01:56:27 +00:00
Philip Reames
67d87be678 [bugpoint] Extract helper functions for readability [NFCI]
And remove the use of a label(!) in the process.  



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274087 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-29 00:43:18 +00:00
Vedant Kumar
cd29c6b37b [llvm-cov] Minor cleanups to prepare for the html format patch
- Add renderView{Header,Footer}, renderLineSuffix, and hasSubViews to
  support creating tables with nested views.

- Move the 'Format' cl::opt to make it easier to extend.

- Just create one function view file, instead of overwriting the same
  file for every new function. Add a regression test for this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274086 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-29 00:38:21 +00:00
Vedant Kumar
3cb7bf5952 [Object] Fix a -Wpessimizing-move error; clang-format; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274085 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-29 00:37:13 +00:00
Philip Reames
34618d997d [bugpoint] Simplify code by moving exception to only caller
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274083 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-29 00:26:21 +00:00
Philip Reames
2d7feebf30 [bugpoint] Treat token type the same as ehpad w.r.t deletion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274082 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-29 00:15:35 +00:00
Philip Reames
9530134a5d [bugpoint] Disabling one transform shouldn't prevent reporting the progress of the former
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274081 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-29 00:10:39 +00:00
Kevin Enderby
c827f2cd76 Finish cleaning up most of the error handling in libObject’s MachOUniversalBinary
and its clients to use the new llvm::Error model for error handling.

Changed getAsArchive() from ErrorOr<...> to Expected<...> so now all
interfaces there use the new llvm::Error model for return values.

In the two places it had if (!Parent) this is actually a program error so changed
from returning errorCodeToError(object_error::parse_failed) to calling
report_fatal_error() with a message.

In getObjectForArch() added error messages to its two llvm::Error return values
instead of returning errorCodeToError(object_error::arch_not_found) with no
error message.

For the llvm-obdump, llvm-nm and llvm-size clients since the only binary files in
Mach-O Universal Binaries that are supported are Mach-O files or archives with
Mach-O objects, updated their logic to generate an error when a slice contains
something like an ELF binary instead of ignoring it. And added a test case for
that.

The last error stuff to be cleaned up for libObject’s MachOUniversalBinary is
the use of errorOrToExpected(Archive::create(ObjBuffer)) which needs
Archive::create() to be changed from ErrorOr<...> to Expected<...> first,
which I’ll work on next. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274079 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 23:16:13 +00:00
Adam Nemet
6ae4c209f5 [Diag] Fix file comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274078 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 23:06:39 +00:00
Kyle Butt
baaf6e521a Codegen: [MBP] Add messages to asserts. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274075 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 22:50:54 +00:00
Weiming Zhao
98f00b718b [ARM] Fix 28282: cost computation for constant hoisting
Summary:
This fixes bug: https://llvm.org/bugs/show_bug.cgi?id=28282

Currently the cost model of constant hoisting checks the bit width of the data type of the constants.
However, the actual immediate value is small enough and not need to be hoisted.
This patch checks for the actual bit width needed for the constant.

Reviewers: t.p.northover, rengolin

Subscribers: aemerson, rengolin, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274073 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 22:30:45 +00:00
Manman Ren
ba713e39b3 Revert r274054 to try to appease the bot
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274072 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 22:20:17 +00:00
Dehao Chen
527613bc4e Relax the clearance calculating for breaking partial register dependency.
Summary: LLVM assumes that large clearance will hide the partial register spill penalty. But in our experiment, 16 clearance is too small. As the inserted XOR is normally fairly cheap, we should have a higher clearance threshold to aggressively insert XORs that is necessary to break partial register dependency.

Reviewers: wmi, davidxl, stoklund, zansari, myatsina, RKSimon, DavidKreitzer, mkuper, joerg, spatel

Subscribers: davidxl, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274068 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 21:19:34 +00:00
Chris Bieneman
efed5fba68 [YAML] Fix YAML tags appearing before the start of sequence elements
Our existing yaml::Output code writes tags immediately when mapTag is called, without any state handling. This results in tags on sequence elements being written before the element itself. For example, we see this:

SomeArray:     !elem_type
  - key1:         1
    key2:         2 !elem_type2
  - key3:         3
    key4:         4

We should instead see:

SomeArray:
  - !elem_type
    key1:         1
    key2:         2
  - !elem_type2
    key3:         3
    key4:         4

Our reader handles reading properly, so this bug only impacts writing yaml sequences with tagged elements.

As a test for this I've modified the Mach-O yaml encoding to allways apply the !mach-o tag when encoding MachOYAML::Object entries. This results in the !mach-o tag appearing as expected in dumped fat files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274067 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 21:10:26 +00:00
Zhan Jun Liau
a1bfbb709d [SystemZ] Use NILL instruction instead of NILF where possible
Summary: SystemZ shift instructions only use the last 6 bits of the shift
amount. When the result of an AND operation is used as a shift amount, this
means that we can use the NILL instruction (which operates on the last 16 bits)
rather than NILF (which operates on the last 32 bits) for a 16-bit savings in
instruction size.

Reviewers: uweigand

Subscribers: llvm-commits

Author: colpell
Committing on behalf of Elliot.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274066 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 21:03:19 +00:00
Simon Pilgrim
24aa476923 Fix "not all control paths return a value" warning on MSVC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274065 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 21:02:41 +00:00
Matthias Braun
b102a31d3c X86FrameLowering: Check subregs when deciding prolog kill flags
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274057 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 20:31:56 +00:00
Rafael Espindola
c4cbe67fa8 Use isPositionIndependent in a few more places.
I think this converts all the simple cases that really just care about
the generated code being position independent or not. The remaining
uses are a bit more complicated and are checking things like "is this
a library or executable" or "can this symbol be preempted".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274055 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 20:13:36 +00:00
Zachary Turner
d6a559cb89 Update llvm command line parser to support subcommands.
This allows command line tools to use syntaxes like the following:

  llvm-foo.exe command1 -o1 -o2
  llvm-foo.exe command2 -p1 -p2

Where command1 and command2 contain completely different sets of
valid options.  This is backwards compatible with previous uses
of llvm cl which did not support subcommands, as any option
which specifies no optional subcommand (e.g. all existing
code) goes into a special "top level" subcommand that expects
dashed options to appear immediately after the program name.
For example, code which is subcommand unaware would generate
a command line such as the following, where no subcommand
is specified:

  llvm-foo.exe -q1 -q2

The top level subcommand can co-exist with actual subcommands,
as it is implemented as an actual subcommand which is searched
if no explicit subcommand is specified.  So llvm-foo.exe as
specified above could be written so as to support all three
aforementioned command lines simultaneously.

There is one additional "special" subcommand called AllSubCommands,
which can be used to inject an option into every subcommand.
This is useful to support things like help, so that commands
such as:

  llvm-foo.exe --help
  llvm-foo.exe command1 --help
  llvm-foo.exe command2 --help

All work and display the help for the selected subcommand
without having to explicitly go and write code to handle each
one separately.

This patch is submitted without an example of anything actually
using subcommands, but a followup patch will convert the
llvm-pdbdump tool to use subcommands.

Reviewed By: beanz
Differential Revision: http://reviews.llvm.org/D21485

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274054 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 20:09:47 +00:00
Krzysztof Parzyszek
c90294dc24 Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274051 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 19:12:28 +00:00
Sanjay Patel
b4ca424ce9 minimize regression tests and update checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274047 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 18:40:08 +00:00
Sanjay Patel
0eb410f910 minimize regression tests and update checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274046 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 18:33:10 +00:00
Artur Pilipenko
48917c9e44 Support arbitrary addrspace pointers in masked load/store intrinsics
This is a resubmittion of 263158 change after fixing the existing problem with intrinsics mangling (see LTO and intrinsics mangling llvm-dev thread for details).

This patch fixes the problem which occurs when loop-vectorize tries to use @llvm.masked.load/store intrinsic for a non-default addrspace pointer. It fails with "Calling a function with a bad signature!" assertion in CallInst constructor because it tries to pass a non-default addrspace pointer to the pointer argument which has default addrspace.

The fix is to add pointer type as another overloaded type to @llvm.masked.load/store intrinsics.

Reviewed By: reames

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274043 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 18:27:25 +00:00
Jacques Pienaar
041fc266ab [lanai] Update ELF number to correspond to the assigned number.
Change EM_LANAI to correspond to machine number assigned by Xinuos.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274042 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 18:22:22 +00:00
Michael Kuperstein
cfa7009629 [X86] Update a test with more explicit checks. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274040 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 17:42:13 +00:00
Matt Arsenault
364fc298eb AMDGPU: Fix global isel crashes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274039 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 17:42:09 +00:00
Chad Rosier
8c043bfa10 Typos. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274038 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 17:19:10 +00:00
Michael Kuperstein
558b25ffb5 [X86] Reorder source list alphabetically. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274036 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 17:11:15 +00:00
Matt Arsenault
927f3f9d4a AMDGPU: Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274034 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 16:59:53 +00:00
Matt Arsenault
bd1991ecf2 AMDGPU: Remove unused function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274033 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 16:59:49 +00:00
Vedant Kumar
028d73c4cd [llvm-cov] Create an index of reports in -output-dir mode
This index lists the reports available in the 'coverage' sub-directory.
This will help navigate coverage output from large projects.

This commit factors the file creation code out of SourceCoverageView and
into CoveragePrinter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274029 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 16:12:24 +00:00
Vedant Kumar
184c22415b [llvm-cov] Minor cleanups (NFC)
- Test the '-o' alias for -output-dir.
- Use a helper method in a conditional.
- Add a period.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274028 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 16:12:20 +00:00
Vedant Kumar
75f03af542 [llvm-cov] Avoid copying file paths multiple times (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274027 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 16:12:18 +00:00
Vedant Kumar
c5fab6a8fd [llvm-cov] Rename ShowFormat to Format (NFC)
This makes it a bit more generic, in case we want to emit summary
reports in different formats in the future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274026 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 16:12:15 +00:00