platform/upstream/llvm.git
10 years agoDon't capture DeclRefExpr::getNameInfo().getInfo(). It returns reference in temporary...
NAKAMURA Takumi [Wed, 29 Oct 2014 08:11:47 +0000 (08:11 +0000)]
Don't capture DeclRefExpr::getNameInfo().getInfo(). It returns reference in temporary object.

DeclarationNameInfo::getInfo() returns reference, but DeclRefExpr::getNameInfo() returns temporary DeclarationNameInfo().

It triggered a local crash for me.

  Failing Tests (1):
      Clang :: SemaTemplate/instantiate-overload-candidates.cpp

  Assertion failed!
  Program: bin\clang.EXE
  File: clang/lib/Basic/SourceManager.cpp, Line 822
  Expression: 0 && "Invalid SLocOffset or bad function choice"

llvm-svn: 220841

10 years agomacho-symbolized-disassembly.test: Don't check C++ demangler unconditionally.
NAKAMURA Takumi [Wed, 29 Oct 2014 08:08:21 +0000 (08:08 +0000)]
macho-symbolized-disassembly.test: Don't check C++ demangler unconditionally.

For example, MS PSDK is not expected to have <cxxabi.h>.
You should introduce the new feature in lit.cfg corresponding to HAVE_CXXABI_H if you would like to test demangler.

llvm-svn: 220840

10 years agotest: tweak inlined-allocs test
Saleem Abdulrasool [Wed, 29 Oct 2014 06:31:11 +0000 (06:31 +0000)]
test: tweak inlined-allocs test

Remove pointless checks for storage of uninteresting values.  Ensure that we
perform basic alias analysis to make the test more correct.  Finally, apply a
stylistic change to the test.

llvm-svn: 220839

10 years agoVMCore was renamed to IR long time ago
Seo Sanghyeon [Wed, 29 Oct 2014 05:20:39 +0000 (05:20 +0000)]
VMCore was renamed to IR long time ago

llvm-svn: 220838

10 years agoSuppress clang-tools-extra/test/clang-tidy/file-filter.cpp on win32 for investigaitng.
NAKAMURA Takumi [Wed, 29 Oct 2014 05:19:55 +0000 (05:19 +0000)]
Suppress clang-tools-extra/test/clang-tidy/file-filter.cpp on win32 for investigaitng.

llvm-svn: 220837

10 years agoShuffle a couple of formatters around. This should fix the bug that never dies, aka...
Enrico Granata [Wed, 29 Oct 2014 01:03:09 +0000 (01:03 +0000)]
Shuffle a couple of formatters around. This should fix the bug that never dies, aka rdar://15154623

llvm-svn: 220836

10 years agoObjective-C modern rewriter. Patch to fix a rewriting bug
Fariborz Jahanian [Tue, 28 Oct 2014 23:46:58 +0000 (23:46 +0000)]
Objective-C modern rewriter. Patch to fix a rewriting bug
rewriting an Objective-C block. Patch by Ryan Govostes.
rdar://18799145

llvm-svn: 220834

10 years agoUpdate llvm-objdump’s Mach-O symbolizer code to demangle C++ names.
Kevin Enderby [Tue, 28 Oct 2014 23:39:46 +0000 (23:39 +0000)]
Update llvm-objdump’s Mach-O symbolizer code to demangle C++ names.

llvm-svn: 220833

10 years ago[OCaml] PR5595: Pass LDFLAGS to tests via -cclib.
Peter Zotov [Tue, 28 Oct 2014 23:31:13 +0000 (23:31 +0000)]
[OCaml] PR5595: Pass LDFLAGS to tests via -cclib.

llvm-svn: 220832

10 years ago[OCaml] PR14083, PR9606: Only pick *.odoc files from current build target.
Peter Zotov [Tue, 28 Oct 2014 22:45:25 +0000 (22:45 +0000)]
[OCaml] PR14083, PR9606: Only pick *.odoc files from current build target.

When several build targets, e.g. Debug+Asserts and Release+Asserts
are present, ocamldoc complains of duplicate interfaces.

llvm-svn: 220831

10 years ago[clang-tidy] Updated docs for r220826.
Alexander Kornienko [Tue, 28 Oct 2014 22:43:33 +0000 (22:43 +0000)]
[clang-tidy] Updated docs for r220826.

llvm-svn: 220830

10 years ago[OCaml] Fix whitespace.
Peter Zotov [Tue, 28 Oct 2014 22:39:42 +0000 (22:39 +0000)]
[OCaml] Fix whitespace.

llvm-svn: 220829

10 years ago[OCaml] PR9719, PR14727: Make tests run without ocamlopt.
Peter Zotov [Tue, 28 Oct 2014 22:39:36 +0000 (22:39 +0000)]
[OCaml] PR9719, PR14727: Make tests run without ocamlopt.

Previously, tests hardcoded ocamlopt and cmxa, which broke builds on
machines without ocamlopt. Instead, they now fall back to ocamlc.

