platform/upstream/llvm.git
9 years agoChange the semantics of is*Parallel
Johannes Doerfert [Fri, 1 Aug 2014 08:14:28 +0000 (08:14 +0000)]
Change the semantics of is*Parallel

  The functions isParallel, isInnermostParallel and IsOutermostParallel in
  IslAstInfo will now return true even in the presence of broken reductions.
  To compensate for this change the negated result of isReductionParallel can
  be used.

llvm-svn: 214488

9 years agoSLP Vectorizer: added statistics counter
Erik Eckstein [Fri, 1 Aug 2014 08:14:28 +0000 (08:14 +0000)]
SLP Vectorizer: added statistics counter

llvm-svn: 214487

9 years agoChange the printing of reduction types
Johannes Doerfert [Fri, 1 Aug 2014 08:13:25 +0000 (08:13 +0000)]
Change the printing of reduction types

  We use the C operator representation when applicable.

  + Update all the test cases accordingly.

llvm-svn: 214486

9 years agoSLP Vectorizer: improve canonicalize tree operands of commutitive binary operands.
Erik Eckstein [Fri, 1 Aug 2014 08:05:55 +0000 (08:05 +0000)]
SLP Vectorizer: improve canonicalize tree operands of commutitive binary operands.

This reverts r214338 (except the test file) and replaces it with a more general algorithm.

llvm-svn: 214485

9 years agoAdding ABI information to linux test results
Eric Fiselier [Fri, 1 Aug 2014 06:30:18 +0000 (06:30 +0000)]
Adding ABI information to linux test results

llvm-svn: 214484

9 years agoUpdate information about compiler used during linux tests and reformat run information.
Eric Fiselier [Fri, 1 Aug 2014 06:27:40 +0000 (06:27 +0000)]
Update information about compiler used during linux tests and reformat run information.

llvm-svn: 214483

9 years agoRevert of 214418:
Sylvestre Ledru [Fri, 1 Aug 2014 06:16:03 +0000 (06:16 +0000)]
Revert of 214418:
"Create a default symver on Linux like ELF OSes."

Fails the build under Debian with ld.gold:
/usr/bin/ld.gold: --default-symver: unknown option

llvm-svn: 214482

9 years ago[PowerPC] Generate unaligned vector loads using intrinsics instead of regular loads
Hal Finkel [Fri, 1 Aug 2014 05:20:41 +0000 (05:20 +0000)]
[PowerPC] Generate unaligned vector loads using intrinsics instead of regular loads

Altivec vector loads on PowerPC have an interesting property: They always load
from an aligned address (by rounding down the address actually provided if
necessary). In order to generate an actual unaligned load, you can generate two
load instructions, one with the original address, one offset by one vector
length, and use a special permutation to extract the bytes desired.

When this was originally implemented, I generated these two loads using regular
ISD::LOAD nodes, now marked as aligned. Unfortunately, there is a problem with
this:

The alignment of a load does not contribute to its identity, and SDNodes
are uniqued. So, imagine that we have some unaligned load, L1, that is not
aligned. The routine will create two loads, L1(aligned) and (L1+16)(aligned).
Further imagine that there had already existed a load (L1+16)(unaligned) with
the same chain operand as the load L1. When (L1+16)(aligned) is created as part
of the lowering of L1, this load *is* also the (L1+16)(unaligned) node, just
now marked as aligned (because the new alignment overwrites the old). But the
original users of (L1+16)(unaligned) now get the data intended for the
permutation yielding the data for L1, and (L1+16)(unaligned) no longer exists
to get its own permutation-based expansion. This was PR19991.

A second potential problem has to do with the MMOs on these loads, which can be
used by AA during instruction scheduling to break chain-based dependencies. If
the new "aligned" loads get the MMO from the original unaligned load, this does
not represent the fact that it will load data from below the original address.
Normally, this would not matter, but this load might be combined with another
load pair for a previous vector, and then the dependency on the otherwise-
ignored lower bytes can matter.

To fix both problems, instead of generating the necessary loads using regular
ISD::LOAD instructions, ppc_altivec_lvx intrinsics are used instead. These are
provided with MMOs with a conservative address range.

Unfortunately, I no longer have a failing test case (since PR19991 was
reported, other changes in CodeGen have forced this bug back into hiding it
again). Nevertheless, this should fix the underlying problem.

llvm-svn: 214481

9 years agoChange the encoding of the Triple string exchanged across GDB-RSP
Matthew Gardiner [Fri, 1 Aug 2014 05:12:23 +0000 (05:12 +0000)]
Change the encoding of the Triple string exchanged across GDB-RSP
and update documentation to suit, as suggested by Jason Molenda and
discussed in:

http://lists.cs.uiuc.edu/pipermail/lldb-commits/Week-of-Mon-20140721/011978.html

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

llvm-svn: 214480

9 years agoThis patch implements transform for pattern "(A & ~B) ^ (~A) -> ~(A & B)".
Suyog Sarda [Fri, 1 Aug 2014 05:07:20 +0000 (05:07 +0000)]
This patch implements transform for pattern "(A & ~B) ^ (~A) -> ~(A & B)".

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

llvm-svn: 214479

9 years agoThis patch implements transform for pattern "(A | B) & ((~A) ^ B) -> (A & B)".
Suyog Sarda [Fri, 1 Aug 2014 04:59:26 +0000 (04:59 +0000)]
This patch implements transform for pattern "(A | B) & ((~A) ^ B) -> (A & B)".

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

