1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 05:23:45 +02:00
Commit Graph

132938 Commits

Author SHA1 Message Date
Sanjay Patel
7c1912623f update test to FileCheck
llvm-svn: 271837
2016-06-05 16:29:15 +00:00
Simon Pilgrim
585db6f6c3 [X86][XOP] Added VPERMIL2PD/VPERMIL2PS raw mask decoding for target shuffle combines
llvm-svn: 271834
2016-06-05 15:21:30 +00:00
Simon Pilgrim
94a9893eda [X86][XOP] Added VPERMIL2PD/VPERMIL2PS as a target shuffle type
llvm-svn: 271831
2016-06-05 15:01:45 +00:00
Simon Pilgrim
8b04898abe [X86][XOP] Tidied up DecodeVPERMIL2PMask to more closely match DecodeVPERMILPMask.
llvm-svn: 271830
2016-06-05 14:33:43 +00:00
Craig Topper
2249826460 [AVX512] Add support for lowering PALIGNR for v64i8.
Could do this for other types to, but this is what's needed to replace the instrinsic with native IR in clang.

llvm-svn: 271828
2016-06-05 06:29:12 +00:00
Craig Topper
47e5abb616 [AVX512] Split command lines and regenerate a test to prepare for a future commit.
llvm-svn: 271827
2016-06-05 06:29:08 +00:00
Craig Topper
d8c697aad5 [AVX512] Fix PANDN combining for v4i32/v8i32 when VLX is enabled.
v4i32/v8i32 ANDs aren't promoted to v2i64/v4i64 when VLX is enabled.

