platform/upstream/llvm.git
10 years agoMergeFunctions Pass, introduced total ordering among top-level comparison
Stepan Dyatkovskiy [Sat, 21 Jun 2014 17:55:51 +0000 (17:55 +0000)]
MergeFunctions Pass, introduced total ordering among top-level comparison
methods.

Patch changes return type of FunctionComparator::compare() and
FunctionComparator::compare(const BasicBlock*, const BasicBlock*)
methods from bool (equal or not) to {-1, 0, 1} (less, equal, great).

This patch belongs to patch series that improves MergeFunctions
performance time from O(N*N) to O(N*log(N)).

llvm-svn: 211437

10 years agoLoopUnrollRuntime: Check for overflow in the trip count calculation.
Benjamin Kramer [Sat, 21 Jun 2014 13:46:25 +0000 (13:46 +0000)]
LoopUnrollRuntime: Check for overflow in the trip count calculation.

Fixes PR19823.

llvm-svn: 211436

10 years agoLegalizer: Add support for splitting insert_subvectors.
Benjamin Kramer [Sat, 21 Jun 2014 12:56:42 +0000 (12:56 +0000)]
Legalizer: Add support for splitting insert_subvectors.

We handle this by spilling the whole thing to the stack and doing the
insertion as a store.

PR19492. This happens in real code because the vectorizer creates v2i128 when AVX is enabled.

llvm-svn: 211435

10 years agoRevert "Lex: Use the correct types for MS integer suffixes"
Rafael Espindola [Sat, 21 Jun 2014 12:39:25 +0000 (12:39 +0000)]
Revert "Lex: Use the correct types for MS integer suffixes"

This reverts commit r211426.

This broke the arm bots. The crash can be reproduced on X86 by running.
./bin/clang -cc1  -fsyntax-only -verify -fms-extensions ~/llvm/clang/test/Lexer/ms-extensions.c -triple arm-linux

llvm-svn: 211434

10 years agoSCEVExpander: Fold constant PHIs harder. The logic below only understands proper...
Benjamin Kramer [Sat, 21 Jun 2014 11:47:18 +0000 (11:47 +0000)]
SCEVExpander: Fold constant PHIs harder. The logic below only understands proper IVs.

PR20093.

llvm-svn: 211433

10 years agoFix breakage after r211259
Jeroen Ketema [Sat, 21 Jun 2014 09:20:31 +0000 (09:20 +0000)]
Fix breakage after r211259

While we are here introduce the proper headers for the error code.

Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 211432

10 years ago[Mips] Remove redundant checking from the RelocationPass::isDynamic() function.
Simon Atanasyan [Sat, 21 Jun 2014 08:36:12 +0000 (08:36 +0000)]
[Mips] Remove redundant checking from the RelocationPass::isDynamic() function.

No functional changes.

llvm-svn: 211431

10 years agoAdd back functionality removed in r210497.
Richard Trieu [Sat, 21 Jun 2014 02:43:02 +0000 (02:43 +0000)]
Add back functionality removed in r210497.

Instead of asserting, output a message stating that a null pointer was found.

llvm-svn: 211430

10 years agotsan: fix code formatting
Dmitry Vyukov [Sat, 21 Jun 2014 02:10:17 +0000 (02:10 +0000)]
tsan: fix code formatting

llvm-svn: 211429

10 years agobuiltins: assembly routines are not static
Saleem Abdulrasool [Sat, 21 Jun 2014 01:41:21 +0000 (01:41 +0000)]
builtins: assembly routines are not static

Storage Class 3 is static storage.  These symbols need to be marked as external
(storage class 2) so that they can be referenced.  Note that this external is
not the same as ELF "external" visibility, which is indicated by DLL Storage
Class (i.e. __declspec(dllexport) or __declspec(dllimport)).

llvm-svn: 211428

10 years ago[X86] Add ISel patterns to select SSE3/AVX ADDSUB instructions.
Andrea Di Biagio [Sat, 21 Jun 2014 01:31:15 +0000 (01:31 +0000)]
[X86] Add ISel patterns to select SSE3/AVX ADDSUB instructions.

This patch adds ISel patterns to select SSE3/AVX ADDSUB instructions
from a sequence of "vadd + vsub + blend".

Example:

///
typedef float float4 __attribute__((ext_vector_type(4)));

float4 foo(float4 A, float4 B) {
  float4 X = A - B;
  float4 Y = A + B;
  return (float4){X[0], Y[1], X[2], Y[3]};
}
///

Before this patch, (with flag -mcpu=corei7) llc produced the following
assembly sequence:
  movaps  %xmm0, %xmm2
  addps   %xmm1, %xmm2
  subps   %xmm1, %xmm0
  blendps $10, %xmm2, %xmm0

With this patch, we now get a single
  addsubps  %xmm1, %xmm0

