134432 Commits

Author SHA1 Message Date
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
Vedant Kumar
e017372fb5 [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
2016-06-28 16:12:12 +00:00
David Majnemer
89493fda7e [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
2016-06-28 16:04:46 +00:00
Rafael Espindola
eeeea1e6dc 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
2016-06-28 15:38:13 +00:00
Rafael Espindola
b13ddb18db 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
2016-06-28 15:18:26 +00:00
Rafael Espindola
3315ba73c8 Convert more cases to isPositionIndependent(). NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274021 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 14:33:28 +00:00
Rafael Espindola
a57faa40c2 Delete dead code. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274020 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 14:26:39 +00:00
Marcin Koscielnicki
6a26759b4c [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
2016-06-28 14:13:11 +00:00
Simon Pilgrim
93497543cc [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
2016-06-28 13:24:05 +00:00
Simon Pilgrim
7b928ec61c 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
2016-06-28 12:55:35 +00:00
Rafael Espindola
05bd016f73 Convert 2 more uses to shouldAssumeDSOLocal(). NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274009 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 12:49:12 +00:00
Simon Pilgrim
970b0c8164 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
2016-06-28 12:34:44 +00:00
Vassil Vassilev
086367144d [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
2016-06-28 12:27:09 +00:00
Rafael Espindola
f62d1a880b Use isPositionIndependent(). NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274005 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 12:25:00 +00:00
Vassil Vassilev
eff905a676 Add missing includes.
Patch by Cristina Cristescu.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274004 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 12:17:05 +00:00
Arnaud A. de Grandmaison
6a84436d51 [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
2016-06-28 08:12:09 +00:00
Simon Pilgrim
f5d0848f55 [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
2016-06-28 08:08:15 +00:00
Xinliang David Li
cc075cf619 [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
2016-06-28 06:58:21 +00:00
Elena Demikhovsky
514f9dc33c [X86 Target Lowering] Merged ICMP test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273995 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 06:25:38 +00:00
Xinliang David Li
f2c927d2a8 [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
2016-06-28 04:07:03 +00:00
Adam Nemet
b168c2514b [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
2016-06-28 04:02:47 +00:00
Xinliang David Li
6fff479973 [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
2016-06-28 03:41:29 +00:00
Vedant Kumar
edd67d643a [llvm-cov] Simplify; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273988 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 03:37:56 +00:00
Vedant Kumar
40a78f87a4 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
2016-06-28 02:09:39 +00:00
Nick Lewycky
9ad3314df4 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
2016-06-28 01:45:05 +00:00
Vedant Kumar
69821cb9ef 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
2016-06-28 01:14:04 +00:00
Matt Arsenault
1bf162a64a 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
2016-06-28 01:09:00 +00:00
Matthias Braun
aa99e51240 AArch64: Remove unnecessary namespace llvm; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273975 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 00:54:33 +00:00
Michael Kuperstein
ce2862caac [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
2016-06-28 00:54:12 +00:00
Chandler Carruth
5dcd187721 [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
2016-06-28 00:38:42 +00:00
Vedant Kumar
b979c03ac6 [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
2016-06-28 00:18:57 +00:00
Vedant Kumar
ba1a097676 [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
2016-06-28 00:18:53 +00:00
Vedant Kumar
aba058fe5f [llvm-cov] clang-format a line, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273969 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 00:18:51 +00:00
Vedant Kumar
0347ce77ea [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
2016-06-28 00:15:54 +00:00
Xinliang David Li
2aa8ecf9de [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
2016-06-28 00:15:45 +00:00
Michael Kuperstein
97b2584988 Remove stray comment. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273966 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 00:14:09 +00:00
Matt Arsenault
b0b8d0af0c AMDGPU: Fix global isel build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273964 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 00:11:26 +00:00
Wolfgang Pieb
f64136cb37 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
2016-06-27 23:59:00 +00:00
Chandler Carruth
77e165569e [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
2016-06-27 23:26:08 +00:00
Rafael Espindola
5e49c0d4a2 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
2016-06-27 23:21:07 +00:00
Rafael Espindola
d980ed0d00 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
2016-06-27 23:15:57 +00:00
George Burgess IV
bf8070b1e3 [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
2016-06-27 22:50:01 +00:00
Davide Italiano
27a476bdfa [MC] Garbage collect dead API: createELFObjectTargetWriter().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273953 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-27 22:41:52 +00:00
Easwaran Raman
a9324834d1 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
2016-06-27 22:31:53 +00:00
Sanjay Patel
230a1ede00 [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
2016-06-27 22:27:11 +00:00
Chris Dewhurst
95c869b234 [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
2016-06-27 22:11:09 +00:00
Matt Arsenault
e4c2111aa4 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
2016-06-27 21:42:49 +00:00