Commit Graph

199500 Commits

Author SHA1 Message Date
Hans Wennborg 67c03759e4 Switch lowering: Take branch weight into account when ordering for fall-through
Previously, the code would try to put a fall-through case last,
even if that meant moving a case with much higher branch weight
further down the chain.

Ordering by branch weight is most important, putting a fall-through
block last is secondary.

llvm-svn: 235942
2015-04-27 23:35:22 +00:00
Richard Smith 753e007091 [modules] Incrementally compute the list of overridden module macros based on
the active module macros at the point of definition, rather than reconstructing
it from the macro history. No functionality change intended.

llvm-svn: 235941
2015-04-27 23:21:38 +00:00
Chaoren Lin 368c9f6e9b Add an unnamed pipe fail-safe to launching lldb-gdbserver.
Summary:
Currently, launching lldb-gdbserver from platform on Android requires root for
mkfifo() and an explicit TMPDIR variable. This should remove both requirements.

Test Plan: Successfully launched lldb-gdbserver on a non-rooted Android device.

Reviewers: tberghammer, vharron, clayborg

Reviewed By: clayborg

Subscribers: tberghammer, lldb-commits

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

llvm-svn: 235940
2015-04-27 23:20:30 +00:00
Duncan P. N. Exon Smith 7832e0a2f0 LTO: Simplify code generator initialization
Simplify `LTOCodeGenerator` initialization by initializing simple fields
at their definition.

llvm-svn: 235939
2015-04-27 23:19:26 +00:00
Reid Kleckner e0bca755d8 Remove stale FIXMEs from test case
llvm-svn: 235937
2015-04-27 23:14:24 +00:00
Eric Christopher f37ab1ca73 Always add the target-cpu and target-features sets if they're non-null.
This makes sure that the front end is specific about what they're expecting
the backend to produce. Update a FIXME with the idea that the target-features
could be more precise using backend knowledge.

llvm-svn: 235936
2015-04-27 23:11:34 +00:00
Zachary Turner 7cc3494dea [Windows] Add a RegisterContextWindows_x64.
With this patch, LLDB can debug x64 executables on Windows with
the same level of functionality as for x86 executables.

llvm-svn: 235935
2015-04-27 22:58:57 +00:00
Alexey Samsonov 675e539f54 [docs] Fix the link to SanitizerCoverage docs.
llvm-svn: 235934
2015-04-27 22:50:06 +00:00
Rafael Espindola ed48e53d60 Use MemoryBufferRef instead of MemoryBuffer&. NFC.
This just reduces the noise from another patch.

llvm-svn: 235933
2015-04-27 22:48:51 +00:00
Daniel Jasper a73aed0c9b clang-tidy: [readability-else-after-return] Fix false positive. This
might be a little too strict now, but better be too strict than do the
wrong thing.

llvm-svn: 235932
2015-04-27 22:42:20 +00:00
Aaron Ballman edc8084751 Check whether the operand to a noexcept expression is valid or not. Fixes PR15842.
llvm-svn: 235931
2015-04-27 22:31:12 +00:00
Sanjay Patel ca5ad5fb6d remove obsolete pattern matches for scalar SSE ops
The blendi pattern should always replace the insertps pattern after:
http://reviews.llvm.org/rL232850
http://reviews.llvm.org/rL235124

llvm-svn: 235930
2015-04-27 22:23:17 +00:00
Alexey Samsonov 98d79dace3 [UBSan] Reenable ASan+UBSan tests on Darwin now that PR21112 is fixed.
llvm-svn: 235929
2015-04-27 22:09:27 +00:00
Alexey Samsonov 56d6fc81a5 Introduce tsan_cxx and msan_cxx libraries (compiler-rt part).
For now tsan_cxx and msan_cxx contain only operator new/delete
replacements. In the future, when we add support for running UBSan+TSan
and UBSan+MSan, they will also contain bits ubsan_cxx runtime.

