Commit Graph

206911 Commits

Author SHA1 Message Date
Bruce Mitchener e2453afff6 [lldb-mi] Use empty arg lists instead of (void).
Summary: This brings the code more in line with the usual LLDB style. NFC.

Reviewers: abidh, ki.stfu

Subscribers: lldb-commits

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

llvm-svn: 243967
2015-08-04 10:24:20 +00:00
Benjamin Kramer 8d3bfd0fa1 [AST] Use StringRef's convenient copy method. No functionality change.
llvm-svn: 243966
2015-08-04 10:22:38 +00:00
David Majnemer eb518bd5d8 Drive-by fixes for LandingPad -> EHPad
This change was done as an audit and is by inspection.  The new EH
system is still very much a work in progress.  NFC for the landingpad
case.

llvm-svn: 243965
2015-08-04 08:21:40 +00:00
Alexey Bataev 48977c3364 [OPENMP] Fix compiler crash during data-sharing attributes analysis.
If a global variable is marked as private in OpenMP construct and then is used in of the private clauses of the same construct, it might cause compiler crash because of incorrect capturing.

llvm-svn: 243964
2015-08-04 08:10:48 +00:00
Simon Pilgrim d19b9d8229 [InstCombine] Split off SSE2/AVX2 vector shift tests.
These aren't vector demanded bits tests. More tests to follow.

llvm-svn: 243963
2015-08-04 08:05:27 +00:00
Simon Pilgrim dcfd7a3fba [InstCombine] Moved SSE vector shift constant folding into its own helper function. NFCI.
This will make some upcoming bugfixes + improvements easier to manage.

llvm-svn: 243962
2015-08-04 07:49:58 +00:00
Duncan P. N. Exon Smith 706f37e8df Linker: Fix references to uniqued nodes after r243883
r243883 started moving 'distinct' nodes instead of duplicated them in
lib/Linker.  This had the side-effect of sometimes not cloning uniqued
nodes that reference them.  I missed a corner case:

    !named = !{!0}
    !0 = !{!1}
    !1 = distinct !{!0}

!0 is the entry point for "remapping", and a temporary clone (say,
!0-temp) is created and mapped in case we need to model a uniquing
cycle.

    Recursive descent into !1.  !1 is distinct, so we leave it alone,
    but update its operand to !0-temp.

Pop back out to !0.  Its only operand, !1, hasn't changed, so we don't
need to use !0-temp.  !0-temp goes out of scope, and we're finished
remapping, but we're left with:

    !named = !{!0}
    !0 = !{!1}
    !1 = distinct !{null} ; uh oh...

Previously, if !0 and !0-temp ended up with identical operands, then
!0-temp couldn't have been referenced at all.  Now that distinct nodes
don't get duplicated, that assumption is invalid.  We need to
!0-temp->replaceAllUsesWith(!0) before freeing !0-temp.

I found this while running an internal `-flto -g` bootstrap.  Strangely,
there was no case of this in the open source bootstrap I'd done before
commit...

llvm-svn: 243961
2015-08-04 06:42:31 +00:00
Mehdi Amini c8d5783114 Update test suite to make "ninja check" succeed without native backend builtin
Requires "native" feature in most places that were failing.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 243960
2015-08-04 06:32:54 +00:00
Mehdi Amini 63c3989f6a Move generic MIR tests in their own subdir, requires "native" as well
These tests rely on the native backend to be built-in.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 243959
2015-08-04 06:32:45 +00:00
Mehdi Amini fc6b6983ac Improve lit "native" feature to check if the native backend is builtin
The goal is to have 'ninja check' passing even if the X86 backend is
not built.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 243958
2015-08-04 06:32:31 +00:00
Justin Bogner c7e3f3ab6e Remove the configure and cmake checks for sys/wait.h
If we don't have sys/wait.h and we're on a unix system there's no way
that several of the llvm tools work at all. This includes clang.

Just remove the configure and cmake checks entirely - we'll get a
build error instead of building something broken now.

llvm-svn: 243957
2015-08-04 06:29:58 +00:00
Hal Finkel caf1149b8b [SDAG] Fix a result chain in ExpandUnalignedLoad
On the code path in ExpandUnalignedLoad which expands an unaligned vector/fp
value in terms of a legal integer load of the same size, the ChainResult needs
to be the chain result of the integer load.

No in-tree test case is currently available.

Patch by Jan Hranac!

llvm-svn: 243956
2015-08-04 06:29:12 +00:00
Adam Nemet 8701118792 [LAA] Remove unused pointer partition argument from addRuntimeCheck, NFC
This variant of addRuntimeCheck is only used now from the LoopVectorizer
which does not use this parameter.

llvm-svn: 243955
2015-08-04 05:16:20 +00:00
Chen Li 0003878466 Introduce enum value for previously defined metadata -- make.implicit
Summary: This patch adds enum value for an existing metadata type -- make.implicit. Using preassigned enum will be helpful to get compile time type checking and avoid string construction and comparison. The patch also changes uses of make.implicit from string metadata to enum metadata. There is no functionality change.

Reviewers: reames

