Commit Graph

106462 Commits

Author SHA1 Message Date
Charles Davis a575226fd8 Emit the handler's data area. For GCC-style exceptions under Win64, the
handler's data area starts with a 4-byte reference to the personality
function, followed by the DWARF LSDA.

llvm-svn: 132302
2011-05-30 00:13:34 +00:00
Greg Clayton 15184db092 Protect the input reader stack with a recursive mutex.
llvm-svn: 132301
2011-05-29 23:07:38 +00:00
Joerg Sonnenberger d9bcddd6b9 If a test case is not compiled on a specific platform, print "skipped"
to stdout. This helps identifying missing coverage on a given platform.

llvm-svn: 132300
2011-05-29 21:43:29 +00:00
Jakob Stoklund Olesen ca6a4d8940 Revert r132245, "Create two BlockInfo entries when a live range is discontinuous through a block."
This commit seems to have broken a darwin 9 tester.

llvm-svn: 132299
2011-05-29 21:24:39 +00:00
Jakob Stoklund Olesen dd6fcc4e46 Fix PR10046 by updating LiveVariables kill info when splitting live ranges.
This only affects targets like Mips where branch instructions may kill virtual
registers. Most other targets branch on flag values, so virtual registers are
not involved.

The problem is that MachineBasicBlock::updateTerminator deletes branches and
inserts new ones while LiveVariables keeps a list of pointers to instructions
that kill virtual registers. That list wasn't properly updated in
MBB::SplitCriticalEdge.

llvm-svn: 132298
2011-05-29 20:10:28 +00:00
Richard Trieu beaf34531e Add a new warning on NULL pointer constant to integer conversion.
This path was reviewed by Chandler Carruth at http://codereview.appspot.com/4538074/