llvm-svn: 211427

10 years agoLex: Use the correct types for MS integer suffixes
David Majnemer [Sat, 21 Jun 2014 00:51:59 +0000 (00:51 +0000)]
Lex: Use the correct types for MS integer suffixes

We didn't properly implement support for the sized integer suffixes.
Suffixes like i16 were essentially ignored instead of mapping them to
the appropriately sized integer type.

This fixes PR20008.

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

llvm-svn: 211426

10 years agoFix a gdbremote bug in _M/_m stub support detection.
Todd Fiala [Sat, 21 Jun 2014 00:48:09 +0000 (00:48 +0000)]
Fix a gdbremote bug in _M/_m stub support detection.

When a stub reported $#00 (unsupported) for _M and _m
packets, the unsupported response was not handled and
the client then marked the _M/_m commands as definitely
supported.  However, they would always fail, preventing
lldb's fallback InferiorCallMmap-based allocation strategy
from being used to attempt to allocate memory in the inferior
process space.

llvm-svn: 211425

10 years agoFix the MinGW builder. Apparently std::call_once and
Zachary Turner [Sat, 21 Jun 2014 00:24:51 +0000 (00:24 +0000)]
Fix the MinGW builder.  Apparently std::call_once and
std::recursive_mutex are not available on MinGW and breaks the
builder.  Revert to using a function local static and sys::Mutex
just to get the tree green until we figure out a better solution.

llvm-svn: 211424

10 years agoAlways use a temp symbol for CIE.
Rafael Espindola [Fri, 20 Jun 2014 23:54:32 +0000 (23:54 +0000)]
Always use a temp symbol for CIE.

Fixes pr19185.

llvm-svn: 211423

10 years agotsan: fix windows build script
Dmitry Vyukov [Fri, 20 Jun 2014 23:22:31 +0000 (23:22 +0000)]
tsan: fix windows build script

llvm-svn: 211422

10 years agoDriver: In crashdumps with -fmodule, dump the module dependencies
Justin Bogner [Fri, 20 Jun 2014 22:59:50 +0000 (22:59 +0000)]
Driver: In crashdumps with -fmodule, dump the module dependencies

llvm-svn: 211421

10 years agoDriver: enhance MSC version compatibility
Saleem Abdulrasool [Fri, 20 Jun 2014 22:58:35 +0000 (22:58 +0000)]
Driver: enhance MSC version compatibility

The version information for Visual Studio is spread over multiple variables.
The newer Windows SDK has started making use of some of the extended versioning
variables that were previously undefined.  Enhance our compatibility definitions
for these cases.

_MSC_VER is defined to be the Major * 100 + Minor.  _MSC_FULL_VER is defined to
be Major * 10000000 + Minor * 100000 + Build.  And _MSC_BUILD is the build
revision of the compiler.

Extend the -fmsc-version option in a compatible manner.  If the value is the
previous form of MMmm, then we assume that the build number is 0.  Otherwise, a
specific build number may be passed by using the form MMmmbbbbb.  Due to
bitwidth limitations of the option, it is currently not possible to define a
revision value.

The version information can be passed as either the decimal encoded value
(_MSC_FULL_VER or _MSC_VER) or as a dot-delimited value.

The change to the TextDiagnostic is to deal with the updated encoding of the
version information.

llvm-svn: 211420

10 years agotsan: add Go build script for freebsd
Dmitry Vyukov [Fri, 20 Jun 2014 22:53:43 +0000 (22:53 +0000)]
tsan: add Go build script for freebsd

llvm-svn: 211419

10 years agotsan: port to freebsd
Dmitry Vyukov [Fri, 20 Jun 2014 22:51:18 +0000 (22:51 +0000)]
tsan: port to freebsd

llvm-svn: 211418

10 years agotsan: fix freebsd build
Dmitry Vyukov [Fri, 20 Jun 2014 22:49:41 +0000 (22:49 +0000)]
tsan: fix freebsd build
freebsd does not have /proc/self/environ

llvm-svn: 211417

10 years agoUse compact unwind for the iOS simulator.
Rafael Espindola [Fri, 20 Jun 2014 22:40:55 +0000 (22:40 +0000)]
Use compact unwind for the iOS simulator.

Another step in fixing pr19185.

llvm-svn: 211416

10 years agoUse a helper function and clang-format.
Rafael Espindola [Fri, 20 Jun 2014 22:37:01 +0000 (22:37 +0000)]
Use a helper function and clang-format.

No functionality change.

llvm-svn: 211415

10 years agoSupport: ScaledNumber: Fix inconsistent test names
Duncan P. N. Exon Smith [Fri, 20 Jun 2014 22:36:09 +0000 (22:36 +0000)]
Support: ScaledNumber: Fix inconsistent test names

