platform/upstream/llvm.git
10 years ago[OPENMP] Reformatting and code improvement.
Alexey Bataev [Mon, 23 Jun 2014 08:21:53 +0000 (08:21 +0000)]
[OPENMP] Reformatting and code improvement.

llvm-svn: 211489

10 years agoclang-format: [proto] Add required space before absolute references.
Daniel Jasper [Mon, 23 Jun 2014 07:36:25 +0000 (07:36 +0000)]
clang-format: [proto] Add required space before absolute references.

llvm-svn: 211488

10 years agoclang-format: Fix corner case in pointer/reference detection.
Daniel Jasper [Mon, 23 Jun 2014 07:36:18 +0000 (07:36 +0000)]
clang-format: Fix corner case in pointer/reference detection.

llvm-svn: 211487

10 years agoMC: Cleanup parseMSInlineAsm
David Majnemer [Mon, 23 Jun 2014 02:17:16 +0000 (02:17 +0000)]
MC: Cleanup parseMSInlineAsm

Utilize range based for-loops to simplify some code.
Use insert() instead of a loop for simplicity/efficiency.

No functionality change.

llvm-svn: 211486

10 years agoParse: Simplify construction of the clobber list
David Majnemer [Mon, 23 Jun 2014 02:16:41 +0000 (02:16 +0000)]
Parse: Simplify construction of the clobber list

This avoids going over the clobber list twice.

No functionality change.

llvm-svn: 211485

10 years agoStaticAnalyzer: Switch a loop to a range-based for
David Majnemer [Mon, 23 Jun 2014 02:16:38 +0000 (02:16 +0000)]
StaticAnalyzer: Switch a loop to a range-based for

Merely a code simplification, no functionality change.

llvm-svn: 211484

10 years agoAST: Add ranges for AsmStmt's inputs and outputs
David Majnemer [Mon, 23 Jun 2014 02:16:34 +0000 (02:16 +0000)]
AST: Add ranges for AsmStmt's inputs and outputs

No functionality change.

llvm-svn: 211483

10 years agocindex.py: remove obsolete workaround and FIXME
Alp Toker [Sun, 22 Jun 2014 23:28:54 +0000 (23:28 +0000)]
cindex.py: remove obsolete workaround and FIXME

clang_getCursorSpelling() doesn't assert on non-declarations any more and the
behaviour is covered by c-index tests.

Passes nosetests.

llvm-svn: 211482

10 years agoMC: adjust text section flags for WoA
Saleem Abdulrasool [Sun, 22 Jun 2014 22:25:01 +0000 (22:25 +0000)]
MC: adjust text section flags for WoA

Correct the section flags for code built for Windows on ARM with
`-ffunction-sections`.  Windows on ARM uses solely Thumb-2 instructions, and
indicates that the function is thumb by placing it in a text section that has
IMAGE_SCN_MEM_16BIT flag set.

When we encounter a .section directive, a new section is constructed.  This may
be a text segment.  In order to identify that we need the additional flag,
expose the target triple through the ObjectFileInfo as this information is lost
otherwise.

Since any modern ARM targeting environment on Windows would be Thumb-2 (Windows
ARM NT or Windows Embedded Compact), introducing a new flag to indicate the
section attribute seems to be a bit overkill.  Simply depend on the target
triple.  Since there is one location that this information is currently needed,
creating a target specific assembly parser and delegating the parsing of section
switches also feels a bit heavy handed.  If it turns out that this information
ends up changing additional behaviour, then it may be worth considering that
alternative.

llvm-svn: 211481

10 years agoRevert r211399, "Generate native unwind info on Win64"
NAKAMURA Takumi [Sun, 22 Jun 2014 22:00:56 +0000 (22:00 +0000)]
Revert r211399, "Generate native unwind info on Win64"

It broke Legacy JIT Tests on x86_64-{mingw32|msvc}, aka Windows x64.

llvm-svn: 211480

10 years agoDiagnosticIDs: use diagnostic severities to simplify extension handling
Alp Toker [Sun, 22 Jun 2014 21:58:33 +0000 (21:58 +0000)]
DiagnosticIDs: use diagnostic severities to simplify extension handling

llvm-svn: 211479

10 years agoR600: Use LowerSDIVREM for i64 node replace
Jan Vesely [Sun, 22 Jun 2014 21:43:01 +0000 (21:43 +0000)]
R600: Use LowerSDIVREM for i64 node replace

v2: move div/rem node replacement to R600ISelLowering
    make lowerSDIVREM protected

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 211478

10 years agoR600: Implement custom SDIVREM.
Jan Vesely [Sun, 22 Jun 2014 21:43:00 +0000 (21:43 +0000)]
R600: Implement custom SDIVREM.

Instead of separate SDIV/SREM. SDIV used UDIV which in turn used UDIVREM anyway.
SREM used SDIV(UDIV->UDIVREM)+MUL+SUB, using UDIVREM directly is more efficient.

v2: Don't use all caps names

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 211477

10 years agoR600: Add udivrem test
Jan Vesely [Sun, 22 Jun 2014 21:42:58 +0000 (21:42 +0000)]
R600: Add udivrem test

v2: move < %s to the end of the line
    space after ;
    add v4i32 test

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 211476

10 years agoFix the category name for hash-warnings and hash-errors
Alp Toker [Sun, 22 Jun 2014 21:16:50 +0000 (21:16 +0000)]
Fix the category name for hash-warnings and hash-errors

llvm-svn: 211475

10 years agoDriver: Skip the -ivfsoverlay argument in driver crash diags
Justin Bogner [Sun, 22 Jun 2014 20:35:10 +0000 (20:35 +0000)]
Driver: Skip the -ivfsoverlay argument in driver crash diags

llvm-svn: 211474

10 years agoRevert "Revert r211402 (and r211408,r211410), "CodeGen: Refactor dynamic_cast and...
David Majnemer [Sun, 22 Jun 2014 19:05:33 +0000 (19:05 +0000)]
Revert "Revert r211402 (and r211408,r211410), "CodeGen: Refactor dynamic_cast and typeid" It crashes msvc codegen in clang/test/SemaCXX/undefined-internal.cpp."

This reverts commit r211467 which reverted r211408,r211410, it caused
crashes in test/SemaCXX/undefined-internal.cpp for i686-win32 targets.

llvm-svn: 211473

10 years agoFix PR20087 by using the source index when changing the vector load
Filipe Cabecinhas [Sun, 22 Jun 2014 17:21:37 +0000 (17:21 +0000)]
Fix PR20087 by using the source index when changing the vector load

llvm-svn: 211472

10 years ago[cxx_status] Minor wording tweaks.
Richard Smith [Sun, 22 Jun 2014 16:00:05 +0000 (16:00 +0000)]
[cxx_status] Minor wording tweaks.

llvm-svn: 211471

10 years ago[cxx_status] Be a bit more precise.
Richard Smith [Sun, 22 Jun 2014 15:56:23 +0000 (15:56 +0000)]
[cxx_status] Be a bit more precise.

llvm-svn: 211470

10 years agoFix dead link.
Richard Smith [Sun, 22 Jun 2014 15:54:54 +0000 (15:54 +0000)]
Fix dead link.

llvm-svn: 211469

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