llvm-svn: 214478

9 years agoThis patch implements transform for pattern "( A & (~B)) | (A ^ B) -> (A ^ B)"
Suyog Sarda [Fri, 1 Aug 2014 04:50:31 +0000 (04:50 +0000)]
This patch implements transform for pattern "( A & (~B)) | (A ^ B) -> (A ^ B)"

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

llvm-svn: 214477

9 years agoThis patch implements transform for pattern "(A & B) | ((~A) ^ B) -> (~A ^ B)".
Suyog Sarda [Fri, 1 Aug 2014 04:41:43 +0000 (04:41 +0000)]
This patch implements transform for pattern "(A & B) | ((~A) ^ B) -> (~A ^ B)".
Patch Credit to Ankit Jain !

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

llvm-svn: 214476

9 years agoR600/SI: Fix build warning
Tom Stellard [Fri, 1 Aug 2014 02:05:57 +0000 (02:05 +0000)]
R600/SI: Fix build warning

llvm-svn: 214475

9 years agoUpdate linux test results file
Eric Fiselier [Fri, 1 Aug 2014 01:59:09 +0000 (01:59 +0000)]
Update linux test results file

llvm-svn: 214474

9 years ago[modules] Remove IRGen special case for emitting implicit special members if
Richard Smith [Fri, 1 Aug 2014 01:56:39 +0000 (01:56 +0000)]
[modules] Remove IRGen special case for emitting implicit special members if
they're somehow missing a body. Looks like this was left behind when the loop
was generalized, and it's not been problematic before because without modules,
a used, implicit special member function declaration must be a definition.

This was resulting in us trying to emit a constructor declaration rather than
a definition, and producing a constructor missing its member initializers.

llvm-svn: 214473

9 years agoAdd comments to debug info testing case.
Manman Ren [Fri, 1 Aug 2014 01:47:13 +0000 (01:47 +0000)]
Add comments to debug info testing case.

llvm-svn: 214472

9 years agoRemove this pointer that is converted to bool. In well-defined contexts, the
Richard Trieu [Fri, 1 Aug 2014 01:42:01 +0000 (01:42 +0000)]
Remove this pointer that is converted to bool.  In well-defined contexts, the
this pointer is always non-null.  If the this pointer is null, it is undefined
and the compiler may optimize it away by assuming it is non-null.  The null
checks are pushed into the callers.

llvm-svn: 214471

9 years ago[FastISel][AArch64] Fix the immediate versions of the {s|u}{add|sub}.with.overflow...
Juergen Ributzka [Fri, 1 Aug 2014 01:25:55 +0000 (01:25 +0000)]
[FastISel][AArch64] Fix the immediate versions of the {s|u}{add|sub}.with.overflow intrinsics.

ADDS and SUBS cannot encode negative immediates or immediates larger than 12bit.
This fix checks if the immediate version can be used under this constraints and
if we can convert ADDS to SUBS or vice versa to support negative immediates.

Also update the test cases to test the immediate versions.

llvm-svn: 214470

9 years ago[PowerPC] Recognize consecutive memory accesses from intrinsics
Hal Finkel [Fri, 1 Aug 2014 01:02:01 +0000 (01:02 +0000)]
[PowerPC] Recognize consecutive memory accesses from intrinsics

When generating unaligned vector loads, we need to search for other loads or
stores nearby offset by one vector width. If we find one, then we know that we
can safely generate another aligned load at that address. Otherwise, we must
generate the next load using an offset of the vector width minus one byte (so
we don't read off the end of the allocation if the base unaligned address
happened to be aligned at runtime). We had previously done this using only
other vector loads and stores, but did not consider the PowerPC-specific vector
load/store intrinsics. Now we'll also consider vector intrinsics. By itself,
this change is a feature enhancement, but is a necessary step toward fixing the
underlying problem behind PR19991.

llvm-svn: 214469

9 years agoMS inline asm: Fix null SMLoc when 'ptr' is missing after dword & co
Reid Kleckner [Fri, 1 Aug 2014 00:59:22 +0000 (00:59 +0000)]
MS inline asm: Fix null SMLoc when 'ptr' is missing after dword & co

This improves the diagnostics from the regular assembler, but more
importantly it fixes an assertion when parsing inline assembly.  Test
landing in Clang.

llvm-svn: 214468

9 years agoR600/SI: Do abs/neg folding with ComplexPatterns
Tom Stellard [Fri, 1 Aug 2014 00:32:39 +0000 (00:32 +0000)]
R600/SI: Do abs/neg folding with ComplexPatterns

Abs/neg folding has moved out of foldOperands and into the instruction
selection phase using complex patterns.  As a consequence of this
change, we now prefer to select the 64-bit encoding for most
instructions and the modifier operands have been dropped from
integer VOP3 instructions.

llvm-svn: 214467

9 years agoTableGen: Allow AddedComplexity values to be negative
Tom Stellard [Fri, 1 Aug 2014 00:32:36 +0000 (00:32 +0000)]
TableGen: Allow AddedComplexity values to be negative

This is useful for cases when stand-alone patterns are preferred to the
patterns included in the instruction definitions.  Instead of requiring
that stand-alone patterns set a larger AddedComplexity value, which
can be confusing to new developers, the allows us to reduce the
complexity of the included patterns to achieve the same result.

