Commit Graph

178077 Commits

Author SHA1 Message Date
Saleem Abdulrasool 427c08d48b MC: add and use an accessor for WinCFI
This adds a utility method to access the WinCFI information in bulk and uses
that to iterate rather than requesting the count and individually iterating
them.  This is in preparation for restructuring WinCFI handling to enable more
clear sharing across architectures to enable unwind information emission for
Windows on ARM.

llvm-svn: 212683
2014-07-10 04:50:06 +00:00
Peter Collingbourne 8876c3face Remove move assignment operator to appease older GCCs.
llvm-svn: 212682
2014-07-10 04:39:40 +00:00
Todd Fiala 202ecd26da Fixes for broken Debian build - g++ 4.7 support.
These fix the broken debian lldb build, which is using g++ 4.7.2.

TypeFormat changes:
1. stopped using the C++11 "dtor = default;" construct.
The generated default destructor in the two derived classes wanted
them to have a different throws() semantic that was causing 4.7 to
fail to generate it.  I switched these to empty destructors defined
in the .cpp file.

2. Switched the m_types map from an ordered map to an unordered_map.
g++ 4.7's c++ library supports the C++11 emplace() used by TypeFormat
but the same c++ library's map impl does not.  Since TypeFormat didn't
look like it depended on ordering in the map, I just switched it to
a std::unordered_map.

NativeProcessLinux - g++ 4.7 chokes on lexing the "<::" in
static_cast<::pid_t>(wpid).  g++ 4.8+ and clang are fine with it.
I just put a space in between the "<" and the "::" and that cleared
it up.

llvm-svn: 212681
2014-07-10 04:39:13 +00:00
Chandler Carruth 7d2ffb5492 [x86] Initial improvements to the new shuffle lowering for v16i8
shuffles specifically for cases where a small subset of the elements in
the input vector are actually used.

This is specifically targetted at improving the shuffles generated for
trunc operations, but also helps out splat-like operations.

There is still some really low-hanging fruit here that I want to address
but this is a huge step in the right direction.

llvm-svn: 212680
2014-07-10 04:34:06 +00:00
Peter Collingbourne 05b9ebf2f9 Explicitly define move constructor and move assignment operator to appease MSVC.
llvm-svn: 212679
2014-07-10 04:29:06 +00:00
Peter Collingbourne d5feb7ba42 SpecialCaseList: use std::unique_ptr.
llvm-svn: 212678
2014-07-10 03:55:02 +00:00
Hao Liu 71224b02fb [AArch64]Fix an assertion failure in DAG Combiner about concating 2 build_vector.
llvm-svn: 212677
2014-07-10 03:41:50 +00:00
Matt Arsenault b0df92577d R600/SI: Add support for llvm.convert.{to|from}.fp16
llvm-svn: 212676
2014-07-10 03:22:20 +00:00
Matt Arsenault 3e3ddda7a2 Fix types in documentation.
The examples were using f32, but the IR type is called float

llvm-svn: 212675
2014-07-10 03:22:16 +00:00
Chandler Carruth b3840a55ae [x86] Refactor some of the new code for lowering v16i8 shuffles to
remove duplication and make it easier to select different strategies.

No functionality changed.

llvm-svn: 212674
2014-07-10 02:24:26 +00:00
Jason Molenda 277335f9b2 Add a new 'stresstest' category, set the api/multiple-debuggers test case as a stresstest.
llvm-svn: 212673
2014-07-10 02:21:16 +00:00
Dan Albert a770f9d66b Add lit configs for libcxxabi tests.
This makes running libcxxabi tests on Linux _much_ easier.
Adds a check-libcxxabi target to cmake.

Also defaults to building a dynamic libc++abi. This is so that the
default options still test the libc++abi that is being built. There are
two problems with testing a static libc++abi. In the case of a
standalone build, the tests will link the system's libc++, which might
not have been built against our libc++abi. In the case of an in tree
build, libc++ will prefer a dynamic libc++abi from the system over a
static libc++abi from the output directory.

llvm-svn: 212672
2014-07-10 02:20:11 +00:00
Jason Molenda 8c07401504 Add a new test in api/multiple-debuggers which tries to create 50
debug sessions simultaneously to expose race conditoin/locking
issues.