llvm-svn: 271826
2016-06-05 05:35:11 +00:00
Xinliang David Li
6326853102 Fix wrong comment in header /NFC
llvm-svn: 271825
2016-06-05 05:18:20 +00:00
Xinliang David Li
27d32c7208 Fix pass declaration order /NFC
llvm-svn: 271824
2016-06-05 05:15:45 +00:00
Xinliang David Li
a585afd293 [PM] Port GCOVProfiler pass to the new pass manager
llvm-svn: 271823
2016-06-05 05:12:23 +00:00
Xinliang David Li
73b5d1e27d [PM] code refactoring /NFC
llvm-svn: 271822
2016-06-05 03:40:03 +00:00
Chandler Carruth
c6ece6bf3b Disable the use of std::call_once on PowerPC due to an apparent bug in
libstdc++ (or in compilers, or somewhere, I can't track it down) that
causes unittests that use INITIALIZE_PASS to crash.

The analysis I've been able to do is that inside libstdc++'s
implementation of std::call_once, it uses pthread_once, and when that
returns an error code it throws std::system_error which then eventually
calls std::terminate.

Hopefully some of the folks who work on PPC can try to sort out what's
going on here. Until then, they'll have to use the fallback
implementation.

llvm-svn: 271821
2016-06-05 02:46:01 +00:00
NAKAMURA Takumi
37b3d11aec Threading.h: Update \param. [-Wdocumentation]
llvm-svn: 271819
2016-06-05 00:15:44 +00:00
Sanjay Patel
11b22015f7 [InstCombine] less 'CI' confusion; NFC
Change the name of the ICmpInst to 'ICmp' and the Constant (was a ConstantInt) to 'C',
so that it's hopefully clearer that 'CI' refers to CastInst in this context.

While we're scrubbing, fix the documentation comment and use 'auto' with 'dyn_cast'.

llvm-svn: 271817
2016-06-05 00:12:32 +00:00
David Majnemer
3c5fa38a11 [SimplifyCFG] Don't kill empty cleanuppads with multiple uses
A basic block could contain:
  %cp = cleanuppad []
  cleanupret from %cp unwind to caller

This basic block is empty and is thus a candidate for removal.  However,
there can be other uses of %cp outside of this basic block.  This is
only possible in unreachable blocks.

Make our transform more correct by checking that the pad has a single
user before removing the BB.

This fixes PR28005.

llvm-svn: 271816
2016-06-04 23:50:03 +00:00
David Majnemer
6972cf3620 [DebugInfo, PDB] Use sparse bitfields for the name map
The name map might not be densely packed on disk.  Using a sparse map
will save memory in such situations.

llvm-svn: 271811
2016-06-04 22:47:39 +00:00
Sanjay Patel
dad6c47e6b [InstCombine] allow vector constants for cast+icmp fold
This is step 1 of unknown towards fixing PR28001:
https://llvm.org/bugs/show_bug.cgi?id=28001

llvm-svn: 271810
2016-06-04 22:04:05 +00:00
Simon Pilgrim
2edc73fed4 [X86][XOP] Added VPERMIL2PD/VPERMIL2PS shuffle mask comment decoding
llvm-svn: 271809
2016-06-04 21:44:28 +00:00
Sanjay Patel
a7b7945972 [InstCombine] add test for missing vector optimization
llvm-svn: 271808
2016-06-04 21:41:25 +00:00
Sanjay Patel
6ada1cf739 clean-up; NFC
llvm-svn: 271807
2016-06-04 21:20:44 +00:00
Sanjay Patel
b44cf32fc9 [InstCombine] add test for missing vector optimization
llvm-svn: 271806
2016-06-04 21:20:03 +00:00
Sanjay Patel
9fa8579461 [InstCombine] minimize test case and use FileCheck
llvm-svn: 271805
2016-06-04 21:04:59 +00:00
Sanjay Patel
1388784f5b fix formatting, punctuation; NFC
llvm-svn: 271804
2016-06-04 20:39:22 +00:00
Simon Pilgrim
dde840bfa3 [Analysis] Enabled BITREVERSE as a vectorizable intrinsic
Allows XOP to vectorize BITREVERSE - other targets will follow as their costmodels improve.

llvm-svn: 271803
2016-06-04 20:21:07 +00:00
Craig Topper
1f8b674ca2 [X86] Add the VR128L/H and VR256L/H to the list of vector register classes for inline asm constraints. Also fix the comment on the function.
llvm-svn: 271802
2016-06-04 20:15:08 +00:00
Chandler Carruth
d7aa55c96c [LPM] Reinstate r271781 which reinstated r271652 to replace the
CALL_ONCE_... macro in the legacy pass manager with the new
llvm::call_once facility.

Nothing changed sicne the last attempt in r271781 which I reverted in
r271788. At least one of the failures I saw was spurious, and I want to
make sure the other failures are real before I work around them -- they
appeared to only effect ppc64le and ppc64be.

Original commit message of r271781:
----
[LPM] Reinstate r271652 to replace the CALL_ONCE_... macro in the legacy
pass manager with the new llvm::call_once facility.

This reverts commit r271657 and re-applies r271652 with a fix to
actually work with arguments. In the original version, we just ended up
directly calling std::call_once via ADL because of the std::once_flag
argument. The llvm::call_once never worked with arguments. Now,
llvm::call_once is a variadic template that perfectly forwards
everything. As a part of this it had to move to the header and we use
a generic functor rather than an explict function pointer. It would be
nice to use std::invoke here but we don't have it yet. That means
pointer to members won't work here, but that seems a tolerable
compromise.

I've also tested this by forcing the fallback path, so hopefully it
sticks this time.
----

Original commit message of r271652:
----
[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.
----

llvm-svn: 271800
2016-06-04 19:57:55 +00:00
Saleem Abdulrasool
f999318a81 X86: enable TLS on Windows itanium
Windows itanium is nearly identical to windows-msvc (MS ABI for C, itanium for
C++).  Enable the TLS support for the target similar to the MSVC model.

llvm-svn: 271797
2016-06-04 18:27:22 +00:00
Simon Pilgrim
73aea916e6 [X86][AVX2] Fix v16i16 SHL lowering (PR27730)
The AVX2 v16i16 shift lowering works by unpacking to 2 x v8i32, performing the shift and then truncating the result.

The unpacking is used to place the values in the upper 16-bits so that we can correctly sign-extend for SRA shifts. Unfortunately we weren't ensuring that the lower 16-bits were zero to ensure that SHL correctly shifts in zero bits.

llvm-svn: 271796
2016-06-04 16:45:33 +00:00
David Majnemer
37e7fb37c7 [AsmPrinter, CodeView] There are some more ways of getting wchar_t
C++ has a builtin type called wchar_t.  Clang also provides a type
called __wchar_t in C mode.

In C mode, wchar_t can be a typedef to unsigned short.

llvm-svn: 271793
2016-06-04 15:40:33 +00:00
David Majnemer
08e81eef3f [CodeView] Fix a busted assert in TypeTableBuilder::writeClass
It was checking for Union when it should have checked for Interface.

llvm-svn: 271792
2016-06-04 15:40:31 +00:00
David Majnemer
838aba6c09 [CodeView] Validate the vftable offset
llvm-svn: 271791
2016-06-04 15:40:29 +00:00
David Majnemer
3e22310a07 [TypeStreamMerger] visitUnknownMember was supposed to be visitUnknownType
llvm-svn: 271790
2016-06-04 15:40:27 +00:00
Simon Pilgrim
c995ee7b75 [InstCombine][MMX] Extend SimplifyDemandedUseBits MOVMSK support to MMX
Add the MMX implementation to the SimplifyDemandedUseBits SSE/AVX MOVMSK support added in D19614

Requires a minor tweak as llvm.x86.mmx.pmovmskb takes a x86_mmx argument - so we have to be explicit about the implied v8i8 vector type.

llvm-svn: 271789
2016-06-04 13:42:46 +00:00
Chandler Carruth
46f3fd369e [LPM] Revert r271781 which was a re-commit of r271652.
There appears to be a strange exception thrown and crash using call_once
on a PPC build bot, and a *really* weird windows link error for
GCMetadata.obj. Still need to investigate the cause of both problems.

Original change summary:
[LPM] Reinstate r271652 to replace the CALL_ONCE_... macro in the legacy
pass manager with the new llvm::call_once facility.

llvm-svn: 271788
2016-06-04 09:36:40 +00:00
Chandler Carruth
39d7104d20 [LPM] Reinstate r271652 to replace the CALL_ONCE_... macro in the legacy
pass manager with the new llvm::call_once facility.

This reverts commit r271657 and re-applies r271652 with a fix to
actually work with arguments. In the original version, we just ended up
directly calling std::call_once via ADL because of the std::once_flag
argument. The llvm::call_once never worked with arguments. Now,
llvm::call_once is a variadic template that perfectly forwards
everything. As a part of this it had to move to the header and we use
a generic functor rather than an explict function pointer. It would be
nice to use std::invoke here but we don't have it yet. That means
pointer to members won't work here, but that seems a tolerable
compromise.

I've also tested this by forcing the fallback path, so hopefully it
sticks this time.

Original commit message:
----
[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.

llvm-svn: 271781
2016-06-04 07:25:44 +00:00
Craig Topper
460aabc61f [X86] Use smaller types to shrink the intrinsic lowering tables by about 12K.
llvm-svn: 271776
2016-06-04 04:32:17 +00:00
Craig Topper
c89131380e [X86] Use X86ISD::ABS for lowering pabs SSSE3/AVX intrinsics to match AVX512. Should allow those intrinsics to use the EVEX encoded instructions and get the extra registers when available.
llvm-svn: 271775
2016-06-04 04:32:15 +00:00
Petr Hosek
d42b0273f8 [MC] Check the upper bound in truncate assertion
The truncateToSize function already has assertion to check the
lower boundary for the number bytes, but it does not check the
upper boundary which could still lead to usage errors.

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

llvm-svn: 271773
2016-06-04 04:02:18 +00:00
Taewook Oh
798fe72f38 Revert commit r271704, a patch that enables warnings for non-portable #include and #import paths (Corresponding clang patch has been reverted by r271761). Patches are reverted because they generate lots of unadressable warnings for windows and fail tests under ASAN.
llvm-svn: 271764
2016-06-04 03:36:12 +00:00
Chandler Carruth
29e3ce3cdf [sancov] Revert r271695 which broke all of the PPC bots.
Original commit message:
[sancov] Run sancov tests on more platforms

The only tests that need to be run on Linux are the ones that use C++
demangling. I'm assuming they will fail on Mac, since __cxa_demangle
there won't handle the non-double-underscore prefixed mangled names.

llvm-svn: 271763
2016-06-04 03:28:27 +00:00
Chandler Carruth
85f0f82387 [llvm-profdata] Revert r271709 and the 3 subsequent commits - the code
and/or tests aren't working on Windows currently.

There seems to be some problem with quoting the file paths. I don't
understand the test structure here or the code well enough to try to
come up with a way to correctly handle paths with back slashes in them,
and this has caused the Windows builds to be failing for 7 hours now, so
I'm reverting the whole thing to bring them back to life. Sorry for the
disruption, but a couple of these were bug fixes anyways that can be
folded into a fresh commit.

Reverts the following patches:

r271756: Clean up the way we create the input filenames buffer (NFC)
r271748: Fix use-after-free from discarded MemoryBuffer (NFC)
r271710: Fix option description (NFC)
r271709: Add option to ingest filepaths from a file
llvm-svn: 271760
2016-06-04 03:08:01 +00:00
Devin Coughlin
9a58e5e9f3 STLExtras: Add convenience is_contained() function.
This commit adds a convenience is_contained() function
which checks if an element exists in a container. It is part of a larger
series of patches adding an MPI checker to the clang static analyzer.

Reviewers: dblaikie,bkramer

A patch by Alexander Droste!

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

llvm-svn: 271757
2016-06-04 00:49:46 +00:00
Vedant Kumar
bdf8e4b9f9 [llvm-profdata] Clean up the way we create the input filenames buffer (NFC)
Create the buffer before calling parseInputFilenamesFile(), and add a
comment explaining why this is done.

Thanks to David Li for the suggestion!

llvm-svn: 271756
2016-06-04 00:36:28 +00:00
Bruno Cardoso Lopes
396da704c4 [LockFileManager] Improve error output by using better error messages
This is currently used by clang to lock access to modules; improve the
error message so that clang can use better output messages from locking
error issues.

rdar://problem/26529101

Differential Review: http://reviews.llvm.org/D20942

llvm-svn: 271755
2016-06-04 00:34:00 +00:00
Adrian Prantl
718ab049bc Testcase cleanup: Remove a redundant test input.
llvm-svn: 271753
2016-06-04 00:10:17 +00:00
Matthias Braun
64003711e2 MIR: Support MachineMemOperands without associated value
This is allowed (though used rarely) and useful to keep your tests
short.

llvm-svn: 271752
2016-06-04 00:06:31 +00:00
Xinliang David Li
c1bc30f856 Replace hard coded probability threshold with parameter /NFC
llvm-svn: 271751
2016-06-03 23:48:36 +00:00
Vedant Kumar
56ea31445a [llvm-profdata] Fix use-after-free from discarded MemoryBuffer (NFC)
Thanks to Justin Bogner for pointing this out!

Caught by ASAN.

llvm-svn: 271748
2016-06-03 23:12:38 +00:00
Xinliang David Li
af3cf63542 [pgo] extend r271532 to darwin platform
llvm-svn: 271746
2016-06-03 23:02:28 +00:00
Easwaran Raman
60d682daa9 Reapply r271728 after adding move cobstructor for ProfileSummaryInfo
llvm-svn: 271745
2016-06-03 22:54:26 +00:00