Commit Graph

153413 Commits

Author SHA1 Message Date
Fariborz Jahanian db4fc28145 Objective-C: merge objc_requires_super attribute of
method declaration into its implementation to
prevent a bogus warning about mismatched attributes.
then make sure the warning about missing call to super comes out
of the method implementation. // rdar://14251387

llvm-svn: 185974
2013-07-09 22:02:20 +00:00
David Majnemer a80fed7e58 InstSimplify: X >> X -> 0
llvm-svn: 185973
2013-07-09 22:01:22 +00:00
Adrian Prantl 1014fcfd99 move test into the appropriate subdir.
llvm-svn: 185972
2013-07-09 21:44:11 +00:00
Adrian Prantl 19942885ba Typo.
llvm-svn: 185971
2013-07-09 21:44:06 +00:00
Nadav Rotem d7b574e5b3 Fix PR16571, which is a bug in the code that checks that all of the types in the bundle are uniform.
llvm-svn: 185970
2013-07-09 21:38:08 +00:00
Marshall Clow 8e1cb5adb3 move __save_flags from <random> to <ios> in preparation for reuse; no functionality change
llvm-svn: 185968
2013-07-09 20:34:14 +00:00
Adrian Prantl 7278788ffe Reapply an improved version of r180816/180817.
Do not generate VLAs as complex variables any more, as they are now
correctly represented as breg+0 locations in the backend.

(Paired commit with LLVM: r185966)

rdar://problem/13658587

llvm-svn: 185967
2013-07-09 20:29:03 +00:00
Adrian Prantl 418d1d1ea9 Reapply an improved version of r180816/180817.
Change the informal convention of DBG_VALUE machine instructions so that
we can express a register-indirect address with an offset of 0.
The old convention was that a DBG_VALUE is a register-indirect value if
the offset (operand 1) is nonzero. The new convention is that a DBG_VALUE
is register-indirect if the first operand is a register and the second
operand is an immediate. For plain register values the combination reg,
reg is used. MachineInstrBuilder::BuildMI knows how to build the new
DBG_VALUES.

rdar://problem/13658587

llvm-svn: 185966
2013-07-09 20:28:37 +00:00
Enrico Granata eff81a471a Second attempt at getting the PyCallable changes in trunk
Thanks to Daniel Malea for helping test this patch for Linux happiness!

llvm-svn: 185965
2013-07-09 20:14:26 +00:00
Michael Gottesman 61a56d7a3a Fixed up the comments in FastISel.h so that they conform to the LLVM style guide.
llvm-svn: 185964
2013-07-09 20:08:46 +00:00
Michael Gottesman c487d99905 Added "mode: c++" to FastISel.h header.
llvm-svn: 185963
2013-07-09 20:00:25 +00:00
Stephen Lin 4ee5e873d5 Appease buildbots after r185956: just set -mcpu explicitly, as it should have been from the beginning.
llvm-svn: 185962
2013-07-09 19:27:10 +00:00
Stephen Lin 228765f61f Appease Atom buildbot after r185956 (explicitly turn on AVX)
llvm-svn: 185961
2013-07-09 18:55:52 +00:00
Hal Finkel e4dd5c29f0 WidenVecRes_BUILD_VECTOR must use the first operand's type
Because integer BUILD_VECTOR operands may have a larger type than the result's
vector element type, and all operands must have the same type, when widening a
BUILD_VECTOR node by adding UNDEFs, we cannot use the vector element type, but
rather must use the type of the existing operands.

Another bug found by llvm-stress.

llvm-svn: 185960
2013-07-09 18:55:10 +00:00
Bill Schmidt 4122169308 [PowerPC] Better fix for PR16556.
A more complete example of the bug in PR16556 was recently provided,
showing that the previous fix was not sufficient.  The previous fix is
reverted herein.

The real problem is that ReplaceNodeResults() uses LowerFP_TO_INT as
custom lowering for FP_TO_SINT during type legalization, without
checking whether the input type is handled by that routine.
LowerFP_TO_INT requires the input to be f32 or f64, so we fail when
the input is ppcf128.