There will be test cases for this added to the R600 backend in a
future commit.

llvm-svn: 214466

9 years agoR600/SI: Simplify and fix handling of VOP2 in SIInstrInfo::legalizeOperands
Tom Stellard [Fri, 1 Aug 2014 00:32:35 +0000 (00:32 +0000)]
R600/SI: Simplify and fix handling of VOP2 in SIInstrInfo::legalizeOperands

We were incorrectly assuming that all VOP2 instructions can read SGPRs
in Src0, but this is not true for instructions that read carry-in from
VCC.

The old logic has been replaced with new logic which checks the defined
register classes of the VOP2 instruction to determine whether or not to
legalize the operands.

llvm-svn: 214465

9 years agoR600/SI: Fold immediates when shrinking instructions
Tom Stellard [Fri, 1 Aug 2014 00:32:33 +0000 (00:32 +0000)]
R600/SI: Fold immediates when shrinking instructions

This will prevent us from using extra MOV instructions once we prefer
selecting 64-bit instructions.

llvm-svn: 214464

9 years agoR600/SI: Fix incorrect commute operation in shrink instructions pass
Tom Stellard [Fri, 1 Aug 2014 00:32:28 +0000 (00:32 +0000)]
R600/SI: Fix incorrect commute operation in shrink instructions pass

We were commuting the instruction by still shrinking it using the
original opcode.

NOTE: This is a candidate for the 3.5 branch.
llvm-svn: 214463

9 years agoclang-format vs plugin: claim support for VS 14 CTP too
Hans Wennborg [Fri, 1 Aug 2014 00:02:24 +0000 (00:02 +0000)]
clang-format vs plugin: claim support for VS 14 CTP too

llvm-svn: 214461

9 years agoAdd support for the X86 secure guard extensions instructions in assembler (SGX).
Kevin Enderby [Thu, 31 Jul 2014 23:57:38 +0000 (23:57 +0000)]
Add support for the X86 secure guard extensions instructions in assembler (SGX).

This allows assembling the two new instructions, encls and enclu for the
SKX processor model.

Note the diffs are a bigger than what might think, but to fit the new
MRM_CF and MRM_D7 in things in the right places things had to be
renumbered and shuffled down causing a bit more diffs.

rdar://16228228

llvm-svn: 214460

9 years agoFix buildbot: work around missing GCC C++11 feature.
Richard Smith [Thu, 31 Jul 2014 23:52:38 +0000 (23:52 +0000)]
Fix buildbot: work around missing GCC C++11 feature.

llvm-svn: 214459

9 years ago[modules] Maintain an AST invariant across module load/save: if any declaration
Richard Smith [Thu, 31 Jul 2014 23:46:44 +0000 (23:46 +0000)]
[modules] Maintain an AST invariant across module load/save: if any declaration
of a function has a resolved exception specification, then all declarations of
the function do.

We should probably improve the AST representation to make this implicit (perhaps
only store the exception specification on the canonical declaration), but this
fixes things for now.

The testcase for this (which used to assert) also exposes the actual bug I was
trying to reduce here: we sometimes fail to emit the body of an imported
special member function definition. Fix for that to follow.

llvm-svn: 214458

9 years agoX86 MC: Don't crash on empty memory operand parens
Reid Kleckner [Thu, 31 Jul 2014 23:26:35 +0000 (23:26 +0000)]
X86 MC: Don't crash on empty memory operand parens

Instead, create an absolute memory operand.

Fixes PR20504.

llvm-svn: 214457

9 years agoX86 MC: Reject invalid segment registers before a memory operand colon
Reid Kleckner [Thu, 31 Jul 2014 23:03:22 +0000 (23:03 +0000)]
X86 MC: Reject invalid segment registers before a memory operand colon

Previously we would execute unreachable during object emission.

llvm-svn: 214456

9 years agoWhite space fix.
Louis Gerbarg [Thu, 31 Jul 2014 22:57:46 +0000 (22:57 +0000)]
White space fix.

llvm-svn: 214455

9 years agoChange lit.cfg to allow whitespace before comments
Eric Fiselier [Thu, 31 Jul 2014 22:56:52 +0000 (22:56 +0000)]
Change lit.cfg to allow whitespace before comments

llvm-svn: 214454

9 years ago[PECOFF] Fix section header.
Rui Ueyama [Thu, 31 Jul 2014 22:40:35 +0000 (22:40 +0000)]
[PECOFF] Fix section header.

The PE/COFF spec says that SizeOfRawData field in the section
header must be a multiple of FileAlignment from the optional
header. LLD emits 512 as FileAlignment, so it must have been
a multiple of 512.

LLD did not follow that. It emitted the actual section size
without the last padding as the SizeOfRawData. Although it's
not correct as per the spec, the Windows loader doesn't seem
to actually bother to check that. Executables created by LLD
worked fine.

However, tools dealing with executalbe files may expect it
to be the correct value, and one instance of it is mt.exe
tool distributed as a part of Windows SDK.

If CMake is invoked with "-E vs_link_exe" option, it silently
run mt.exe to embed a resource file to the resulting file.
And mt.exe sometimes breaks an input file if it's section
header does not follow the standard. That caused a misterous
error that CMake with Ninja occasionally produces a broken
executable.

This patch fixes the section header to make mt.exe and
other tools happy.