llvm-svn: 211414

10 years agoSupport: Write ScaledNumbers::getLg{,Floor,Ceiling}()
Duncan P. N. Exon Smith [Fri, 20 Jun 2014 22:33:40 +0000 (22:33 +0000)]
Support: Write ScaledNumbers::getLg{,Floor,Ceiling}()

llvm-svn: 211413

10 years agoDelete dead code.
Rafael Espindola [Fri, 20 Jun 2014 22:30:31 +0000 (22:30 +0000)]
Delete dead code.

The compact unwind info is only used by code that knows it is supported.

llvm-svn: 211412

10 years agoDriver: Record that we're in crashdump and push flags to ConstructJob
Justin Bogner [Fri, 20 Jun 2014 22:16:00 +0000 (22:16 +0000)]
Driver: Record that we're in crashdump and push flags to ConstructJob

It's more flexible and arguably better layering to set flags to modify
compiling for diagnostics in the CC1 job themselves, rather than
tweaking the driver flags and letting them propagate.

There is one visible change this causes: crash report files will now
get preprocessed names (.i and friends).

llvm-svn: 211411

10 years agoCodeGen: Fix test to work with assertions as well
David Majnemer [Fri, 20 Jun 2014 22:08:59 +0000 (22:08 +0000)]
CodeGen: Fix test to work with assertions as well

llvm-svn: 211410

10 years agoSupport: Write ScaledNumber::getQuotient() and getProduct()
Duncan P. N. Exon Smith [Fri, 20 Jun 2014 21:47:47 +0000 (21:47 +0000)]
Support: Write ScaledNumber::getQuotient() and getProduct()

llvm-svn: 211409

10 years agoCodeGen: typeid/dynamic_cast tests don't need asserts
David Majnemer [Fri, 20 Jun 2014 21:44:39 +0000 (21:44 +0000)]
CodeGen: typeid/dynamic_cast tests don't need asserts

These tests relied on information that was only available for clang
builds that included asserts.  Fix these tests to lift that restriction.

llvm-svn: 211408

10 years agoSupport: Cleanup ScaledNumber::getAdjusted() doc
Duncan P. N. Exon Smith [Fri, 20 Jun 2014 21:44:36 +0000 (21:44 +0000)]
Support: Cleanup ScaledNumber::getAdjusted() doc

llvm-svn: 211407

10 years agoSupport: Mark end of namespaces
Duncan P. N. Exon Smith [Fri, 20 Jun 2014 21:43:20 +0000 (21:43 +0000)]
Support: Mark end of namespaces

This convinces clang-format to leave a newline.

llvm-svn: 211406

10 years agoFix some double printing of filenames for archives in llvm-nm when
Kevin Enderby [Fri, 20 Jun 2014 21:29:27 +0000 (21:29 +0000)]
Fix some double printing of filenames for archives in llvm-nm when
the tool is given multiple files.  Also fix the same issue with Mach-O
universal files. And fix the newline spacing to separate the output
in these cases.

llvm-svn: 211405

10 years agoDon't produce eh_frame relocations when targeting the IOS simulator.
Rafael Espindola [Fri, 20 Jun 2014 21:15:27 +0000 (21:15 +0000)]
Don't produce eh_frame relocations when targeting the IOS simulator.

First step for fixing pr19185.

llvm-svn: 211404

10 years agoDriver: Remove some superfluous calls to Arg->claim()
Justin Bogner [Fri, 20 Jun 2014 21:12:53 +0000 (21:12 +0000)]
Driver: Remove some superfluous calls to Arg->claim()

Args.getLastArg() claims the Arg it returns, so calling claim on these
results is unnecessary.

llvm-svn: 211403

10 years agoCodeGen: Refactor dynamic_cast and typeid
David Majnemer [Fri, 20 Jun 2014 21:11:00 +0000 (21:11 +0000)]
CodeGen: Refactor dynamic_cast and typeid

This refactors the emission of dynamic_cast and typeid expressions so
that ABI specific knowledge lives in appropriate places.  There are
quite a few benefits for having the two implementations share a common
core like sharing logic for optimization opportunities.

While we are at it, clean up the tests.

llvm-svn: 211402

10 years agoRevert "Replace Execution Engine's mutex with std::recursive_mutex."
Zachary Turner [Fri, 20 Jun 2014 21:07:14 +0000 (21:07 +0000)]
Revert "Replace Execution Engine's mutex with std::recursive_mutex."

This reverts commit 1f502bd9d7d2c1f98ad93a09ffe435e11a95aedd, due to
GCC / MinGW's lack of support for C++11 threading.

It's possible this will go back in after we come up with a
reasonable solution.

llvm-svn: 211401

