Commit Graph

105996 Commits

Author SHA1 Message Date
Benjamin Kramer fda5dc4968 Revert "InstCombine: Turn mul.with.overflow(X, 2) into the cheaper add.with.overflow(X, X)"
It's better to do this in codegen, mul.with.overflow(X, 2) is more canonical because it has only one use on "X".

llvm-svn: 131798
2011-05-21 18:31:42 +00:00
Douglas Gregor 097984480d Clang is now correctly marking this as a class, so update the test case accordingly
llvm-svn: 131797
2011-05-21 18:17:06 +00:00
Douglas Gregor 9574af6ea2 Teach Sema::ActOnUninitializedDecl() not to try to interpret when one
should use a constructor to default-initialize a
variable. InitializationSequence knows the rules for default
initialization, better. Fixes <rdar://problem/8501008>.

llvm-svn: 131796
2011-05-21 17:52:48 +00:00
Charles Davis 6879634efd Don't allow .seh_handler and .seh_handlerdata directives inside chained
unwind areas.

llvm-svn: 131795
2011-05-21 17:36:25 +00:00
Douglas Gregor 643c922e66 Introduce the -fdiagnostics-format=xxx option to control how Clang
prints the file, line, and column of a diagnostic. We currently
support Clang's normal format, MSVC, and Vi formats.

Note that we no longer change the diagnostic format based on
-fms-extensions.

Patch by Andrew Fish!

llvm-svn: 131794
2011-05-21 17:07:29 +00:00
Douglas Gregor 61b6e49ee1 A few more is(Un)signedIntegerType/is(Un)signedOrEnumerationType cleanups.
llvm-svn: 131793
2011-05-21 16:28:01 +00:00
Douglas Gregor 253cadfe68 Implement C++0x semantics for passing non-POD classes through varargs.
llvm-svn: 131792
2011-05-21 16:27:21 +00:00
Charles Davis 8e8f59bdfb A handler for a function in the Win64 EH scheme can be both an unwind handler
and an exception handler. Handle that case.

Also, add an 'Emitted' member to the MCWin64EHUnwindInfo struct. It will be
needed later.

llvm-svn: 131791
2011-05-21 15:57:49 +00:00
Benjamin Kramer 691731eb9c InstCombine: Turn mul.with.overflow(X, 2) into the cheaper add.with.overflow(X, X)
llvm-svn: 131789
2011-05-21 09:22:06 +00:00
Argyrios Kyrtzidis 627c14a068 Only ignore extra tokens after #else if we skip it, otherwise warn. Fixes rdar://9475098.
llvm-svn: 131788
2011-05-21 04:26:04 +00:00
Cameron Zwarich faeb520c97 Fix PR9978 by adding RIP to GR64_TC so it can be used as an address in PIC code. It
is already in GR64 for the same reasons. Since it isn't allocatable it can't cause
any problems.

llvm-svn: 131787
2011-05-21 04:13:49 +00:00
Akira Hatanaka 2df6c010aa Use the correct register to access stack frame objects.
llvm-svn: 131785
2011-05-21 03:01:03 +00:00
Akira Hatanaka f084fcd7fe Insert instructions that copy $sp to or from $fp at the right locations.
llvm-svn: 131784
2011-05-21 02:29:26 +00:00
Dan Gohman 8b20187c82 When BasicAA can determine that two pointers have the same base but
differ by a dynamic offset, return PartialAlias instead of MayAlias.
See the comment in the code for details. This fixes PR9971.

llvm-svn: 131781
2011-05-21 01:05:08 +00:00
Andrew Trick d5d0764b3b Have Program::Wait return -2 for crashed and timeouts instead of embedding
info in the error message. Per Dan's request.

llvm-svn: 131780
2011-05-21 00:56:46 +00:00
Johnny Chen 1c464d4961 A little refactoring.
llvm-svn: 131779
2011-05-21 00:55:57 +00:00
Johnny Chen e7faaa6688 When in non-raw mode and edis fails to parse the tokens of the instruction, output
the raw disassembly so that the opcode aligns with the edis'ed disassembly.