As a side effect this fixes PR14727, which was caused by a crude hack
that replaced gcc with g++ everywhere in the ocamlopt native compiler
path and passes it back using -cc. Now the tests use the same
technique as META, i.e. -cclib -lstdc++. It might be more fragile
than using g++ explicitly, but it will break when the installed
package will also break, which is good.

llvm-svn: 220828

10 years ago[mach-o] generate LC_DATA_IN_CODE in final linked images
Nick Kledzik [Tue, 28 Oct 2014 22:21:10 +0000 (22:21 +0000)]
[mach-o] generate LC_DATA_IN_CODE in final linked images

lld was regenerating LC_DATA_IN_CODE in .o output files, but not into
final linked images.

Update test case to verify data-in-code info makes it into final linked images.

llvm-svn: 220827

10 years ago[clang-tidy] Added -system-headers option.
Alexander Kornienko [Tue, 28 Oct 2014 22:16:13 +0000 (22:16 +0000)]
[clang-tidy] Added -system-headers option.

Added -system-headers option to allow display of warnings from system headers.
This is needed for testing libcxx, for example.

llvm-svn: 220826

10 years agoThe dllimport.cpp test was gating some checks on #ifndef MSABI,
Hans Wennborg [Tue, 28 Oct 2014 22:15:55 +0000 (22:15 +0000)]
The dllimport.cpp test was gating some checks on #ifndef MSABI,
but MSABI was never defined in the test. It seems we are erroring
on code that we should be accepting when compiling for MSVC compatibility.

This should make the test less confusing until PR21406 is fixed.

llvm-svn: 220825

10 years agoAdd a few functions to SBType to handle arrays and typedefs. Fixes rdar://12675166
Enrico Granata [Tue, 28 Oct 2014 21:44:06 +0000 (21:44 +0000)]
Add a few functions to SBType to handle arrays and typedefs. Fixes rdar://12675166

llvm-svn: 220824

10 years agoAdd a few words of documentation for the the $\{var.script:\} feature
Enrico Granata [Tue, 28 Oct 2014 21:13:31 +0000 (21:13 +0000)]
Add a few words of documentation for the the $\{var.script:\} feature

llvm-svn: 220823

10 years ago[mach-o] Turn -single_module error into a warning
Nick Kledzik [Tue, 28 Oct 2014 21:11:02 +0000 (21:11 +0000)]
[mach-o] Turn -single_module error into a warning

To be more compatible with existing darwin linker.

llvm-svn: 220822

10 years agoAdd a feature where a string data formatter can now be partially composed of Python...
Enrico Granata [Tue, 28 Oct 2014 21:07:00 +0000 (21:07 +0000)]
Add a feature where a string data formatter can now be partially composed of Python summary functions
This works similarly to the {thread/frame/process/target.script:...} feature - you write a summary string, part of which is

${var.script:someFuncName}
someFuncName is expected to be declared as
def someFuncName(SBValue,otherArgument) - essentially the same as a summary function

Since . -> [] are the only allowed separators, and % is used for custom formatting, .script: would not be a legitimate symbol anyway, which makes this non-ambiguous

llvm-svn: 220821

10 years agoAdded the ability to add attributes to inline
Sean Callanan [Tue, 28 Oct 2014 20:23:20 +0000 (20:23 +0000)]
Added the ability to add attributes to inline
testcases.  Also fixed one of the testcases to
not run on the platforms that don't support
Objective-C.

We want to do better with the Objective-C attribute
but we'll do that in a future commit.

llvm-svn: 220820

10 years agoObjective-C remove an unused enumerator which causes
Fariborz Jahanian [Tue, 28 Oct 2014 20:21:33 +0000 (20:21 +0000)]
Objective-C remove an unused enumerator which causes
warning in a switch statement.

llvm-svn: 220819

10 years ago[OCaml] PR19859: Add functions to query and modify branches.
Peter Zotov [Tue, 28 Oct 2014 19:47:02 +0000 (19:47 +0000)]
[OCaml] PR19859: Add functions to query and modify branches.

Patch by Gabriel Radanne <drupyog@zoho.com>.

llvm-svn: 220818

10 years ago[C API] PR19859: Add functions to query and modify branches.
Peter Zotov [Tue, 28 Oct 2014 19:46:56 +0000 (19:46 +0000)]
[C API] PR19859: Add functions to query and modify branches.

Patch by Gabriel Radanne <drupyog@zoho.com>.

llvm-svn: 220817

10 years ago[OCaml] PR19859: Add tests for reading the values of numeric constants.
Peter Zotov [Tue, 28 Oct 2014 19:46:52 +0000 (19:46 +0000)]
[OCaml] PR19859: Add tests for reading the values of numeric constants.

Patch by Gabriel Radanne <drupyog@zoho.com>.

llvm-svn: 220816

10 years ago[OCaml] PR19859: Add Llvm.{fcmp_predicate,float_of_const}.
Peter Zotov [Tue, 28 Oct 2014 19:46:48 +0000 (19:46 +0000)]
[OCaml] PR19859: Add Llvm.{fcmp_predicate,float_of_const}.

