platform/upstream/llvm.git
9 years agoR600/SI: Remove _e32 and _e64 suffixes from mnemonics
Tom Stellard [Thu, 12 Mar 2015 21:34:22 +0000 (21:34 +0000)]
R600/SI: Remove _e32 and _e64 suffixes from mnemonics

Instead print them as part of the $dst operand.  The AsmMatcher
requires the 32-bit and 64-bit encodings have the same mnemonic in
order to parse them correctly.

llvm-svn: 232105

9 years agoAdding WinEHPrepare tests (currently XFAILs)
Andrew Kaylor [Thu, 12 Mar 2015 21:32:59 +0000 (21:32 +0000)]
Adding WinEHPrepare tests (currently XFAILs)

llvm-svn: 232104

9 years agoMigrate the AArch64 TargetRegisterInfo to its TargetMachine
Eric Christopher [Thu, 12 Mar 2015 21:04:46 +0000 (21:04 +0000)]
Migrate the AArch64 TargetRegisterInfo to its TargetMachine
implementation. This requires a bit of scaffolding and a few fixups
that'll go away once all of the ports have been migrated.

llvm-svn: 232103

9 years agoRemove unused headers.
Eric Christopher [Thu, 12 Mar 2015 21:04:42 +0000 (21:04 +0000)]
Remove unused headers.

llvm-svn: 232102

9 years agoSema: Make BoundTypeDiagnoser a variadic template
Benjamin Kramer [Thu, 12 Mar 2015 20:58:06 +0000 (20:58 +0000)]
Sema: Make BoundTypeDiagnoser a variadic template

llvm-svn: 232101

9 years agoAdd -polly-vectorizer=stripmine
Tobias Grosser [Thu, 12 Mar 2015 20:48:07 +0000 (20:48 +0000)]
Add -polly-vectorizer=stripmine

By strip-mining outer loops to the innermost level we can enable LLVM's loop
vectorizer to vectorize outer loops.

llvm-svn: 232100

9 years agoDrop option to prepare code for the BB vectorizer
Tobias Grosser [Thu, 12 Mar 2015 20:47:58 +0000 (20:47 +0000)]
Drop option to prepare code for the BB vectorizer

The BB vectorizer is deprecated and there is no point in generating code for it
any more. This option was introduced when there was not yet any loop vectorizer
in sight. Now being matured, Polly should target the loop vectorizer.

llvm-svn: 232099

9 years agoUnxfail passing test on Hexagon
Krzysztof Parzyszek [Thu, 12 Mar 2015 20:38:10 +0000 (20:38 +0000)]
Unxfail passing test on Hexagon

test/CodeGen/Generic/2008-02-20-MatchingMem.ll

llvm-svn: 232098

9 years agoMake the atom_iterator copy assignable
David Blaikie [Thu, 12 Mar 2015 20:18:10 +0000 (20:18 +0000)]
Make the atom_iterator copy assignable

This makes it a bit more like a 'real' iterator though I still haven't
gone through to make sure it meets the full requirements. Copy
assignability seems to be required by MSVC's std::find_if, which is its
right.

llvm-svn: 232097

9 years agoUpdate copyright year to 2015.
Renato Golin [Thu, 12 Mar 2015 20:14:35 +0000 (20:14 +0000)]
Update copyright year to 2015.

llvm-svn: 232096

9 years agoUpdate copyright year to 2015.
Renato Golin [Thu, 12 Mar 2015 20:13:54 +0000 (20:13 +0000)]
Update copyright year to 2015.

llvm-svn: 232095

9 years agoUpdate copyright year to 2015.
Renato Golin [Thu, 12 Mar 2015 20:13:11 +0000 (20:13 +0000)]
Update copyright year to 2015.

llvm-svn: 232094

9 years agoRevert "r232027 - Add infrastructure for support of multiple memory constraints"
Hal Finkel [Thu, 12 Mar 2015 20:09:39 +0000 (20:09 +0000)]
Revert "r232027 - Add infrastructure for support of multiple memory constraints"

This (r232027) has caused PR22883; so it seems those bits might be used by
something else after all. Reverting until we can figure out what else to do.

Original commit message:

The operand flag word for ISD::INLINEASM nodes now contains a 15-bit
memory constraint ID when the operand kind is Kind_Mem. This constraint
ID is a numeric equivalent to the constraint code string and is converted
with a target specific hook in TargetLowering.

This patch maps all memory constraints to InlineAsm::Constraint_m so there
is no functional change at this point. It just proves that using these
previously unused bits in the encoding of the flag word doesn't break anything.

The next patch will make each target preserve the current mapping of
everything to Constraint_m for itself while changing the target independent
implementation of the hook to return Constraint_Unknown appropriately. Each
target will then be adapted in separate patches to use appropriate Constraint_*
values.

llvm-svn: 232093

9 years agoXFAIL TestAbbreviations on Linux, improve test
Vince Harron [Thu, 12 Mar 2015 20:08:45 +0000 (20:08 +0000)]
XFAIL TestAbbreviations on Linux, improve test

It was failing on gcc 4.8, only passing accidentally on clang 3.5
This patch improves the checking to make sure if fails in all cases
and then XFAILS

llvm-svn: 232092

9 years agoTest that software breakpoints aren't visible in disassembly
Vince Harron [Thu, 12 Mar 2015 20:07:13 +0000 (20:07 +0000)]
Test that software breakpoints aren't visible in disassembly

Linux lldb-server Handle_m doesn't properly replace software breakpoints
with the original instructions. This test is added with expectedFailureLinux

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

llvm-svn: 232091

9 years ago[autoconf] Fix the build failure by quoting the strings.
Logan Chien [Thu, 12 Mar 2015 19:56:25 +0000 (19:56 +0000)]
[autoconf] Fix the build failure by quoting the strings.

