Commit Graph

208902 Commits

Author SHA1 Message Date
Eric Fiselier 44d9307293 Remove XFAIL in test. The bug causing it has been fixed.
llvm-svn: 246022
2015-08-26 07:03:43 +00:00
Eric Christopher d50e2e6397 Remove dead code associated with parsing and setting ABI based on
string name.

llvm-svn: 246021
2015-08-26 07:01:33 +00:00
Eric Christopher 1d3cbfa1c1 Remove a TODO that isn't going to get fixed in this way.
llvm-svn: 246020
2015-08-26 07:01:30 +00:00
Frederic Riss 5f369036d8 Revert "[dsymutil] Emit real dSYM companion binaries."
This reverts commit r246012.
Some bots do not like it (mips/s390).

llvm-svn: 246019
2015-08-26 06:41:57 +00:00
Alex Rosenberg 81cfed21ca Modernize with range-based for loops.
llvm-svn: 246018
2015-08-26 06:11:41 +00:00
Alex Rosenberg 99805ed45a Reduce code duplication.
llvm-svn: 246017
2015-08-26 06:11:38 +00:00
Alex Rosenberg 5b3404a03e Trailing whitespace
llvm-svn: 246016
2015-08-26 06:11:36 +00:00
Bhushan D. Attarde 7f3daeda9a [MIPS] Avoid breakpoint in delay slot
SUMMARY:
    This patch implements Target::GetBreakableLoadAddress() method that takes an address
    and checks for any reason there is a better address than this to put a breakpoint on.
    If there is then return that address.
    MIPS uses this method to avoid breakpoint in delay slot.
    
    Reviewers: clayborg, jingham
    Subscribers: jingham, mohit.bhakkad, sagar, jaydeep, nitesh.jain, lldb-commits
    Differential Revision: http://http://reviews.llvm.org/D12184

llvm-svn: 246015
2015-08-26 06:04:54 +00:00
David Majnemer d39bcaed21 [Sema] Don't assume CallExpr::getDirectCallee will succeed
We tried to provide a very nice diagnostic when diagnosing an assignment
to a const int & produced by a function call.  However, we cannot always
determine what function was called.

This fixes PR24568.

llvm-svn: 246014
2015-08-26 05:13:19 +00:00
Frederic Riss fae69e6d4b [dsymutil] Emit real dSYM companion binaries.
The binaries containing the linked DWARF generated by dsymutil are not
standard relocatable object files like emitted did previsously. They should be
dSYM companion files, which means they have a different file type in the
header, but also a couple other peculiarities:
 - they contain the segments and sections from the original binary in their
load commands, but not the actual contents. This means they get an address
and a size, but their offset is always 0 (but these are not virtual sections)
 - they also conatin all the defined symbols from the original binary

This makes MC a really bad fit to emit these kind of binaries. The approach
that was used in this patch is to leverage MC's section layout for the
debug sections, but to use a replacement for MachObjectWriter that lives
in MachOUtils.cpp. Some of the low-level helpers from MachObjectWriter
were reused too.

llvm-svn: 246012
2015-08-26 05:10:04 +00:00
Frederic Riss 2c69d36db1 [dsymutil] Store an optional BinaryPath in the debug map.
llvm-dsymutil needs to emit dSYM companion bundles. These are binary files
that replicate some of the orignal binary file properties (sections and
symbols). To get acces to these properties, pass the binary path in the
debug map.

llvm-svn: 246011
2015-08-26 05:09:59 +00:00
Frederic Riss 65e145ce9f [dsymutil] Make the warn and error helpers globally available. NFC.
llvm-svn: 246010
2015-08-26 05:09:55 +00:00
Frederic Riss 30711fbbf7 [dsymutil] Split NonRelocatableStringPool into its own file. NFC.
llvm-svn: 246009
2015-08-26 05:09:52 +00:00
Frederic Riss 74b9882ec3 [MC] Split the layout part of MCAssembler::finish() into its own method. NFC.
Split a MCAssembler::layout() method out of MCAssembler::finish(). This allows
running the MCSections layout separately from the streaming of the output
file. This way if a client wants to use MC to generate section contents, but
emit something different than the standard relocatable object files it is
possible (llvm-dsymutil is such a client).