Patch by Gabriel Radanne <drupyog@zoho.com>.

llvm-svn: 220815

10 years ago[C API] PR19859: Add LLVMGetFCmpPredicate and LLVMConstRealGetDouble.
Peter Zotov [Tue, 28 Oct 2014 19:46:44 +0000 (19:46 +0000)]
[C API] PR19859: Add LLVMGetFCmpPredicate and LLVMConstRealGetDouble.

Patch by Gabriel Radanne <drupyog@zoho.com>.

llvm-svn: 220814

10 years agoclang-format: Improve && detection as binary operator.
Daniel Jasper [Tue, 28 Oct 2014 18:28:22 +0000 (18:28 +0000)]
clang-format: Improve && detection as binary operator.

Before:
  template <class T,
            class = typename ::std::enable_if<
                ::std::is_array<T>{}&& ::std::is_array<T>{}>::type>
  void F();

After:
  template <class T,
            class = typename ::std::enable_if<
                ::std::is_array<T>{} && ::std::is_array<T>{}>::type>
  void F();

llvm-svn: 220813

10 years agoObjective-C. revert patch for rdar://17554063.
Fariborz Jahanian [Tue, 28 Oct 2014 18:28:16 +0000 (18:28 +0000)]
Objective-C. revert patch for rdar://17554063.

llvm-svn: 220812

10 years agoTransforms: reapply SVN r219899
Saleem Abdulrasool [Tue, 28 Oct 2014 18:27:37 +0000 (18:27 +0000)]
Transforms: reapply SVN r219899

This restores the commit from SVN r219899 with an additional change to ensure
that the CodeGen is correct for the case that was identified as being incorrect
(originally PR7272).

In the case that during inlining we need to synthesize a value on the stack
(i.e. for passing a value byval), then any function involving that alloca must
be stripped of its tailness as the restriction that it does not access the
parent's stack no longer holds.  Unfortunately, a single alloca can cause a
rippling effect through out the inlining as the value may be aliased or may be
mutated through an escaped external call.  As such, we simply track if an alloca
has been introduced in the frame during inlining, and strip any tail calls.

llvm-svn: 220811

10 years agoWhen trying to get the element type of an array type, do not go to the canonical...
Enrico Granata [Tue, 28 Oct 2014 18:25:50 +0000 (18:25 +0000)]
When trying to get the element type of an array type, do not go to the canonical type, since that will strip typedefs where we want them to be preserved. Fixes rdar://15453076

llvm-svn: 220810

10 years ago[AVX512] Fix VSQRT packed instructions internal names.
Robert Khasanov [Tue, 28 Oct 2014 18:22:41 +0000 (18:22 +0000)]
[AVX512] Fix VSQRT packed instructions internal names.
No functional change

llvm-svn: 220808

10 years agoclang-format: Fix test.
Daniel Jasper [Tue, 28 Oct 2014 18:18:02 +0000 (18:18 +0000)]
clang-format: Fix test.

llvm-svn: 220807

10 years ago[AVX512] Extended avx512_sqrt_packed (sqrt instructions) to VL subset.
Robert Khasanov [Tue, 28 Oct 2014 18:15:20 +0000 (18:15 +0000)]
[AVX512] Extended avx512_sqrt_packed (sqrt instructions) to VL subset.
Refactored through AVX512_maskable

llvm-svn: 220806

10 years agoclang-format: Improve && detection as binary operators.
Daniel Jasper [Tue, 28 Oct 2014 18:11:52 +0000 (18:11 +0000)]
clang-format: Improve && detection as binary operators.

Before:
  template <class T, class = typename std::enable_if<std::is_integral<
                         T>::value &&(sizeof(T) > 1 || sizeof(T) < 8)>::type>
  void F();

After:
  template <class T, class = typename std::enable_if<
                         std::is_integral<T>::value &&
                         (sizeof(T) > 1 || sizeof(T) < 8)>::type>
  void F();

llvm-svn: 220805

10 years agoFix example in documentation of target triple sanitization.
Eric Fiselier [Tue, 28 Oct 2014 18:03:38 +0000 (18:03 +0000)]
Fix example in documentation of target triple sanitization.

llvm-svn: 220804

10 years agoActually remove this test entirely.
Fariborz Jahanian [Tue, 28 Oct 2014 17:32:36 +0000 (17:32 +0000)]
Actually remove this test entirely.

llvm-svn: 220803

10 years ago[Objective-C]. revert r220740,r220727
Fariborz Jahanian [Tue, 28 Oct 2014 17:26:21 +0000 (17:26 +0000)]
[Objective-C]. revert r220740,r220727

llvm-svn: 220802

10 years agoclang-format: Improve function declaration detection.
Daniel Jasper [Tue, 28 Oct 2014 17:06:04 +0000 (17:06 +0000)]
clang-format: Improve function declaration detection.