This directory has an inferior program, testprog.cpp that has a
couple of functions we can put breakpoints on.

It has a driver program, multi-process-driver.cpp, which links
against the LLDB solib and uses the SB APIs.  It creates 50 pthreads,
creates a debugger on all of them, launches a debug session of the
inferior testprog, hits a couple breakpoints, walks the stack,
continues, etc., and then kills the inferior and ends the debug
session.

A pass is if all fifty debug sessions complete successfully
in the alloted time (~60 seconds).

We may need to tweak this one to work correctly on different
platforms/targets but I wanted to get it checked in to start.

llvm-svn: 212671
2014-07-10 02:17:31 +00:00
Alp Toker e81b42fde9 Prevent link warnings due to -Wframe-larger-than=
Although this is nominally a -W option, we actually handle it in the driver
exactly as an f-group flag that's translated directly to -mllvm.

That means f_Group (and unintuitively, not W_Group) has the semantics we want
to make it behave like a standard warning flag: no automatic forwarding, no
warning for link invocations and compile-only.

Silences diagnostics like:

  [691/1545] Linking CXX executable bin/llvm-diff
  clang-3.5: warning: argument unused during compilation: '-Wframe-larger-than=2048'

(Hopefully we can move towards handling these in the frontend but that'll
require some infrastructure work.)

llvm-svn: 212670
2014-07-10 02:13:29 +00:00
Reid Kleckner 677539d0af MS ABI: Fix __fastcall methods that return structs
The sret paramater consumes the register after the implicit 'this'
parameter, as with other calling conventions.

Fixes PR20278, which turned out to be very easy.

llvm-svn: 212669
2014-07-10 01:58:55 +00:00
Peter Collingbourne 2e28edf8e1 [dfsan] Handle bitcast aliases.
llvm-svn: 212668
2014-07-10 01:30:39 +00:00
Richard Smith 8b4e1e2c8d Cleanup. No functionality change.
llvm-svn: 212667
2014-07-10 01:20:17 +00:00
Argyrios Kyrtzidis 1b49db6035 [Driver] Expose getARMCPUForMArch() function in the Driver API; NFC.
llvm-svn: 212666
2014-07-10 01:03:37 +00:00
Alexey Samsonov 84e0223a9d Fix configure+make build of profile runtime library
llvm-svn: 212665
2014-07-10 00:53:20 +00:00
Alexey Samsonov 020ac94665 [ASan] Force the compiler to generate frame pointer in certain Mac-specific interceptors.
Patch by Kuba Brecka!

llvm-svn: 212664
2014-07-10 00:06:53 +00:00
Alexey Samsonov f723794da8 [Sanitizer] Remove SANITIZER_NEEDS_SEGV from shared sanitizer_common headers.
Otherwise, it can be accidentally redefined when we build specific sanitizer
runtime. This definition should be provided only once - when we build
sanitizer_common library.

llvm-svn: 212663
2014-07-09 23:59:40 +00:00
Todd Fiala 9e2d329818 Skip tests that are intermittent on Linux, fix gdb-remote port-grabbing code.
Marked skipped for Linux:
TestCallStopAndContinue
TestConvenienceVariables
TestStopHookMultipleThreads

Fixed up gdb-remote port-grabbing code to use a random port in a wide range,
and to allow that to fail more gracefully.  This appears to have solved some
gdb-remote intermittent failing behavior.

llvm-svn: 212662
2014-07-09 23:10:43 +00:00
Chandler Carruth d3561f6fec [SDAG] Make the new zext-vector-inreg node default to expand so targets
don't need to set it manually.

This is based on feedback from Tom who pointed out that if every target
needs to handle this we need to reach out to those maintainers. In fact,
it doesn't make sense to duplicate everything when anything other than
expand seems unlikely at this stage.

llvm-svn: 212661
2014-07-09 22:53:04 +00:00
Todd Fiala 8a4ee50e58 Skip TestCallStopAndContinue and TestCallThatRestarts on Darwin.
These are failing intermittently.

See http://llvm.org/bugs/show_bug.cgi?id=19246 for TestCallThatRestarts.  Also applies to Linux.
See http://llvm.org/bugs/show_bug.cgi?id=20274 for TestCallStopAndContinue.