llvm-svn: 232090

9 years agoUpdate copyright year to 2015.
Alexey Samsonov [Thu, 12 Mar 2015 19:53:06 +0000 (19:53 +0000)]
Update copyright year to 2015.

llvm-svn: 232089

9 years agoRephrase find loop to use std::find_if
David Blaikie [Thu, 12 Mar 2015 19:46:21 +0000 (19:46 +0000)]
Rephrase find loop to use std::find_if

Avoids the need for an assert-only variable, among other benefits.

llvm-svn: 232088

9 years agoFix grammar in a comment, wrap to 80 columns. No behavior change.
Nico Weber [Thu, 12 Mar 2015 19:37:10 +0000 (19:37 +0000)]
Fix grammar in a comment, wrap to 80 columns. No behavior change.

llvm-svn: 232087

9 years agoRemove duplicate "the". N+1 redundancy is not useful here.
Nico Weber [Thu, 12 Mar 2015 19:35:34 +0000 (19:35 +0000)]
Remove duplicate "the". N+1 redundancy is not useful here.

llvm-svn: 232086

9 years ago[X86] Fix a regression introduced by r223641.
Quentin Colombet [Thu, 12 Mar 2015 19:34:12 +0000 (19:34 +0000)]
[X86] Fix a regression introduced by r223641.
The permps and permd instructions have their operands swapped compared to the
intrinsic definition. Therefore, they do not fall into the INTR_TYPE_2OP
category.

I did not create a new category for those two, as they are the only one AFAICT
in that case.

<rdar://problem/20108262>

llvm-svn: 232085

9 years ago[Mips] Make `readAddend` a virtual member function to escape explicit
Simon Atanasyan [Thu, 12 Mar 2015 18:53:06 +0000 (18:53 +0000)]
[Mips] Make `readAddend` a virtual member function to escape explicit
template class instantiation

No functional changes.

llvm-svn: 232081

9 years agoReapply "[dsymutil] Gather function ranges during DIE selection."
Frederic Riss [Thu, 12 Mar 2015 18:45:10 +0000 (18:45 +0000)]
Reapply "[dsymutil] Gather function ranges during DIE selection."

This reverts commit r231967 which reinstates r231957.

Now that IntervalMap uses explicitely aligned storage, it should be safe.

llvm-svn: 232080

9 years ago[ADT] IntervalMap: use AlignedCharArrayUnion.
Frederic Riss [Thu, 12 Mar 2015 18:45:07 +0000 (18:45 +0000)]
[ADT] IntervalMap: use AlignedCharArrayUnion.

Currently IntervalMap would assert when used with keys bigger than host
pointers. This patch uses the AlignedCharArrayUnion functionality to
overcome that limitation.

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

llvm-svn: 232079

9 years agoAdd missing include guards.
Yaron Keren [Thu, 12 Mar 2015 18:39:54 +0000 (18:39 +0000)]
Add missing include guards.

llvm-svn: 232078

9 years agoAdd -p and -r options to lldb-mi command -file-exec-file-and-symbols to support iOS...
Hafiz Abid Qadeer [Thu, 12 Mar 2015 18:35:54 +0000 (18:35 +0000)]
Add -p and -r options to lldb-mi command -file-exec-file-and-symbols to support iOS debugging on macOS.

The patch adds 2 options which are not present in the GDB MI. Those have been described in MIExtensions.txt.

Patch from Chuck Ries.

llvm-svn: 232077

9 years agoFix comment formatting.
Eric Christopher [Thu, 12 Mar 2015 18:23:01 +0000 (18:23 +0000)]
Fix comment formatting.

llvm-svn: 232076

9 years agoMake ModuleCache::Get to return instantiated ModuleSP instance so already created...
Oleksiy Vyalov [Thu, 12 Mar 2015 18:18:03 +0000 (18:18 +0000)]
Make ModuleCache::Get to return instantiated ModuleSP instance so already created in-memory instance can be returned instead of creating a new one.

http://reviews.llvm.org/D8270

llvm-svn: 232075

9 years ago[Tsan] Do not declare std_suppressions when not used
Viktor Kutuzov [Thu, 12 Mar 2015 18:14:42 +0000 (18:14 +0000)]
[Tsan] Do not declare std_suppressions when not used
Differential Revision: http://reviews.llvm.org/D8288

llvm-svn: 232074

9 years ago[Tsan] Adjust SA_SIGINFO and SIG_SETMASK values on FreeBSD.
Viktor Kutuzov [Thu, 12 Mar 2015 18:12:43 +0000 (18:12 +0000)]
[Tsan] Adjust SA_SIGINFO and SIG_SETMASK values on FreeBSD.
Differential Revision: http://reviews.llvm.org/D8176

llvm-svn: 232073

9 years ago[Sanitizers] Fix sanitizers to build on FreeBSD.
Viktor Kutuzov [Thu, 12 Mar 2015 18:10:06 +0000 (18:10 +0000)]
[Sanitizers] Fix sanitizers to build on FreeBSD.
Differential Revision: http://reviews.llvm.org/D8175

llvm-svn: 232072

9 years agoRemove the need to cache the subtarget in the X86 TargetRegisterInfo
Eric Christopher [Thu, 12 Mar 2015 17:54:19 +0000 (17:54 +0000)]
Remove the need to cache the subtarget in the X86 TargetRegisterInfo
classes. Use a Triple instead and simplify a lot of the querying
logic to use lookups on the Triple.

llvm-svn: 232071

9 years agoMS ABI: Allow a nullptr_t exception to be caught by void * catch handler
David Majnemer [Thu, 12 Mar 2015 17:44:49 +0000 (17:44 +0000)]
MS ABI: Allow a nullptr_t exception to be caught by void * catch handler