Before:
  ReturnType MACRO
      FunctionName() {}

After:
  ReturnType MACRO
  FunctionName() {}

This fixes llvm.org/PR21404.

I wonder what the motivation for that if-condition was. But as no test
breaks, ...

llvm-svn: 220801

10 years agoPR17730: Add test that we don't crash on this testcase. (The bug is already fixed.)
Richard Smith [Tue, 28 Oct 2014 17:00:19 +0000 (17:00 +0000)]
PR17730: Add test that we don't crash on this testcase. (The bug is already fixed.)

llvm-svn: 220787

10 years agoclang-format: Update generated documentation with new flag.
Daniel Jasper [Tue, 28 Oct 2014 16:56:37 +0000 (16:56 +0000)]
clang-format: Update generated documentation with new flag.

llvm-svn: 220786

10 years agoPR21367: Don't accept rvalue references as an extension in C++98 mode if we're in...
Richard Smith [Tue, 28 Oct 2014 16:55:02 +0000 (16:55 +0000)]
PR21367: Don't accept rvalue references as an extension in C++98 mode if we're in a new-type-id or conversion-type-id, since those things can legitimately be followed by a binary && operator.

llvm-svn: 220785

10 years agoclang-format: [ObjC] Add separate flag to control indentation in blocks
Daniel Jasper [Tue, 28 Oct 2014 16:53:38 +0000 (16:53 +0000)]
clang-format: [ObjC] Add separate flag to control indentation in blocks

Apparently, people are very much divided on what the "correct"
indentation is. So, best to give them a choice.

The new flag is called ObjCBlockIndentWidth and the default is now set
to the same value as IndentWidth for the pre-defined styles.

llvm-svn: 220784

10 years ago[AVX-512] Expanded rsqrt/rcp instructions to VL subset.
Robert Khasanov [Tue, 28 Oct 2014 16:37:13 +0000 (16:37 +0000)]
[AVX-512] Expanded rsqrt/rcp instructions to VL subset.
Refactored multiclass through AVX512_maskable

llvm-svn: 220783

10 years agoExtend test to check that -D flags do not leak across module boundaries.
Richard Smith [Tue, 28 Oct 2014 16:30:57 +0000 (16:30 +0000)]
Extend test to check that -D flags do not leak across module boundaries.

llvm-svn: 220782

10 years agoclang-format: Fix test after recent flag change.
Daniel Jasper [Tue, 28 Oct 2014 16:29:56 +0000 (16:29 +0000)]
clang-format: Fix test after recent flag change.

llvm-svn: 220781

10 years ago[modules] Allow -I, -D, -W flags to change between building a module and
Richard Smith [Tue, 28 Oct 2014 16:24:08 +0000 (16:24 +0000)]
[modules] Allow -I, -D, -W flags to change between building a module and
explicitly using the resulting .pcm file. Unlike for an implicit module build,
we don't need nor want to require these flags to match between the module
and its users.

llvm-svn: 220780

10 years ago[AVX512] Removed special case for cmp instructions in getVectorMaskingNode. Now cmp...
Robert Khasanov [Tue, 28 Oct 2014 16:17:14 +0000 (16:17 +0000)]
[AVX512] Removed special case for cmp instructions in getVectorMaskingNode. Now cmp intrinsics lower as other intrinsics through VSELECT, and then VSELECT tranforms to AND in PerformSELECTCombine.
No functional change.

llvm-svn: 220779

10 years agoclang-format: Don't put functions on a single line in Google's Java
Daniel Jasper [Tue, 28 Oct 2014 16:15:52 +0000 (16:15 +0000)]
clang-format: Don't put functions on a single line in Google's Java
style.

llvm-svn: 220778

10 years ago[x86] Simplify vector selection if condition value type matches vselect value type...
Robert Khasanov [Tue, 28 Oct 2014 15:59:40 +0000 (15:59 +0000)]
[x86] Simplify vector selection if condition value type matches vselect value type and true value is all ones or false value is all zeros.
This transformation worked if selector is produced by SETCC, however SETCC is needed only if we consider to swap operands. So I replaced SETCC check for this case.
Added tests for vselect of <X x i1> values.

llvm-svn: 220777

10 years agoAdd valueDecl() matcher.
Samuel Benzaquen [Tue, 28 Oct 2014 13:33:58 +0000 (13:33 +0000)]
Add valueDecl() matcher.

Summary: Add valueDecl() matcher.

Reviewers: klimek

Subscribers: klimek, cfe-commits

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

llvm-svn: 220776

10 years agoSilencing an "enumeral and non-enumeral type in conditional expression" warning;...
Aaron Ballman [Tue, 28 Oct 2014 13:12:13 +0000 (13:12 +0000)]
Silencing an "enumeral and non-enumeral type in conditional expression" warning; NFC.

llvm-svn: 220775