llvm-svn: 212660
2014-07-09 22:03:30 +00:00
Todd Fiala fb17762ee5 Marked TestTargetAPI.test_launch_new_process_and_redirect_stdout_with_* as XFAIL on Darwin.
See http://llvm.org/bugs/show_bug.cgi?id=20273

llvm-svn: 212659
2014-07-09 21:24:41 +00:00
Alexander Kornienko 47d7ae9875 Removed the "-fix" suffix from tests that verify both fixes and messages.
llvm-svn: 212658
2014-07-09 21:21:39 +00:00
Todd Fiala 8f694d92f9 TestRealDefinition tests marked XFAIL on Darwin.
http://llvm.org/bugs/show_bug.cgi?id=20272

llvm-svn: 212657
2014-07-09 21:21:39 +00:00
Todd Fiala 2efa5655a9 Marked failing TestObjCDynamicValue tests as XFAIL on Darwin.
See http://llvm.org/bugs/show_bug.cgi?id=20271

llvm-svn: 212656
2014-07-09 21:19:03 +00:00
Todd Fiala 7a7dbb8a6c Marked failing TestObjCDynamicSBType tests XFAIL on Darwin.
See http://llvm.org/bugs/show_bug.cgi?id=20270

llvm-svn: 212655
2014-07-09 21:15:46 +00:00
Todd Fiala 51452ed75b Marked failing TestHiddenIvars tests as XFAIL on Darwin.
See http://llvm.org/bugs/show_bug.cgi?id=20269

llvm-svn: 212654
2014-07-09 21:10:13 +00:00
Alexander Kornienko af9ccfad87 Check messages and fixes in the same test.
Summary: This reduces duplication of test code and improves locality of checks.

Reviewers: sbenza, djasper

Reviewed By: sbenza, djasper

Subscribers: cfe-commits

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

llvm-svn: 212653
2014-07-09 21:09:26 +00:00
Nick Kledzik 0edfdeb0be Move GOTPass and StubsPass from Core to MachO
llvm-svn: 212652
2014-07-09 21:04:24 +00:00
Marshall Clow 79d4ffbc8f Add a reset method to the counting predicates in the test suite
llvm-svn: 212651
2014-07-09 21:04:22 +00:00
Todd Fiala 532d8a709b Marked TestObjCMethods failing tests XFAIL, fixed cleanup code, removed now-passing expected failure markers.
All tests matching '-p TestObjCMethods' now are marked correctly for MacOSX, and some
error classes have been removed in cleanup code looking for files that
might not exist due to previous failure.

See http://llvm.org/bugs/show_bug.cgi?id=20267

llvm-svn: 212650
2014-07-09 21:02:52 +00:00
David Blaikie 029bd3350e Recommit r212203: Don't try to construct debug LexicalScopes hierarchy for functions that do not have top level debug information.
Reverted by Eric Christopher (Thanks!) in r212203 after Bob Wilson
reported LTO issues. Duncan Exon Smith and Aditya Nandakumar helped
provide a reduced reproduction, though the failure wasn't too hard to
guess, and even easier with the example to confirm.

The assertion that the subprogram metadata associated with an
llvm::Function matches the scope data referenced by the DbgLocs on the
instructions in that function is not valid under LTO. In LTO, a C++
inline function might exist in multiple CUs and the subprogram metadata
nodes will refer to the same llvm::Function. In this case, depending on
the order of the CUs, the first intance of the subprogram metadata may
not be the one referenced by the instructions in that function and the
assertion will fail.

A test case (test/DebugInfo/cross-cu-linkonce-distinct.ll) is added, the
assertion removed and a comment added to explain this situation.

Original commit message:

If a function isn't actually in a CU's subprogram list in the debug info
metadata, ignore all the DebugLocs and don't try to build scopes, track
variables, etc.

While this is possibly a minor optimization, it's also a correctness fix
for an incoming patch that will add assertions to LexicalScopes and the
debug info verifier to ensure that all scope chains lead to debug info
for the current function.

Fix up a few test cases that had broken/incomplete debug info that could
violate this constraint.

Add a test case where this occurs by design (inlining a
debug-info-having function in an attribute nodebug function - we want
this to work because /if/ the nodebug function is then inlined into a
debug-info-having function, it should be fine (and will work fine - we
just stitch the scopes up as usual), but should the inlining not happen
we need to not assert fail either).