10 years agoFixed the "log enable gdb-remote packets" to support dumping the binary memory read...
Greg Clayton [Fri, 20 Jun 2014 20:41:07 +0000 (20:41 +0000)]
Fixed the "log enable gdb-remote packets" to support dumping the binary memory read packet ('x') by printing out the binary data correctly using only printable characters and removing the 0x7d escapes so the memory is readable in the packet output.

llvm-svn: 211400

10 years agoGenerate native unwind info on Win64
Reid Kleckner [Fri, 20 Jun 2014 20:35:47 +0000 (20:35 +0000)]
Generate native unwind info on Win64

This patch enables LLVM to emit Win64-native unwind info rather than
DWARF CFI.  It handles all corner cases (I hope), including stack
realignment.

Because the unwind info is not flexible enough to describe stack frames
with a gap of unknown size in the middle, such as the one caused by
stack realignment, I modified register spilling code to place all spills
into the fixed frame slots, so that they can be accessed relative to the
frame pointer.

Patch by Vadim Chugunov!

Reviewed By: rnk

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

llvm-svn: 211399

10 years agoC++ status page: restore the convention of saying "SVN" until we reach a release.
Richard Smith [Fri, 20 Jun 2014 20:35:42 +0000 (20:35 +0000)]
C++ status page: restore the convention of saying "SVN" until we reach a release.

llvm-svn: 211398

10 years agoBe less bold.
Richard Smith [Fri, 20 Jun 2014 20:34:03 +0000 (20:34 +0000)]
Be less bold.

llvm-svn: 211397

10 years ago[C++1z] Add C++1z to the C++ status page.
Richard Smith [Fri, 20 Jun 2014 20:33:10 +0000 (20:33 +0000)]
[C++1z] Add C++1z to the C++ status page.

llvm-svn: 211396

10 years agoFix typo in r211394.
Richard Smith [Fri, 20 Jun 2014 19:58:05 +0000 (19:58 +0000)]
Fix typo in r211394.

llvm-svn: 211395

10 years ago[C++1z] Implement N3928: message in static_assert is optional.
Richard Smith [Fri, 20 Jun 2014 19:57:12 +0000 (19:57 +0000)]
[C++1z] Implement N3928: message in static_assert is optional.

llvm-svn: 211394

10 years agoFix some -Wsign-compare fallout from changing container count member functions to...
David Blaikie [Fri, 20 Jun 2014 19:54:13 +0000 (19:54 +0000)]
Fix some -Wsign-compare fallout from changing container count member functions to return unsigned instead of bool.

llvm-svn: 211393

10 years ago[C++1z] Implement N3981: Disable trigraphs by default in C++1z mode.
Richard Smith [Fri, 20 Jun 2014 19:23:57 +0000 (19:23 +0000)]
[C++1z] Implement N3981: Disable trigraphs by default in C++1z mode.

llvm-svn: 211392

10 years agoCommited patch from Björn Steinbrink:
Stepan Dyatkovskiy [Fri, 20 Jun 2014 19:11:56 +0000 (19:11 +0000)]
Commited patch from Björn Steinbrink:
Summary:
Different range metadata can lead to different optimizations in later
passes, possibly breaking the semantics of the merged function. So range
metadata must be taken into consideration when comparing Load
instructions.

Thanks!

llvm-svn: 211391

10 years ago[Make] Fix dependencies for td.expanded
Adam Nemet [Fri, 20 Jun 2014 19:00:41 +0000 (19:00 +0000)]
[Make] Fix dependencies for td.expanded

Depend on all the .td files not just the main one.

llvm-svn: 211390

10 years agotsan: remove unused header include
Dmitry Vyukov [Fri, 20 Jun 2014 18:56:11 +0000 (18:56 +0000)]
tsan: remove unused header include

llvm-svn: 211389

10 years agoDon't crash when emitting a glvalue conditional where one arm is a
Richard Smith [Fri, 20 Jun 2014 18:43:47 +0000 (18:43 +0000)]
Don't crash when emitting a glvalue conditional where one arm is a
throw-expression. Based on a patch by Marius Wachtler!

llvm-svn: 211388

10 years agotsan: remove unused header include
Dmitry Vyukov [Fri, 20 Jun 2014 18:30:06 +0000 (18:30 +0000)]
tsan: remove unused header include

llvm-svn: 211386

10 years agotsan: remove unused header include
Dmitry Vyukov [Fri, 20 Jun 2014 18:28:34 +0000 (18:28 +0000)]
tsan: remove unused header include

llvm-svn: 211385

10 years ago[RuntimeDyld] Fix ppc64 stub relocations on little-endian
Ulrich Weigand [Fri, 20 Jun 2014 18:17:56 +0000 (18:17 +0000)]
[RuntimeDyld] Fix ppc64 stub relocations on little-endian