A nullptr exception object can be caught by any pointer type catch
handler.  However, it is not possible to express this in the exception
info for the MS ABI.  As a middle ground, allow such exception objects
to be caught with pointer-to-void catch handlers.

llvm-svn: 232069

9 years agoAvoid a failing test case by fixing things so the compiler generates a line table...
Greg Clayton [Thu, 12 Mar 2015 17:42:15 +0000 (17:42 +0000)]
Avoid a failing test case by fixing things so the compiler generates a line table entry for line the very start of the printf() before any values have been loaded into registers.

The issue was the previous code tried to stop on the following code in main.c:

21    // Stop here and set values
22    printf ("Val - %d Mine - %d, %d, %llu. Ptr - %d, %d, %llu\n",
23            val,
24            mine.first_val, mine.second_val, mine.third_val,
25            ptr->first_val, ptr->second_val, ptr->third_val);

We we set a source regex breakpoint on "// Stop here and set values" we would set a breakpoint on line 22 as expected.

The problem is the most recent clang compiler generates a line table like this

0x1000: main.c:23 // Loading of "val" into a register
0x1010: main.c:24 // Load mine.first_val, mine.second_val, mine.third_val values into registers or on the stack
0x1020: main.c:25 // Load ptr->first_val, ptr->second_val, ptr->third_val values into registers or on the stack
0x1030: main.c:22 // Call to printf

In this test, we run to line 22, then we use python to modify the value of "val" and then continue to another breakpoint and try to read the STDOUT from the printf to verify the values changed correctly.

With the above line table the value for "val" had already been loaded into a register so the string from printf would be incorrect.

Doing an easy fix for now by changing the code to:

21    // Stop here and set values
22  printf ("Val - %d Mine - %d, %d, %llu. Ptr - %d, %d, %llu\n", val,
23          mine.first_val, mine.second_val, mine.third_val,
24          ptr->first_val, ptr->second_val, ptr->third_val);

Now we get a line table entry for line 22 that is before any locals are read from the stack into registers.

I need to follow up with the compiler guys and see if we can get a fix for this as anyone setting file + line breeakpoints might be very surprised to have code from lines below the current line already have had their code run.

llvm-svn: 232068

9 years agoRefactoring CMake CrossCompile module.
Chris Bieneman [Thu, 12 Mar 2015 17:33:34 +0000 (17:33 +0000)]
Refactoring CMake CrossCompile module.

* put most of the cross-compiling support into a function llvm_create_cross_target_internal.
* when CrossCompile is included it still generates a NATIVE target.
* llvm_create_cross_target function takes a target_name which should match a toolchain.
* llvm_create_cross_target can now be used to target more than one cross-compilation target.

llvm-svn: 232067

9 years ago[docs] Update the doxygen configuration file.
Logan Chien [Thu, 12 Mar 2015 17:27:53 +0000 (17:27 +0000)]
[docs] Update the doxygen configuration file.

Update the doxygen configuration file and the Makefile build rules
to provide better output (simply use the default stylesheet and template
from the Doxygen distribution.)

This CL has upgrade doxygen.cfg.in to Doxygen 1.8.6.

llvm-svn: 232066

9 years ago[docs] Replace the doxygen qch option properly.
Logan Chien [Thu, 12 Mar 2015 17:27:19 +0000 (17:27 +0000)]
[docs] Replace the doxygen qch option properly.

llvm-svn: 232065

9 years ago[docs] Update the doxygen configuration file.
Logan Chien [Thu, 12 Mar 2015 17:26:27 +0000 (17:26 +0000)]
[docs] Update the doxygen configuration file.

Update the doxygen configuration file and Makefile build rules
to provide better output (simply use the default stylesheet and template
from the Doxygen distribution.)

This CL has upgrade doxygen.cfg.in to Doxygen 1.8.6.

llvm-svn: 232064

9 years ago[autoconf] Regenerate autoconf configure script.
Logan Chien [Thu, 12 Mar 2015 17:25:25 +0000 (17:25 +0000)]
[autoconf] Regenerate autoconf configure script.

llvm-svn: 232063

9 years ago[autoconf] Refine doxygen document options.
Logan Chien [Thu, 12 Mar 2015 17:25:01 +0000 (17:25 +0000)]
[autoconf] Refine doxygen document options.

This CL adds --enable-doxygen-search to enable doxygen search engine
and --enable-doxygen-qt-help to enable the Qt help file generation.

llvm-svn: 232062

9 years agoReplace second (hopefully unused) access of macro input argument with zero vector...
Sanjay Patel [Thu, 12 Mar 2015 17:23:46 +0000 (17:23 +0000)]
Replace second (hopefully unused) access of macro input argument with zero vector to be safer.

Suggested by Craig Topper in D8275.

This is a follow-on to r232052.

llvm-svn: 232061

9 years agoRemove unused FileSpec variable from Target::GetSharedModule
Ilia K [Thu, 12 Mar 2015 17:12:06 +0000 (17:12 +0000)]
Remove unused FileSpec variable from Target::GetSharedModule

llvm-svn: 232060

9 years agoClean up includes in source/lldb.cpp (1 was unused, 1 duplicated)
Ilia K [Thu, 12 Mar 2015 17:05:18 +0000 (17:05 +0000)]
Clean up includes in source/lldb.cpp (1 was unused, 1 duplicated)

llvm-svn: 232059

9 years agoFixing CMake developer warning.
Chris Bieneman [Thu, 12 Mar 2015 16:49:52 +0000 (16:49 +0000)]
Fixing CMake developer warning.

LLDUnitTests target doesn't exist unless LLVM_INCLUDE_TESTS is On.

llvm-svn: 232058

9 years agoRemove unused complex patterns for addressing modes on Hexagon.
Krzysztof Parzyszek [Thu, 12 Mar 2015 16:44:50 +0000 (16:44 +0000)]
Remove unused complex patterns for addressing modes on Hexagon.