llvm-svn: 235928
2015-04-27 22:08:09 +00:00
Alexey Samsonov f430205b82 [TSan] Prepare TSan tests for splitting tsan_cxx library.
llvm-svn: 235927
2015-04-27 22:08:08 +00:00
Alexey Samsonov 042a069b25 [MSan] Prepare for splitting msan_new_delete.cc into a separate library. NFC.
llvm-svn: 235926
2015-04-27 22:08:04 +00:00
Duncan P. N. Exon Smith d99829481c LTO: Correct some doxygen comments about API availability
These look like copy/paste errors, and shouldn't have the "prior to"
qualifier.  Each API was introduced at the given values of
`LTO_API_VERSION`.  The "prior to" in other doxygen comments is because
I couldn't easily differentiate between versions 1 and 2 when I added
these comments.

llvm-svn: 235925
2015-04-27 22:08:01 +00:00
Alexey Samsonov 381845d54f Introduce tsan_cxx and msan_cxx libraries (Clang part).
For now tsan_cxx and msan_cxx contain only operator new/delete
replacements. In the future, when we add support for running UBSan+TSan
and UBSan+MSan, they will also contain bits ubsan_cxx runtime.

llvm-svn: 235924
2015-04-27 22:07:50 +00:00
Rafael Espindola a7c3163cdf Use CIE version 1 for .eh_frame.
According to

http://www.linuxbase.org/betaspecs/lsb/LSB-Core-generic/LSB-Core-generic/ehframechpt.html

we should always use 1.

llvm-svn: 235923
2015-04-27 22:04:24 +00:00
Ahmed Bougacha c004c60c0a [AArch64] Also combine vector selects fed by non-i1 SETCCs.
After legalization, scalar SETCC has an i32 result type on AArch64.
The i1 requirement seems too conservative, replace it with an assert.

This also means that we now can run after legalization. That should also
be fine, since the ops legalizer runs again after each combine, and
all types created all have the same sizes as the (legal) inputs.

Exposed by r235917; while there, robustize its tests (bsl also uses the
register it defines).

llvm-svn: 235922
2015-04-27 21:43:12 +00:00
Richard Smith c38498f046 PR23334: Perform semantic checking of lambda capture initialization in the right context.
Previously we'd try to perform checks on the captures from the middle of
parsing the lambda's body, at the point where we detected that a variable
needed to be captured. This was wrong in a number of subtle ways. In
PR23334, we couldn't correctly handle the list of potential odr-uses
resulting from the capture, and our attempt to recover from that resulted
in a use-after-free.

We now defer building the initialization expression until we leave the lambda
body and return to the enclosing context, where the initialization does the
right thing. This patch only covers lambda-expressions, but we should apply
the same change to blocks and captured statements too.

llvm-svn: 235921
2015-04-27 21:27:54 +00:00
Pete Cooper 5b39524313 Add missing library dependency in libPDB.
PDB uses COFFObjectFile::getPE32Header which lives in libObject.

Make sure that LLVMBuild.txt reflects this dependency.

llvm-svn: 235920
2015-04-27 21:23:12 +00:00
Artem Belevich c3e2fd7bea Revert "PR21000: pass -I options to assembler" as the test was failing on hexagon.
llvm-svn: 235919
2015-04-27 21:11:08 +00:00
Rafael Espindola 6b27999196 Allow building the gold plugin even if the gold binary is not found.
The gold binary is not required to build the plugin. All that is
needed is for LLVM_BINUTILS_INCDIR to point to the directory
containing plugin-api.h.

llvm-svn: 235918
2015-04-27 21:08:47 +00:00
Ahmed Bougacha 89bba61c84 [AArch64] Don't assert when combining (v3f32 select (setcc f64)).
When the setcc has f64 operands, we can't build a vector setcc mask
to feed a vselect, because f64 doesn't divide v3f32 evenly.
Just bail out when that happens.