Subscribers: llvm-commits

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

llvm-svn: 243954
2015-08-04 04:41:34 +00:00
Bruce Mitchener bfcb6c870a [debugserver] Fix "control may reach end of non-void function" warnings.
Reviewers: clayborg, jingham

Subscribers: lldb-commits

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

llvm-svn: 243953
2015-08-04 04:01:16 +00:00
Saleem Abdulrasool 0a2672bb43 ARM: support windows division routines
This adds the software division routines for the Windows RTABI.  These are not
expected to be used often though as most modern Windows ARM capable targets
support hardware division.  In the case that the target CPU doesnt support
hardware division, this will be the fallback.

llvm-svn: 243952
2015-08-04 03:57:56 +00:00
Saleem Abdulrasool 67697a7ea9 ARM: make Darwin libcall registration table driven (NFC)
Make the libcall updating table driven similar to the approach that the Linux
and Windows codepath does below.  NFC.

llvm-svn: 243951
2015-08-04 03:57:52 +00:00
Chandler Carruth 6ac555fb71 [UB] Avoid a really broken call to realloc that would later result in
a bad call to memcpy.

When we only have a buffer from one of the two reparse calls, we can
just return that buffer rather than going through the realloc/memcpy
dance.

Found with UBsan.

llvm-svn: 243950
2015-08-04 03:53:04 +00:00
Chandler Carruth 38a45cc686 [UB] Guard two calls to memcpy in generated attribute code to handle
null StringRef objects as inputs.

Found by UBSan.

llvm-svn: 243949
2015-08-04 03:53:01 +00:00
Chandler Carruth a91ba1260a [UB] Another place where we were trying to put string data into
a BumpPtrAllocator. This at least now handles the case where there is no
concatentation without calling memcpy on a null pointer. It might be
interesting to handle the case where everything is empty without
round-tripping through the allocator, but it wasn't clear to me if the
pointer returned is significant in any way, so I've left it in
a conservatively more-correct state.

Again, found with UBSan.

llvm-svn: 243948
2015-08-04 03:53:00 +00:00
Chandler Carruth f0c627d5f8 [UB] When attaching empty strings to the AST, use an empty StringRef
rather than forcing the bump pointer allocator to produce a viable
pointer. This also fixes UB when we would try to memcpy from the null
incoming StringRef.

llvm-svn: 243947
2015-08-04 03:52:58 +00:00
Chandler Carruth b6708d8ebf [UB] Fix the two ways that we would try to memcpy from a null buffer in
the nested name specifier code.

First, skip the entire thing when the input is empty.

Next, handle the case where we started off with a null buffer and a zero
capacity to skip copying and freeing.

This was found with UBSan.

llvm-svn: 243946
2015-08-04 03:52:56 +00:00
Chandler Carruth d96e877788 [UB] Fix two cases of UB in copy/pasted code from SmallVector.
We should really stop copying and pasting code around. =/

Found by UBSan.

llvm-svn: 243945
2015-08-04 03:52:52 +00:00
Chandler Carruth 7771197955 [UB] Don't allocate space for contained types and then try to copy the
contained types into the space when we have no contained types. This
fixes the UB stemming from a call to memcpy with a null pointer. This
also reduces the calls to allocate because this actually happens in
a notable client - Clang.

Found by UBSan.

llvm-svn: 243944
2015-08-04 03:48:26 +00:00
Jason Molenda 3874ee6869 Bump the version # in the xcode proj file from major number 340 to 350.
The SB API for major version 340 won't be changing any more.

llvm-svn: 243943
2015-08-04 03:14:49 +00:00
Sean Silva f53cdb9dcd [GettingStarted.rst] Commit the right patch.
Looks like the rebased version that Mehdi committed didn't incorporate
the latest changes.

Patch by Erik de Castro Lopo <erikd@mega-nerd.com>!

llvm-svn: 243942
2015-08-04 03:12:33 +00:00
Bruce Mitchener 3dd3a77e81 Fix cmake build on non-Windows platforms.
r243914 introduced a change which mistakenly tried to build the
Windows minidump code on all platforms rather than only on Windows.

llvm-svn: 243941
2015-08-04 02:41:49 +00:00
Richard Smith 8cbd895947 [modules] Make IndirectFieldDecl mergeable to avoid lookup ambiguity when the same anonymous union is defined across multiple modules.
llvm-svn: 243940
2015-08-04 02:05:09 +00:00
Sanjoy Das 215df9ed98 Revert "[LSR] Generate and use zero extends"
This reverts commit r243348 and r243357.  They caused PR24347.