When RuntimeDyldELF creates stub functions, it needs to install
relocations that will resolve to the final address of the target
routine. Since those are 16-bit relocs, they need to be applied to the
least-significant halfword of the instruction.  On big-endian ppc64,
this means that addresses have to be adjusted by 2, which is what the
code currently does.

However, on a little-endian system, the address must *not* be adjusted;
the least-significant halfword is the first one.  This patch updates the
RuntimeDyldELF code to take the target byte order into account.

llvm-svn: 211384

10 years agoFix a warning about the use of const being ignored with a cast.
Kevin Enderby [Fri, 20 Jun 2014 18:07:34 +0000 (18:07 +0000)]
Fix a warning about the use of const being ignored with a cast.

llvm-svn: 211383

10 years ago[RuntimeDyld] Support more PPC64 relocations
Ulrich Weigand [Fri, 20 Jun 2014 17:51:47 +0000 (17:51 +0000)]
[RuntimeDyld] Support more PPC64 relocations

This adds support for several missing PPC64 relocations in the
straight-forward manner to RuntimeDyldELF.cpp.

Note that this actually fixes a failure of a large-model test case on
PowerPC, allowing the XFAIL to be removed.

llvm-svn: 211382

10 years agoAdded gdb-remote tests for Q{Save,Restore}RegisterState.
Todd Fiala [Fri, 20 Jun 2014 17:39:24 +0000 (17:39 +0000)]
Added gdb-remote tests for Q{Save,Restore}RegisterState.

Tests for both thread suffix and no thread suffix execution.

Moved some bit-flipping helper methods from TestLldbGdbServer
into the base GdbRemoteTestCaseBase class.

llvm-svn: 211381

10 years agoFix crash caused by unnamed union or struct when doing ast-print
Serge Pavlov [Fri, 20 Jun 2014 17:08:28 +0000 (17:08 +0000)]
Fix crash caused by unnamed union or struct when doing ast-print

llvm-svn: 211380

10 years ago[Refactor] Simplify memory access isWrite
Johannes Doerfert [Fri, 20 Jun 2014 17:06:41 +0000 (17:06 +0000)]
[Refactor] Simplify memory access isWrite

llvm-svn: 211379

10 years agoR600/SI: Add patterns for ctpop inside a branch
Tom Stellard [Fri, 20 Jun 2014 17:06:11 +0000 (17:06 +0000)]
R600/SI: Add patterns for ctpop inside a branch

llvm-svn: 211378

10 years agoR600/SI: Add a pattern for f32 ftrunc
Tom Stellard [Fri, 20 Jun 2014 17:06:09 +0000 (17:06 +0000)]
R600/SI: Add a pattern for f32 ftrunc

llvm-svn: 211377

10 years agoR600: Expand vector flog2
Tom Stellard [Fri, 20 Jun 2014 17:06:07 +0000 (17:06 +0000)]
R600: Expand vector flog2

llvm-svn: 211376

10 years agoR600: Expand vector fexp2
Tom Stellard [Fri, 20 Jun 2014 17:06:05 +0000 (17:06 +0000)]
R600: Expand vector fexp2

llvm-svn: 211375

10 years agoR600/SI: SI Control Flow Annotation bug fixed
Tom Stellard [Fri, 20 Jun 2014 17:06:02 +0000 (17:06 +0000)]
R600/SI: SI Control Flow Annotation bug fixed

Mixing of AddAvailableValue and GetValueAtEndOfBlock methods of SSAUpdater
leaded to the endless loop generation when the nested loops annotated.

This fixes a bug in the OCL_ML/KNN OpenCV test.  The test case is too
complex for FileCheck and would be very fragile.

Patch by: Elena Denisova

llvm-svn: 211374

10 years agoR600/SI: Add a VALU pattern for i64 xor
Tom Stellard [Fri, 20 Jun 2014 17:05:57 +0000 (17:05 +0000)]
R600/SI: Add a VALU pattern for i64 xor

llvm-svn: 211373

10 years agoReduction like is now a memory access property
Johannes Doerfert [Fri, 20 Jun 2014 16:58:12 +0000 (16:58 +0000)]
Reduction like is now a memory access property

- Remove the statement reduction like property
+ Add the reduction like property to memory accesses

llvm-svn: 211372

10 years agoPE/COFF: move PAGE_SIZE into the PECOFFLinkingContext.
Tim Northover [Fri, 20 Jun 2014 16:45:16 +0000 (16:45 +0000)]
PE/COFF: move PAGE_SIZE into the PECOFFLinkingContext.

A refactoring, with the added benefit of helping OS X builds.

llvm-svn: 211371

10 years ago[PowerPC] Fix small argument stack slot offset for LE
Ulrich Weigand [Fri, 20 Jun 2014 16:37:40 +0000 (16:37 +0000)]
[PowerPC] Fix small argument stack slot offset for LE