10 years ago[AVX512] Bring back vector-shuffle lowering support through broadcasts
Robert Khasanov [Tue, 28 Oct 2014 12:28:51 +0000 (12:28 +0000)]
[AVX512] Bring back vector-shuffle lowering support through broadcasts

Ffter commit at rev219046 512-bit broadcasts lowering become non-optimal. Most of tests on broadcasting and embedded broadcasting were changed and they doesn’t produce efficient code.

Example below is from commit changes (it’s the first test from test/CodeGen/X86/avx512-vbroadcast.ll):

 define   <16 x i32> @_inreg16xi32(i32 %a) {
 ; CHECK-LABEL: _inreg16xi32:
 ; CHECK:       ## BB#0:
-; CHECK-NEXT:    vpbroadcastd %edi, %zmm0
+; CHECK-NEXT:    vmovd %edi, %xmm0
+; CHECK-NEXT:    vpbroadcastd %xmm0, %ymm0
+; CHECK-NEXT:    vinserti64x4 $1, %ymm0, %zmm0, %zmm0
 ; CHECK-NEXT:    retq
 %b = insertelement <16 x i32> undef, i32 %a, i32 0
 %c = shufflevector <16 x i32> %b, <16 x i32> undef, <16 x i32> zeroinitializer
 ret <16 x i32> %c
}

Here, 256-bit broadcast was generated instead of 512-bit one.

In this patch
1) I added vector-shuffle lowering through broadcasts
2) Removed asserts and branches likes because this is incorrect
-  assert(Subtarget->hasDQI() && "We can only lower v8i64 with AVX-512-DQI");
3) Fixed lowering tests

llvm-svn: 220774

10 years agoReformat partially, where I touched for whitespace changes.
NAKAMURA Takumi [Tue, 28 Oct 2014 11:54:52 +0000 (11:54 +0000)]
Reformat partially, where I touched for whitespace changes.

llvm-svn: 220773

10 years agoLoopRerollPass.cpp: Use range-based loop. NFC.
NAKAMURA Takumi [Tue, 28 Oct 2014 11:54:05 +0000 (11:54 +0000)]
LoopRerollPass.cpp: Use range-based loop. NFC.

llvm-svn: 220772

10 years agoUntabify and whitespace cleanups.
NAKAMURA Takumi [Tue, 28 Oct 2014 11:53:30 +0000 (11:53 +0000)]
Untabify and whitespace cleanups.

llvm-svn: 220771

10 years agoclang/test/Modules/explicit-build.cpp: Tweak to meet win32's backslash.
NAKAMURA Takumi [Tue, 28 Oct 2014 11:34:29 +0000 (11:34 +0000)]
clang/test/Modules/explicit-build.cpp: Tweak to meet win32's backslash.

llvm-svn: 220770

10 years ago[libcxx] Delay evaluation of __make_tuple_types to prevent blowing the max template...
Eric Fiselier [Tue, 28 Oct 2014 06:31:22 +0000 (06:31 +0000)]
[libcxx] Delay evaluation of __make_tuple_types to prevent blowing the max template instantiation depth. Fixes Bug #18345

Summary:
http://llvm.org/bugs/show_bug.cgi?id=18345

Tuple's constructor and assignment operators for "tuple-like" types evaluates __make_tuple_types unnecessarily. In the case of a large array this can blow the template instantiation depth.

Ex:
```
#include <array>
#include <tuple>
#include <memory>

typedef std::array<int, 1256> array_t;
typedef std::tuple<array_t> tuple_t;

int main() {
  array_t a;
  tuple_t t(a); // broken
  t = a; // broken

  // make_shared uses tuple behind the scenes. This bug breaks this code.
  std::make_shared<array_t>(a);
}
```

To prevent this from happening we delay the instantiation of `__make_tuple_types` until after we perform the length check. Currently `__make_tuple_types` is instantiated at the same time that the length check .

Test Plan: Two tests have been added. One for the "tuple-like" constructors and another for the "tuple-like" assignment operator.

Reviewers: mclow.lists, EricWF

Reviewed By: EricWF

Subscribers: K-ballo, cfe-commits

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

llvm-svn: 220769

10 years agoUpdate compile target dependency.
Rui Ueyama [Tue, 28 Oct 2014 06:30:34 +0000 (06:30 +0000)]
Update compile target dependency.

test/elf/Mips/hilo16-*.test depends on llvm-mc, so we need to
make CMake to build that before running the tests.

llvm-svn: 220768

10 years ago[OCaml] Enable -g for debug builds.
Peter Zotov [Tue, 28 Oct 2014 06:15:41 +0000 (06:15 +0000)]
[OCaml] Enable -g for debug builds.

We don't care about pre-3.12.1 anymore.

llvm-svn: 220767

10 years ago[OCaml] Fix whitespace.
Peter Zotov [Tue, 28 Oct 2014 06:15:18 +0000 (06:15 +0000)]
[OCaml] Fix whitespace.

llvm-svn: 220766

10 years agoFix warning text: lower -> higher
Richard Trieu [Tue, 28 Oct 2014 04:37:34 +0000 (04:37 +0000)]
Fix warning text: lower -> higher