llvm-svn: 214453

9 years agoMake classof in MemSDNode consistent with MemIntrinsicSDNode
Hal Finkel [Thu, 31 Jul 2014 22:31:33 +0000 (22:31 +0000)]
Make classof in MemSDNode consistent with MemIntrinsicSDNode

If INTRINSIC_W_CHAIN and INTRINSIC_VOID are MemIntrinsicSDNodes, and a
MemIntrinsicSDNode is a MemSDNode, then INTRINSIC_W_CHAIN and INTRINSIC_VOID
must be MemSDNodes too.

Noticed by inspection.

llvm-svn: 214452

9 years agoR600: Modernize work item intrinsics test
Jan Vesely [Thu, 31 Jul 2014 22:11:03 +0000 (22:11 +0000)]
R600: Modernize work item intrinsics test

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Matt Arsenault <Matthew.Arsenault@amd.com>
llvm-svn: 214451

9 years agoFactor out exception specification information from
Richard Smith [Thu, 31 Jul 2014 21:57:55 +0000 (21:57 +0000)]
Factor out exception specification information from
FunctionProtoType::ExtProtoInfo. Most of the users of these fields don't care
about the other ExtProtoInfo bits and just want to talk about the exception
specification.

llvm-svn: 214450

9 years agoMake sure no loads resulting from load->switch DAGCombine are marked invariant
Louis Gerbarg [Thu, 31 Jul 2014 21:45:05 +0000 (21:45 +0000)]
Make sure no loads resulting from load->switch DAGCombine are marked invariant

Currently when DAGCombine converts loads feeding a switch into a switch of
addresses feeding a load the new load inherits the isInvariant flag of the left
side. This is incorrect since invariant loads can be reordered in cases where it
is illegal to reoarder normal loads.

This patch adds an isInvariant parameter to getExtLoad() and updates all call
sites to pass in the data if they have it or false if they don't. It also
changes the DAGCombine to use that data to make the right decision when
creating the new load.

llvm-svn: 214449

9 years ago[Refactor] Remove unecessary check and function
Johannes Doerfert [Thu, 31 Jul 2014 21:34:32 +0000 (21:34 +0000)]
[Refactor] Remove unecessary check and function

  + Perform the parallelism check on the innermost loop only once.
  + Inline the markOpenmpParallel function.
  + Rename all IslAstUserPayload * into Payload to make it consistent.

llvm-svn: 214448

9 years ago[Refactor] Use nicer print callback function in IslAst
Johannes Doerfert [Thu, 31 Jul 2014 21:33:49 +0000 (21:33 +0000)]
[Refactor] Use nicer print callback function in IslAst

llvm-svn: 214447