I'm leaving the test case from the initial fix (r185821) in place, and
adding the new test as another crash-only check.

llvm-svn: 185959
2013-07-09 18:50:20 +00:00
Stephen Lin 73fa842e2e Attempt to appease buildbot after r185956 by explicitly turning setting -fma,-fma4 attrs (I'm assuming they're set because the bot is running on machine that has one or the other.)
llvm-svn: 185958
2013-07-09 18:41:43 +00:00
Stephen Lin 73de7bf5de AArch64/PowerPC/SystemZ/X86: This patch fixes the interface, usage, and all
in-tree implementations of TargetLoweringBase::isFMAFasterThanMulAndAdd in
order to resolve the following issues with fmuladd (i.e. optional FMA)
intrinsics:

1. On X86(-64) targets, ISD::FMA nodes are formed when lowering fmuladd
intrinsics even if the subtarget does not support FMA instructions, leading
to laughably bad code generation in some situations.

2. On AArch64 targets, ISD::FMA nodes are formed for operations on fp128,
resulting in a call to a software fp128 FMA implementation.

3. On PowerPC targets, FMAs are not generated from fmuladd intrinsics on types
like v2f32, v8f32, v4f64, etc., even though they promote, split, scalarize,
etc. to types that support hardware FMAs.

The function has also been slightly renamed for consistency and to force a
merge/build conflict for any out-of-tree target implementing it. To resolve,
see comments and fixed in-tree examples.

llvm-svn: 185956
2013-07-09 18:16:56 +00:00
Hal Finkel ff666bd962 Don't crash in SE dealing with ashr x, -1
ScalarEvolution::getSignedRange uses ComputeNumSignBits from ValueTracking on
ashr instructions. ComputeNumSignBits can return zero, but this case was not
handled correctly by the code in getSignedRange which was calling:
  APInt::getSignedMinValue(BitWidth).ashr(NS - 1)
with NS = 0, resulting in an assertion failure in APInt::ashr.

Now, we just return the conservative result (as with NS == 1).

Another bug found by llvm-stress.

llvm-svn: 185955
2013-07-09 18:16:16 +00:00
David Majnemer a92b3c914e ValueTracking: Fix bugs in isKnownToBeAPowerOfTwo
(add nsw x, (and x, y)) isn't a power of two if x is zero, it's zero
(add nsw x, (xor x, y)) isn't a power of two if y has bits set that aren't set in x

llvm-svn: 185954
2013-07-09 18:11:10 +00:00
Nadav Rotem 861bef7dd0 Set the default insert point to the first instruction, and not to end()
llvm-svn: 185953
2013-07-09 17:55:36 +00:00
Nadav Rotem 2315c2e618 IRBuilder: add an assertion that checks if we try to get a debug loc from ->end();
llvm-svn: 185952
2013-07-09 17:54:22 +00:00
Daniel Malea 6c4a0f0816 Cleanup in TestConcurrentEvents.py
- re-enable tests fixed by Matt's commit this morning (addressed llvm.org/pr16567)
- disabled tests affected by new bug llvm.org/pr16575
- removed some commented out code in inferior

llvm-svn: 185951
2013-07-09 17:36:18 +00:00
Howard Hinnant dbdeb153d8 Bill Fisher: This patch fixes a bug where regex_iterator doesn't indicate when it's restarting in the middle of a string. This bug causes /^a/ to match in the middle of the string "aaaaaaa", during iteration.
My patch uses  to communicate when  is false.

llvm-svn: 185950
2013-07-09 17:29:09 +00:00
Hal Finkel 6c29bd9088 DAGCombine tryFoldToZero cannot create illegal types after type legalization
When folding sub x, x (and other similar constructs), where x is a vector, the
result is a vector of zeros. After type legalization, make sure that the input
zero elements have a legal type. This type may be larger than the result's
vector element type.

This was another bug found by llvm-stress.

llvm-svn: 185949
2013-07-09 17:02:45 +00:00
Fariborz Jahanian d83ef848bd ObjC migrator: Add -objcmt-migrate-property to do property
migration. Also, fixes an old bug where older migration 
flags were not being checked for properly.