llvm-svn: 132297
2011-05-29 19:59:02 +00:00
Howard Hinnant 76c7cd0e15 noexcept for Chapter 21 [strings].
llvm-svn: 132296
2011-05-29 19:57:12 +00:00
John McCall 7d84ece09b On Darwin ARM, set the UNWIND_RESUME libcall to _Unwind_SjLj_Resume.
This is important for the correct lowering of unwind instructions
(which doesn't matter at all) and llvm.eh.resume calls (which does).

Take 2, now with more basic competence.

llvm-svn: 132295
2011-05-29 19:50:32 +00:00
John McCall be6d0c0aea ...this is not a good commit day for me.
llvm-svn: 132294
2011-05-29 19:44:55 +00:00
John McCall e64371b932 I didn't mean to commit these residues of a personal project.
llvm-svn: 132293
2011-05-29 19:41:56 +00:00
Nick Lewycky 63353933c6 Add testcase for r132290, to check for the crasher caught by the buildbots
doing llvm-gcc selfhost (or cross).

llvm-svn: 132292
2011-05-29 19:41:14 +00:00
John McCall 085d891d80 On Darwin ARM, set the UNWIND_RESUME libcall to _Unwind_SjLj_Resume.
This is important for the correct lowering of unwind instructions
(which doesn't matter at all) and llvm.eh.resume calls (which does).

llvm-svn: 132291
2011-05-29 19:39:04 +00:00
Nick Lewycky c66d455e50 Don't crash owhen ComputeLoadResult can't compute the result of the load.
llvm-svn: 132290
2011-05-29 19:33:36 +00:00
Greg Clayton 18d85eedda Make sure if an enumeration "settings" value has a valid default setting in
its definition, that the first enumeration doesn't always get used as the
default.

llvm-svn: 132289
2011-05-29 19:21:37 +00:00
Nick Lewycky a3bb03e400 Obey the isVolatile bit on memory intrinsics when analyzing uses of a global
variable. Noticed by inspection.

Simulate memset in EvaluateFunction where the target of the memset and the
value we're setting are both the null value. Fixes PR10047!

llvm-svn: 132288
2011-05-29 18:41:56 +00:00
Howard Hinnant 28d55e0745 http://llvm.org/bugs/show_bug.cgi?id=10045 . Please review, I have not tested this on linux.
llvm-svn: 132287
2011-05-29 13:57:49 +00:00
Howard Hinnant af152c8431 minor documentation update
llvm-svn: 132286
2011-05-29 13:53:56 +00:00
Nadav Rotem 707f2d7787 Fix warnings due to 132263; Thanks rdivacky.
llvm-svn: 132285
2011-05-29 08:10:47 +00:00
Chandler Carruth a923fb2b3b Fix a regression in the source locations for unary trait expressions.
I tried to use an assert to prove that I could remove each of the
arguments I did, but ended up writing my assert with inverted logic.
Doh! Reported by Xi Wang on cfe-dev. I have manually verified the source
locations and ranges for these using -ast-dump. I tried writing a test
case that would catch these, but these expressions aren't exposed in the
c-index-test's token annotation utility.

llvm-svn: 132284
2011-05-29 07:32:14 +00:00
Charles Davis b025724b46 When generating against the Win64 EH scheme, set the handler to the GCC-specific
handler.

At this moment, only GCC-style exceptions are supported. Other kinds
of exceptions, including "traditional" SEH and Microsoft Visual C++ exceptions,
need more work--and an compiler exception model that isn't specific to
GCC-style exceptions!

In particular, I imagine that it would be possible to mix "traditional" SEH
with GCC-style EH or Microsoft C++ EH. Currently LLVM has no way (beyond some
target-specific defaults and whole-module compiler switches) of knowing which
scheme to use when.

llvm-svn: 132283
2011-05-29 04:28:35 +00:00
Greg Clayton 71f96fef42 lldb-58
llvm-svn: 132281
2011-05-29 04:10:48 +00:00
Greg Clayton fc3f027d33 Don't have the debugger default to ignoring EOF. This is only what the driver
(or anything running in a terminal) wants. Not what a UI (Xcode) would want 
where it creates a debugger per debug window. The current code had an infinite
loop after a debug session ended. 

llvm-svn: 132280
2011-05-29 04:06:55 +00:00
Rafael Espindola 2e84c82750 Use %rbp on a 64 bit test.
llvm-svn: 132279
2011-05-29 04:04:50 +00:00
Rafael Espindola 0f17990f28 Fix to match the dwarf register numbers that gdb uses.
llvm-svn: 132278
2011-05-29 03:58:16 +00:00
Eli Friedman 8f630d9ffc Fix tests broken by r132257.
llvm-svn: 132277
2011-05-29 03:51:55 +00:00
Rafael Espindola ccfd392c13 Dwarf register 0 is r0, remove incorrect entries.
llvm-svn: 132276
2011-05-29 03:17:01 +00:00
John McCall 2c6d23fba2 Fix this to work correctly with phis; test case to follow if this successfully
fixes self-host.

llvm-svn: 132275
2011-05-29 03:01:09 +00:00
Rafael Espindola fd75d45b88 Remove the dwarf numbers from the D registers. They don't have dwarf numbers
and should probably be encoded as

DW_OP_reg 32 DW_OP_piece 4 DW_OP_reg 33

llvm-svn: 132274
2011-05-29 02:21:01 +00:00
Greg Clayton 2dfd12fb22 lldb-57
llvm-svn: 132271
2011-05-29 01:30:02 +00:00
Greg Clayton c0ea046a80 Fixed an issue that could cause LLDB to spin indefinitely.
llvm-svn: 132270
2011-05-29 00:45:15 +00:00
John McCall 9b382dde92 Convert Clang over to resuming from landing pads with llvm.eh.resume.
It's quite likely that this will explode, but I need to know how. :)

llvm-svn: 132269
2011-05-28 21:13:02 +00:00
Cameron Zwarich 6528a54946 Fix ARM fast isel to correctly flag memory operands to stores. This fixes
-verify-machineinstrs failures on several tests.

llvm-svn: 132268
2011-05-28 20:34:49 +00:00
Howard Hinnant 9e5c99f61f noexcept for <typeindex>. This completes Chapter 20 [utilities].
llvm-svn: 132267
2011-05-28 18:57:24 +00:00
Howard Hinnant cfd52789dc noexcept for <scoped_allocator>.
llvm-svn: 132266
2011-05-28 18:51:12 +00:00
Howard Hinnant d53d81522d noexcept for <chrono>.
llvm-svn: 132265
2011-05-28 18:34:36 +00:00
Howard Hinnant 6a07d6f06d noexcept for <functional>.
llvm-svn: 132264
2011-05-28 17:59:48 +00:00
Nadav Rotem d86c1c41fb Refactor the type legalizer. Switch TargetLowering to a new enum - LegalizeTypeAction.
This patch does not change the behavior of the type legalizer. The codegen
produces the same code.
This infrastructural change is needed in order to enable complex decisions
for vector types (needed by the vector-select patch).

llvm-svn: 132263
2011-05-28 17:57:14 +00:00
Chris Lattner 4b799d4e0c make this a bit less confusing
llvm-svn: 132262
2011-05-28 17:53:17 +00:00
Howard Hinnant 3739fe79e5 noexcept for <memory>. I've added a few extension noexcept to: allocator_traits<A>::deallocate, allocaate<T>::deallocate, return_temporary_buffer, and default_delete<T>::operator()(T*) const. My rationale was: If a std-dicated noexcept function needs to call another std-defined function, that called function must be noexcept. We're all a little new to noexcept, so things like this are to be expected. Also included fix for broken __is_swappable trait pointed out by Marc Glisse, thanks Marc|. And fixed a test case for is_nothrow_destructible. Destructors are now noexcept by default|
llvm-svn: 132261
2011-05-28 14:41:13 +00:00
Benjamin Kramer df1fb13a5c Eliminate temporary argument vectors.
llvm-svn: 132260
2011-05-28 14:26:31 +00:00
David Chisnall 7441d8823f Fix another type mismatch.
llvm-svn: 132259
2011-05-28 14:23:43 +00:00
David Chisnall 8a42d19b33 Fix missing cast.
llvm-svn: 132258
2011-05-28 14:09:01 +00:00
Renato Golin 161505f480 adding XFAIL and XTARGET to those that require Darwin host
llvm-svn: 132257
2011-05-28 14:03:16 +00:00
Benjamin Kramer e260b2b08a Erase instructions _after_ checking their type.
llvm-svn: 132256
2011-05-28 11:48:37 +00:00
Benjamin Kramer 41112a1703 Move ARM specific test into the ARM subdir.
llvm-svn: 132255
2011-05-28 11:01:30 +00:00
Benjamin Kramer fd53a27f99 ConstantFoldInstOperands doesn't like compares, hand it off to instsimplify instead.
Fixes PR10040.

llvm-svn: 132254
2011-05-28 10:16:58 +00:00
John McCall 046c47e970 Implement and document the llvm.eh.resume intrinsic, which is
transformed by the inliner into a branch to the enclosing landing pad
(when inlined through an invoke).  If not so optimized, it is lowered
DWARF EH preparation into a call to _Unwind_Resume (or _Unwind_SjLj_Resume
as appropriate).  Its chief advantage is that it takes both the
exception value and the selector value as arguments, meaning that there
is zero effort in recovering these;  however, the frontend is required
to pass these down, which is not actually particularly difficult.

Also document the behavior of landing pads a bit better, and make it
clearer that it's okay that personality functions don't always land at
landing pads.  This is just a fact of life.  Don't write optimizations that
rely on pushing things over an unwind edge.

llvm-svn: 132253
2011-05-28 07:45:59 +00:00
John McCall 375dcc9ec9 Change how tblgen generates attributes for intrinsics to use a single
switch.  With this newfound organization, teach tblgen how not to give
all intrinsics the 'nounwind' attribute.  Introduce a new intrinsic,
llvm.eh.resume, which does not have this attribute.  Documentation and uses
to follow.

llvm-svn: 132252
2011-05-28 06:31:34 +00:00
Charles Davis 5638b9f01e When generating code for Win64 EH, emit StartProc and EndProc directives.
llvm-svn: 132250
2011-05-28 04:21:04 +00:00
Bruno Cardoso Lopes fe73374d7a Add support for ARM ldrexd/strexd builtins
llvm-svn: 132249
2011-05-28 04:11:33 +00:00