When small arguments (structures < 8 bytes or "float") are passed in a
stack slot in the ppc64 SVR4 ABI, they must reside in the least
significant part of that slot.  On BE, this means that an offset needs
to be added to the stack address of the parameter, but on LE, the least
significant part of the slot has the same address as the slot itself.

For the most part, this is handled in the LLVM back-end, where I just
fixed the LE case in commit r211368.

However, there is one piece of the clang front-end that is also aware of
these stack-slot offsets: PPC64_SVR4_ABIInfo::EmitVAArg.  This patch
updates that routine to take endianness into account.

llvm-svn: 211370

10 years agoModel statement wise reduction dependences
Johannes Doerfert [Fri, 20 Jun 2014 16:37:11 +0000 (16:37 +0000)]
Model statement wise reduction dependences

+ Collect reduction dependences
+ Introduced TYPE_RED in Dependences.h which can be used to obtain the
  reduction dependences
+ Used TYPE_RED to prevent parallelization while we do not have a privatizing
  code generation
+ Relax the dependences for non-parallel code generation
+ Add privatization dependences to ensure correctness
+ 12 Test cases to check for reduction and privatization dependences

llvm-svn: 211369

10 years ago[PowerPC] Fix small argument stack slot offset for LE
Ulrich Weigand [Fri, 20 Jun 2014 16:34:05 +0000 (16:34 +0000)]
[PowerPC] Fix small argument stack slot offset for LE

When small arguments (structures < 8 bytes or "float") are passed in a
stack slot in the ppc64 SVR4 ABI, they must reside in the least
significant part of that slot.  On BE, this means that an offset needs
to be added to the stack address of the parameter, but on LE, the least
significant part of the slot has the same address as the slot itself.

This changes the PowerPC back-end ABI code to only add the small
argument stack slot offset for BE.  It also adds test cases to verify
the correct behavior on both BE and LE.

llvm-svn: 211368

10 years agoMachO: rename _outputFileType to avoid shadowing parent field.
Tim Northover [Fri, 20 Jun 2014 15:59:00 +0000 (15:59 +0000)]
MachO: rename _outputFileType to avoid shadowing parent field.

llvm-svn: 211367

10 years agoMove test so that it is skipped if the ARM target is not enabled.
Rafael Espindola [Fri, 20 Jun 2014 15:30:38 +0000 (15:30 +0000)]
Move test so that it is skipped if the ARM target is not enabled.

llvm-svn: 211366

10 years agoDisable Modules/dependency-dump-dependent-module.m on win32 for now.
NAKAMURA Takumi [Fri, 20 Jun 2014 15:04:25 +0000 (15:04 +0000)]
Disable Modules/dependency-dump-dependent-module.m on win32 for now.

FIXME: This fails on win32 due to ERROR_FILENAME_EXCED_RANGE if the working directory is too deep.

We should make Win32/Path.inc capable of long pathnames with '\\?\'.

llvm-svn: 211363

10 years agoThe ability to use vector initializer lists is a GNU vector extension
James Molloy [Fri, 20 Jun 2014 14:35:13 +0000 (14:35 +0000)]
The ability to use vector initializer lists is a GNU vector extension
and is unrelated to the NEON intrinsics in arm_neon.h. On little
endian machines it works fine, however on big endian machines it
exhibits surprising behaviour:

    uint32x2_t x = {42, 64};
    return vget_lane_u32(x, 0); // Will return 64.

Because of this, explicitly call out that it is unsupported on big
endian machines.

This patch will emit the following warning in big-endian mode:

    test.c:3:15: warning: vector initializers are a GNU extension and are not compatible with NEON intrinsics [-Wgnu]
    int32x4_t x = {0, 1, 2, 3};
                  ^
    test.c:3:15: note: consider using vld1q_s32() to initialize a vector from memory, or vcombine_s32(vcreate_s32(), vcreate_s32()) to initialize from integer constants
    1 warning generated.

llvm-svn: 211362

10 years agoAdd file missed in r211360 commit
Ulrich Weigand [Fri, 20 Jun 2014 14:32:39 +0000 (14:32 +0000)]
Add file missed in r211360 commit

llvm-svn: 211361

10 years ago[PowerPC] Fix ELF interpreter name for powerpc64le-linux
Ulrich Weigand [Fri, 20 Jun 2014 14:19:02 +0000 (14:19 +0000)]
[PowerPC] Fix ELF interpreter name for powerpc64le-linux

On PowerPC LE the system uses the /lib64/ld64.so.2 dynamic linker name
instead of /lib64/ld64.so.1 (to indicate the ELFv2 ABI version).

This fixes the clang driver to pass the appropriate -dynamic-linker
setting, and adds some more tests to linux-ld.c.

llvm-svn: 211360

