platform/upstream/llvm.git
10 years agoRemove useless declaration
Sylvestre Ledru [Sun, 22 Jun 2014 13:18:53 +0000 (13:18 +0000)]
Remove useless declaration

llvm-svn: 211468

10 years agoRevert r211402 (and r211408,r211410), "CodeGen: Refactor dynamic_cast and typeid...
NAKAMURA Takumi [Sun, 22 Jun 2014 12:42:29 +0000 (12:42 +0000)]
Revert r211402 (and r211408,r211410), "CodeGen: Refactor dynamic_cast and typeid" It crashes msvc codegen in clang/test/SemaCXX/undefined-internal.cpp.

It is reproducible with:

  $ clang -cc1 -triple i686-win32 -emit-llvm-only clang/test/SemaCXX/undefined-internal.cpp

llvm-svn: 211467

10 years agoIntroduce a Lit feature "debug_frame" and apply it to llvm/test/MC/ELF/cfi-version.ll.
NAKAMURA Takumi [Sun, 22 Jun 2014 12:35:39 +0000 (12:35 +0000)]
Introduce a Lit feature "debug_frame" and apply it to llvm/test/MC/ELF/cfi-version.ll.

.debug_frame is not emitted for targeting Windows x64.

llvm-svn: 211466

10 years agoAdd a description to the test from r211433 explaining why it's written that way.
Benjamin Kramer [Sun, 22 Jun 2014 12:22:04 +0000 (12:22 +0000)]
Add a description to the test from r211433 explaining why it's written that way.

llvm-svn: 211465

10 years agoRemove unused diagnostic and diagnostic group.
Benjamin Kramer [Sun, 22 Jun 2014 12:16:35 +0000 (12:16 +0000)]
Remove unused diagnostic and diagnostic group.

llvm-svn: 211464

10 years ago[Mips] Make rel-dynamic-01.test test case independent from external input files.
Simon Atanasyan [Sun, 22 Jun 2014 11:58:08 +0000 (11:58 +0000)]
[Mips] Make rel-dynamic-01.test test case independent from external input files.

llvm-svn: 211463

10 years agoTextDiagnosticPrinter: use the mapped level for remark flag computation
Alp Toker [Sun, 22 Jun 2014 10:08:06 +0000 (10:08 +0000)]
TextDiagnosticPrinter: use the mapped level for remark flag computation

Custom diagnostics don't have a builtin class so this wouldn't have worked.
Reduces surface area of remark-related changes.

No test coverage.

llvm-svn: 211462

10 years agoEnable WindowsToolChain on all native Windows builds
Alp Toker [Sun, 22 Jun 2014 04:31:15 +0000 (04:31 +0000)]
Enable WindowsToolChain on all native Windows builds

Make binaries built by MSVC, mingw and clang functionally equivalent. The
checks are trivially performed at runtime to eliminate functional differences
between supported configurations that used to be hard-coded.

llvm-svn: 211461

10 years agoLoopVectorizer: Fix a dominance issue
Arnold Schwaighofer [Sun, 22 Jun 2014 03:38:59 +0000 (03:38 +0000)]
LoopVectorizer: Fix a dominance issue

The induction variables start value needs to be defined before we branch
(overflow check) to the scalar preheader where we used it.

llvm-svn: 211460

10 years agoWindowsToolChain: decouple build environment from the toolchain
Alp Toker [Sun, 22 Jun 2014 03:27:52 +0000 (03:27 +0000)]
WindowsToolChain: decouple build environment from the toolchain

Don't try to find the MSVC version that the binaries were built with. Doing so
defeats testing by causing invalid test passes on the build servers.

Whichever Visual Studio (or clang-cl.exe) edition was used to build the clang
package, it's strictly orthogonal and has no relation to software versions
available on the user's PC.

llvm-svn: 211459

10 years agoMake WindowsToolChain portable
Alp Toker [Sun, 22 Jun 2014 03:27:45 +0000 (03:27 +0000)]
Make WindowsToolChain portable

De-conditionalize as much as possible so we can start to fix this code.

No change in functionality.

llvm-svn: 211458

10 years agoMergeFunctions Pass, removed DenseMap helpers.
Stepan Dyatkovskiy [Sun, 22 Jun 2014 01:53:30 +0000 (01:53 +0000)]
MergeFunctions Pass, removed DenseMap helpers.

Patch removes rest part of code related to old implementation.

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

This one was the final patch.

llvm-svn: 211457

10 years agoMergeFunctions Pass, updated header comments.
Stepan Dyatkovskiy [Sun, 22 Jun 2014 00:57:09 +0000 (00:57 +0000)]
MergeFunctions Pass, updated header comments.

Added short description for new comparison algorithm, that introduces
total ordering among functions set.

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

llvm-svn: 211456

10 years agoReport error for non-zero data in .bss
Weiming Zhao [Sun, 22 Jun 2014 00:33:44 +0000 (00:33 +0000)]
Report error for non-zero data in .bss

User may initialize a var with non-zero value and specify .bss section.
E.g. : int a __attribute__((section(".bss"))) = 2;

This patch converts an assertion to error report for better user
experience.

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

llvm-svn: 211455

10 years agoRemove useless call
Sylvestre Ledru [Sat, 21 Jun 2014 23:51:07 +0000 (23:51 +0000)]
Remove useless call