llvm-svn: 185948
2013-07-09 16:59:14 +00:00
Andrew Kaylor 5743f1aafc Change TestRegisters.py attach case to attach to a.out and enable that test case
llvm-svn: 185947
2013-07-09 16:48:30 +00:00
Andrew Kaylor 214f3a8a78 Use shared pointers to hold the process in ProcessMonitor
llvm-svn: 185946
2013-07-09 16:44:27 +00:00
Ulrich Weigand 52cf8e4488 [PowerPC] Revert r185476 and fix up TLS variant kinds
In the commit message to r185476 I wrote:

>The PowerPC-specific modifiers VK_PPC_TLSGD and VK_PPC_TLSLD
>correspond exactly to the generic modifiers VK_TLSGD and VK_TLSLD.
>This causes some confusion with the asm parser, since VK_PPC_TLSGD
>is output as @tlsgd, which is then read back in as VK_TLSGD.
>
>To avoid this confusion, this patch removes the PowerPC-specific
>modifiers and uses the generic modifiers throughout.  (The only
>drawback is that the generic modifiers are printed in upper case
>while the usual convention on PowerPC is to use lower-case modifiers.
>But this is just a cosmetic issue.)

This was unfortunately incorrect, there is is fact another,
serious drawback to using the default VK_TLSLD/VK_TLSGD
variant kinds: using these causes ELFObjectWriter::RelocNeedsGOT
to return true, which in turn causes the ELFObjectWriter to emit
an undefined reference to _GLOBAL_OFFSET_TABLE_.

This is a problem on powerpc64, because it uses the TOC instead
of the GOT, and the linker does not provide _GLOBAL_OFFSET_TABLE_,
so the symbol remains undefined.  This means shared libraries
using TLS built with the integrated assembler are currently
broken.

While the whole RelocNeedsGOT / _GLOBAL_OFFSET_TABLE_ situation
probably ought to be properly fixed at some point, for now I'm
simply reverting the r185476 commit.  Now this in turn exposes
the breakage of handling @tlsgd/@tlsld in the asm parser that
this check-in was originally intended to fix.

To avoid this regression, I'm also adding a different fix for
this problem: while common code now parses @tlsgd as VK_TLSGD,
a special hack in the asm parser translates this code to the
platform-specific VK_PPC_TLSGD that the back-end now expects.
While this is not really pretty, it's self-contained and
shouldn't hurt anything else for now.  One the underlying
problem is fixed, this hack can be reverted again.

llvm-svn: 185945
2013-07-09 16:41:09 +00:00
Matt Kopec b29104467f Fix signal handling for POSIX (only tested on Linux) processes in multi-threaded programs.
Also fix a related issue where if a thread exits after a thread continue, lldb would hang.

llvm-svn: 185944
2013-07-09 15:09:45 +00:00
Vincent Lejeune ce499744b3 R600: Do not predicated basic block with multiple alu clause
Test is not included as it is several 1000 lines long.
To test this functionnality, a test case must generate at least 2 ALU clauses,
where an ALU clause is ~110 instructions long.

NOTE: This is a candidate for the stable branch.
llvm-svn: 185943
2013-07-09 15:03:33 +00:00
Vincent Lejeune b8aac8d720 R600: Fix a rare bug where swizzle optimization returns wrong values
llvm-svn: 185942
2013-07-09 15:03:25 +00:00
Vincent Lejeune a4d8d2ef2b R600: Fix wrong export reswizzling
llvm-svn: 185941
2013-07-09 15:03:19 +00:00
Vincent Lejeune b55940cc7d R600: Use DAG lowering pass to handle fcos/fsin
NOTE: This is a candidate for the stable branch.
llvm-svn: 185940
2013-07-09 15:03:11 +00:00
Vincent Lejeune f10d1cd2a3 R600: Print Export Swizzle
llvm-svn: 185939
2013-07-09 15:03:03 +00:00
Daniel Jasper 6cdec7cf05 Initial support for formatting trailing return types.
This fixes llvm.org/PR15170.

For now, the basic formatting rules are (based on the C++11 standard):
* Surround the "->" with spaces.
* Break before "->".