llvm-svn: 220763

10 years agoAdd breakpoint instruction byte sequences for arm to
Jason Molenda [Tue, 28 Oct 2014 03:43:54 +0000 (03:43 +0000)]
Add breakpoint instruction byte sequences for arm to
PlatformLinux::GetSoftwareBreakpointTrapOpcode.

Patch by Stephane Sezer.
http://reviews.llvm.org/D5923

llvm-svn: 220762

10 years agoClarify the launch style for debugserver to use.
Jason Molenda [Tue, 28 Oct 2014 03:15:33 +0000 (03:15 +0000)]
Clarify the launch style for debugserver to use.
<rdar://problem/18786645>

llvm-svn: 220761

10 years agoDriver: remove a stray s that propagated in cross-windows
Saleem Abdulrasool [Tue, 28 Oct 2014 03:15:02 +0000 (03:15 +0000)]
Driver: remove a stray s that propagated in cross-windows

The option is '--allow-multiple-definition' not '--allow-multiple-definitions'.

llvm-svn: 220760

10 years agoMinimize the scope of some variables, NFC.
David Blaikie [Tue, 28 Oct 2014 02:57:26 +0000 (02:57 +0000)]
Minimize the scope of some variables, NFC.

llvm-svn: 220759

10 years agoX86: Implement the vectorcall calling convention
Reid Kleckner [Tue, 28 Oct 2014 01:29:26 +0000 (01:29 +0000)]
X86: Implement the vectorcall calling convention

This is a Microsoft calling convention that supports both x86 and x86_64
subtargets. It passes vector and floating point arguments in XMM0-XMM5,
and passes them indirectly once they are consumed.

Homogenous vector aggregates of up to four elements can be passed in
sequential vector registers, but this part is not implemented in LLVM
and will be handled in Clang.

On 32-bit x86, it is similar to fastcall in that it uses ecx:edx as
integer register parameters and is callee cleanup. On x86_64, it
delegates to the normal win64 calling convention.

Reviewers: majnemer

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

llvm-svn: 220745

10 years agoAArch64: enable Cortex-A57 FP balancing on Cortex-A53.
Tim Northover [Tue, 28 Oct 2014 01:24:32 +0000 (01:24 +0000)]
AArch64: enable Cortex-A57 FP balancing on Cortex-A53.

Benchmarks have shown that it's harmless to the performance there, and having a
unified set of passes between the two cores where possible helps big.LITTLE
deployment.

Patch by Z. Zheng.

llvm-svn: 220744

10 years agoAdd a test for setting and hitting the C++ Exception throw breakpoint.
Jim Ingham [Tue, 28 Oct 2014 00:53:20 +0000 (00:53 +0000)]
Add a test for setting and hitting the C++ Exception throw breakpoint.

llvm-svn: 220743

10 years agoUpdate for LLVM API change.
Rafael Espindola [Tue, 28 Oct 2014 00:29:51 +0000 (00:29 +0000)]
Update for LLVM API change.

llvm-svn: 220742

10 years agoRemove the PreserveSource linker mode.
Rafael Espindola [Tue, 28 Oct 2014 00:24:16 +0000 (00:24 +0000)]
Remove the PreserveSource linker mode.

I noticed that it was untested, and forcing it on caused some tests to fail:

    LLVM :: Linker/metadata-a.ll
    LLVM :: Linker/prefixdata.ll
    LLVM :: Linker/type-unique-odr-a.ll
    LLVM :: Linker/type-unique-simple-a.ll
    LLVM :: Linker/type-unique-simple2-a.ll
    LLVM :: Linker/type-unique-simple2.ll
    LLVM :: Linker/type-unique-type-array-a.ll
    LLVM :: Linker/unnamed-addr1-a.ll
    LLVM :: Linker/visibility1.ll

If it is to be resurrected, it has to be fixed and we should probably have a
-preserve-source command line option in llvm-mc and run tests with and without
it.

llvm-svn: 220741

10 years agoImprove on the diagnostic in my last patch and change warning
Fariborz Jahanian [Mon, 27 Oct 2014 23:41:04 +0000 (23:41 +0000)]
Improve on the diagnostic in my last patch and change warning
to error. rdar://18768214.

llvm-svn: 220740