llvm-svn: 131773
2011-05-21 00:44:42 +00:00
Charles Davis 54254008ba Set the "LastFrameInst" field when streaming a .seh_setframe directive. This
is needed for an upcoming patch.

llvm-svn: 131772
2011-05-21 00:09:04 +00:00
Greg Clayton 21c5ab4fe1 Lock the target API mutex correctly in all cases and make sure m_opaque_sp
contains a valid pointer before trying to access the target.

llvm-svn: 131771
2011-05-20 23:51:26 +00:00
Ted Kremenek 109b127e02 Fix regression in static analyzer's handling of prefix '--' operator. It was being treated as postfix '--' in C mode.
llvm-svn: 131770
2011-05-20 23:40:06 +00:00
Greg Clayton adc00cb2ba Centralize the code that gathers the thread ID list from the remote GDB
server so that it happens in command sequence where no other packets can
sneak between.

llvm-svn: 131769
2011-05-20 23:38:13 +00:00
Cameron Zwarich d7ee0fcac9 Fix PR9962 by properly constraining register classes in RemoveCopyByCommutingDef(). This
actually fixes most of the VerifyCoalescing failures in test-suite.

llvm-svn: 131768
2011-05-20 23:25:36 +00:00
Akira Hatanaka 0837692ac6 Change the order fixed objects are created in MipsTargetLowering::LowerCall in
preparation for reversing StackDirection.

Fixed objects are created in the following order:  
 1. Incoming arguments passed on stack.
 2. va_arg objects (include both arguments that are passed in registers and
    pointer to the location of the first va_arg argument).
 3. $gp restore slot.
 4. Outgoing arguments passed on stack.
 5. Pointer to alloca'd space.

llvm-svn: 131767
2011-05-20 23:22:14 +00:00
Peter Collingbourne f5c22943eb Fix build error - strstr returns a const char *
llvm-svn: 131766
2011-05-20 22:42:59 +00:00
Charles Davis 1a1d4777b9 Fix typo. When will I learn?
llvm-svn: 131765
2011-05-20 22:23:34 +00:00
Eli Friedman 60afcc2a6f Add fast-isel support for byval calls on x86.
llvm-svn: 131764
2011-05-20 22:21:04 +00:00
Charles Davis bc1feb1f25 Add .pdata and .xdata sections to the COFF TLOF implementation.
llvm-svn: 131763
2011-05-20 22:13:55 +00:00
Greg Clayton 43479731c0 Now that we have dynamic values, we need to protect the GetChildAtIndex()
calls with the target API mutex.

llvm-svn: 131762
2011-05-20 22:07:17 +00:00
Howard Hinnant 6282a4a1d3 This is a simplified (and superior) implementation of __invoke, __invokable and __invoke_of. It is superior in that __invoke now handles reference qualified member functions whereas the previous implementation did not. And it simply has less infrastructure in its implementation. I'm still learning how to program in C++11 (and probably will be for a long time). This change does not impact the behavior we're seeing in http://llvm.org/bugs/show_bug.cgi?id=9975
llvm-svn: 131761
2011-05-20 22:02:53 +00:00
Jim Grosbach 8aded86edb No reason not to allow defining the CFA as a reg w/ offset zero.
llvm-svn: 131760
2011-05-20 21:50:09 +00:00
Alexis Hunt a671bca618 Add a missing case for default constructor deletion.
This case is tested by the fact that the modified test produces
significatly worse diagnostics. That's on the list.

llvm-svn: 131759
2011-05-20 21:43:47 +00:00
Akira Hatanaka 7c619f174a In CC_MipsO32, allocate a stack space regardless of whether the argument is
passed in register or on the stack.

llvm-svn: 131758
2011-05-20 21:39:54 +00:00
Jim Grosbach 17c1d13ee4 Fix typo.
llvm-svn: 131757
2011-05-20 21:35:39 +00:00
Jim Grosbach 83c4bb157a Add support for frame info use of the .cfi_def_cfa directive.
llvm-svn: 131756
2011-05-20 21:23:17 +00:00
Jim Grosbach 860b03b5f9 Add missing leading \t when printing .cfi_def_cfa in the asmstreamer.
llvm-svn: 131755
2011-05-20 21:22:37 +00:00
Sebastian Redl d29f6086a4 Introduce XFAILed test for braced initializer lists.
llvm-svn: 131754
2011-05-20 21:07:01 +00:00
Akira Hatanaka cae19e8671 Define functions that get/set maximum call frame size.
llvm-svn: 131752
2011-05-20 20:11:17 +00:00
Rafael Espindola 652bfdb1ab adds some attributes to attribute section when cpu is "xscale"
(this is what used in Android NDK, when architecture is ARMv5)