Also fix typo.

llvm-svn: 185938
2013-07-09 14:36:48 +00:00
Rafael Espindola 8115e1da91 Add missing getters. They will be used in llvm-ar.
llvm-svn: 185937
2013-07-09 12:49:24 +00:00
Rafael Espindola 8e9385ec63 Archive members cannot be larger than 4GB. Return a uint32_t.
llvm-svn: 185936
2013-07-09 12:45:11 +00:00
Evgeniy Stepanov 7160fb6511 [sanitizer] Update glob64 interceptor to handle GLOB_ALTDIRFUNC as well.
llvm-svn: 185935
2013-07-09 12:34:25 +00:00
Rafael Espindola 86fbebd3b7 We never compare iterators from two archives. Assert that.
llvm-svn: 185934
2013-07-09 12:30:10 +00:00
Rafael Espindola 97ee9de652 Add getHeader helper and move ToHeader to the cpp file.
llvm-svn: 185933
2013-07-09 12:22:05 +00:00
Evgeniy Stepanov faba61a7bc [sanitizer] Support GLOB_ALTDIRFUNC in glob interceptor.
llvm-svn: 185932
2013-07-09 12:07:59 +00:00
Rafael Espindola ab417699dd ArrayRef'ize Sema::FinalizeDeclaratorGroup, Sema::BuildDeclaratorGroup and
Sema::ActOnDocumentableDecls.

Patch by Robert Wilhelm.

llvm-svn: 185931
2013-07-09 12:05:01 +00:00
Daniel Jasper bd05888fa0 Avoid confusing indentations for chained function calls.
Basically treat a function with a trailing call similar to a function
with multiple parameters.

Before:
  aaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
      aaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaa))
      .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa();

After:
  aaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
                           aaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaa))
      .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa();

Also fix typo.

llvm-svn: 185930
2013-07-09 11:57:27 +00:00
Joey Gouly 0f12aa2b0f Add MC assembly/disassembly support for VRINT{A, N, P, M} to V8FP.
llvm-svn: 185929
2013-07-09 11:26:18 +00:00
NAKAMURA Takumi 80e373e44f c-index-test/CMakeLists.txt: Suggest -isystem to include libxml2 with include_directories(SYSTEM).
llvm-svn: 185928
2013-07-09 11:14:30 +00:00
NAKAMURA Takumi b538ac6830 c-index-test/Makefile: Use -isystem instead of -I on $(LIBXML2_INC) with -Wdocumentation.
-Wdocumentation won't seek -isystem. LIBXML2's headers in a certain distro might be incompatible to -Wdocumentation.

FIXME: Could autoconf detect clang or availability of -isystem?
llvm-svn: 185927
2013-07-09 11:14:24 +00:00
Joey Gouly 3b693c42b5 Add MC assembly/disassembly support for VRINT{Z, X, R} to V8FP.
llvm-svn: 185926
2013-07-09 11:03:21 +00:00
Alexey Samsonov d7f6a6196e Document LLVM_USE_SANITIZER CMake option
llvm-svn: 185925
2013-07-09 10:56:13 +00:00
Ulrich Weigand 55daa77901 [PowerPC] Support ".machine any"
The PowerPC assembler is supposed to provide a directive .machine
that allows switching the supported CPU instruction set on the fly.
Since we do not yet check CPU feature sets at all and always accept
any available instruction, this is not really useful at this point.

However, it makes sense to accept (and ignore) ".machine any" to
avoid spuriously rejecting existing assembler files that use this.

llvm-svn: 185924
2013-07-09 10:00:34 +00:00
Alexander Potapenko 8d2d79d05f Revert r185872 - "Stop emitting weak symbols into the "coal" sections"
This patch broke `make check-asan` on Mac, causing ld warnings like the following one:

ld: warning: direct access in __GLOBAL__I_a to global weak symbol
___asan_mapping_scale means the weak symbol cannot be overridden at
runtime. This was likely caused by different translation units being
compiled with different visibility settings.

The resulting test binaries crashed with incorrect ASan warnings.

llvm-svn: 185923
2013-07-09 10:00:16 +00:00