10 years agoAArch64InstrInfo.h: Fix a warning introduced in clang r220703. [-Winconsistent-missin...
NAKAMURA Takumi [Mon, 27 Oct 2014 23:29:27 +0000 (23:29 +0000)]
AArch64InstrInfo.h: Fix a warning introduced in clang r220703. [-Winconsistent-missing-override]

llvm-svn: 220739

10 years agoRemove unused variable.
Richard Smith [Mon, 27 Oct 2014 23:25:15 +0000 (23:25 +0000)]
Remove unused variable.

llvm-svn: 220738

10 years ago[AVX512] Add vpermil variable version
Adam Nemet [Mon, 27 Oct 2014 23:08:40 +0000 (23:08 +0000)]
[AVX512] Add vpermil variable version

This is implemented via a multiclass that derives from the vperm imm
multiclass.

Fixes <rdar://problem/18426089>

llvm-svn: 220737

10 years ago[AVX512] Clean up avx512_perm_imm to use X86VectorVTInfo
Adam Nemet [Mon, 27 Oct 2014 23:08:37 +0000 (23:08 +0000)]
[AVX512] Clean up avx512_perm_imm to use X86VectorVTInfo

No functionality change.  No change in X86.td.expanded except that we only set
the CD8 attributes for the memory variants.  (This shouldn't be used unless we
have a memory operand.)

llvm-svn: 220736

10 years ago[AVX512] Derive vpermil* from avx512_perm_imm
Adam Nemet [Mon, 27 Oct 2014 23:08:34 +0000 (23:08 +0000)]
[AVX512] Derive vpermil* from avx512_perm_imm

This used to derive from avx512_pshuf_imm which is confusing.

NFC.  Compared X86.td.expanded.

llvm-svn: 220735

10 years ago[AVX512] Fix copy-and-paste bugs in vpermil
Adam Nemet [Mon, 27 Oct 2014 23:08:31 +0000 (23:08 +0000)]
[AVX512] Fix copy-and-paste bugs in vpermil

1) i512mem -> f512mem (this is the packed FP input being permuted)
2) element size is 64 bits in EVEX_CD8 for PD.

(A good illustration why X86VectorVTInfo is useful)

llvm-svn: 220734

10 years agoUse the newer/simple API for passing a diagnostic handler to the IR linker.
Rafael Espindola [Mon, 27 Oct 2014 23:02:34 +0000 (23:02 +0000)]
Use the newer/simple API for passing a diagnostic handler to the IR linker.

llvm-svn: 220733

10 years agoMake it easier to pass a custom diagnostic handler to the IR linker.
Rafael Espindola [Mon, 27 Oct 2014 23:02:10 +0000 (23:02 +0000)]
Make it easier to pass a custom diagnostic handler to the IR linker.

llvm-svn: 220732

10 years ago[modules] Load .pcm files specified by -fmodule-file lazily.
Richard Smith [Mon, 27 Oct 2014 23:01:16 +0000 (23:01 +0000)]
[modules] Load .pcm files specified by -fmodule-file lazily.

llvm-svn: 220731

10 years agoTMP: fix readN & writeN to not encourage UB
Tim Northover [Mon, 27 Oct 2014 22:48:35 +0000 (22:48 +0000)]
TMP: fix readN & writeN to not encourage UB

llvm-svn: 220730

10 years agoTest that the single-threaded lit feature is available iff the corresponding guard...
Jonathan Roelofs [Mon, 27 Oct 2014 22:39:19 +0000 (22:39 +0000)]
Test that the single-threaded lit feature is available iff the corresponding guard is #defined

http://reviews.llvm.org/D6006

llvm-svn: 220729

10 years agoFix a stackmap bug introduced in r220710.
Pete Cooper [Mon, 27 Oct 2014 22:38:45 +0000 (22:38 +0000)]
Fix a stackmap bug introduced in r220710.

For a call to not return in to the stackmap shadow, the shadow must end with the call.

To do this, we must insert any required nops *before* the call, and not after it.

llvm-svn: 220728

10 years agoObjective-C ARC [qoi]. Issue diagnostic if __bridge casting
Fariborz Jahanian [Mon, 27 Oct 2014 22:33:06 +0000 (22:33 +0000)]
Objective-C ARC [qoi]. Issue diagnostic if __bridge casting
to C type a collection literal. rdar://18768214

llvm-svn: 220727

10 years agoFrontend: Don't include stdin in the dependency list for an object file
David Majnemer [Mon, 27 Oct 2014 22:31:50 +0000 (22:31 +0000)]
Frontend: Don't include stdin in the dependency list for an object file

GCC doesn't do this and it semes weird to include a file that we can't
open.

This fixes PR21362.

llvm-svn: 220726

10 years agoTry to appease the C++ gods
Hans Wennborg [Mon, 27 Oct 2014 22:28:50 +0000 (22:28 +0000)]
Try to appease the C++ gods

Looks like some builds were not happy with the potentially-throwing move
constructor that was added in r220723, and reached for the implicitly
deleted copy constructor instead.

llvm-svn: 220725

10 years agoAdd special case handling of linux target triples that do not contain `-gnu`.
Eric Fiselier [Mon, 27 Oct 2014 22:14:25 +0000 (22:14 +0000)]
Add special case handling of linux target triples that do not contain `-gnu`.

For targets that end it `redhat-linux` and `suse-linux` manually add the `-gnu`
section of the target since `linux-gnu` is needed in the testsuite.

This patch also moves the removal of minor and patchlevel numbers from OSX
triples to be handled when deducing the triple instead of when adding available
features.

llvm-svn: 220724