llvm-svn: 232057

9 years agomake an array of constants explicitly const
Sanjay Patel [Thu, 12 Mar 2015 16:29:58 +0000 (16:29 +0000)]
make an array of constants explicitly const

Suggested by Craig Topper in D8184.

This goes with r232047.

llvm-svn: 232056

9 years agoASTMatchers: Add an explicit dependency on libclangBasic.
Benjamin Kramer [Thu, 12 Mar 2015 16:25:19 +0000 (16:25 +0000)]
ASTMatchers: Add an explicit dependency on libclangBasic.

In a static build the dependency is picked up implictly, but not in a shared
library build. This is needed for the new ObjC matchers that reference Selector.

llvm-svn: 232055

9 years agoDoing some cleanup to the iOS toolchain.
Chris Bieneman [Thu, 12 Mar 2015 16:19:16 +0000 (16:19 +0000)]
Doing some cleanup to the iOS toolchain.

* There is no reason to require SDKROOT as an environment variable because we can derive it from xcrun
* Setting CMAKE_RANLIB makes our static archives usable

llvm-svn: 232053

9 years ago[X86, AVX] replace vextractf128 intrinsics with generic shuffles
Sanjay Patel [Thu, 12 Mar 2015 15:50:36 +0000 (15:50 +0000)]
[X86, AVX] replace vextractf128 intrinsics with generic shuffles

This is very much like D8088 (checked in at r231792).

Now that we've replaced the vinsertf128 intrinsics,
do the same for their extract twins.

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

llvm-svn: 232052

9 years agoAdd support for a few Objective-C matchers.
Manuel Klimek [Thu, 12 Mar 2015 15:48:15 +0000 (15:48 +0000)]
Add support for a few Objective-C matchers.

Add some matchers for Objective-C selectors and messages to
ASTMatchers.h. Minor mods to ASTMatchersTest.h to allow test files with
".m" extension in addition to ".cpp".  New tests added to
ASTMatchersTest.c.

Patch by Dean Sutherland.

llvm-svn: 232051

9 years agoAlso enable the default rune table on CloudABI.
Ed Schouten [Thu, 12 Mar 2015 15:48:06 +0000 (15:48 +0000)]
Also enable the default rune table on CloudABI.

CloudABI does not expose a table on its own.

llvm-svn: 232050

9 years agoAdd option to disable access to the global filesystem namespace.
Ed Schouten [Thu, 12 Mar 2015 15:44:39 +0000 (15:44 +0000)]
Add option to disable access to the global filesystem namespace.

Systems like FreeBSD's Capsicum and Nuxi CloudABI apply the concept of
capability-based security on the way processes can interact with the
filesystem API. It is no longer possible to interact with the VFS
through calls like open(), unlink(), rename(), etc. Instead, processes
are only allowed to interact with files and directories to which they
have been granted access. The *at() functions can be used for this
purpose.

This change adds a new config switch called
_LIBCPP_HAS_NO_GLOBAL_FILESYSTEM_NAMESPACE. If set, all functionality
that requires the global filesystem namespace will be disabled. More
concretely:

- fstream's open() function will be removed.
- cstdio will no longer pull in fopen(), rename(), etc.
- The test suite's get_temp_file_name() will be removed. This will cause
  all tests that use the global filesystem namespace to break, but will
  at least make all the other tests run (as get_temp_file_name will not
  build anyway).

It is important to mention that this change will make fstream rather
useless on those systems for now. Still, I'd rather not have fstream
disabled entirely, as it is of course possible to come up with an
extension for fstream that would allow access to local filesystem
namespaces (e.g., by adding an openat() member function).

Differential revision: http://reviews.llvm.org/D8194
Reviewed by: jroelofs (thanks!)

llvm-svn: 232049

9 years agoAdd low-frame/high-frame options to -stack-list-arguments (MI)
Ilia K [Thu, 12 Mar 2015 15:35:58 +0000 (15:35 +0000)]
Add low-frame/high-frame options to -stack-list-arguments (MI)

Summary:
Add low-frame/high-frame options to -stack-list-arguments

All tests pass on OS X.

Reviewers: clayborg, abidh

Reviewed By: abidh

Subscribers: lldb-commits, clayborg, abidh

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

llvm-svn: 232048

9 years agoIRBuilder: add a CreateShuffleVector function that takes an ArrayRef of int
Sanjay Patel [Thu, 12 Mar 2015 15:27:07 +0000 (15:27 +0000)]
IRBuilder: add a CreateShuffleVector function that takes an ArrayRef of int

This is a convenience function to ease mask creation of ShuffleVectors
in AutoUpgrade and other places.

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

llvm-svn: 232047

9 years ago[X86] Fix wrong target specific combine on SETCC nodes.
Andrea Di Biagio [Thu, 12 Mar 2015 15:16:58 +0000 (15:16 +0000)]
[X86] Fix wrong target specific combine on SETCC nodes.

Part of the folding logic implemented by function 'PerformISDSETCCCombine'
only worked under the assumption that the condition code in input could have
been either SETNE or SETEQ.
Unfortunately that assumption was incorrect, and in some cases the algorithm
ended up incorrectly folding SETCC nodes.

The incorrect folding only affected SETCC dag nodes where:
 - one of the operands was a build_vector of all zeroes;
 - the other operand was a SIGN_EXTEND from a vector of MVT:i1 elements;
 - the condition code was neither SETNE nor SETEQ.

Example:
  (setcc (v4i32 (sign_extend v4i1:%A)), (v4i32 VectorOfAllZeroes), setge)

Before this patch, the entire dag node sequence from the example was
incorrectly folded to node %A.

With this patch, the dag node sequence is folded to a
  (xor %A, (v4i1 VectorOfAllOnes)).