llvm-svn: 246008
2015-08-26 05:09:49 +00:00
Frederic Riss 75c0c7050a [MC/MachO] Make some MachObjectWriter methods more generic. NFC.
Hardcode less values in some mach-o header writing routines and pass them
as argument. Doing so will allow reusing this code in llvm-dsymutil.

llvm-svn: 246007
2015-08-26 05:09:46 +00:00
Eric Christopher b39156d068 Update file comment to more accurately describe what's implemented.
llvm-svn: 246006
2015-08-26 04:23:11 +00:00
Nathan Wilson e23a9a4514 Modify DeclaratorChuck::getFunction to be passed an Exception Specification SourceRange
Summary:
- Store the exception specification range's begin and end SourceLocation in DeclaratorChuck::FunctionTypeInfo. These SourceLocations can be used in a FixItHint Range.
- Add diagnostic; function concept having an exception specification.


Reviewers: hubert.reinterpretcast, fraggamuffin, faisalv, aaron.ballman, rsmith

Subscribers: cfe-commits

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

llvm-svn: 246005
2015-08-26 04:19:36 +00:00
Jason Molenda da9765b966 In SendContinuePacketAndWaitForResponse there is a special bit of
code that looks for a second stop-reply packet in response to an
interrupt (control-c).  This is to handle the case where where a
stop packet is making its way up to lldb right as lldb decides to
interrupt the inferior.  If the inferior is running and we interrupt
it, we'd expect a T11 type response meaning that the inferior halted
because of the interrupt.  But if the interrupt gets a T05 type
response instead, meaning that we stopped execution by hitting a
breakpoint or whatever, then the interrupt was received while the
inferior was already paused and so it is treated as a "?" packet
-- the remote stub will send the stop message a second time.

There's a timeout where we wait to get this second stop reply packet
in SendContinuePacketAndWaitForResponse, currently 1ms.  For a slow
remote target, it may take longer than that to send the second stop
reply packet.  If that happens, then lldb will use that second stop
reply packet as the response for the next packet request it makes 
to the remote stub.  The two will be out of sync by one packet for
the rest of the debug session and it's going to go badly from then on.

I've seen times as slow as 46ms, and given the severity of missing that
second stop reply packet, I'm increasing the timeout to 100ms, or 0.1sec.
<rdar://problem/21990791> 

llvm-svn: 246004
2015-08-26 04:07:30 +00:00
Ted Kremenek 9589caf04d Add missing newline.
llvm-svn: 246003
2015-08-26 03:11:31 +00:00
Lang Hames 2d789c3699 Big Kaleidoscope tutorial update.
This commit switches the underlying JIT for the Kaleidoscope tutorials from
MCJIT to a custom ORC-based JIT, KaleidoscopeJIT. This fixes a lot of the bugs
in Kaleidoscope that were introduced when we deleted the legacy JIT. The
documentation for Chapter 4, which introduces the JIT APIs, is updated to
reflect the change.

Also included are a number of C++11 modernizations and general cleanup. Where
appropriate, the docs have been updated to reflect these changes too.

llvm-svn: 246002
2015-08-26 03:07:41 +00:00
JF Bastien 9dc042a0b6 Comparing operands should not require the same ValueID
Summary: When comparing basic blocks, there is an additional check that two Value*'s should have the same ID, which interferes with merging equivalent constants of different kinds (such as a ConstantInt and a ConstantPointerNull in the included testcase). The cmpValues function already ensures that the two values in each function are the same, so removing this check should not cause incorrect merging.

Also, the type comparison is redundant, based on reviewing the code and testing on the test suite and several large LTO bitcodes.

Author: jrkoenig
Reviewers: nlewycky, jfb, dschuff
Subscribers: llvm-commits
Differential revision: http://reviews.llvm.org/D12302

llvm-svn: 246001
2015-08-26 03:02:58 +00:00
Rui Ueyama d020c65d24 COFF: Attempt to unbreak buildbots.
This is an attempt to unbreak http://reviews.llvm.org/P122.

llvm-svn: 246000
2015-08-26 02:52:05 +00:00
JF Bastien a1d3c24ccf Expose more properties of llvm::fltSemantics
Summary: Adds accessor functions for all the fields in llvm::fltSemantics. This will be used in MergeFunctions to order two APFloats with different semanatics.

Author: jrkoenig
Reviewers: jfb
Subscribers: dschuff, llvm-commits
Differential revision: http://reviews.llvm.org/D12253