10 years agoGive TypoExprState a move constructor and assignment operator to appease MSVC build
Hans Wennborg [Mon, 27 Oct 2014 21:50:49 +0000 (21:50 +0000)]
Give TypoExprState a move constructor and assignment operator to appease MSVC build

llvm-svn: 220723

10 years agoAdd test to ensure including <atomic> fails when _LIBCPP_HAS_NO_THREADS is defined.
Eric Fiselier [Mon, 27 Oct 2014 21:38:23 +0000 (21:38 +0000)]
Add test to ensure including <atomic> fails when _LIBCPP_HAS_NO_THREADS is defined.

llvm-svn: 220722

10 years ago[ScalarEvolution] Guard dump() with #if
Jingyue Wu [Mon, 27 Oct 2014 21:14:41 +0000 (21:14 +0000)]
[ScalarEvolution] Guard dump() with #if

to be consistent with its definition in ScalarEvolution.cpp

llvm-svn: 220721

10 years agoMake sure OTHER_CFLAGS and OTHER_LDFLAGS are inherited from the Xcode project so...
Greg Clayton [Mon, 27 Oct 2014 21:14:34 +0000 (21:14 +0000)]
Make sure OTHER_CFLAGS and OTHER_LDFLAGS are inherited from the Xcode project so you can easily add to the flags of all targets.

llvm-svn: 220720

10 years agoFix segfault in hasDeclContext for nodes that have no decl context.
Samuel Benzaquen [Mon, 27 Oct 2014 20:58:44 +0000 (20:58 +0000)]
Fix segfault in hasDeclContext for nodes that have no decl context.

Summary:
Some declarations do not have a declaration context, like TranslationUnitDecl.
Fix hasDeclContext() to not segfault on these nodes.

Reviewers: klimek

Subscribers: klimek, cfe-commits

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

llvm-svn: 220719

10 years agoThis looks like the actual path under which the builder looks for LLDB headers, so...
Enrico Granata [Mon, 27 Oct 2014 20:31:12 +0000 (20:31 +0000)]
This looks like the actual path under which the builder looks for LLDB headers, so use this path instead

llvm-svn: 220718

10 years agoFix bug where sys::Wait could wait on wrong pid.
Rafael Espindola [Mon, 27 Oct 2014 20:30:04 +0000 (20:30 +0000)]
Fix bug where sys::Wait could wait on wrong pid.

Setting ChildPid to -1 would cause waitpid to wait for any child process.

Patch by Daniel Reynaud!

llvm-svn: 220717

10 years ago[libcxx] use clang's __char16_t and __char32_t definitions on Linux in C++03 mode.
Eric Fiselier [Mon, 27 Oct 2014 20:29:05 +0000 (20:29 +0000)]
[libcxx] use clang's __char16_t and __char32_t definitions on Linux in C++03 mode.

Summary: This fixes ODR violations in C++03 mode in test/localization/locale.stdcvt. The special case for linux was introduced in 2010 before clang always defined __char16_t and __char32_t.

Reviewers: mclow.lists, danalbert, jroelofs, EricWF

Reviewed By: EricWF

Subscribers: cfe-commits

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

llvm-svn: 220716

10 years agoFix use of operator comma in is_permutation and delete comma operator for test iterators.
Eric Fiselier [Mon, 27 Oct 2014 20:26:25 +0000 (20:26 +0000)]
Fix use of operator comma in is_permutation and delete comma operator for test iterators.

The comma operators in the test iterators give better error messages when they
are deleted as opposed to not defined. Delete these functions when possible.

llvm-svn: 220715

10 years agoFrontend: Define __EXCEPTIONS if -fexceptions is passed
David Majnemer [Mon, 27 Oct 2014 20:02:19 +0000 (20:02 +0000)]
Frontend: Define __EXCEPTIONS if -fexceptions is passed

GCC defines __EXCEPTIONS, regardless of language mode, if -fexceptions
is passed.  We should do the same.

This fixes PR21358.

llvm-svn: 220714

10 years ago[FastISel][AArch64] Emit immediate version of icmp (subs) for null pointer check.
Juergen Ributzka [Mon, 27 Oct 2014 19:58:36 +0000 (19:58 +0000)]
[FastISel][AArch64] Emit immediate version of icmp (subs) for null pointer check.

This is a minor change to use the immediate version when the operand is a null
value. This should get rid of an unnecessary 'mov' instruction in debug
builds and align the code more with the one generated by SelectionDAG.

This fixes rdar://problem/18785125.

llvm-svn: 220713

10 years ago[FastISel][AArch64] Optimize compare-and-branch for i1 to use 'tbz'.
Juergen Ributzka [Mon, 27 Oct 2014 19:46:23 +0000 (19:46 +0000)]
[FastISel][AArch64] Optimize compare-and-branch for i1 to use 'tbz'.

Minor enhancement to use 'tbz' for i1 compare-and-branch to get rid of an 'and'
instruction.

This fixes rdar://problem/18784953.

llvm-svn: 220712