Added test setcc-combine.ll.

Thanks to Greg Bedwell for spotting this issue.

llvm-svn: 232046

9 years ago[X86, AVX] replace vextractf128 intrinsics with generic shuffles
Sanjay Patel [Thu, 12 Mar 2015 15:15:19 +0000 (15:15 +0000)]
[X86, AVX] replace vextractf128 intrinsics with generic shuffles

Now that we've replaced the vinsertf128 intrinsics,
do the same for their extract twins.

This is very much like D8086 (checked in at r231794):
We want to replace as much custom x86 shuffling via intrinsics
as possible because pushing the code down the generic shuffle
optimization path allows for better codegen and less complexity
in LLVM.

This is also the LLVM sibling to the cfe D8275 patch.

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

llvm-svn: 232045

9 years agoclang-format: When putting */& next to types, also wrap before them.
Daniel Jasper [Thu, 12 Mar 2015 15:04:53 +0000 (15:04 +0000)]
clang-format: When putting */& next to types, also wrap before them.

Before:
  LoooooooooooongType *
      loooooooooooongVariable;

After:
  LoooooooooooongType
      *loooooooooooongVariable;

llvm-svn: 232044

9 years agoRemoved an unused global variable.
Hafiz Abid Qadeer [Thu, 12 Mar 2015 14:54:44 +0000 (14:54 +0000)]
Removed an unused global variable.

This variable "g_debugger_name" is not used anywhere. It also causes a warning.
I was first going to change its type to fix the warning then noticed that it
is not being used. So removing it.

Committed as Obvious.

llvm-svn: 232043

9 years agoclang-format: [Java] Support anonymous classes after = and return.
Daniel Jasper [Thu, 12 Mar 2015 14:44:29 +0000 (14:44 +0000)]
clang-format: [Java] Support anonymous classes after = and return.

Before:
  A a = new A(){public String toString(){return "NotReallyA";
  }
  }
  ;

After:
  A a = return new A() {
    public String toString() {
      return "NotReallyA";
    }
  };

This fixes llvm.org/PR22878.

llvm-svn: 232042

9 years agoRemove unused variable
Pavel Labath [Thu, 12 Mar 2015 14:41:40 +0000 (14:41 +0000)]
Remove unused variable

llvm-svn: 232041

9 years agoSema: Don't emit a missing prototype warning for deleted functions.
Benjamin Kramer [Thu, 12 Mar 2015 14:28:47 +0000 (14:28 +0000)]
Sema: Don't emit a missing prototype warning for deleted functions.

This is a bit more involved than I anticipated, so here's a breakdown
of the changes:
  1. Call ActOnFinishFunctionBody _after_ we parsed =default and
     =delete specifiers. Saying that we finished the body before parsing
     =default is just wrong. Changing this allows us to use isDefaulted
     and isDeleted on a decl in ActOnFinishFunctionBody.
  2. Check for -Wmissing-prototypes after we parsed the function body.
  3. Disable -Wmissing-prototypes when the Decl isDeleted.

llvm-svn: 232040

9 years agoUse Sema's PrintingPolicy when diagnosing DeclSpecs.
Benjamin Kramer [Thu, 12 Mar 2015 14:28:38 +0000 (14:28 +0000)]
Use Sema's PrintingPolicy when diagnosing DeclSpecs.

Sema overrides ASTContext's policy on the first emitted diagnostic
(doesn't matter if it's ignored or not). This means changing the order
of diagnostic emission in Sema suddenly changes the text of diagnostic
emitted from the parser.

In the test case -Wmissing-prototypes (ignored) was the culprit, use
'int main' to suppress that warning so we see when this regresses.
Also move it into Sema/ as it's not testing any C++.

llvm-svn: 232039

9 years agoReverting r232034, as it broke one of the bots with link errors. Details at: http...
Aaron Ballman [Thu, 12 Mar 2015 14:14:48 +0000 (14:14 +0000)]
Reverting r232034, as it broke one of the bots with link errors. Details at: bb.pgr.jp/builders/ninja-clang-x64-mingw64-RA/builds/6352/steps/build/logs/stdio

llvm-svn: 232038