llvm-svn: 245999
2015-08-26 02:32:45 +00:00
Matthias Braun ccfc9c8d6d FastISel: Use finishCondBranch() for ARM,Mips,PowerPC FastISel
Note that after this change branch probabilities are preserved now.

llvm-svn: 245998
2015-08-26 01:55:47 +00:00
Matthias Braun 17af607796 FastISel: Factor out common code; NFC intended
This should be no functional change but for the record: For three cases
in X86FastISel this will change the order in which the FalseMBB and
TrueMBB of a conditional branch is addedd to the successor/predecessor
lists.

llvm-svn: 245997
2015-08-26 01:38:00 +00:00
JF Bastien 1a4aa1589b WebAssembly: add small FIXME for AsmPrinter.
Suggested by @sunfish as a follow-up to r245982.

llvm-svn: 245996
2015-08-26 00:50:49 +00:00
Richard Smith 0924ceab04 Refactor to reduce duplication in OnDiskIterableChainedHashTable's iterators.
llvm-svn: 245995
2015-08-26 00:22:41 +00:00
Eric Fiselier 30130f2070 [compiler-rt] Add common interceptor for wcrtomb.
Summary: Currently there is a libc++ test failing under MSAN because wcrtomb is not intercepted. This patch adds an interceptor for it. 

Reviewers: samsonov, eugenis

Subscribers: tberghammer, danalbert, srhines, llvm-commits

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

llvm-svn: 245994
2015-08-26 00:14:08 +00:00
Enrico Granata 54ed7e18f2 Rename all functionalities/data-formatter test case with radar bug numbers in them to more meaningful names
llvm-svn: 245993
2015-08-25 23:55:10 +00:00
Ahmed Bougacha beb3a9a970 [Headers] Require x86-registered for r245987 codegen tests.
llvm-svn: 245992
2015-08-25 23:42:55 +00:00
Frederic Riss ff7ab5b300 [dsymutil] actually fix test.
Not all machines have lipo installed. Do not try to invoke it.

llvm-svn: 245991
2015-08-25 23:29:43 +00:00
Charles Davis 119525914c Make variable argument intrinsics behave correctly in a Win64 CC function.
Summary:
This change makes the variable argument intrinsics, `llvm.va_start` and
`llvm.va_copy`, and the `va_arg` instruction behave as they do on Windows
inside a `CallingConv::X86_64_Win64` function. It's needed for a Clang patch
I have to add support for GCC's `__builtin_ms_va_list` constructs.

Reviewers: nadav, asl, eugenis

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1622

llvm-svn: 245990
2015-08-25 23:27:41 +00:00
JF Bastien 54be3b1f03 WebAssembly: assert that there aren't any constant pools
WebAssembly will either use globals or immediates, since it's a virtual ISA.

llvm-svn: 245989
2015-08-25 23:19:49 +00:00
Frederic Riss f2aa5e7d19 [dsymutil] Reapply r245960.
There was an issue in the test setup because the test requires an arch that
wasn't filtered by the lit.local.cfg, but given the set of bots that failed,
I'm not confident this is the (only) issue. So this commit also adds more
output to the test to help me track down the failure if it happens again.

Original commit message:
[dsymutil] Rewrite thumb triple names in user visible messages.

We autodetect triples from the input file(s) while reading the mach-o debug map.
As we need to create a Target from those triples, we always chose the thumb
variant (because the arm variant might not be 'instantiable' eg armv7m). The
user visible architecture names should still be 'arm' and not 'thumb' variants
though.

llvm-svn: 245988
2015-08-25 23:15:26 +00:00
Ahmed Bougacha e9abaad105 [Headers][X86] Add -O0 assembly tests for avx2 intrinsics.
We agreed for r245605 that, as long as we don't affect -O0 codegen
too much, it's OK to use native constructs rather than intrinsics.
Let's test that, starting with AVX2 here.

See PR24580.

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

llvm-svn: 245987
2015-08-25 23:09:05 +00:00
JF Bastien b6091dfe0f WebAssembly: emit `(func (param t) (result t))` s-expressions
Summary: Match spec format: https://github.com/WebAssembly/spec/blob/master/ml-proto/test/fac.wasm

Reviewers: sunfish

Subscribers: llvm-commits, jfb

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