llvm-svn: 235917
2015-04-27 21:01:20 +00:00
Chaoren Lin cae516117a XFail flakey test.
llvm-svn: 235916
2015-04-27 20:57:24 +00:00
Artem Belevich 8fe8ed56ee PR21000: pass -I options to assembler
Pass -I options to assembly so it can find files included with
.include.

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

llvm-svn: 235915
2015-04-27 20:51:44 +00:00
Chris Bieneman 017ebf09d9 Fixes a hang that can occur if a signal comes in during malloc calls.
We need to dereference the signals mutex during handler registration so that we force its construction. This is to prevent the first use being during handling an actual signal because you can't safely allocate memory in a signal handler.

llvm-svn: 235914
2015-04-27 20:45:35 +00:00
Bill Schmidt e71db85bed Silence unused variable errors for no-asserts builds
llvm-svn: 235913
2015-04-27 20:22:35 +00:00
Hans Wennborg ba6d2568f9 Switch lowering: order bit tests by branch weight.
llvm-svn: 235912
2015-04-27 20:21:17 +00:00
David Blaikie 1a848da518 [opaque pointer type] encode the pointee type of global variables
Use a few extra bits in the const field (after widening it from a fixed
single bit) to stash the address space which is no longer provided by
the type (and an extra bit in there to specify that we're using that new
encoding).

llvm-svn: 235911
2015-04-27 19:58:56 +00:00
Bill Schmidt fe723b9a6d [PPC64LE] Remove unnecessary swaps from lane-insensitive vector computations
This patch adds a new SSA MI pass that runs on little-endian PPC64
code with VSX enabled. Loads and stores of 4x32 and 2x64 vectors
without alignment constraints are accomplished for little-endian using
lxvd2x/xxswapd and xxswapd/stxvd2x. The existence of the additional
xxswapd instructions hurts performance in comparison with big-endian
code, but they are necessary in the general case to support correct
semantics.

However, the general case does not apply to most vector code. Many
vector instructions are lane-insensitive; they do not "care" which
lanes the parallel computations are performed within, provided that
the resulting data is stored into the correct locations. Thus this
pass looks for computations that perform only lane-insensitive
operations, and remove the unnecessary swaps from loads and stores in
such computations.

Future improvements will allow computations using certain
lane-sensitive operations to also be optimized in this manner, by
modifying the lane-sensitive operations to account for the permuted
order of the lanes. However, this patch only adds the infrastructure
to permit this; no lane-sensitive operations are optimized at this
time.

This code is heavily exercised by the various vectorizing applications
in the projects/test-suite tree. For the time being, I have only added
one simple test case to demonstrate what the pass is doing. Although
it is quite simple, it provides coverage for much of the code,
including the special case handling of copies and subreg-to-reg
operations feeding the swaps. I plan to add additional tests in the
future as I fill in more of the "special handling" code.

Two existing tests were affected, because they expected the swaps to
be present, but they are now removed.

llvm-svn: 235910
2015-04-27 19:57:34 +00:00
Zachary Turner 5590935499 [llvm-symbolizer] Link DebugInfoPDB for the autoconf build
llvm-svn: 235909
2015-04-27 19:41:40 +00:00
Paul Robinson d101ca21e6 Simplify depfile quoting test.
With -MG we don't actually need to create the files with funky names.
Also use a more sensible check-prefix for the NMAKE case.

llvm-svn: 235908
2015-04-27 19:40:04 +00:00
Artem Belevich fa62ad4087 [cuda] Ignore "TLS unsupported by target" errors for host variables during device compilation.
During device-side CUDA compilation clang currently complains about
all TLS variables, regardless of whether they are __host__ or
__device__.

This patch suppresses "TLS unsupported" errors for host variables
during device compilation and for device variables during host
compilation.

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