llvm-svn: 243939
2015-08-04 01:52:05 +00:00
Argyrios Kyrtzidis 0ce08b890e Remove unused header include.
llvm-svn: 243938
2015-08-04 01:44:13 +00:00
Marshall Clow 2d265aee08 Change char_traits<char16_t>::eof() to return 0xFFFF instead of 0xDFFF. Fixes PR#24342
llvm-svn: 243937
2015-08-04 01:38:34 +00:00
Ahmed Bougacha 81fda188f9 [AArch64] Rename FP formats to be more consistent. NFC.
Some are named "FP", others "SD", others still "FP*SD".
Rename all this to just use "FP", which, except for conversions
(which don't use this format naming scheme), implies "SD" anyway.

llvm-svn: 243936
2015-08-04 01:38:08 +00:00
Ahmed Bougacha e0e12db8c8 [AArch64] Add isel support for f16 indexed LD/ST.
llvm-svn: 243935
2015-08-04 01:29:38 +00:00
Chandler Carruth 1c156f737e [UB] Fix yet another use of memcpy with a null pointer argument. I think
this is the last of them in my build of LLVM. Haven't tried Clang yet.

Found via UBSan.

llvm-svn: 243934
2015-08-04 01:00:56 +00:00
Ahmed Bougacha e8ea9ac32b [AArch64][v8.1a] The "pan" sysreg isn't MSR-specific. NFCI.
It's already in SysRegMappings, no need to also have it in MSRMappings:
the latter is only used if we didn't find a match in the former.

llvm-svn: 243933
2015-08-04 00:55:11 +00:00
Chandler Carruth 13c247b455 [UB] Fix another place where we would pass a null pointer to memcpy.
This too was found by UBSan. Down to 35 failures for me.

llvm-svn: 243932
2015-08-04 00:53:01 +00:00
Ahmed Bougacha 0cbe2efcd6 [AArch64] Remove unnecessary "break". NFC.
llvm-svn: 243931
2015-08-04 00:49:08 +00:00
Ahmed Bougacha 239d635d3d [AArch64] Use SDValue bool operator. NFC.
llvm-svn: 243930
2015-08-04 00:48:02 +00:00
Hans Wennborg 9da51807ee Add a -revert option to utils/release/merge.sh
llvm-svn: 243929
2015-08-04 00:47:58 +00:00
Chandler Carruth 630423e379 [UB] Fix a nasty place where we would pass null pointers to memcpy.
This happens to work, but is not guaranteed to work. Indeed, most memcpy
interfaces in Linux-land annotate these arguments as nonnull, and GCC
and LLVM both can and do optimized based upon that. When they do so,
they might legitimately have miscompiled code calling this routine with
two valid iterators, 'nullptr' and 'nullptr'. There was even code doing
precisely this because StringRef().begin() and StringRef().end() both
produce null pointers.

This was found by UBSan.

llvm-svn: 243927
2015-08-04 00:44:07 +00:00
Ahmed Bougacha b0ae36f0d1 [AArch64] Vector FCOPYSIGN supports Custom-lowering: mark it as such.
There's a bunch of code in LowerFCOPYSIGN that does smart lowering, and
is actually already vector-aware; let's use it instead of scalarizing!

The only interesting change is that for v2f32, we previously always used
use v4i32 as the integer vector type.
Use v2i32 instead, and mark FCOPYSIGN as Custom.

llvm-svn: 243926
2015-08-04 00:42:34 +00:00
Ahmed Bougacha f65371a235 [CodeGen] Fix FCOPYSIGN legalization to account for mismatched types.
We used to legalize it like it's any other binary operations.  It's not,
because it accepts mismatched operand types.  Because of that, we used
to hit various asserts and miscompiles.

Specialize vector legalizations to, in the worst case, unroll, or, when
possible, to just legalize the operand that needs legalization.

Scalarization isn't covered, because I can't think of a target where
some but not all of the 1-element vector types are to be scalarized.

llvm-svn: 243924
2015-08-04 00:32:55 +00:00
Alex Lorenz a518b79601 MIR Serialization: Serialize the 'volatile' machine memory operand flag.
llvm-svn: 243923
2015-08-04 00:24:45 +00:00
Chaoren Lin 845f40ada6 XFAIL TestInferiorAssert for Android API <= 16.
llvm-svn: 243922
2015-08-03 23:59:41 +00:00
Adam Nemet 53e30aec46 [LAA] Remove unused needsAnyChecking(), NFC
llvm-svn: 243921
2015-08-03 23:33:03 +00:00
Adam Nemet 6b6082dc42 [LoopVer] Remove unused needsRuntimeChecks(), NFC
The previous commits moved this functionality into the client.

Also remove the now unused member variable.

llvm-svn: 243920
2015-08-03 23:32:57 +00:00
Mehdi Amini a28b07d7e5 Docs: s/Sanitiser/Sanitizer/ for consistency
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 243918
2015-08-03 23:25:46 +00:00
Mehdi Amini 855c06c53c GettingStarted.rst: Add info about building sanitizers
From: Erik de Castro Lopo <erikd@qti.qualcomm.com>
llvm-svn: 243917
2015-08-03 23:17:47 +00:00
Mehdi Amini fb6fd5c799 docs/GettingStarted.rst: Whitespace only
From: Erik de Castro Lopo <erikd@qti.qualcomm.com>
llvm-svn: 243916
2015-08-03 23:17:44 +00:00
Alex Lorenz 4af7e610c3 MIR Serialization: Initial serialization of the machine memory operands.
Reviewers: Duncan P. N. Exon Smith
llvm-svn: 243915
2015-08-03 23:08:19 +00:00