llvm-svn: 245986
2015-08-25 22:58:05 +00:00
Nick Lewycky e283c5529e Make sure that we evaluate __attribute__((enable_if)) on a method with no overloads. Patch by Ettore Speziale!
llvm-svn: 245985
2015-08-25 22:33:16 +00:00
Zachary Turner 2cd2f39ea5 XFAIL TestQuoting on Windows.
A couple of edge cases are broken with regards to quote handling.

Fixing this is tracked by http://llvm.org/pr24557

llvm-svn: 245984
2015-08-25 22:25:33 +00:00
Zachary Turner d1c5b6f66b Fix a bunch of portability issues in test executables.
llvm-svn: 245983
2015-08-25 22:25:21 +00:00
JF Bastien 289287060b WebAssembly: comment out .globl when printing textual assembly
Do the same for .weak (not implemented for now, but may as well to it). Update comment string to two semicolons.

llvm-svn: 245982
2015-08-25 22:23:15 +00:00
Evgeniy Stepanov f8af87957c [msan] Regression test for PR24561.
Fixed in r245980.

llvm-svn: 245981
2015-08-25 22:20:15 +00:00
Evgeniy Stepanov d04d07e65e [msan] Precise instrumentation for icmp sgt %x, -1.
Extend signed relational comparison instrumentation with a special
case for comparisons with -1. This fixes an MSan false positive when
such comparison is used as a sign bit test.

https://llvm.org/bugs/show_bug.cgi?id=24561

llvm-svn: 245980
2015-08-25 22:19:11 +00:00
Nick Lewycky 08426e2098 Clarify the error message when the reason the conversion is not viable is because the returned value does not match the function return type.
llvm-svn: 245979
2015-08-25 22:18:46 +00:00
Vedant Kumar 73a7c93a0a [MC] Add a SetUsed default param to MCSymbol accessors (NFC)
Reviewed by: rafael

llvm-svn: 245978
2015-08-25 22:06:07 +00:00
Matthias Braun 130bd90e17 MachineBasicBlock: Use MCPhysReg instead of unsigned in livein API
This is friendlier to the readers as it makes it clear that the API is
not meant for vregs but just for physregs.

llvm-svn: 245977
2015-08-25 22:05:55 +00:00
Cong Hou cd59591396 Remove the final bit test during lowering switch statement if all cases in bit test cover a contiguous range.
When lowering switch statement, if bit tests are used then LLVM will always generates a jump to the default statement in the last bit test. However, this is not necessary when all cases in bit tests cover a contiguous range. This is because when generating the bit tests header MBB, there is a range check that guarantees cases in bit tests won't go outside of [low, high], where low and high are minimum and maximum case values in the bit tests. This patch checks if this is the case and then doesn't emit jump to default statement and hence saves a bit test and a branch.

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

llvm-svn: 245976
2015-08-25 21:34:38 +00:00
Simon Pilgrim fbb8904411 [X86] Remove unnecessary MMX declarations from Intrin.h
As discussed in PR23648 - the intrinsics _m_from_int, _m_to_int and _m_prefetch are defined in mmintrin.h and prfchwintrin.h so we don't need to in Intrin.h

Added tests for _m_from_int and _m_to_int

D11338 already added a test for _m_prefetch

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

llvm-svn: 245975
2015-08-25 21:27:46 +00:00
Evgeniy Stepanov b0b2d4d2c9 Use CHECK-LABEL in MSan IR tests.
This actually found one case when a test was matching instructions
from the output of a different test.

llvm-svn: 245974
2015-08-25 20:59:26 +00:00
Chris Bieneman f4b7bcec97 [CMake] fixing a typo that is breaking bots.
llvm-svn: 245971
2015-08-25 20:00:35 +00:00
Chris Bieneman d160260681 [CMake] merge add_compiler_rt_runtime and add_compiler_rt_darwin_runtime into a single function
Summary: This refactoring moves much of the Apple-specific behavior into a function in AddCompilerRT. The next cleanup patch will remove more of the if(APPLE) checks in the outlying CMakeLists.

This patch adds a bunch of new functionality to add_compiler_rt_runtime so that the target names don't need to be reconstructed outside the call. It also updates some of the call sites to exercise the new functionality, but does not update all uses fully. Subsequent patches will further update call sites and move to using the new features.

Reviewers: filcab, bogner, kubabrecka, zaks.anna, glider, samsonov

Subscribers: beanz, rengolin, llvm-commits

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

llvm-svn: 245970
2015-08-25 19:53:09 +00:00