9 years agoInstead of dereferencing std::vector::end() (which is UB and causes failed assertions...
Aaron Ballman [Thu, 12 Mar 2015 13:49:45 +0000 (13:49 +0000)]
Instead of dereferencing std::vector::end() (which is UB and causes failed assertions in debug builds with Visual Studio), use data() + size() to calculate the end iterator. Amends r231952.

llvm-svn: 232037

9 years ago[OPENMP] CodeGen - 'omp for' with dynamic schedule kinds.
Alexander Musman [Thu, 12 Mar 2015 13:37:50 +0000 (13:37 +0000)]
[OPENMP] CodeGen - 'omp for' with dynamic schedule kinds.
Differential Revision: http://reviews.llvm.org/D7138

llvm-svn: 232036

9 years agoSilencing an "enumeral and non-enumeral type in conditional expression" warning;...
Aaron Ballman [Thu, 12 Mar 2015 13:24:06 +0000 (13:24 +0000)]
Silencing an "enumeral and non-enumeral type in conditional expression" warning; NFC.

llvm-svn: 232035

9 years agoAdded some matchers for objective c selectors and messages to ASTMatchers.h. Minor...
Aaron Ballman [Thu, 12 Mar 2015 13:21:19 +0000 (13:21 +0000)]
Added some matchers for objective c selectors and messages to ASTMatchers.h. Minor mods to ASTMatchersTest.h to allow test files with ".m" extension in addition to ".cpp". New tests added to ASTMatchersTest.c.

Patch by Dean Sutherland, reviewed by Manuel Klimek. From http://reviews.llvm.org/D7710

llvm-svn: 232034

9 years ago[X86][AVX2] Added missing palignr stack folding test
Simon Pilgrim [Thu, 12 Mar 2015 13:12:33 +0000 (13:12 +0000)]
[X86][AVX2] Added missing palignr stack folding test

llvm-svn: 232033

9 years agotsan: fix a bug in MetaMap::ResetRange
Dmitry Vyukov [Thu, 12 Mar 2015 12:48:19 +0000 (12:48 +0000)]
tsan: fix a bug in MetaMap::ResetRange

The bug was uncovered by NegativeTests.MmapTest from
data-race-test suite, so port it as well.

llvm-svn: 232032

9 years ago[clang-tidy] Remove an empty destructor.
Alexander Kornienko [Thu, 12 Mar 2015 12:30:10 +0000 (12:30 +0000)]
[clang-tidy] Remove an empty destructor.

llvm-svn: 232031

9 years agoFix configure & make build by adding support for the ExampleSubTarget.
Iain Sandoe [Thu, 12 Mar 2015 11:47:51 +0000 (11:47 +0000)]
Fix configure & make build by adding support for the ExampleSubTarget.

llvm-svn: 232030

9 years agotsan: fix crash during __tsan_java_move
Dmitry Vyukov [Thu, 12 Mar 2015 11:24:16 +0000 (11:24 +0000)]
tsan: fix crash during __tsan_java_move

Munmap interceptor did not reset meta shadow for the range,
and __tsan_java_move crashed because it encountered
non-zero meta shadow for the destination.

llvm-svn: 232029

9 years agoAdd infrastructure for support of multiple memory constraints.
Daniel Sanders [Thu, 12 Mar 2015 11:00:48 +0000 (11:00 +0000)]
Add infrastructure for support of multiple memory constraints.

Summary:
The operand flag word for ISD::INLINEASM nodes now contains a 15-bit
memory constraint ID when the operand kind is Kind_Mem. This constraint
ID is a numeric equivalent to the constraint code string and is converted
with a target specific hook in TargetLowering.

This patch maps all memory constraints to InlineAsm::Constraint_m so there
is no functional change at this point. It just proves that using these
previously unused bits in the encoding of the flag word doesn't break anything.

The next patch will make each target preserve the current mapping of
everything to Constraint_m for itself while changing the target independent
implementation of the hook to return Constraint_Unknown appropriately. Each
target will then be adapted in separate patches to use appropriate Constraint_*
values.

Reviewers: hfinkel

Reviewed By: hfinkel

Subscribers: hfinkel, jholewinski, llvm-commits

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

llvm-svn: 232027

9 years agoAdding the implementation of atos and dladdr symbolizers for OS X.
Kuba Brecka [Thu, 12 Mar 2015 10:53:18 +0000 (10:53 +0000)]
Adding the implementation of atos and dladdr symbolizers for OS X.

They are currently still *not* used, "llvm-symbolizer" is still the default symbolizer on OS X.

Reviewed at http://reviews.llvm.org/D6588

llvm-svn: 232026

9 years agoMake the UBSan coverage-levels.cc test be Linux specific
Kuba Brecka [Thu, 12 Mar 2015 10:44:34 +0000 (10:44 +0000)]
Make the UBSan coverage-levels.cc test be Linux specific

Reviewed at http://reviews.llvm.org/D8278

llvm-svn: 232025

9 years agoLimit the lenght of the file name of the log file for tests
Tamas Berghammer [Thu, 12 Mar 2015 10:24:11 +0000 (10:24 +0000)]
Limit the lenght of the file name of the log file for tests

If a test have very long name and the compiler specified with (a long)
full path then the name of the log file name can exceed 255 characters.
This change replace the full compiler path with just the compiler name
if the prior would cause a too long file name.

Differential revision: http://reviews.llvm.org/D8252

llvm-svn: 232024

9 years agoFix ProcessIO test failures
Pavel Labath [Thu, 12 Mar 2015 10:12:41 +0000 (10:12 +0000)]
Fix ProcessIO test failures

Summary:
There was a race condition regarding the output of the inferior process. The reading of the
output is performed on a separate thread, and there was no guarantee that the output will get
eventually consumed. Because of that, it was happening that calling Process::GetSTDOUT was not
returning anything even though the process was terminated and would definitely not produce any
further output. This was usually happening only under very heavy system load, but it can be
reproduced by placing an usleep in the stdio thread (Process::STDIOReadThreadBytesReceived).

This patch addresses this by adding synchronization capabilities to the Communication thread.
After calling Communication::SynchronizeWithReadThread one can be sure that all pending input has
been processed by the read thread. This function is then called after every public event which
stops the process to obtain the entire process output.

Test Plan: TestProcessIO.py should now succeed every time instead of flaking in and out.

Reviewers: clayborg, jingham

Subscribers: lldb-commits

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

llvm-svn: 232023

9 years agoTest Commit: Spell correction
Bhushan D. Attarde [Thu, 12 Mar 2015 09:17:22 +0000 (09:17 +0000)]
Test Commit: Spell correction

llvm-svn: 232022

9 years ago[OPENMP] Initial codegen for 'omp sections' and 'omp section' directives.
Alexey Bataev [Thu, 12 Mar 2015 08:53:29 +0000 (08:53 +0000)]
[OPENMP] Initial codegen for 'omp sections' and 'omp section' directives.
If only one section is found in the sections region, it is emitted just like single region.
Otherwise it is emitted as a static non-chunked loop.

#pragma omp sections
{
#pragma omp section
  {1}
  ...
  #pragma omp section
  {n}
}
is translated to something like

i32 <iter_var>
i32 <last_iter> = 0
i32 <lower_bound> = 0
i32 <upper_bound> = n-1
i32 <stride> = 1
call void @__kmpc_for_static_init_4(<loc>, i32 <gtid>, i32 34/*static non-chunked*/, i32* <last_iter>, i32* <lower_bound>, i32* <upper_bound>, i32* <stride>, i32 1/*increment always 1*/, i32 1/*chunk always 1*/)
<upper_bound> = min(<upper_bound>, n-1)
<iter_var> = <lb>
check:
br <iter_var> <= <upper_bound>, label cont, label exit
continue:
switch (IV) {
  case 0:
  {1};
  break;
  ...
  case <NumSection> - 1:
  {n};
  break;
  }
  ++<iter_var>
  br label check
  exit:
  call void @__kmpc_for_static_fini(<loc>, i32 <gtid>)
Differential Revision: http://reviews.llvm.org/D8244

llvm-svn: 232021

9 years ago[Object/ELF] Add support for setVisibility()
Davide Italiano [Thu, 12 Mar 2015 07:48:25 +0000 (07:48 +0000)]
[Object/ELF] Add support for setVisibility()

This is a prerequisite to implement symbol visibility for ELF
in lld.

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

llvm-svn: 232020

9 years agoAdd lldb-mi/lldb-server test folders to PATH before in dotest.py
Ilia K [Thu, 12 Mar 2015 07:32:32 +0000 (07:32 +0000)]
Add lldb-mi/lldb-server test folders to PATH before in dotest.py

Summary:
This patch allows not specify search path in each lldb-mi test. It makes tests easier.

This fix was requested by vharron.

All test pass on OS X.

Reviewers: vharron, clayborg

Subscribers: lldb-commits, vharron

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

llvm-svn: 232019

9 years agoAVX-512: Added encoding tests for VPROR, VPROL instructions,
Elena Demikhovsky [Thu, 12 Mar 2015 07:28:41 +0000 (07:28 +0000)]
AVX-512: Added encoding tests for VPROR, VPROL instructions,
fixed opcode.

llvm-svn: 232018

9 years agoFix SDK selection using "platform select" when --sysroot/--version/--build options...
Ilia K [Thu, 12 Mar 2015 07:21:25 +0000 (07:21 +0000)]
Fix SDK selection using "platform select" when --sysroot/--version/--build options were specified

Summary:
This patch fixes SDK selection in the following case:
```
platform select remote-ios --sysroot "/Users/IliaK/Library/Developer/Xcode/iOS DeviceSupport/8.1.2 (12B440)" --build 12B440 --version 8.1.2
target create --arch arm64 "~/Project1.app"
```

Currently the lldb selects a first SDK version (in name order) in directory and then updates it after the device is connected. This approach ignores user's arguments and actually "platform select" command doesn't make sense.

After this patch, lldb takes a SDK which matches to user's arguments.

Reviewers: jasonmolenda, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits, clayborg, jasonmolenda, aemerson

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

llvm-svn: 232017

9 years agoSkip AsanTestCase and AsanTestReportDataCase on Darwin
Ilia K [Thu, 12 Mar 2015 07:19:41 +0000 (07:19 +0000)]
Skip AsanTestCase and AsanTestReportDataCase on Darwin

Summary:
This patch skips tests which cause the following error:
```
1: test_with_dsym (TestMemoryHistory.AsanTestCase) ...
os command: make clean ; make MAKE_DSYM=YES ARCH=x86_64 CC="/Users/IliaK/p/llvm/build_ninja/bin/clang"
with pid: 9475
stdout: rm -f "a.out"  main.o main.d main.d.tmp
rm -f -r "a.out.dSYM"
/Users/IliaK/p/llvm/build_ninja/bin/clang  -fsanitize=address -fsanitize-address-field-padding=1 -g -arch x86_64   -I/Users/IliaK/p/llvm/tools/lldb/test/make/../../include   -c -o main.o main.c
/Users/IliaK/p/llvm/build_ninja/bin/clang  main.o  -fsanitize=address -fsanitize-address-field-padding=1 -g -arch x86_64   -I/Users/IliaK/p/llvm/tools/lldb/test/make/../../include   -o "a.out"

stderr: clang: error: unknown argument: '-fsanitize-address-field-padding=1'
clang: error: unsupported argument 'address' to option 'fsanitize='
ld: file not found: /Users/IliaK/p/llvm/build_ninja/bin/../lib/clang/3.7.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib
clang-3.7: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [a.out] Error 1

retcode: 2

ERROR

os command: make clean
with pid: 9521
stdout: rm -f "a.out"  main.o main.d main.d.tmp
rm -f -r "a.out.dSYM"

stderr:
retcode: 0

Restore dir to: /Users/IliaK/p/llvm/tools/lldb

======================================================================
ERROR: test_with_dsym (TestMemoryHistory.AsanTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 612, in wrapper
    func(*args, **kwargs)
  File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 456, in wrapper
    return func(self, *args, **kwargs)
  File "/Users/IliaK/p/llvm/tools/lldb/test/functionalities/asan/TestMemoryHistory.py", line 24, in test_with_dsym
    self.buildDsym (None, compiler)
  File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 1496, in buildDsym
    if not module.buildDsym(self, architecture, compiler, dictionary, clean):
  File "/Users/IliaK/p/llvm/tools/lldb/test/plugins/builder_darwin.py", line 16, in buildDsym
    lldbtest.system(commands, sender=sender)
  File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 370, in system
    raise CalledProcessError(retcode, cmd)
CalledProcessError: Command 'make clean ; make MAKE_DSYM=YES ARCH=x86_64 CC="/Users/IliaK/p/llvm/build_ninja/bin/clang" ' returned non-zero exit status 2
Config=x86_64-clang
----------------------------------------------------------------------
```

Also this patch fixes findBuiltClang() by looking a clang in the build folder.

BTW, another patch was made in October 2014, but it wasn't committed: http://reviews.llvm.org/D6272.

Reviewers: abidh, zturner, emaste, jingham, jasonmolenda, granata.enrico, DougSnyder, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits, DougSnyder, granata.enrico, jasonmolenda, jingham, emaste, zturner, abidh, clayborg

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

llvm-svn: 232016

9 years agoAvoid an unused variable warning when assertions are off
Justin Bogner [Thu, 12 Mar 2015 06:50:54 +0000 (06:50 +0000)]
Avoid an unused variable warning when assertions are off

Patch by Mike Edwards. Thanks!

llvm-svn: 232015

9 years agoRemove some unnecessary forward declarations and put a couple more
Eric Christopher [Thu, 12 Mar 2015 06:07:16 +0000 (06:07 +0000)]
Remove some unnecessary forward declarations and put a couple more
where they're supposed to reside.

llvm-svn: 232014

9 years agoRemove the need to cache the subtarget in the Sparc TargetRegisterInfo
Eric Christopher [Thu, 12 Mar 2015 05:55:26 +0000 (05:55 +0000)]
Remove the need to cache the subtarget in the Sparc TargetRegisterInfo
classes.

llvm-svn: 232013

9 years agoRemove the need to cache the subtarget in the Mips TargetRegisterInfo
Eric Christopher [Thu, 12 Mar 2015 05:43:57 +0000 (05:43 +0000)]
Remove the need to cache the subtarget in the Mips TargetRegisterInfo
classes.

llvm-svn: 232012

9 years agoReapply 'Run LICM pass after loop unrolling pass.'
Kevin Qin [Thu, 12 Mar 2015 05:36:01 +0000 (05:36 +0000)]
Reapply 'Run LICM pass after loop unrolling pass.'

It's firstly committed at r231630, and reverted at r231635.

Function pass InstructionSimplifier is inserted as barrier to
make sure loop unroll pass won't affect on LICM pass.

llvm-svn: 232011

9 years agoRemove the need to cache the subtarget in the ARM TargetRegisterInfo
Eric Christopher [Thu, 12 Mar 2015 05:12:31 +0000 (05:12 +0000)]
Remove the need to cache the subtarget in the ARM TargetRegisterInfo
classes. Replace the frame pointer initialization with a static function
that'll look it up via the subtarget on the MachineFunction.

llvm-svn: 232010

9 years agodocs: Fix a typo in my previous commit
Justin Bogner [Thu, 12 Mar 2015 04:43:01 +0000 (04:43 +0000)]
docs: Fix a typo in my previous commit

llvm-svn: 232009

9 years agoFix PATH_MAX definition after remarks in r231917 (MI)
Ilia K [Thu, 12 Mar 2015 04:18:47 +0000 (04:18 +0000)]
Fix PATH_MAX definition after remarks in r231917 (MI)

llvm-svn: 232008

9 years agodocs: Document the llvm-cov show and report commands
Justin Bogner [Thu, 12 Mar 2015 04:18:21 +0000 (04:18 +0000)]
docs: Document the llvm-cov show and report commands

Add a basic synopsis of how to work with instrprof based coverage
using the llvm-cov tools.

llvm-svn: 232007

9 years agoRemove the need to cache the subtarget in the AArch64 TargetRegisterInfo
Eric Christopher [Thu, 12 Mar 2015 02:04:46 +0000 (02:04 +0000)]
Remove the need to cache the subtarget in the AArch64 TargetRegisterInfo
classes. Replace it with a cache to the Triple and use that
where applicable at the moment.

llvm-svn: 232005

9 years ago[NVPTXAsmPrinter] do not print .align on function headers
Jingyue Wu [Thu, 12 Mar 2015 01:50:30 +0000 (01:50 +0000)]
[NVPTXAsmPrinter] do not print .align on function headers

Summary:
PTX does not allow .align directives on function headers.

Fixes PR21551.

Test Plan: test/Codegen/NVPTX/function-align.ll

Reviewers: eliben, jholewinski

Reviewed By: eliben, jholewinski

Subscribers: llvm-commits, eliben, jpienaar, jholewinski

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

llvm-svn: 232004

9 years agoMake llvm.eh.actions an intrinsic and add docs for it
Reid Kleckner [Thu, 12 Mar 2015 01:45:37 +0000 (01:45 +0000)]
Make llvm.eh.actions an intrinsic and add docs for it

These docs *don't* match the way WinEHPrepare uses them yet, and
verifier support isn't implemented either. The implementation will come
after the documentation text is reviewed and agreed upon.

llvm-svn: 232003

9 years agoRemove the need to cache the subtarget in the PowerPC TargetRegisterInfo
Eric Christopher [Thu, 12 Mar 2015 01:42:51 +0000 (01:42 +0000)]
Remove the need to cache the subtarget in the PowerPC TargetRegisterInfo
classes. Replace it with a cache to the TargetMachine and use that
where applicable at the moment.

llvm-svn: 232002

9 years agodocs: Try to fix a couple of internal links in the llvm-profdata manual
Justin Bogner [Thu, 12 Mar 2015 01:38:50 +0000 (01:38 +0000)]
docs: Try to fix a couple of internal links in the llvm-profdata manual

These links seem broken on llvm.org/docs. Change them to use the
sphinx-recommended style to see if that helps.

llvm-svn: 232001

9 years agoRemove some CHECK-NOT lines in favor of CHECK-NEXT
Reid Kleckner [Thu, 12 Mar 2015 01:38:48 +0000 (01:38 +0000)]
Remove some CHECK-NOT lines in favor of CHECK-NEXT

NFC, this is just shorter.

llvm-svn: 232000

9 years agoUpdate copyright year to 2015.
Tanya Lattner [Thu, 12 Mar 2015 01:36:10 +0000 (01:36 +0000)]
Update copyright year to 2015.

llvm-svn: 231999