10 years ago[PowerPC] Add MultiarchIncludeDirs for powerpc64le
Ulrich Weigand [Fri, 20 Jun 2014 13:41:24 +0000 (13:41 +0000)]
[PowerPC] Add MultiarchIncludeDirs for powerpc64le

There was already partial support for multi-arch on powerpc64le,
but the MultiarchIncludeDirs setting was missing.  This patch
adds the appropriate definition, and also extends the
linux-header-search.cpp test case to verify an Ubuntu 14.04
powerpc64le tree.

llvm-svn: 211359

10 years agoAllow a target to create a null streamer.
Rafael Espindola [Fri, 20 Jun 2014 13:11:28 +0000 (13:11 +0000)]
Allow a target to create a null streamer.

Targets can assume that a target streamer is present, so they have to be able
to construct a null streamer in order to set the target streamer in it to.

Fixes a crash when using the null streamer with arm.

llvm-svn: 211358

10 years agoFix PR20081: Parsing templates in the presence of -x cuda -std=c++11
Eli Bendersky [Fri, 20 Jun 2014 13:09:59 +0000 (13:09 +0000)]
Fix PR20081: Parsing templates in the presence of -x cuda -std=c++11

http://reviews.llvm.org/D4222

llvm-svn: 211357

10 years agoCode in LoopStrengthReduce.cpp depends on SmallBitVector::size() being size_t
Yaron Keren [Fri, 20 Jun 2014 12:57:44 +0000 (12:57 +0000)]
Code in LoopStrengthReduce.cpp depends on SmallBitVector::size() being size_t
and not unsigned.

llvm-svn: 211356

10 years ago[Mips] Make rel-copy.test test case independent from external input files.
Simon Atanasyan [Fri, 20 Jun 2014 12:54:06 +0000 (12:54 +0000)]
[Mips] Make rel-copy.test test case independent from external input files.

llvm-svn: 211355

10 years agoAdd module flags metadata to record the settings for enum and wchar width
Oliver Stannard [Fri, 20 Jun 2014 12:43:07 +0000 (12:43 +0000)]
Add module flags metadata to record the settings for enum and wchar width

Add module flags metadata to record the settings for enum and wchar width,
to allow correct ARM build attribute generation

llvm-svn: 211354

10 years agoReverting size_type for the containers from size_type to unsigned.
Yaron Keren [Fri, 20 Jun 2014 12:20:56 +0000 (12:20 +0000)]
Reverting size_type for the containers from size_type to unsigned.
Various places in LLVM assume that container size and count are unsigned
and do not use the container size_type. Therefore they break compilation
(or possibly executation) for LP64 systems where size_t is 64 bit while
unsigned is still 32 bit.

If we'll ever that many items in the container size_type could be made
size_t for a specific containers after reviweing its other uses.

llvm-svn: 211353

10 years ago[OPENMP] Initial support for 'nowait' clause.
Alexey Bataev [Fri, 20 Jun 2014 11:19:47 +0000 (11:19 +0000)]
[OPENMP] Initial support for 'nowait' clause.

llvm-svn: 211352

10 years agoAttempting to fix the 64 bit bots.
Yaron Keren [Fri, 20 Jun 2014 10:52:57 +0000 (10:52 +0000)]
Attempting to fix the 64 bit bots.

llvm-svn: 211351

10 years agoThe count() function for STL datatypes returns unsigned, even where it's
Yaron Keren [Fri, 20 Jun 2014 10:26:56 +0000 (10:26 +0000)]
The count() function for STL datatypes returns unsigned, even where it's
only 1/0 result like std::set. Some of the LLVM ADT already return unsigned
count(), while others still return bool count().

In continuation to r197879, this patch modifies DenseMap, DenseSet,
ScopedHashTable, ValueMap:: count() to return size_type instead of bool,
1 instead of true and 0 instead of false.

size_type is typedef-ed locally within each class to size_t.

http://reviews.llvm.org/D4018

Reviewed by dblaikie.

llvm-svn: 211350

10 years agoEmit the ARM build attributes ABI_PCS_wchar_t and ABI_enum_size.
Oliver Stannard [Fri, 20 Jun 2014 10:08:11 +0000 (10:08 +0000)]
Emit the ARM build attributes ABI_PCS_wchar_t and ABI_enum_size.

Emit the ARM build attributes ABI_PCS_wchar_t and ABI_enum_size based on
module flags metadata.

llvm-svn: 211349

