OSDN Git Service
Craig Topper [Wed, 29 Jun 2016 04:57:00 +0000 (04:57 +0000)]
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
Adam Nemet [Wed, 29 Jun 2016 04:55:19 +0000 (04:55 +0000)]
[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
Craig Topper [Wed, 29 Jun 2016 03:46:47 +0000 (03:46 +0000)]
[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
Craig Topper [Wed, 29 Jun 2016 03:29:12 +0000 (03:29 +0000)]
[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
Craig Topper [Wed, 29 Jun 2016 03:29:09 +0000 (03:29 +0000)]
[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
Craig Topper [Wed, 29 Jun 2016 03:29:06 +0000 (03:29 +0000)]
[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
Eric Christopher [Wed, 29 Jun 2016 03:05:58 +0000 (03:05 +0000)]
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
Philip Reames [Wed, 29 Jun 2016 03:02:01 +0000 (03:02 +0000)]
[bugpoint] Delete a stale comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274093
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Wed, 29 Jun 2016 03:01:13 +0000 (03:01 +0000)]
[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
Davide Italiano [Wed, 29 Jun 2016 01:56:27 +0000 (01:56 +0000)]
[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
Philip Reames [Wed, 29 Jun 2016 00:43:18 +0000 (00:43 +0000)]
[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
Vedant Kumar [Wed, 29 Jun 2016 00:38:21 +0000 (00:38 +0000)]
[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
Vedant Kumar [Wed, 29 Jun 2016 00:37:13 +0000 (00:37 +0000)]
[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
Philip Reames [Wed, 29 Jun 2016 00:26:21 +0000 (00:26 +0000)]
[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
Philip Reames [Wed, 29 Jun 2016 00:15:35 +0000 (00:15 +0000)]
[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
Philip Reames [Wed, 29 Jun 2016 00:10:39 +0000 (00:10 +0000)]
[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
Kevin Enderby [Tue, 28 Jun 2016 23:16:13 +0000 (23:16 +0000)]
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
Adam Nemet [Tue, 28 Jun 2016 23:06:39 +0000 (23:06 +0000)]
[Diag] Fix file comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274078
91177308-0d34-0410-b5e6-
96231b3b80d8
Kyle Butt [Tue, 28 Jun 2016 22:50:54 +0000 (22:50 +0000)]
Codegen: [MBP] Add messages to asserts. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274075
91177308-0d34-0410-b5e6-
96231b3b80d8
Weiming Zhao [Tue, 28 Jun 2016 22:30:45 +0000 (22:30 +0000)]
[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
Manman Ren [Tue, 28 Jun 2016 22:20:17 +0000 (22:20 +0000)]
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
Dehao Chen [Tue, 28 Jun 2016 21:19:34 +0000 (21:19 +0000)]
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
Chris Bieneman [Tue, 28 Jun 2016 21:10:26 +0000 (21:10 +0000)]
[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
Zhan Jun Liau [Tue, 28 Jun 2016 21:03:19 +0000 (21:03 +0000)]
[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
Simon Pilgrim [Tue, 28 Jun 2016 21:02:41 +0000 (21:02 +0000)]
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
Matthias Braun [Tue, 28 Jun 2016 20:31:56 +0000 (20:31 +0000)]
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
Rafael Espindola [Tue, 28 Jun 2016 20:13:36 +0000 (20:13 +0000)]
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
Zachary Turner [Tue, 28 Jun 2016 20:09:47 +0000 (20:09 +0000)]
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
Krzysztof Parzyszek [Tue, 28 Jun 2016 19:12:28 +0000 (19:12 +0000)]
Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274051
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 28 Jun 2016 18:40:08 +0000 (18:40 +0000)]
minimize regression tests and update checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274047
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 28 Jun 2016 18:33:10 +0000 (18:33 +0000)]
minimize regression tests and update checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274046
91177308-0d34-0410-b5e6-
96231b3b80d8
Artur Pilipenko [Tue, 28 Jun 2016 18:27:25 +0000 (18:27 +0000)]
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
Jacques Pienaar [Tue, 28 Jun 2016 18:22:22 +0000 (18:22 +0000)]
[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
Michael Kuperstein [Tue, 28 Jun 2016 17:42:13 +0000 (17:42 +0000)]
[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
Matt Arsenault [Tue, 28 Jun 2016 17:42:09 +0000 (17:42 +0000)]
AMDGPU: Fix global isel crashes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274039
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 28 Jun 2016 17:19:10 +0000 (17:19 +0000)]
Typos. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274038
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Tue, 28 Jun 2016 17:11:15 +0000 (17:11 +0000)]
[X86] Reorder source list alphabetically. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274036
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 28 Jun 2016 16:59:53 +0000 (16:59 +0000)]
AMDGPU: Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274034
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 28 Jun 2016 16:59:49 +0000 (16:59 +0000)]
AMDGPU: Remove unused function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274033
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Tue, 28 Jun 2016 16:12:24 +0000 (16:12 +0000)]
[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
Vedant Kumar [Tue, 28 Jun 2016 16:12:20 +0000 (16:12 +0000)]
[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
Vedant Kumar [Tue, 28 Jun 2016 16:12:18 +0000 (16:12 +0000)]
[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
Vedant Kumar [Tue, 28 Jun 2016 16:12:15 +0000 (16:12 +0000)]
[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
Vedant Kumar [Tue, 28 Jun 2016 16:12:12 +0000 (16:12 +0000)]
[llvm-cov] Move a check into a helper method (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274025
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 28 Jun 2016 16:04:46 +0000 (16:04 +0000)]
[X86] Make WRPKRU/RDPKRU pass -verify-machineinstrs
The original implementation attempted to zero registers using
XOR %foo, %foo. This is problematic because it constitutes a
read-modify-write of a register which might not be defined.
Instead, use MOV32r0 to avoid these problems; expandPostRAPseudo does
the right thing here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274024
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 28 Jun 2016 15:38:13 +0000 (15:38 +0000)]
Don't pass a Reloc::Model to GVIsIndirectSymbol.
It already has access to it.
While at it, rename it to isGVIndirectSymbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274023
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 28 Jun 2016 15:18:26 +0000 (15:18 +0000)]
Don't pass Reloc::Model to places that already have it. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274022
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 28 Jun 2016 14:33:28 +0000 (14:33 +0000)]
Convert more cases to isPositionIndependent(). NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274021
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 28 Jun 2016 14:26:39 +0000 (14:26 +0000)]
Delete dead code. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274020
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcin Koscielnicki [Tue, 28 Jun 2016 14:13:11 +0000 (14:13 +0000)]
[SystemZ] Save/restore r6 and r7 if function contains landing pad.
This fixes PR27102.
Differential Revision: http://reviews.llvm.org/D18541
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274017
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 28 Jun 2016 13:24:05 +0000 (13:24 +0000)]
[X86][AVX] Peek through bitcasts to find the source of broadcasts (reapplied)
AVX1 can only broadcast vectors as floats/doubles, so for 256-bit vectors we insert bitcasts if we are shuffling v8i32/v4i64 types. Unfortunately the presence of these bitcasts prevents the current broadcast lowering code from peeking through cases where we have concatenated / extracted vectors to create the 256-bit vectors.
This patch allows us to peek through bitcasts as long as the number of elements doesn't change (i.e. element bitwidth is the same) so the broadcast index is not affected.
Note this bitcast peek is different from the stage later on which doesn't care about the type and is just trying to find a load node.
As we're being more aggressive with bitcasts, we also need to ensure that the broadcast type is correctly bitcasted
Differential Revision: http://reviews.llvm.org/D21660
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274013
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 28 Jun 2016 12:55:35 +0000 (12:55 +0000)]
Fix "not all control paths return a value" warning on MSVC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274011
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 28 Jun 2016 12:49:12 +0000 (12:49 +0000)]
Convert 2 more uses to shouldAssumeDSOLocal(). NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274009
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 28 Jun 2016 12:34:44 +0000 (12:34 +0000)]
Fixed MSVC unresolved symbol error due to an incorrectly declared extern
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274007
91177308-0d34-0410-b5e6-
96231b3b80d8
Vassil Vassilev [Tue, 28 Jun 2016 12:27:09 +0000 (12:27 +0000)]
[modules] Separate intrinsic_gen dependent headers from module LLVM_IR.
Some headers in IR depend on tablegen generated code. Modules builds triggered
generation of the LLVM_IR module (including headers dependant on intrinsic_gen),
imposing a unnecessary build dependency.
Reviewed by Richard Smith.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274006
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 28 Jun 2016 12:25:00 +0000 (12:25 +0000)]
Use isPositionIndependent(). NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274005
91177308-0d34-0410-b5e6-
96231b3b80d8
Vassil Vassilev [Tue, 28 Jun 2016 12:17:05 +0000 (12:17 +0000)]
Add missing includes.
Patch by Cristina Cristescu.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274004
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnaud A. de Grandmaison [Tue, 28 Jun 2016 08:12:09 +0000 (08:12 +0000)]
[gold] Really fix test to run on non x86 platforms.
Address post-commit comment from H.J. Lu.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274000
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 28 Jun 2016 08:08:15 +0000 (08:08 +0000)]
[X86][SSE] Added support for combining target shuffles to (V)PSHUFD/VPERMILPD/VPERMILPS immediate permutes
This patch allows target shuffles to be combined to single input immediate permute instructions - (V)PSHUFD/VPERMILPD/VPERMILPS - allowing more general pattern matching than what we current do and improves the likelihood of memory folding compared to existing patterns which tend to reuse the input in multiple arguments.
Further permute instructions (V)PSHUFLW/(V)PSHUFHW/(V)PERMQ/(V)PERMPD may be added in the future but its proven tricky to create tests cases for them so far. (V)PSHUFLW/(V)PSHUFHW is already handled quite well in combineTargetShuffle so it may be that removing some of that code may allow us to perform more of the combining in one place without duplication.
Differential Revision: http://reviews.llvm.org/D21148
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273999
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Tue, 28 Jun 2016 06:58:21 +0000 (06:58 +0000)]
[BFI/MBFI]: cfg graph view with color scheme
This patch enhances dot graph viewer to show hot regions
with hot bbs/edges displayed in red. The ratio of the bb
freq to the max freq of the function needs to be no less
than the value specified by view-hot-freq-percent option.
The default value is 10 (i.e. 10%).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273996
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Tue, 28 Jun 2016 06:25:38 +0000 (06:25 +0000)]
[X86 Target Lowering] Merged ICMP test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273995
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Tue, 28 Jun 2016 04:07:03 +0000 (04:07 +0000)]
[BFI]: enhance BFI graph dump
MBFI supports profile count dumping and function
name based filtering. Add these two feature to
BFI as well. The filtering option is shared between
BFI and MBFI: -view-bfi-func-name=..
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273992
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Tue, 28 Jun 2016 04:02:47 +0000 (04:02 +0000)]
[LLE] Don't hoist conditionally executed loads
If the load is conditional we can't hoist its 0-iteration instance to
the preheader because that would make it unconditional. Thus we would
access a memory location that the original loop did not access.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273991
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Tue, 28 Jun 2016 03:41:29 +0000 (03:41 +0000)]
[BFI]: graph viewer code refactoring
BFI and MBFI's dot traits class share most of the
code and all future enhancement. This patch extracts
common implementation into base class BFIDOTGraphTraitsBase.
This patch also enables BFI graph to show branch probability
on edges as MBFI does before.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273990
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Tue, 28 Jun 2016 03:37:56 +0000 (03:37 +0000)]
[llvm-cov] Simplify; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273988
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Tue, 28 Jun 2016 02:09:39 +0000 (02:09 +0000)]
Reapply "[llvm-cov] Add an -output-dir option for the show sub-command""
Passing -output-dir path/to/dir to llvm-cov show creates path/to/dir if
it doesn't already exist, and prints reports into that directory.
In function view mode, all views are written into
path/to/dir/functions.$EXTENSION. In file view mode, all views are
written into path/to/dir/coverage/$PATH.$EXTENSION.
Changes since the initial commit:
- Avoid accidentally closing stdout twice.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273985
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 28 Jun 2016 01:45:05 +0000 (01:45 +0000)]
NFC. Fix popular typo in comment 'deferencing' --> 'dereferencing'.
Bonus changes, * placement in X86ISelLowering and 'exerce' -> 'exercise' in test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273984
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Tue, 28 Jun 2016 01:14:04 +0000 (01:14 +0000)]
Revert "[llvm-cov] Add an -output-dir option for the show sub-command"
This reverts commit r273971. test/profile/instrprof-visibility.cpp is
failing because of an uncaught error in SafelyCloseFileDescriptor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273978
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 28 Jun 2016 01:09:00 +0000 (01:09 +0000)]
AMDGPU: Fix out of bounds indirect indexing errors
This was producing acceses to registers beyond the super
register's limits, resulting in verifier failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273977
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Tue, 28 Jun 2016 00:54:33 +0000 (00:54 +0000)]
AArch64: Remove unnecessary namespace llvm; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273975
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Tue, 28 Jun 2016 00:54:12 +0000 (00:54 +0000)]
[PM] Normalize FIXMEs for missing PreserveCFG to have the same wording.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273974
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 28 Jun 2016 00:38:42 +0000 (00:38 +0000)]
[PM] Sink the module parsing from the fixture to the test as subsequent
tests will want different IR.
Wanted this when writing tests for the proposed CG update stuff, and
this is an easily separable piece.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273973
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Tue, 28 Jun 2016 00:18:57 +0000 (00:18 +0000)]
[llvm-cov] Add an -output-dir option for the show sub-command
Passing -output-dir path/to/dir to llvm-cov show creates path/to/dir if
it doesn't already exist, and prints reports into that directory.
In function view mode, all views are written into
path/to/dir/functions.$EXTENSION. In file view mode, all views are
written into path/to/dir/coverage/$PATH.$EXTENSION.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273971
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Tue, 28 Jun 2016 00:18:53 +0000 (00:18 +0000)]
[llvm-cov] Use -check-prefixes in a test (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273970
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Tue, 28 Jun 2016 00:18:51 +0000 (00:18 +0000)]
[llvm-cov] clang-format a line, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273969
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Tue, 28 Jun 2016 00:15:54 +0000 (00:15 +0000)]
[llvm-cov] Add a format option for the 'show' sub-command (mostly NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273968
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Tue, 28 Jun 2016 00:15:45 +0000 (00:15 +0000)]
[BFI]: code cleanup
Expose getBPI interface from BFI impl and use
it in graph viewer. This eliminates the dependency
on old PM interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273967
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Tue, 28 Jun 2016 00:14:09 +0000 (00:14 +0000)]
Remove stray comment. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273966
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 28 Jun 2016 00:11:26 +0000 (00:11 +0000)]
AMDGPU: Fix global isel build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273964
91177308-0d34-0410-b5e6-
96231b3b80d8
Wolfgang Pieb [Mon, 27 Jun 2016 23:59:00 +0000 (23:59 +0000)]
Document the ability to perform multi-line pattern matching in FileCheck.
Differential review: http://reviews.llvm.org/D21522
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273962
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 27 Jun 2016 23:26:08 +0000 (23:26 +0000)]
[PM] Improve the debugging and logging facilities of the CGSCC bits of
the new pass manager.
This adds operator<< overloads for the various bits of the
LazyCallGraph, dump methods for use from the debugger, and debug logging
using them to the CGSCC pass manager.
Having this was essential for debugging the call graph update patch, and
I've extracted what I could from that patch here to minimize the delta.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273961
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 27 Jun 2016 23:21:07 +0000 (23:21 +0000)]
Fix typo.
Thanks to Benjamin Kramer for noticing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273959
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 27 Jun 2016 23:15:57 +0000 (23:15 +0000)]
Move shouldAssumeDSOLocal to Target.
Should fix the shared library build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273958
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Mon, 27 Jun 2016 22:50:01 +0000 (22:50 +0000)]
[CFLAA] Make MSVC happy. NFC.
Apparently, MSVC complains if there's an implicit conversion from
`unsigned` to `unsigned long long`, if the `unsigned` is the result of
a bit shift.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273955
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Mon, 27 Jun 2016 22:41:52 +0000 (22:41 +0000)]
[MC] Garbage collect dead API: createELFObjectTargetWriter().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273953
91177308-0d34-0410-b5e6-
96231b3b80d8
Easwaran Raman [Mon, 27 Jun 2016 22:31:53 +0000 (22:31 +0000)]
Fix size computation of array allocation in inline cost analysis
Differential revision: http://reviews.llvm.org/D21690
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273952
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 27 Jun 2016 22:27:11 +0000 (22:27 +0000)]
[InstCombine] shrink type of sdiv if dividend is sexted and constant divisor is small enough (PR28153)
This should fix PR28153:
https://llvm.org/bugs/show_bug.cgi?id=28153
Differential Revision: http://reviews.llvm.org/D21769
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273951
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Dewhurst [Mon, 27 Jun 2016 22:11:09 +0000 (22:11 +0000)]
[Sparc] Atomics pass changes to make work with SparcV8 back-ends.
This change reverts a "false" test that was placed to avoid regressions while the atomics pass was completed for the Sparc back-ends.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273949
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 27 Jun 2016 21:42:49 +0000 (21:42 +0000)]
AMDGPU: Set MinInstAlignment
Not sure this actually changes anything
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273947
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Mon, 27 Jun 2016 21:39:39 +0000 (21:39 +0000)]
Change all but the last ErrorOr<...> use for MachOUniversalBinary to Expected<...> to
allow a good error message to be produced.
I added the one test case that the object file tools could produce an error
message. The other two errors can’t be triggered if the input file is passed
through sys::fs::identify_magic(). But the malformedError("bad magic number")
does get triggered by the logic in llvm-dsymutil when dealing with a normal
Mach-O file. The other "File too small ..." error would take a logic error
currently to produce and is not tested for.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273946
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 27 Jun 2016 21:33:08 +0000 (21:33 +0000)]
Convert a few more comparisons to isPositionIndependent(). NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273945
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 27 Jun 2016 21:09:14 +0000 (21:09 +0000)]
Delete the IsStatic predicate.
In all its uses it was equivalent to IsNotPIC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273943
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 27 Jun 2016 20:48:03 +0000 (20:48 +0000)]
AMDGPU: Implement per-function subtargets
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273940
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Mon, 27 Jun 2016 20:38:39 +0000 (20:38 +0000)]
[llvm-ar] Ignore -plugin option.
binutils ar uses -plugin to specify the LTO plugin, but LLVM doesn't
need this as it doesn't use a plugin for LTO. Accepting (and ignoring)
the option allows interoperability with existing build systems and
make downstream consumers life much easier.
No objections from Rafael on this change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273938
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 27 Jun 2016 20:32:13 +0000 (20:32 +0000)]
AMDGPU: Move subtarget feature checks into passes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273937
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 27 Jun 2016 20:28:59 +0000 (20:28 +0000)]
add tests for PR28153
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273936
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Mon, 27 Jun 2016 20:22:22 +0000 (20:22 +0000)]
Only emit extension for zeroext/signext arguments if type is < 32 bits
Reviewers: jingyue, jlebar
Subscribers: jholewinski
Differential Revision: http://reviews.llvm.org/D21756
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273922
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 27 Jun 2016 20:19:14 +0000 (20:19 +0000)]
Teach shouldAssumeDSOLocal about tls.
Fixes a fixme about handling other visibilities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273921
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Mon, 27 Jun 2016 20:07:00 +0000 (20:07 +0000)]
Fixed crash of SLP Vectorizer on KNL
The bug is connected to vector GEPs.
https://llvm.org/bugs/show_bug.cgi?id=28313
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273919
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Mon, 27 Jun 2016 20:02:49 +0000 (20:02 +0000)]
[yaml2obj] Missed updating a few test cases in r273915
This should fix the broken bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273918
91177308-0d34-0410-b5e6-
96231b3b80d8