llvm-svn: 211454

10 years ago[analyzer] Check for NULL passed to CFAutorelease.
Jordan Rose [Sat, 21 Jun 2014 23:50:40 +0000 (23:50 +0000)]
[analyzer] Check for NULL passed to CFAutorelease.

Patch by Sean McBride, tests adjusted by me.

llvm-svn: 211453

10 years agoSimplify the code (variable bValid is not really interesting)
Sylvestre Ledru [Sat, 21 Jun 2014 23:48:45 +0000 (23:48 +0000)]
Simplify the code (variable bValid is not really interesting)

llvm-svn: 211452

10 years agoRemove useless declaration
Sylvestre Ledru [Sat, 21 Jun 2014 23:47:20 +0000 (23:47 +0000)]
Remove useless declaration

llvm-svn: 211451

10 years agoTrack changes from clang r211448.
Alp Toker [Sat, 21 Jun 2014 23:33:00 +0000 (23:33 +0000)]
Track changes from clang r211448.

llvm-svn: 211450

10 years agoMake MS i128 suffix test from r211446 more robust
Alp Toker [Sat, 21 Jun 2014 23:32:05 +0000 (23:32 +0000)]
Make MS i128 suffix test from r211446 more robust

We want to catch both negative and positive failure conditions.

llvm-svn: 211449

10 years agoDiagnosticRenderer: emit basic notes as real diagnostics
Alp Toker [Sat, 21 Jun 2014 23:31:59 +0000 (23:31 +0000)]
DiagnosticRenderer: emit basic notes as real diagnostics

Fixes terminal column wrapping and vestigial 'note:' prefixes that would appear
when using emitBasicNote().

llvm-svn: 211448

10 years agoTextDiagnostic: print remark level diagnostics in bold too
Alp Toker [Sat, 21 Jun 2014 23:31:52 +0000 (23:31 +0000)]
TextDiagnostic: print remark level diagnostics in bold too

The purpose of bolding these is to make them visually distinct from
continuations (supplemental note diagnostics). Therefore, the bolding applies
to all severities _including_ remarks -- it's not in any way an indicator of
priority. Also simplify and comment.

No tests.

llvm-svn: 211447

10 years agoThe i128 suffix isn't always available.
David Majnemer [Sat, 21 Jun 2014 22:49:50 +0000 (22:49 +0000)]
The i128 suffix isn't always available.

This Lexer test unconditionally used the i128 integer literal suffix.
This suffix is only available to targets that have 128-bit arithmetic
support.

llvm-svn: 211446

10 years agoMergeFunctions Pass, FnSet has been replaced with FnTree.
Stepan Dyatkovskiy [Sat, 21 Jun 2014 20:54:36 +0000 (20:54 +0000)]
MergeFunctions Pass, FnSet has been replaced with FnTree.

Patch activates new implementation.
So from now, merging process should take time O(N*log(N)).
Where N size of module (we are free to measure it in
functions or in instructions). Internally FnTree represents
binary tree. So every lookup operation takes O(log(N)) time.

It is still not the last patch in series, we also have to
clean-up pass from old code, and update pass comments.

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

llvm-svn: 211445

10 years agoMergeFunctions Pass, removed unused methods from old implementation.
Stepan Dyatkovskiy [Sat, 21 Jun 2014 20:13:24 +0000 (20:13 +0000)]
MergeFunctions Pass, removed unused methods from old implementation.

Patch removed next old FunctionComparator methods:
    * enumerate
    * isEquivalentOperation
    * isEquivalentGEP
    * isEquivalentType

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

llvm-svn: 211444

10 years agoMergeFunctions, doSanityCheck: fixed body comments.
Stepan Dyatkovskiy [Sat, 21 Jun 2014 19:07:51 +0000 (19:07 +0000)]
MergeFunctions, doSanityCheck: fixed body comments.

llvm-svn: 211443

10 years agoMergeFunctions Pass, introduced sanity check, that checks order relation,
Stepan Dyatkovskiy [Sat, 21 Jun 2014 18:58:11 +0000 (18:58 +0000)]
MergeFunctions Pass, introduced sanity check, that checks order relation,
introduced among functions set.

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

llvm-svn: 211442

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

Something went wrong with r211426, it is an older version of this code
and should not have been committed.  It was reverted with r211434.

Original commit message:
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: 211441

10 years agoAdd "Yabin Hu" to CREDITS.txt
Yabin Hu [Sat, 21 Jun 2014 18:35:33 +0000 (18:35 +0000)]
Add "Yabin Hu" to CREDITS.txt

llvm-svn: 211440

10 years ago[test] Add '-target' option to fix bot failure.
Argyrios Kyrtzidis [Sat, 21 Jun 2014 18:28:44 +0000 (18:28 +0000)]
[test] Add '-target' option to fix bot failure.

llvm-svn: 211439

10 years ago[PCH] Remove the BackingIvarReferencedInAccessor field from DECL_OBJC_IVAR abbreviati...
Argyrios Kyrtzidis [Sat, 21 Jun 2014 18:16:40 +0000 (18:16 +0000)]
[PCH] Remove the BackingIvarReferencedInAccessor field from DECL_OBJC_IVAR abbreviation record.

Patch by Yiding Jia!

llvm-svn: 211438

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