llvm-svn: 212649
2014-07-09 21:02:41 +00:00
Todd Fiala 046ca1faec Marked failing test XFAIL for TestRegisterVariables.test_with_dsym_and_run_command on Darwin
See http://llvm.org/bugs/show_bug.cgi?id=20266

llvm-svn: 212648
2014-07-09 20:45:09 +00:00
Todd Fiala 90198a81e0 Marked failing Darwin TestProcessLaunch tests as XFAIL
See http://llvm.org/bugs/show_bug.cgi?id=20265

llvm-svn: 212647
2014-07-09 20:42:14 +00:00
Todd Fiala 6667e1192a TestDataFormatterStdVector.test_with_dsym_and_run_command marked XFAIL on Darwin
See http://llvm.org/bugs/show_bug.cgi?id=20264

llvm-svn: 212646
2014-07-09 20:38:27 +00:00
Todd Fiala 1928c9bd53 Disable TestDataFormatterStdMap.test_with_dsym_and_run_command on Darwin
See http://llvm.org/bugs/show_bug.cgi?id=20263

llvm-svn: 212645
2014-07-09 20:33:51 +00:00
Greg Clayton 73d80faa78 Make sure the "command regex add" has a unique name for editline history purposes.
llvm-svn: 212644
2014-07-09 20:18:54 +00:00
Alexey Samsonov b7dd329f2f Decouple llvm::SpecialCaseList text representation and its LLVM IR semantics.
Turn llvm::SpecialCaseList into a simple class that parses text files in
a specified format and knows nothing about LLVM IR. Move this class into
LLVMSupport library. Implement two users of this class:
  * DFSanABIList in DFSan instrumentation pass.
  * SanitizerBlacklist in Clang CodeGen library.
The latter will be modified to use actual source-level information from frontend
(source file names) instead of unstable LLVM IR things (LLVM Module identifier).

Remove dependency edge from ClangCodeGen/ClangDriver to LLVMTransformUtils.

No functionality change.

llvm-svn: 212643
2014-07-09 19:40:08 +00:00
Alexey Samsonov cd0a4aaba3 Don't check lint for SpecialCaseList.cpp
llvm-svn: 212642
2014-07-09 19:29:10 +00:00
Tim Northover 0f0a6c1e1d Use simpler constructor for range adapter.
It is a good idea, it's slightly clearer and simpler. Unfortunately
the headline news is: we save one line!

llvm-svn: 212641
2014-07-09 19:14:34 +00:00
Matt Arsenault 658c5576d1 Add trunc (select c, a, b) -> select c (trunc a), (trunc b) combine.
Do this if the truncate is free and the select is legal.

llvm-svn: 212640
2014-07-09 19:12:07 +00:00
Todd Fiala c0b1eae6b4 Mark failing tests in TestDataFormatterObjC on Darwin as XFAIL
See http://llvm.org/bugs/show_bug.cgi?id=20260 for more details.

llvm-svn: 212639
2014-07-09 19:00:21 +00:00
Jim Grosbach 34cc92b475 AArch64: Better codegen for storing to __fp16.
Storing will generally be immediately preceded by rounding from an f32
or f64, so make sure to match those patterns directly to convert into the
FPR16 register class directly rather than going through the integer GPRs.

This also eliminates an extra step in the convert-from-f64 path
which was first converting to f32 and then to f16 from there.

rdar://17594379

llvm-svn: 212638
2014-07-09 18:55:52 +00:00
Jim Grosbach 37b8093a8f Change an assert() to a diagnostic.
llvm-svn: 212637
2014-07-09 18:55:49 +00:00
Benjamin Kramer c560a6cadc TargetRegisterInfo: Remove function that fell out of use years ago.
llvm-svn: 212636
2014-07-09 18:53:57 +00:00
Cameron McInally 0c01caa2ad Update ReleaseNotes to mention Atomic NAND semantic changes.
llvm-svn: 212635
2014-07-09 18:29:55 +00:00
Adam Nemet 2820a5b9e9 [X86] AVX512: Enable it in the Loop Vectorizer
This lets us experiment with 512-bit vectorization without passing
force-vector-width manually.

The code generated for a simple integer memset loop is properly vectorized.
Disassembly is still broken for it though :(.

llvm-svn: 212634
2014-07-09 18:22:33 +00:00