patch by Koan-Sin Tan

llvm-svn: 131751
2011-05-20 20:10:34 +00:00
Rafael Espindola 1866808384 fixes target address tBL and tBLX and sets relocation type
of tBL/tBLX to R_ARM_THM_CALL (ARM ELF 4.7.1.6)

Patch by koan-sin tan.

llvm-svn: 131748
2011-05-20 20:01:01 +00:00
Argyrios Kyrtzidis ac8bc12cd1 Add asserts in StringRef to make sure we avoid undefined behavior:
-strlen should not be called with NULL. Also guarantee that StringRef's Length is 0 if Data is NULL.
-memcmp should not be called with NULL (even if size is 0)

Patch by Matthieu Monrocq!

llvm-svn: 131747
2011-05-20 19:24:12 +00:00
Stuart Hastings 91f1d24736 Re-commit 131641 with fixes; de-pseudoize MOVSX16rr8 and friends.
rdar://problem/8614450

llvm-svn: 131746
2011-05-20 19:04:40 +00:00
Akira Hatanaka 43407fe633 Make $fp and $ra callee-saved registers and let PrologEpilogInserter handle
saving and restoring them.

llvm-svn: 131745
2011-05-20 18:39:33 +00:00
Andrew Trick f44aadf0fd indvars: Prototyping Sign/ZeroExtend elimination without canonical IVs.
No functionality enabled by default. Use -disable-iv-rewrite.
Extended IVUsers to keep track of the phi that represents the users' IV.
Added the WidenIV transform to replace a narrow IV with a wide IV
by doing a one-for-one replacement of IV users instead of expanding the
SCEV expressions. [sz]exts are removed and truncs are inserted.

llvm-svn: 131744
2011-05-20 18:25:42 +00:00
Charles Davis 9a115a4bd2 Now that they're implemented, make the Win64 EH MCAsmStreamer methods call
super.

llvm-svn: 131743
2011-05-20 18:19:22 +00:00
Charles Davis 0b96522758 Better way to build the CFCPP sources as part of liblldbHostMacOSX.
llvm-svn: 131742
2011-05-20 18:18:09 +00:00
Charles Davis dae31daf64 When installing the binary part of the LLDB Python modules, symlink to the
installed liblldb instead of the built one. Now Python support won't break if
you clean your build directories.

llvm-svn: 131741
2011-05-20 18:14:37 +00:00
Chad Rosier ad00f3d0b9 Fixed regression due to commit 131709, which disables vararg tail call optimizations on Win64
llvm-svn: 131740
2011-05-20 17:49:39 +00:00
Evan Cheng 4fcd8250ae Revert accidental commit.
llvm-svn: 131739
2011-05-20 17:38:48 +00:00
Johnny Chen 02cefc2c23 Workaround the issue of llvm:tB (A8.6.16 B Encoding T2) not being processed as
a branch instruction and therefore the symbolic information is not being dumped for
non-raw mode.

The problem is that the ARMAsmParser is not recognizing the "#274" in "b	#274"
as a valid operand when doing disassembly in non-raw mode.

llvm-svn: 131738
2011-05-20 17:27:37 +00:00
Douglas Gregor 6ab2fa8f78 Introduce Type::isSignedIntegerOrEnumerationType() and
Type::isUnsignedIntegerOrEnumerationType(), which are like
Type::isSignedIntegerType() and Type::isUnsignedIntegerType() but also
consider the underlying type of a C++0x scoped enumeration type.

Audited all callers to the existing functions, switching those that
need to also handle scoped enumeration types (e.g., those that deal
with constant values) over to the new functions. Fixes PR9923 /
<rdar://problem/9447851>.

llvm-svn: 131735
2011-05-20 16:38:50 +00:00