llvm-svn: 235907
2015-04-27 19:37:53 +00:00
Alexey Samsonov 0eafe5df71 [TSan] Move new/delete interceptors into a separate source file. NFC.
llvm-svn: 235906
2015-04-27 19:33:55 +00:00
Artem Belevich 0488d1e4ba [cuda] treat file scope __asm as __host__ and ignore it during device-side compilation.
Currently clang emits file-scope asm during *both* host and device
compilation modes which is usually a wrong thing to do.

There's no way to attach any attribute to an __asm statement, so
there's no way to differentiate between host-side and device-side
file-scope asm.  This patch makes clang to match nvcc behavior and
emit file-scope-asm only during host-side compilation.

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

llvm-svn: 235905
2015-04-27 18:52:00 +00:00
Saleem Abdulrasool fd8a75d730 libc++abi: enable LLVM unwinder by default for ARM
libc++abi uses EHABI extensions, which are only part of the LLVM unwinder.  When
targeting ARM by default, enable the use of the LLVM unwinder.  Hopefully this
will fix the ARM native bot

llvm-svn: 235904
2015-04-27 18:19:33 +00:00
Paul Robinson d7214a7651 Support generating NMake/Jom-style depfiles.
NMake is a Make-like builder that comes with Microsoft Visual Studio.
Jom (https://wiki.qt.io/Jom) is an NMake-compatible build tool.
Dependency files for NMake/Jom need to use double-quotes to wrap
filespecs containing special characters, instead of the backslash
escapes that GNU Make wants.

Adds the -MV option, which specifies to use double-quotes as needed
instead of backslash escapes when writing the dependency file.

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

llvm-svn: 235903
2015-04-27 18:14:32 +00:00
Sanjay Patel 8fd573e87f fix 80-cols; NFC
llvm-svn: 235902
2015-04-27 17:45:44 +00:00
Zachary Turner e629530d3e Fix build broken by incorrect class name.
llvm-svn: 235901
2015-04-27 17:22:30 +00:00
Zachary Turner 20dbd0d0de Make llvm-symbolizer work on Windows.
Differential Revision: http://reviews.llvm.org/D9234
Reviewed By: Alexey Samsonov

llvm-svn: 235900
2015-04-27 17:19:51 +00:00
Reid Kleckner 4cb2dbde5b [MS ABI] Use 'continue' instead of 'return false' where intended
This was a bug in r218285 that prevented us from seeing subsequent
virtual bases in the class hierarchy, leading to crashes later.

Also add some comments to this function, now that we better understand
what it's trying to do.

Fixes PR21062 and PR21064.

llvm-svn: 235899
2015-04-27 17:19:49 +00:00
Zachary Turner c205570127 Make an RAII com initializer.
Differential Revision: http://reviews.llvm.org/D9267
Reviewed By: Aaron Ballman, David Majnemer

llvm-svn: 235898
2015-04-27 17:19:26 +00:00
Rui Ueyama 035025c0da Remove trailing whitespace characters.
llvm-svn: 235897
2015-04-27 17:18:04 +00:00
Sanjay Patel 912315811e fix typos; NFC
llvm-svn: 235896
2015-04-27 17:03:31 +00:00
Rui Ueyama de9215e498 ELF: Simplify LinkerScript detection. NFC.
llvm-svn: 235895
2015-04-27 16:54:48 +00:00
Greg Clayton 937ff6e9c6 Make sure files in the Xcode project in source/API are in alphabetic order.
llvm-svn: 235894
2015-04-27 16:52:08 +00:00
Saleem Abdulrasool 93174d9542 unwind: remove inclusion of private_typeinfo.h
This include is not currently used.  It is intended for type info based
switching, which is part of the EHABI specification.  However, the unwinder does
not currently support this functionality. This backwards dependency into
libc++abi is currently causing a buildbot failure, remove it until we have a
better solution.

llvm-svn: 235893
2015-04-27 16:51:52 +00:00
Greg Clayton 63adb3f5ff Make sure versions are valid before we try to use them. Also check for invalid versions[0] by comparing it to UINT32_MAX instead of 0.
llvm-svn: 235892
2015-04-27 16:49:57 +00:00