9 years agoLoop hint pragmas sometimes do not contain an identifier option (such as #pragma...
Aaron Ballman [Thu, 31 Jul 2014 21:24:32 +0000 (21:24 +0000)]
Loop hint pragmas sometimes do not contain an identifier option (such as #pragma unroll(4)). Check explicitly that the token we stored was an identifier.

Amends r214432

llvm-svn: 214446

9 years agoImprove the remark generated for -Rpass-missed.
Tyler Nowicki [Thu, 31 Jul 2014 21:22:22 +0000 (21:22 +0000)]
Improve the remark generated for -Rpass-missed.

The current remark is ambiguous and makes it sounds like explicitly specifying vectorization will allow the loop to be vectorized. This is not the case. The improved remark directs the user to -Rpass-analysis=loop-vectorize to determine the cause of the pass-miss.

Reviewed by Arnold Schwaighofer`

llvm-svn: 214445

9 years agoRevert "Remove MCObjectDisassembler.cpp as it is untested and unused." as it is appar...
Eric Christopher [Thu, 31 Jul 2014 21:18:38 +0000 (21:18 +0000)]
Revert "Remove MCObjectDisassembler.cpp as it is untested and unused." as it is apparently used, but the build didn't return errors weirdly.

This reverts commits 214437 and 214438.

llvm-svn: 214444

9 years agoMake CMake choose the target architecture according to the build.
Zachary Turner [Thu, 31 Jul 2014 21:07:41 +0000 (21:07 +0000)]
Make CMake choose the target architecture according to the build.

Previously, CMake was invoking the test runner and not specifying
what architecture to use when building test executables.  The
Makefiles for the test executables then had logic to choose x64
by default.  This doesn't work on Windows because the test compiler
would then try to link against the 64-bit MSVCRT and not find them
since only the 32-bit MSVCRT was in the path.

This patch addresses this by figuring out, at CMake time, whether
or not you are building LLDB with a 64 or 32-bit toolchain.  Then,
it explicitly passes this value to the test runner, causing the
test runner to build tests whose architecture matches that of LLDB
itself.  This can still be overridden by setting the CMake variable
LLDB_TEST_EXECUTABLE_ARCH=(x64|x86)

llvm-svn: 214443

9 years agoMake Android's ctype_base::mask unsigned.
Dan Albert [Thu, 31 Jul 2014 21:04:08 +0000 (21:04 +0000)]
Make Android's ctype_base::mask unsigned.

Keeping the regex code sane is much easier if we match the other
platforms and use an unsigned mask.

llvm-svn: 214442

9 years agoRemove shell-globbing from all test makefiles.
Zachary Turner [Thu, 31 Jul 2014 21:03:11 +0000 (21:03 +0000)]
Remove shell-globbing from all test makefiles.

llvm-svn: 214441

9 years agoImprove the remark generated when a variable that is used outside the loop is not...
Tyler Nowicki [Thu, 31 Jul 2014 21:02:40 +0000 (21:02 +0000)]
Improve the remark generated when a variable that is used outside the loop is not a reduction or induction variable.

Reviewed by Arnold Schwaighofer

llvm-svn: 214440

9 years agoReplaces a few pointers with references in llvm-nm.cpp.
Rafael Espindola [Thu, 31 Jul 2014 21:00:10 +0000 (21:00 +0000)]
Replaces a few pointers with references in llvm-nm.cpp.

This opens the way for a few std::uinque_ptr cleanups.

llvm-svn: 214439

9 years agoFixing CMake problems with MCObjectDisassembler.cpp not existing.
Aaron Ballman [Thu, 31 Jul 2014 20:48:54 +0000 (20:48 +0000)]
Fixing CMake problems with MCObjectDisassembler.cpp not existing.

llvm-svn: 214438

9 years agoRemove MCObjectDisassembler.cpp as it is untested and unused.
Eric Christopher [Thu, 31 Jul 2014 20:44:46 +0000 (20:44 +0000)]
Remove MCObjectDisassembler.cpp as it is untested and unused.

llvm-svn: 214437

9 years agoImplemented a diagnostic to handle multiple, distinct ownership_return attributes...
Aaron Ballman [Thu, 31 Jul 2014 20:44:26 +0000 (20:44 +0000)]
Implemented a diagnostic to handle multiple, distinct ownership_return attributes on the same declaration. This removes a FIXME from the code.

llvm-svn: 214436

9 years agomsbuild integration: remove duplicated lines and BOM from 2014 integration (PR20341)
Hans Wennborg [Thu, 31 Jul 2014 20:33:22 +0000 (20:33 +0000)]
msbuild integration: remove duplicated lines and BOM from 2014 integration (PR20341)

llvm-svn: 214435

9 years agoDWOHolder takes ownership of the argument constructor, use std::unique_ptr.
Rafael Espindola [Thu, 31 Jul 2014 20:26:42 +0000 (20:26 +0000)]
DWOHolder takes ownership of the argument constructor, use std::unique_ptr.

Thanks to David Blaikie for noticing it.

llvm-svn: 214434

9 years agoUse a reference instead of a pointer.
Rafael Espindola [Thu, 31 Jul 2014 20:19:36 +0000 (20:19 +0000)]
Use a reference instead of a pointer.

This makes using a std::unique_ptr in the caller more convenient.

llvm-svn: 214433

9 years agoAdd a state variable to the loop hint attribute.
Tyler Nowicki [Thu, 31 Jul 2014 20:15:14 +0000 (20:15 +0000)]
Add a state variable to the loop hint attribute.

This patch is necessary to support constant expressions which replaces the integer value in the loop hint attribute with an expression. The integer value was also storing the pragma’s state for options like vectorize(enable/disable) and the pragma unroll and nounroll directive. The state variable is introduced to hold the state of those options/pragmas. This moves the validation of the state (keywords) from SemaStmtAttr handler to the loop hint annotation token handler.

Resubmit with changes to try to fix the build-bot issue.

Reviewed by Aaron Ballman

llvm-svn: 214432

9 years agoAdd documentation for lit's --show-unsupported flag
Eric Fiselier [Thu, 31 Jul 2014 20:11:13 +0000 (20:11 +0000)]
Add documentation for lit's --show-unsupported flag

llvm-svn: 214431

9 years agoClarify in PowerPC release notes that 32-bit PIC support is incomplete.
Bill Schmidt [Thu, 31 Jul 2014 20:04:51 +0000 (20:04 +0000)]
Clarify in PowerPC release notes that 32-bit PIC support is incomplete.

As requested, changing this wording slightly.

Thanks,
Bill

llvm-svn: 214430

9 years agoDisable IsSub subregister assert. pr18663.
Will Schmidt [Thu, 31 Jul 2014 19:50:53 +0000 (19:50 +0000)]
Disable IsSub subregister assert.  pr18663.

This is a follow-up to the activity in the bug at
http://llvm.org/bugs/show_bug.cgi?id=18663 .  The underlying issue has
to do with how the KILL pseudo-instruction is handled.  I defer to
Hal/Jakob/Uli for additional details and background.

This will disable the (bad?) assert, add an associated fixme comment,
and add a pair of tests.

The code change and the pr18663-2.ll test are copied from the referenced
bug.  That test does not immediately fail in my environment, but I have
added the pr18663.ll test which does.

(Comment from Hal)
to provide everyone else with some context, this assert was not bad when
it was written. At that time, we only generated KILL pseudo instructions
around subregister copies. This logic, unfortunately, had its own problems.
In r199797, the relevant logic in MachineCopyPropagation was replaced to
generate KILLs for other kinds of copies too. This change in semantics broke
this now-problematic assumption in AggressiveAntiDepBreaker. The
AggressiveAntiDepBreaker really needs a proper cleanup to deal with the
change, but removing the assert (which just allows the function to return
false) is a safe conservative behavior, and should do for the time being.

llvm-svn: 214429

9 years agoFixed an issue where the LLDB command prompt isn't interactive if you use -o -O ...
Greg Clayton [Thu, 31 Jul 2014 19:46:19 +0000 (19:46 +0000)]
Fixed an issue where the LLDB command prompt isn't interactive if you use -o -O -S -s or specify a file on the command line.

This means TAB completion wasn't working and editline wasn't being used.

<rdar://problem/17872824>

llvm-svn: 214428

9 years agoRemove unused argument.
Rafael Espindola [Thu, 31 Jul 2014 19:32:04 +0000 (19:32 +0000)]
Remove unused argument.

Thanks to Justin Bogner for noticing it.

llvm-svn: 214426

9 years agoLocal extern redeclarations of dllimport variables stay dllimport even if they don...
Hans Wennborg [Thu, 31 Jul 2014 19:29:39 +0000 (19:29 +0000)]
Local extern redeclarations of dllimport variables stay dllimport even if they don't specify the attribute

llvm-svn: 214425

9 years agoMove MCObjectSymbolizer.h to MC/MCAnalysis.
Rafael Espindola [Thu, 31 Jul 2014 19:29:23 +0000 (19:29 +0000)]
Move MCObjectSymbolizer.h to MC/MCAnalysis.

The cpp file is already in lib/MC/MCAnalysis.

llvm-svn: 214424

9 years agoFix ScalarEvolutionExpander when creating a PHI in a block with duplicate predecessors
Hal Finkel [Thu, 31 Jul 2014 19:13:38 +0000 (19:13 +0000)]
Fix ScalarEvolutionExpander when creating a PHI in a block with duplicate predecessors

It seems that when I fixed this, almost exactly a year ago, I did not quite do
it correctly. When we have duplicate block predecessors, we can indeed not have
different incoming values for the same block, but we *must* have duplicate
entries. So, instead of skipping the duplicates, we explicitly add the
duplicate incoming values.

Fixes PR20442.

llvm-svn: 214423

9 years ago[libcxx] Remove use of default function template parameters in type traits. Fixes...
Eric Fiselier [Thu, 31 Jul 2014 19:09:26 +0000 (19:09 +0000)]
[libcxx] Remove use of default function template parameters in type traits. Fixes DR20484

Summary: This patch moves the SFINAE for __is_destructor_welformed out of the function template parameters. type_traits must compile in c++03 mode since it is included in c++03 headers.

Test Plan: No tests have been added.

Reviewers: danalbert, mclow.lists

Reviewed By: danalbert

Subscribers: K-ballo, cfe-commits

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

llvm-svn: 214422

9 years ago[Sanitizer] Don't try to parse unspecified suppressions file
Alexey Samsonov [Thu, 31 Jul 2014 19:06:47 +0000 (19:06 +0000)]
[Sanitizer] Don't try to parse unspecified suppressions file

llvm-svn: 214421

9 years agoXFAIL the ARM test when we don't have this target.
Simon Atanasyan [Thu, 31 Jul 2014 19:02:10 +0000 (19:02 +0000)]
XFAIL the ARM test when we don't have this target.

llvm-svn: 214420

9 years agoverify-uselistorder: Change the default -num-shuffles=5
Duncan P. N. Exon Smith [Thu, 31 Jul 2014 18:46:24 +0000 (18:46 +0000)]
verify-uselistorder: Change the default -num-shuffles=5

Change the default for `-num-shuffles` to 5 and better document the
algorithm in the header docs of `verify-uselistorder`.

llvm-svn: 214419

9 years agoCreate a default symver on Linux like ELF OSes.
Eric Christopher [Thu, 31 Jul 2014 18:43:43 +0000 (18:43 +0000)]
Create a default symver on Linux like ELF OSes.

Patch by Adam Jackson.

llvm-svn: 214418

9 years agoUseListOrder: Handle self-users
Duncan P. N. Exon Smith [Thu, 31 Jul 2014 18:33:12 +0000 (18:33 +0000)]
UseListOrder: Handle self-users

Correctly sort self-users (such as PHI nodes).  I added a targeted test
in `test/Bitcode/use-list-order.ll` and the final missing RUN line to
tests in `test/Assembly`.

This is part of PR5680.

llvm-svn: 214417

9 years agoFix loop end condition.
Eric Christopher [Thu, 31 Jul 2014 18:28:08 +0000 (18:28 +0000)]
Fix loop end condition.

Note: This code appears to be untested.
llvm-svn: 214416

9 years agoRewrote the initial DW_OP_piece support to be able to support opcodes like:
Greg Clayton [Thu, 31 Jul 2014 18:19:28 +0000 (18:19 +0000)]
Rewrote the initial DW_OP_piece support to be able to support opcodes like:

DW_OP_fbreg(N) DW_OP_piece(4) DW_OP_fbreg(M) DW_OP_piece(8)
DW_OP_fbreg(N) DW_OP_piece(4) DW_OP_piece(8)

The first grabs 4 bytes from FP+N followed by 8 bytes from FP+M, the second grabs 4 bytes from FP+N followed by zero filling 8 bytes which are unavailable. Of course regiters are stuff supported:

DW_OP_reg3 DW_OP_piece(4) DW_OP_reg8 DW_OP_piece(8)

The fix does the following:
1 - don't push the full piece value onto the stack, keep it on the side
2 - fill zeros for DW_OP_piece(N) opcodes that have nothing on the stack (instead of previously consuming the full piece that was pushed onto the stack)
3 - simplify the logic

<rdar://problem/16930524>

llvm-svn: 214415

9 years ago[mach-o] wire up -t option
Nick Kledzik [Thu, 31 Jul 2014 18:19:03 +0000 (18:19 +0000)]
[mach-o] wire up -t option

llvm-svn: 214414

9 years agoReformat docstring to 80-col
Eli Bendersky [Thu, 31 Jul 2014 18:12:17 +0000 (18:12 +0000)]
Reformat docstring to 80-col

llvm-svn: 214412

9 years agoRemoving an outdated FIXME. No functional changes.
Aaron Ballman [Thu, 31 Jul 2014 18:09:13 +0000 (18:09 +0000)]
Removing an outdated FIXME. No functional changes.

llvm-svn: 214411

9 years agoExposes a C API to name mangling for a given cursor.
Eli Bendersky [Thu, 31 Jul 2014 18:04:56 +0000 (18:04 +0000)]
Exposes a C API to name mangling for a given cursor.

Inspired by https://gist.github.com/tritao/2766291, and was previously discussed
on cfe-dev: http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-June/037577.html

Adding testing capability via c-index-test.

llvm-svn: 214410

9 years agoObective-C. Patch to fix the incorrect ObjcMessageExpr argument source ranges,
Fariborz Jahanian [Thu, 31 Jul 2014 17:39:50 +0000 (17:39 +0000)]
Obective-C. Patch to fix the incorrect ObjcMessageExpr argument source ranges,
when arguments are structures or classes. PR16392.
patch by Karlis Senko

llvm-svn: 214409

9 years agoDelay check for prototype on __fastcall functions until after MergeFunctionDecl.
Nico Weber [Thu, 31 Jul 2014 17:19:18 +0000 (17:19 +0000)]
Delay check for prototype on __fastcall functions until after MergeFunctionDecl.

In C, it is only known after merging decls if a function with 0 arguments has
a prototype.  Fixes PR20386, see that for more notes.

llvm-svn: 214408

9 years agoAutomate attribute argument count semantic checking when there are variadic or option...
Aaron Ballman [Thu, 31 Jul 2014 16:37:04 +0000 (16:37 +0000)]
Automate attribute argument count semantic checking when there are variadic or optional arguments present. With this, the only time you should have to manually check attribute argument counts is when HasCustomParsing is set to true, or when you have variadic arguments that aren't really variadic (like ownership_holds and friends).

Updating the diagnostics in the launch_bounds test since they have been improved in that case. Adding a test for nonnull since it has little test coverage, but has truly variadic arguments.

llvm-svn: 214407

9 years agoAdd test cases for creating atomic types for trivially copyable types.
Marshall Clow [Thu, 31 Jul 2014 15:20:48 +0000 (15:20 +0000)]
Add test cases for creating atomic types for trivially copyable types.

llvm-svn: 214406

9 years agoWrong heading level for PowerPC changes in release notes
Bill Schmidt [Thu, 31 Jul 2014 15:20:30 +0000 (15:20 +0000)]
Wrong heading level for PowerPC changes in release notes

Oops.  Used the wrong heading level by mistake.

Thanks,
Bill

llvm-svn: 214405

9 years agoRelease Notes: Overriding PPC64 and PPC64LE ABI defaults is not yet supported.
Bill Schmidt [Thu, 31 Jul 2014 15:17:33 +0000 (15:17 +0000)]
Release Notes: Overriding PPC64 and PPC64LE ABI defaults is not yet supported.

I wrongly included a description of a patch that came in after 3.5 branched
and has not been backported.

Thanks,
Bill

llvm-svn: 214404

9 years agoAdd PowerPC release notes for 3.5.
Bill Schmidt [Thu, 31 Jul 2014 14:38:17 +0000 (14:38 +0000)]
Add PowerPC release notes for 3.5.

Here's my take on 3.5 changes for PowerPC.  Others please feel free to add,
edit, delete as desired.

Thanks,
Bill

llvm-svn: 214403

9 years agoAdd decorator for TestStopHookMultipleThreads failing on FreeBSD
Ed Maste [Thu, 31 Jul 2014 14:02:32 +0000 (14:02 +0000)]
Add decorator for TestStopHookMultipleThreads failing on FreeBSD

llvm.org/pr15037

llvm-svn: 214402

9 years agoms-inline-asm: Add a test to ensure that call doesn't clobber eax.
Ehsan Akhgari [Thu, 31 Jul 2014 13:43:17 +0000 (13:43 +0000)]
ms-inline-asm: Add a test to ensure that call doesn't clobber eax.

Note that it's not clear whether this is the right behavior, please see
the review for the discussion.

Reviewers: rnk

Subscribers: cfe-commits

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

llvm-svn: 214401

9 years agoFixing an -Woverloaded-virtual warnings by exposing the hidden virtual function as...
Aaron Ballman [Thu, 31 Jul 2014 12:58:50 +0000 (12:58 +0000)]
Fixing an -Woverloaded-virtual warnings by exposing the hidden virtual function as well. No functional changes intended.

llvm-svn: 214400

9 years agoFixing a -Wcast-qual warning in GCC. No functional changes.
Aaron Ballman [Thu, 31 Jul 2014 12:55:49 +0000 (12:55 +0000)]
Fixing a -Wcast-qual warning in GCC. No functional changes.

llvm-svn: 214399

9 years ago[msan] Fix handling of array types.
Evgeniy Stepanov [Thu, 31 Jul 2014 11:02:27 +0000 (11:02 +0000)]
[msan] Fix handling of array types.

Switch array type shadow from a single integer to
an array of integers (i.e. make it per-element).
This simplifies instrumentation of extractvalue and fixes PR20493.

llvm-svn: 214398

9 years ago[clang-tidy] Add a checker for code that looks like a delegate constructors but doesn...
Benjamin Kramer [Thu, 31 Jul 2014 09:58:52 +0000 (09:58 +0000)]
[clang-tidy] Add a checker for code that looks like a delegate constructors but doesn't delegate.

Summary:
class Foo {
  Foo() {
    Foo(42); // oops
  }
  Foo(int);
};

This is valid code but it does nothing and we can't emit a warning in clang
because there might be side effects. The checker emits a warning for this
pattern and also for base class initializers written in this style.

There is some overlap with the unused-rtti checker but they follow different
goals and fire in different places most of the time.

Reviewers: alexfh, djasper

Subscribers: cfe-commits

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

llvm-svn: 214397

9 years ago[asan] End-to-end test for REP MOVS instrumentation.
Evgeniy Stepanov [Thu, 31 Jul 2014 09:12:20 +0000 (09:12 +0000)]
[asan] End-to-end test for REP MOVS instrumentation.

Patch by Yuri Gorshenin.

llvm-svn: 214396

9 years ago[asan] Support x86 REP MOVS asm instrumentation.
Evgeniy Stepanov [Thu, 31 Jul 2014 09:11:04 +0000 (09:11 +0000)]
[asan] Support x86 REP MOVS asm instrumentation.

Patch by Yuri Gorshenin.

llvm-svn: 214395

9 years agotsan: use MADV_NOHUGEPAGE only if it is supported by platform
Dmitry Vyukov [Thu, 31 Jul 2014 08:24:59 +0000 (08:24 +0000)]
tsan: use MADV_NOHUGEPAGE only if it is supported by platform
Fixes build failure on an old system:
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-centos-6.5/builds/7555/steps/build/logs/stdio

llvm-svn: 214394

9 years agoFix parsing of classes where the class name is an absolute nested name specifier.
Manuel Klimek [Thu, 31 Jul 2014 07:19:30 +0000 (07:19 +0000)]
Fix parsing of classes where the class name is an absolute nested name specifier.

llvm-svn: 214393

9 years agoMergeFunctions, tiny refactoring:
Stepan Dyatkovskiy [Thu, 31 Jul 2014 07:16:59 +0000 (07:16 +0000)]
MergeFunctions, tiny refactoring:
cmpOperation has been renamed to cmpOperations (multiple form).

llvm-svn: 214392

9 years agoAdd a new directory path to
Jason Molenda [Thu, 31 Jul 2014 06:36:24 +0000 (06:36 +0000)]
Add a new directory path to
PlatformDarwinKernel::GetGenericSDKDirectoriesToSearch
 - /Library/Developer/KDKs where users may store
the kernel debug kits on their systems.

Change PlatformDarwinKernel::GetKextDirectoriesInSDK
to look in the root directory of places like
/Library/Developer/KDKs/KDK_10.10_14A298i.kdk
as well as the System/Library/Extensions subdir
in that directory (if it exists) and the
Library/Extensions subdir in that directory (if it
exists).
<rdar://problem/16568635>

llvm-svn: 214391

9 years agoPR18097: Support initializing an _Atomic(T) from an object of C++ class type T
Richard Smith [Thu, 31 Jul 2014 06:31:19 +0000 (06:31 +0000)]
PR18097: Support initializing an _Atomic(T) from an object of C++ class type T
or a class derived from T. We already supported this when initializing
_Atomic(T) from T for most (and maybe all) other reasonable values of T.

llvm-svn: 214390

9 years ago[FastISel][AArch64] Add basic bitcast support for conversion between float and int.
Juergen Ributzka [Thu, 31 Jul 2014 06:25:37 +0000 (06:25 +0000)]
[FastISel][AArch64] Add basic bitcast support for conversion between float and int.

Fixes <rdar://problem/17867078>.

llvm-svn: 214389

9 years ago[FastISel][AArch64] Add sqrt intrinsic support.
Juergen Ributzka [Thu, 31 Jul 2014 06:25:33 +0000 (06:25 +0000)]
[FastISel][AArch64] Add sqrt intrinsic support.

Fixes <rdar://problem/17867067>.

llvm-svn: 214388

9 years agoWhen doing an exhaustive search for the kernel in memory, also look
Jason Molenda [Thu, 31 Jul 2014 06:07:04 +0000 (06:07 +0000)]
When doing an exhaustive search for the kernel in memory, also look
at 16k offsets.
<rdar://problem/17861781>

llvm-svn: 214387

9 years agoSema: Disallow taking the address of a bitfield coming from preincrement
David Majnemer [Thu, 31 Jul 2014 04:52:13 +0000 (04:52 +0000)]
Sema: Disallow taking the address of a bitfield coming from preincrement

Clang forgot that '++s.m' was a bitfield l-value and permit it's address
to be taken; this would crash at CodeGen-time.

Instead, propagate the object-kind when we see the prefix
increment/decrement.

This fixes PR20496.

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

llvm-svn: 214386