10 years agoOMPScheduleClause::OMPScheduleClause(): Fix possible typos, s/\brief/\param/g. [...
NAKAMURA Takumi [Fri, 20 Jun 2014 09:52:04 +0000 (09:52 +0000)]
OMPScheduleClause::OMPScheduleClause(): Fix possible typos, s/\brief/\param/g. [-Wdocumentation]

llvm-svn: 211348

10 years ago[OPENMP] Initial support for 'ordered' clause.
Alexey Bataev [Fri, 20 Jun 2014 09:44:06 +0000 (09:44 +0000)]
[OPENMP] Initial support for 'ordered' clause.

llvm-svn: 211347

10 years agops][mips64r6] Added LSA/DLSA instructions
Zoran Jovanovic [Fri, 20 Jun 2014 09:28:09 +0000 (09:28 +0000)]
ps][mips64r6] Added LSA/DLSA instructions
Differential Revision: http://reviews.llvm.org/D3897

llvm-svn: 211346

10 years agoclang-tidy: [misc-use-override] Correctly handle defaulted destructors.
Daniel Jasper [Fri, 20 Jun 2014 09:12:46 +0000 (09:12 +0000)]
clang-tidy: [misc-use-override] Correctly handle defaulted destructors.

Also, minor implementation and test fixes.

llvm-svn: 211345

10 years agoFix/Improve SourceRange of explicitly defaulted members
Daniel Jasper [Fri, 20 Jun 2014 08:44:22 +0000 (08:44 +0000)]
Fix/Improve SourceRange of explicitly defaulted members

When adding the implicit compound statement (required for Codegen?), the
end location was previously overridden by the start location, probably
based on the assumptions:

* The location of the compound statement should be the member's location
* The compound statement if present is the last element of a FunctionDecl

This patch changes the location of the compound statement to the
member's end location.

Code review: http://reviews.llvm.org/D4175

llvm-svn: 211344

10 years ago[asan] when reporting an ODR violation, also print the stack traces where the globals...
Kostya Serebryany [Fri, 20 Jun 2014 08:24:12 +0000 (08:24 +0000)]
[asan] when reporting an ODR violation, also print the stack traces where the globals have been registered (thus show the name of shared library or exe to which the global belongs). The reports become a bit too verbose but I do not see any *simple* way to make them more compact. This should be especially helpful when the ODR happens because the same .cc file is used twice in the project in differend DSOs

llvm-svn: 211343

10 years ago[OPENMP] Initial support for 'schedule' clause.
Alexey Bataev [Fri, 20 Jun 2014 07:16:17 +0000 (07:16 +0000)]
[OPENMP] Initial support for 'schedule' clause.

llvm-svn: 211342

10 years agoR600: Trivial subtarget feature cleanups.
Matt Arsenault [Fri, 20 Jun 2014 06:50:05 +0000 (06:50 +0000)]
R600: Trivial subtarget feature cleanups.

Remove an unused AMDIL leftover, correct extra periods
appearing in the help menu.

llvm-svn: 211341

10 years agoArgList: use MakeArgList overloads in subclasses and clean up some calls.
Justin Bogner [Fri, 20 Jun 2014 04:36:29 +0000 (04:36 +0000)]
ArgList: use MakeArgList overloads in subclasses and clean up some calls.

llvm-svn: 211340

10 years agoAdd Support to Recognize and Vectorize NON SIMD instructions in SLPVectorizer.
Karthik Bhat [Fri, 20 Jun 2014 04:32:48 +0000 (04:32 +0000)]
Add Support to Recognize and Vectorize NON SIMD instructions in SLPVectorizer.

This patch adds support to recognize patterns such as fadd,fsub,fadd,fsub.../add,sub,add,sub... and
vectorizes them as vector shuffles if they are profitable.
These patterns of vector shuffle can later be converted to instructions such as addsubpd etc on X86.
Thanks to Arnold and Hal for the reviews. http://reviews.llvm.org/D4015

llvm-svn: 211339

10 years agoFrontend: Disentangle removePathTraversal from concatenating paths
Justin Bogner [Fri, 20 Jun 2014 03:28:46 +0000 (03:28 +0000)]
Frontend: Disentangle removePathTraversal from concatenating paths

This reimplements part of r211303 in a bit of a cleaner way. Doing so
allows us to use a proper absolute path when calling addFileMapping
rather than relying on a substring being one, which should fix the
tests on Windows.

llvm-svn: 211338

10 years agoSupport: Clean up getRounded() tests
Duncan P. N. Exon Smith [Fri, 20 Jun 2014 02:31:07 +0000 (02:31 +0000)]
Support: Clean up getRounded() tests

llvm-svn: 211337

10 years agoSupport: Write ScaledNumbers::getAdjusted()
Duncan P. N. Exon Smith [Fri, 20 Jun 2014 02:31:03 +0000 (02:31 +0000)]
Support: Write ScaledNumbers::getAdjusted()

llvm-svn: 211336

10 years agoSmall clanups:
Rafael Espindola [Fri, 20 Jun 2014 01:37:35 +0000 (01:37 +0000)]
Small clanups:

Use static instead of anonymous namespace.
Delete write only variables.

llvm-svn: 211335