OSDN Git Service
Davide Italiano [Sun, 5 Jun 2016 19:08:54 +0000 (19:08 +0000)]
[Internalize] Test that __stack_chk_{guard, fail} are not internalized.
r154645 introduced this feature without test. This should have better
coverage now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271853
91177308-0d34-0410-b5e6-
96231b3b80d8
Filipe Cabecinhas [Sun, 5 Jun 2016 18:43:40 +0000 (18:43 +0000)]
[BitCode] Make sure atomicrmw's argument is an actual PointerType
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271851
91177308-0d34-0410-b5e6-
96231b3b80d8
Filipe Cabecinhas [Sun, 5 Jun 2016 18:43:33 +0000 (18:43 +0000)]
[BitCode] Make sure storeatomic's argument is an actual PointerType
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271850
91177308-0d34-0410-b5e6-
96231b3b80d8
Filipe Cabecinhas [Sun, 5 Jun 2016 18:43:26 +0000 (18:43 +0000)]
[BitCode] Diagnose GEPs with no indices
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271849
91177308-0d34-0410-b5e6-
96231b3b80d8
Filipe Cabecinhas [Sun, 5 Jun 2016 18:43:17 +0000 (18:43 +0000)]
[BitCode] Don't allow constants of void type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271848
91177308-0d34-0410-b5e6-
96231b3b80d8
Mike Spertus [Sun, 5 Jun 2016 18:34:02 +0000 (18:34 +0000)]
Add Visual Studio Visualizer for ArrayRef
Modeled after visualization of llvm::SmallVec
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271847
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Sun, 5 Jun 2016 18:01:19 +0000 (18:01 +0000)]
[PM] Port IndVarSimplify to the new pass manager
Summary:
There are some rough corners, since the new pass manager doesn't have
(as far as I can tell) LoopSimplify and LCSSA, so I've updated the
tests to run them separately in the old pass manager in the lit tests.
We also don't have an equivalent for AU.setPreservesCFG() in the new
pass manager, so I've left a FIXME.
Reviewers: bogner, chandlerc, davide
Subscribers: sanjoy, mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D20783
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271846
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Sun, 5 Jun 2016 18:01:12 +0000 (18:01 +0000)]
[IndVars] Remove -liv-reduce
It is an off-by-default option that no one seems to use[0], and given
that SCEV directly understands the overflow instrinsics there is no real
need for it anymore.
[0]: http://lists.llvm.org/pipermail/llvm-dev/2016-April/098181.html
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271845
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 5 Jun 2016 17:54:56 +0000 (17:54 +0000)]
fix checks
update_test_checks.py got confused matching the variable names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271844
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 5 Jun 2016 17:49:45 +0000 (17:49 +0000)]
[InstCombine] allow vector icmp bool transforms
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271843
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 5 Jun 2016 17:32:58 +0000 (17:32 +0000)]
add tests to show missing vector transforms
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271842
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 5 Jun 2016 17:29:45 +0000 (17:29 +0000)]
regenerate checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271841
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 5 Jun 2016 17:13:09 +0000 (17:13 +0000)]
update test to use FileCheck
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271840
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 5 Jun 2016 16:46:18 +0000 (16:46 +0000)]
fix documentation comments and other clean-ups; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271839
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 5 Jun 2016 16:41:20 +0000 (16:41 +0000)]
update test to use FileCheck
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271838
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 5 Jun 2016 16:29:15 +0000 (16:29 +0000)]
update test to FileCheck
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271837
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 5 Jun 2016 15:21:30 +0000 (15:21 +0000)]
[X86][XOP] Added VPERMIL2PD/VPERMIL2PS raw mask decoding for target shuffle combines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271834
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 5 Jun 2016 15:01:45 +0000 (15:01 +0000)]
[X86][XOP] Added VPERMIL2PD/VPERMIL2PS as a target shuffle type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271831
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 5 Jun 2016 14:33:43 +0000 (14:33 +0000)]
[X86][XOP] Tidied up DecodeVPERMIL2PMask to more closely match DecodeVPERMILPMask.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271830
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 5 Jun 2016 06:29:12 +0000 (06:29 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271828
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 5 Jun 2016 06:29:08 +0000 (06:29 +0000)]
[AVX512] Split command lines and regenerate a test to prepare for a future commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271827
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 5 Jun 2016 05:35:11 +0000 (05:35 +0000)]
[AVX512] Fix PANDN combining for v4i32/v8i32 when VLX is enabled.
v4i32/v8i32 ANDs aren't promoted to v2i64/v4i64 when VLX is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271826
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Sun, 5 Jun 2016 05:18:20 +0000 (05:18 +0000)]
Fix wrong comment in header /NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271825
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Sun, 5 Jun 2016 05:15:45 +0000 (05:15 +0000)]
Fix pass declaration order /NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271824
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Sun, 5 Jun 2016 05:12:23 +0000 (05:12 +0000)]
[PM] Port GCOVProfiler pass to the new pass manager
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271823
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Sun, 5 Jun 2016 03:40:03 +0000 (03:40 +0000)]
[PM] code refactoring /NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271822
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 5 Jun 2016 02:46:01 +0000 (02:46 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271821
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 5 Jun 2016 00:15:44 +0000 (00:15 +0000)]
Threading.h: Update \param. [-Wdocumentation]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271819
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 5 Jun 2016 00:12:32 +0000 (00:12 +0000)]
[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'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271817
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sat, 4 Jun 2016 23:50:03 +0000 (23:50 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271816
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sat, 4 Jun 2016 22:47:39 +0000 (22:47 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271811
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sat, 4 Jun 2016 22:04:05 +0000 (22:04 +0000)]
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271810
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 4 Jun 2016 21:44:28 +0000 (21:44 +0000)]
[X86][XOP] Added VPERMIL2PD/VPERMIL2PS shuffle mask comment decoding
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271809
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sat, 4 Jun 2016 21:41:25 +0000 (21:41 +0000)]
[InstCombine] add test for missing vector optimization
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271808
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sat, 4 Jun 2016 21:20:44 +0000 (21:20 +0000)]
clean-up; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271807
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sat, 4 Jun 2016 21:20:03 +0000 (21:20 +0000)]
[InstCombine] add test for missing vector optimization
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271806
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sat, 4 Jun 2016 21:04:59 +0000 (21:04 +0000)]
[InstCombine] minimize test case and use FileCheck
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271805
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sat, 4 Jun 2016 20:39:22 +0000 (20:39 +0000)]
fix formatting, punctuation; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271804
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 4 Jun 2016 20:21:07 +0000 (20:21 +0000)]
[Analysis] Enabled BITREVERSE as a vectorizable intrinsic
Allows XOP to vectorize BITREVERSE - other targets will follow as their costmodels improve.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271803
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 4 Jun 2016 20:15:08 +0000 (20:15 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271802
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 4 Jun 2016 19:57:55 +0000 (19:57 +0000)]
[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.
----
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271800
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sat, 4 Jun 2016 18:27:22 +0000 (18:27 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271797
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 4 Jun 2016 16:45:33 +0000 (16:45 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271796
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sat, 4 Jun 2016 15:40:33 +0000 (15:40 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271793
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sat, 4 Jun 2016 15:40:31 +0000 (15:40 +0000)]
[CodeView] Fix a busted assert in TypeTableBuilder::writeClass
It was checking for Union when it should have checked for Interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271792
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sat, 4 Jun 2016 15:40:29 +0000 (15:40 +0000)]
[CodeView] Validate the vftable offset
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271791
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sat, 4 Jun 2016 15:40:27 +0000 (15:40 +0000)]
[TypeStreamMerger] visitUnknownMember was supposed to be visitUnknownType
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271790
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 4 Jun 2016 13:42:46 +0000 (13:42 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271789
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 4 Jun 2016 09:36:40 +0000 (09:36 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271788
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 4 Jun 2016 07:25:44 +0000 (07:25 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271781
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 4 Jun 2016 04:32:17 +0000 (04:32 +0000)]
[X86] Use smaller types to shrink the intrinsic lowering tables by about 12K.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271776
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 4 Jun 2016 04:32:15 +0000 (04:32 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271775
91177308-0d34-0410-b5e6-
96231b3b80d8
Petr Hosek [Sat, 4 Jun 2016 04:02:18 +0000 (04:02 +0000)]
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271773
91177308-0d34-0410-b5e6-
96231b3b80d8
Taewook Oh [Sat, 4 Jun 2016 03:36:12 +0000 (03:36 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271764
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 4 Jun 2016 03:28:27 +0000 (03:28 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271763
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 4 Jun 2016 03:08:01 +0000 (03:08 +0000)]
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271760
91177308-0d34-0410-b5e6-
96231b3b80d8
Devin Coughlin [Sat, 4 Jun 2016 00:49:46 +0000 (00:49 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271757
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Sat, 4 Jun 2016 00:36:28 +0000 (00:36 +0000)]
[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!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271756
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Sat, 4 Jun 2016 00:34:00 +0000 (00:34 +0000)]
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271755
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Sat, 4 Jun 2016 00:10:17 +0000 (00:10 +0000)]
Testcase cleanup: Remove a redundant test input.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271753
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Sat, 4 Jun 2016 00:06:31 +0000 (00:06 +0000)]
MIR: Support MachineMemOperands without associated value
This is allowed (though used rarely) and useful to keep your tests
short.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271752
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Fri, 3 Jun 2016 23:48:36 +0000 (23:48 +0000)]
Replace hard coded probability threshold with parameter /NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271751
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Fri, 3 Jun 2016 23:12:38 +0000 (23:12 +0000)]
[llvm-profdata] Fix use-after-free from discarded MemoryBuffer (NFC)
Thanks to Justin Bogner for pointing this out!
Caught by ASAN.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271748
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Fri, 3 Jun 2016 23:02:28 +0000 (23:02 +0000)]
[pgo] extend r271532 to darwin platform
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271746
91177308-0d34-0410-b5e6-
96231b3b80d8
Easwaran Raman [Fri, 3 Jun 2016 22:54:26 +0000 (22:54 +0000)]
Reapply r271728 after adding move cobstructor for ProfileSummaryInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271745
91177308-0d34-0410-b5e6-
96231b3b80d8
Derek Bruening [Fri, 3 Jun 2016 22:29:52 +0000 (22:29 +0000)]
[esan|wset] Optionally assume intra-cache-line accesses
Summary:
Adds an option -esan-assume-intra-cache-line which causes esan to assume
that a single memory access touches just one cache line, even if it is not
aligned, for better performance at a potential accuracy cost. Experiments
show that the performance difference can be 2x or more, and accuracy loss
is typically negligible, so we turn this on by default. This currently
applies just to the working set tool.
Reviewers: aizatsky
Subscribers: vitalybuka, zhaoqin, kcc, eugenis, llvm-commits
Differential Revision: http://reviews.llvm.org/D20978
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271743
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Fri, 3 Jun 2016 21:45:34 +0000 (21:45 +0000)]
Add a FIXME note in the release notes about documenting ThinLTO
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271742
91177308-0d34-0410-b5e6-
96231b3b80d8
Mike Aizatsky [Fri, 3 Jun 2016 21:34:29 +0000 (21:34 +0000)]
[libfuzzer] hiding custom mutator handling in MutationDispatcher.
Summary: Refactoring, no functional changes.
Differential Revision: http://reviews.llvm.org/D20975
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271740
91177308-0d34-0410-b5e6-
96231b3b80d8
Easwaran Raman [Fri, 3 Jun 2016 21:14:26 +0000 (21:14 +0000)]
Revert r271728 as it breaks Windows build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271738
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Fri, 3 Jun 2016 20:48:51 +0000 (20:48 +0000)]
pdbdump: print out TPI hashes.
Differential Revision: http://reviews.llvm.org/D20945
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271736
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Fri, 3 Jun 2016 20:47:40 +0000 (20:47 +0000)]
Re-apply "SDAG: Update ChainNodesMatched as nodes are deleted"
My first attempt at this had an overly aggressive assert - chain nodes
will only be removed, but we could hit the assert if a non-chain node
was CSE'd (NodeToMatch, for instance).
This reapplies r271706 by reverting r271713 and fixing an assert.
Original message:
Avoid relying on UB by looking into deleted nodes for a marker value.
Instead, update the list of chain nodes as we go.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271733
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Fri, 3 Jun 2016 20:46:32 +0000 (20:46 +0000)]
[ThinLTO/gold] Pass import lists by reference (NFC)
In my earlier patch r271690 I missed passing a map by reference in one
place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271732
91177308-0d34-0410-b5e6-
96231b3b80d8
Easwaran Raman [Fri, 3 Jun 2016 20:37:19 +0000 (20:37 +0000)]
Analysis pass to access profile summary info
Differential Revision: http://reviews.llvm.org/D20648
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271728
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 3 Jun 2016 20:29:51 +0000 (20:29 +0000)]
Fix non-Windows build when inserting a move only type into a map
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271727
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Fri, 3 Jun 2016 20:27:50 +0000 (20:27 +0000)]
[cpu-detection] Naming convention
Summary:
Follow-up to D20926 (committed as r271595, r271596).
This patch is in preparation for a substantial refactoring of the code.
No functionality changed.
Differential Revision: http://reviews.llvm.org/D20970
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271726
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 3 Jun 2016 20:25:09 +0000 (20:25 +0000)]
[Symbolize] Check if the PE file has a PDB and emit an error if we can't load it
Summary:
Previously we would try to load PDBs for every PE executable we tried to
symbolize. If that failed, we would fall back to DWARF. If there wasn't
any DWARF, we'd print mostly useless symbol information using the export
table.
With this change, we only try to load PDBs for executables that claim to
have them. If that fails, we can now print an error rather than falling
back silently. This should make it a lot easier to diagnose and fix
common symbolization issues, such as not having DIA or not having a PDB.
Reviewers: zturner, eugenis
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D20982
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271725
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 3 Jun 2016 20:11:09 +0000 (20:11 +0000)]
[AArch64] Move tests from r271677 to a more appropriately named file. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271718
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 3 Jun 2016 20:05:49 +0000 (20:05 +0000)]
[AArch64] Spot SBFX-compatible code expressed with sign_extend.
This is very similar to r271677, but for extracts from i32 with the SIGN_EXTEND
acting on a arithmetic shift.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271717
91177308-0d34-0410-b5e6-
96231b3b80d8
Derek Bruening [Fri, 3 Jun 2016 19:40:37 +0000 (19:40 +0000)]
[esan] Specify which tool via a global variable
Summary:
Adds a global variable to specify the tool, to support handling early
interceptors that invoke instrumented code and require shadow memory to be
initialized prior to __esan_init() being invoked.
Reviewers: aizatsky
Subscribers: vitalybuka, zhaoqin, kcc, eugenis, llvm-commits
Differential Revision: http://reviews.llvm.org/D20973
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271715
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Fri, 3 Jun 2016 19:40:06 +0000 (19:40 +0000)]
Revert "SDAG: Update ChainNodesMatched as nodes are deleted"
Seeing failures in CodeGen/Generic/icmp-illegal.ll on quite a few
bots.
This reverts r271706.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271713
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 3 Jun 2016 19:28:33 +0000 (19:28 +0000)]
[llvm-pdbdump] Introduce an abstraction for the output style.
This opens the door to introducing a YAML outputter which can be
used for machine consumption. Currently the yaml output style
is unimplemented and returns an error if you try to use it.
Reviewed By: rnk, ruiu
Differential Revision: http://reviews.llvm.org/D20967
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271712
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Fri, 3 Jun 2016 19:20:37 +0000 (19:20 +0000)]
Test commit. Removes some spaces. No functionality changed.
Summary:
Test commit. Removes some spaces.
No functionality changed.
Reviewers: llvm-commits
Differential Revision: http://reviews.llvm.org/D20972
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271711
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Fri, 3 Jun 2016 19:10:25 +0000 (19:10 +0000)]
[llvm-profdata] Fix option description (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271710
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Fri, 3 Jun 2016 19:05:20 +0000 (19:05 +0000)]
[llvm-profdata] Add option to ingest filepaths from a file
Differential Revision: http://reviews.llvm.org/D20980
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271709
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Fri, 3 Jun 2016 18:50:11 +0000 (18:50 +0000)]
SDAG: Update ChainNodesMatched as nodes are deleted
Avoid relying on UB by looking into deleted nodes for a marker value.
Instead, update the list of chain nodes as we go.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271706
91177308-0d34-0410-b5e6-
96231b3b80d8
Taewook Oh [Fri, 3 Jun 2016 18:38:39 +0000 (18:38 +0000)]
In openFileForRead, attempt to fetch the actual name of the file on disk -- including case -- so that clang can later warn about non-portable #include and #import directives.
Differential Revision: http://reviews.llvm.org/D19842
Patch by Eric Niebler
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271704
91177308-0d34-0410-b5e6-
96231b3b80d8
Derek Schuff [Fri, 3 Jun 2016 18:34:36 +0000 (18: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
Re-apply r271599 but instead of bailing with an error when a declared
function has multiple returns, replace it with a pointer argument. Also
add the test case I forgot to 'git add' last time around.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271703
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Fri, 3 Jun 2016 18:09:53 +0000 (18:09 +0000)]
SDAG: Replace some unreachable code with an assert. NFC
The current node shouldn't be (and isn't) removed partway through
selection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271699
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 3 Jun 2016 18:07:32 +0000 (18:07 +0000)]
[sancov] Disable these tests if there is no X86 backend
Copied from test/CodeGen/X86
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271698
91177308-0d34-0410-b5e6-
96231b3b80d8
Mike Aizatsky [Fri, 3 Jun 2016 18:05:22 +0000 (18:05 +0000)]
[libfuzzer] splitting fuzzer.test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271697
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 3 Jun 2016 17:51:42 +0000 (17:51 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271695
91177308-0d34-0410-b5e6-
96231b3b80d8
Ben Craig [Fri, 3 Jun 2016 17:50:14 +0000 (17:50 +0000)]
Doxygen for FoldingSet::reserve and FoldingSet::capacity
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271694
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Fri, 3 Jun 2016 17:15:54 +0000 (17:15 +0000)]
[ThinLTO/gold] Pass down the imports lists from the thin link (NFC)
No longer need to compute the imports in each backend thread.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271690
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Fri, 3 Jun 2016 16:58:05 +0000 (16:58 +0000)]
[yaml2obj] Sort MachO LinkEdit write operations based on offset
This re-applies r271611, and hopefully the bots won't break this time.
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@271687
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Fri, 3 Jun 2016 15:58:59 +0000 (15:58 +0000)]
Trim some spaces (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271681
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 3 Jun 2016 15:58:20 +0000 (15:58 +0000)]
[codeview] Add basic record type translation
This only translates data members for now. Translating overloaded
methods is complicated, so I stopped short of doing that.
Reviewers: aaboud
Differential Revision: http://reviews.llvm.org/D20924
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271680
91177308-0d34-0410-b5e6-
96231b3b80d8
Sjoerd Meijer [Fri, 3 Jun 2016 15:38:55 +0000 (15:38 +0000)]
Code size optimisation: do not inline memcpy if this expansion results
in more instructions than the libary call.
Differential Revision: http://reviews.llvm.org/D20958
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271678
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 3 Jun 2016 15:00:09 +0000 (15:00 +0000)]
[AArch64] Spot SBFX-compatbile code expressed with sign_extend_inreg.
We were assuming all SBFX-like operations would have the shl/asr form, but often
when the field being extracted is an i8 or i16, we end up with a
SIGN_EXTEND_INREG acting on a shift instead.
This is a port of r213754 from ARM to AArch64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271677
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 3 Jun 2016 14:42:07 +0000 (14:42 +0000)]
[InstCombine] look through bitcasts to find selects
There was concern that creating bitcasts for the simpler potential select pattern:
define <2 x i64> @vecBitcastOp1(<4 x i1> %cmp, <2 x i64> %a) {
%a2 = add <2 x i64> %a, %a
%sext = sext <4 x i1> %cmp to <4 x i32>
%bc = bitcast <4 x i32> %sext to <2 x i64>
%and = and <2 x i64> %a2, %bc
ret <2 x i64> %and
}
might lead to worse code for some targets, so this patch is matching the larger
patterns seen in the test cases.
The motivating example for this patch is this IR produced via SSE intrinsics in C:
define <2 x i64> @gibson(<2 x i64> %a, <2 x i64> %b) {
%t0 = bitcast <2 x i64> %a to <4 x i32>
%t1 = bitcast <2 x i64> %b to <4 x i32>
%cmp = icmp sgt <4 x i32> %t0, %t1
%sext = sext <4 x i1> %cmp to <4 x i32>
%t2 = bitcast <4 x i32> %sext to <2 x i64>
%and = and <2 x i64> %t2, %a
%neg = xor <4 x i32> %sext, <i32 -1, i32 -1, i32 -1, i32 -1>
%neg2 = bitcast <4 x i32> %neg to <2 x i64>
%and2 = and <2 x i64> %neg2, %b
%or = or <2 x i64> %and, %and2
ret <2 x i64> %or
}
For an AVX target, this is currently:
vpcmpgtd %xmm1, %xmm0, %xmm2
vpand %xmm0, %xmm2, %xmm0
vpandn %xmm1, %xmm2, %xmm1
vpor %xmm1, %xmm0, %xmm0
retq
With this patch, it becomes:
vpmaxsd %xmm1, %xmm0, %xmm0
Differential Revision: http://reviews.llvm.org/D20774
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271676
91177308-0d34-0410-b5e6-
96231b3b80d8
Artem Tamazov [Fri, 3 Jun 2016 14:41:17 +0000 (14:41 +0000)]
[test/AMDGPU] Square-braced-syntax for registers: add macro test/example.
Test added as per discussion in http://reviews.llvm.org/D20588.
The macro is just a demonstration, useless in practice.
Coding style fixes.
Differential Revision: http://reviews.llvm.org/D20797
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271675
91177308-0d34-0410-b5e6-
96231b3b80d8