platform/upstream/llvm.git
9 years ago[dsymutil] Small clang-format patch.
Frederic Riss [Wed, 11 Mar 2015 18:45:57 +0000 (18:45 +0000)]
[dsymutil] Small clang-format patch.

llvm-svn: 231956

9 years ago[dsymutil] Correctly clone address attributes.
Frederic Riss [Wed, 11 Mar 2015 18:45:52 +0000 (18:45 +0000)]
[dsymutil] Correctly clone address attributes.

DW_AT_low_pc on functions is taken care of by the relocation processing, but
DW_AT_high_pc and DW_AT_low_pc on other lexical scopes need special handling.

llvm-svn: 231955

9 years agoRemove the need to cache the subtarget in the R600 TargetRegisterInfo
Eric Christopher [Wed, 11 Mar 2015 18:43:21 +0000 (18:43 +0000)]
Remove the need to cache the subtarget in the R600 TargetRegisterInfo
classes.

llvm-svn: 231954

9 years agoMS ABI: Mark 'throw' as implemented in the compatibility doc
David Majnemer [Wed, 11 Mar 2015 18:38:51 +0000 (18:38 +0000)]
MS ABI: Mark 'throw' as implemented in the compatibility doc

llvm-svn: 231953

9 years agoMS ABI: Implement copy-ctor closures, finish implementing throw
David Majnemer [Wed, 11 Mar 2015 18:36:39 +0000 (18:36 +0000)]
MS ABI: Implement copy-ctor closures, finish implementing throw

This adds support for copy-constructor closures.  These are generated
when the C++ runtime has to call a copy-constructor with a particular
calling convention or with default arguments substituted in to the call.

Because the runtime has no mechanism to call the function with a
different calling convention or know-how to evaluate the default
arguments at run-time, we create a thunk which will do all the
appropriate work and package it in a way the runtime can use.

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

llvm-svn: 231952

9 years agoHave getRegPressureSetLimit take a MachineFunction so that a
Eric Christopher [Wed, 11 Mar 2015 18:34:58 +0000 (18:34 +0000)]
Have getRegPressureSetLimit take a MachineFunction so that a
we can inspect the subtarget and function when computing values.

llvm-svn: 231951

9 years ago[modules] When merging the pattern of a class template definition into a prior
Richard Smith [Wed, 11 Mar 2015 18:21:02 +0000 (18:21 +0000)]
[modules] When merging the pattern of a class template definition into a prior
definition, be sure to update the definition data on all declarations, not just
the canonical one, since the pattern might not be in the list of pending
definitions (if it used to be canonical itself).

One-line fix by me; reduced testcase by Daniel Jasper!

llvm-svn: 231950

9 years agoPass a process full executable path within "name" response field.
Oleksiy Vyalov [Wed, 11 Mar 2015 18:13:37 +0000 (18:13 +0000)]
Pass a process full executable path within "name" response field.

http://reviews.llvm.org/D8239

llvm-svn: 231949

9 years agoInstCombine: Don't fold call bitcast into args if callee is byval
David Majnemer [Wed, 11 Mar 2015 18:03:05 +0000 (18:03 +0000)]
InstCombine: Don't fold call bitcast into args if callee is byval

This fixes a bug reported here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150309/265341.html

llvm-svn: 231948

9 years ago[ASan/Win] Fix a CHECK failure when an exception is thrown from a callback passed...
Timur Iskhodzhanov [Wed, 11 Mar 2015 17:47:10 +0000 (17:47 +0000)]
[ASan/Win] Fix a CHECK failure when an exception is thrown from a callback passed to QueueUserWorkItem

llvm-svn: 231947

9 years agoUpdated with list of possible improvements we are tracking internally
Kit Barton [Wed, 11 Mar 2015 17:43:43 +0000 (17:43 +0000)]
Updated with list of possible improvements we are tracking internally

llvm-svn: 231946

9 years agoAdd the "vbroadcasti128" instruction back.
Juergen Ributzka [Wed, 11 Mar 2015 17:29:03 +0000 (17:29 +0000)]
Add the "vbroadcasti128" instruction back.

This is a follow-up to r231182. This adds the "vbroadcasti128" instruction
back, but without the intrinsic mapping. Also add a test to check the
instriction encoding.

This is related to rdar://problem/18742778.

llvm-svn: 231945

9 years agoReverted OpenCL2.0 atomic type commits r231932, r231935
Anastasia Stulova [Wed, 11 Mar 2015 17:26:37 +0000 (17:26 +0000)]
Reverted OpenCL2.0 atomic type commits r231932, r231935
(caused undesirable update of -std flag to use _Atomic)

llvm-svn: 231942

9 years ago[clang-tidy] Static Analyzer checker configuration options pass-through.
Gabor Horvath [Wed, 11 Mar 2015 17:25:22 +0000 (17:25 +0000)]
[clang-tidy] Static Analyzer checker configuration options pass-through.

Reviewed by: Alexander Kornienko

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

llvm-svn: 231941

9 years agoFix ctype_byname<wchar_t>::do_is() mask checking.... again
Jonathan Roelofs [Wed, 11 Mar 2015 17:00:28 +0000 (17:00 +0000)]
Fix ctype_byname<wchar_t>::do_is() mask checking.... again

This basically reverts the revert in r216508, and fixes a few more cases while
I'm at it. Reading my commit message on that commit again, I think it's bupkis.

http://reviews.llvm.org/D8237

llvm-svn: 231940

9 years agorevert r231700 (designated initializer patch) which broke
Fariborz Jahanian [Wed, 11 Mar 2015 16:59:48 +0000 (16:59 +0000)]
revert r231700 (designated initializer patch) which broke
several projects. rdar://20120666.

llvm-svn: 231939

9 years ago[clang-tidy] Clean up misc-use-override warning. NFC
Alexander Kornienko [Wed, 11 Mar 2015 16:47:27 +0000 (16:47 +0000)]
[clang-tidy] Clean up misc-use-override warning. NFC

llvm-svn: 231938

9 years agoDisable cat*() on CloudABI. Also make tiny cleanups.
Ed Schouten [Wed, 11 Mar 2015 16:39:36 +0000 (16:39 +0000)]
Disable cat*() on CloudABI. Also make tiny cleanups.

On a new platform that I am working on
(https://github.com/NuxiNL/cloudlibc) I am not implementing the
cat{open,close,gets}() API, just like Android, Newlib, etc.

Instead of adding yet another operating system name to the #ifs,
introduce _LIBCPP_HAS_CATOPEN in include/__config. Also adjust the code
to only pull in nl_types.h when _LIBCPP_HAS_CATOPEN is set. We only
needed this header for the cat*() API.

Differential Revision: http://reviews.llvm.org/D8163
Reviewed by: marshall

llvm-svn: 231937

9 years agoAdd a CODE_OWNERS.txt file to LLDB.
Zachary Turner [Wed, 11 Mar 2015 16:26:46 +0000 (16:26 +0000)]
Add a CODE_OWNERS.txt file to LLDB.

llvm-svn: 231936

9 years agoOpenCL: CL2.0 atomic type diagnostics
Anastasia Stulova [Wed, 11 Mar 2015 16:23:10 +0000 (16:23 +0000)]
OpenCL: CL2.0 atomic type diagnostics

Added restictions for atomic type usage from OpenCL C Spec Section 6.13.11.8

llvm-svn: 231935

9 years agoMake NaCl's use of .init_array for static constructors match Linux
Derek Schuff [Wed, 11 Mar 2015 16:16:09 +0000 (16:16 +0000)]
Make NaCl's use of .init_array for static constructors match Linux

Summary:
The generic ELF TargetObjectFile defaults to .ctors, but Linux's
defaults to .init_array by calling InitializeELF with the value of
UseInitArray from TargetMachine. Make NaCl's behavior match.

Reviewers: jvoung
Differential Revision: http://reviews.llvm.org/D8240

llvm-svn: 231934

9 years agoWrap in __MINGW32__ to avoid warnings from msvc.
Benjamin Kramer [Wed, 11 Mar 2015 16:09:02 +0000 (16:09 +0000)]
Wrap in __MINGW32__ to avoid warnings from msvc.

llvm-svn: 231933

9 years agoOpenCL: CL2.0 atomic types
Anastasia Stulova [Wed, 11 Mar 2015 15:57:53 +0000 (15:57 +0000)]
OpenCL: CL2.0 atomic types

OpenCL C Spec v2.0 Section 6.13.11

- Made c11 _Atomic being accepted only for c11 compilations

- Implemented CL2.0 atomics by aliasing them to the corresponding c11 atomic types using implicit typedef

- Added diagnostics for atomics Khronos extension enabling

llvm-svn: 231932

9 years agoAdd builtins for the 64-bit vector integer arithmetic instructions added in POWER8.
Kit Barton [Wed, 11 Mar 2015 15:57:19 +0000 (15:57 +0000)]
Add builtins for the 64-bit vector integer arithmetic instructions added in POWER8.

These are the Clang-related changes for the instructions added to LLVM in http://reviews.llvm.org/D7959.

Phabricator review: http://reviews.llvm.org/D8041

llvm-svn: 231931

9 years agoAdd missing namespace specifier for MSVC.
Benjamin Kramer [Wed, 11 Mar 2015 15:53:24 +0000 (15:53 +0000)]
Add missing namespace specifier for MSVC.

llvm-svn: 231930

9 years agoRtlCaptureContext is absent from the mingw32 headers, provide a prototype.
Benjamin Kramer [Wed, 11 Mar 2015 15:41:15 +0000 (15:41 +0000)]
RtlCaptureContext is absent from the mingw32 headers, provide a prototype.

llvm-svn: 231929

9 years agoLinkerScript: Add parsing of the MEMORY command
Meador Inge [Wed, 11 Mar 2015 15:34:44 +0000 (15:34 +0000)]
LinkerScript: Add parsing of the MEMORY command

This patch implements parsing of the GNU ld MEMORY command [1].
The command and the memory block definitions are parsed as
specified (including the slightly strange "o" and "l" keywords).
Evaluation will be added at a later point in time.

[1] https://sourceware.org/binutils/docs-2.25/ld/MEMORY.html

llvm-svn: 231928

9 years agoInliner should not add callgraph edges for intrinsic calls (PR22857)
Sanjay Patel [Wed, 11 Mar 2015 15:12:32 +0000 (15:12 +0000)]
Inliner should not add callgraph edges for intrinsic calls (PR22857)

The CallGraphNode function "addCalledFunction()" asserts that edges are not to intrinsics.

This patch makes sure that the Inliner does not add such an edge to the callgraph.

Fix for clang crash by assertion: https://llvm.org/bugs/show_bug.cgi?id=22857

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

llvm-svn: 231927

9 years agoclang-format: Recognize the .ts (TypeScript) extension as JavaScript.
Daniel Jasper [Wed, 11 Mar 2015 14:58:38 +0000 (14:58 +0000)]
clang-format: Recognize the .ts (TypeScript) extension as JavaScript.

Patch by Martin Probst. Thank you.

llvm-svn: 231926

9 years agoRevert "[CMake] Don't pass in MSVC warning flags as definitions"
Greg Bedwell [Wed, 11 Mar 2015 14:57:48 +0000 (14:57 +0000)]
Revert "[CMake] Don't pass in MSVC warning flags as definitions"

reverting while I investigate why it broke the sanitizer-windows build.
This reverts commit r231924.

llvm-svn: 231925

9 years ago[CMake] Don't pass in MSVC warning flags as definitions
Greg Bedwell [Wed, 11 Mar 2015 14:26:29 +0000 (14:26 +0000)]
[CMake] Don't pass in MSVC warning flags as definitions

NFC currently but required as a prerequisite for using
the Microsoft resource compiler in conjunction with
CMake's ninja generator, which knows how to filter flags
appropriately, but not definitions.

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

llvm-svn: 231924

9 years agoPrefer pipes over temporary files in a feeble attempt to stabilize this test on windows.
Benjamin Kramer [Wed, 11 Mar 2015 13:55:41 +0000 (13:55 +0000)]
Prefer pipes over temporary files in a feeble attempt to stabilize this test on windows.

llvm-svn: 231923

9 years agoRefactor GdbRemote test cases to support remote platforms
Tamas Berghammer [Wed, 11 Mar 2015 13:51:07 +0000 (13:51 +0000)]
Refactor GdbRemote test cases to support remote platforms

Previously these test cases execute lldb-server on the host and run the
tests against it even if a remote platform was specified. With this CL
these tests always test the communication with an lldb-server instance
running on the target.

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

llvm-svn: 231922

9 years agoFix too short title underline reported by build-bot.
Dan Liew [Wed, 11 Mar 2015 13:34:49 +0000 (13:34 +0000)]
Fix too short title underline reported by build-bot.

llvm-svn: 231921

9 years agoclang-format: Fix incorrect && recognition.
Daniel Jasper [Wed, 11 Mar 2015 12:59:49 +0000 (12:59 +0000)]
clang-format: Fix incorrect && recognition.

Before:
  if (a &&(b = c)) ..

After:
  if (a && (b = c)) ..

llvm-svn: 231920

9 years agoRelax CHECK to match mips syntax.
Rafael Espindola [Wed, 11 Mar 2015 12:48:24 +0000 (12:48 +0000)]
Relax CHECK to match mips syntax.

llvm-svn: 231919

9 years agoMove MiInterpreterExecTestCase to test/tools/lldb-mi/interpreter folder (MI)
Ilia K [Wed, 11 Mar 2015 12:28:48 +0000 (12:28 +0000)]
Move MiInterpreterExecTestCase to test/tools/lldb-mi/interpreter folder (MI)

llvm-svn: 231918

9 years agoFix build on Windows (PATH_MAX was undefined) after r231858
Ilia K [Wed, 11 Mar 2015 11:24:10 +0000 (11:24 +0000)]
Fix build on Windows (PATH_MAX was undefined) after r231858

llvm-svn: 231917

9 years agoAVX-512: Added SKX forms of shift instructions.
Elena Demikhovsky [Wed, 11 Mar 2015 10:25:42 +0000 (10:25 +0000)]
AVX-512: Added SKX forms of shift instructions.
Added rotation instructions, encoding only.
Added encoding tests for all these forms.

llvm-svn: 231916

9 years agoFix bug in ProcessGDBRemote
Pavel Labath [Wed, 11 Mar 2015 09:53:42 +0000 (09:53 +0000)]
Fix bug in ProcessGDBRemote

Summary:
ProcessGDBRemote::AsyncThread nuked its own thread handle upon exiting. This prevented the main
thread from joining it correctly in StopAsyncThread. I address this by moving the Reset() call to
StopAsyncThread, after the join.

Reviewers: clayborg, zturner

Subscribers: lldb-commits

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

llvm-svn: 231915

9 years agoEnable security checks for arc4random() on CloudABI as well.
Ed Schouten [Wed, 11 Mar 2015 08:48:55 +0000 (08:48 +0000)]
Enable security checks for arc4random() on CloudABI as well.

CloudABI also supports the arc4random() function. We can enable compiler
warnings for rand(), random() and *rand48() on this system as well.

llvm-svn: 231914

9 years agoFix up default header paths for CloudABI.
Ed Schouten [Wed, 11 Mar 2015 08:46:01 +0000 (08:46 +0000)]
Fix up default header paths for CloudABI.

CloudABI is a pure cross compilation target. This means that we should
not add /usr/include and /usr/local/include. Instead, headers are stored
in $sysroot/$triple/include.

The method of going back to the sysroot (by using "../../..") is also
used in this function for some of the other environments (e.g., MinGW).

llvm-svn: 231913

9 years agoAdd target information for CloudABI on x86-64.
Ed Schouten [Wed, 11 Mar 2015 08:42:46 +0000 (08:42 +0000)]
Add target information for CloudABI on x86-64.

CloudABI can be identified by the __CloudABI__ preprocessor definition. The
system uses ELF executables.

CloudABI uses Unicode 7.0.0 for the encoding of wchar_t. As Unicode 7.0.0 is
synchronized with ISO/IEC 10646:2012 (released on 2012-06-01),
__STDC_ISO_10646__ is defined as 201206L.

llvm-svn: 231912

9 years agoNow that r231902's test is executed, make it actually pass
Justin Bogner [Wed, 11 Mar 2015 08:17:25 +0000 (08:17 +0000)]
Now that r231902's test is executed, make it actually pass

As of r231908, the test I added in r231902 actually gets run - but I'd
checked in a stale version of the input so it didn't pass. Fix the
input and un-xfail the test.

llvm-svn: 231911

9 years agoFix another verifier crash where a GC intrinsic would look at the internals of anothe...
Owen Anderson [Wed, 11 Mar 2015 06:57:30 +0000 (06:57 +0000)]
Fix another verifier crash where a GC intrinsic would look at the internals of another intrinsic in order to verify itself.

This causes a crash if the referenced intrinsic was malformed.  In this case, we
would already have reported an error on the referenced intrinsic, but then
crashed on the second one when it tried to introspect the first without
error checking.

llvm-svn: 231910

9 years agoSema: Properly track mangling number/name for linkage for using decls
David Majnemer [Wed, 11 Mar 2015 06:45:39 +0000 (06:45 +0000)]
Sema: Properly track mangling number/name for linkage for using decls

Using declarations which are aliases to struct types have their name
used as the struct type's name for linkage purposes.  Otherwise, make
sure to give an anonymous struct defined inside a using declaration a
mangling number to disambiguate it from other anonymous structs in the
same context.

This fixes PR22809.

llvm-svn: 231909

9 years agoMake test added in r231902 actually be executed.
Daniel Jasper [Wed, 11 Mar 2015 06:44:51 +0000 (06:44 +0000)]
Make test added in r231902 actually be executed.

There were also errors in the CHECK line which I fixed and the test
doesn't actually pass as the "100" is in the wrong line. Not sure
whether this is a test failure or a coverage failure so making the test
XFAIL for now.

llvm-svn: 231908

9 years agoPrevent test from accessing files.
Daniel Jasper [Wed, 11 Mar 2015 06:01:01 +0000 (06:01 +0000)]
Prevent test from accessing files.

llvm-svn: 231907

9 years agoGarbage collect an unused class in Atoms.h
Davide Italiano [Wed, 11 Mar 2015 05:31:07 +0000 (05:31 +0000)]
Garbage collect an unused class in Atoms.h

This will be replaced by a more generic class to handle
all the default symbols in an executable, e.g. __init_array.

Differential Revision:  http://reviews.llvm.org/D8234
Reviewed by: shankare

llvm-svn: 231906

9 years ago[OPENMP] Fix for ExprWithCleanups in 'omp atomic' constructs.
Alexey Bataev [Wed, 11 Mar 2015 04:48:56 +0000 (04:48 +0000)]
[OPENMP] Fix for ExprWithCleanups in 'omp atomic' constructs.
This patch allows using of ExprWithCleanups expressions and other complex expressions in 'omp atomic' construct
Differential Revision: http://reviews.llvm.org/D8200

llvm-svn: 231905

9 years agoDon't print labels that on ELF are never used.
Rafael Espindola [Wed, 11 Mar 2015 04:20:31 +0000 (04:20 +0000)]
Don't print labels that on ELF are never used.

llvm-svn: 231904

9 years agoCGOpenMPRuntime.h: Fix an incorrect \param on emitTaskOutlinedFunction(). [-Wdocument...
NAKAMURA Takumi [Wed, 11 Mar 2015 03:51:40 +0000 (03:51 +0000)]
CGOpenMPRuntime.h: Fix an incorrect \param on emitTaskOutlinedFunction(). [-Wdocumentation]

llvm-svn: 231903

9 years agoInstrProf: Teach llvm-cov to handle universal binaries when given -arch
Justin Bogner [Wed, 11 Mar 2015 02:30:51 +0000 (02:30 +0000)]
InstrProf: Teach llvm-cov to handle universal binaries when given -arch

llvm-svn: 231902

9 years ago[modules] Avoid accidentally completing the redeclaration chain when updating
Richard Smith [Wed, 11 Mar 2015 01:44:51 +0000 (01:44 +0000)]
[modules] Avoid accidentally completing the redeclaration chain when updating
all the existing declarations of a record-like entity with a pointer to its
definition.

llvm-svn: 231901

9 years agoFix test to specify an Itanium triple.
Richard Smith [Wed, 11 Mar 2015 01:09:01 +0000 (01:09 +0000)]
Fix test to specify an Itanium triple.

llvm-svn: 231900

9 years agoRelax label CHECK to mach COFF syntax.
Rafael Espindola [Wed, 11 Mar 2015 01:08:32 +0000 (01:08 +0000)]
Relax label CHECK to mach COFF syntax.

Should fix the cygwin bots.

I added a cygwin specific test that would have caught this on Linux.

llvm-svn: 231899

9 years agoPrint section start labels when first switching to the section.
Rafael Espindola [Wed, 11 Mar 2015 00:51:37 +0000 (00:51 +0000)]
Print section start labels when first switching to the section.

This is less brittle and avoids polluting the start of the file with every
debug section.

llvm-svn: 231898

9 years agoMove Android to the builtin rune table.
Dan Albert [Wed, 11 Mar 2015 00:51:06 +0000 (00:51 +0000)]
Move Android to the builtin rune table.

llvm-svn: 231897

9 years ago[Orc][MCJIT][RuntimeDyld] Re-apply r231726 and r231724 with fix suggested by
Lang Hames [Wed, 11 Mar 2015 00:43:26 +0000 (00:43 +0000)]
[Orc][MCJIT][RuntimeDyld] Re-apply r231726 and r231724 with fix suggested by
Dave Blaikie. Thanks Dave!

llvm-svn: 231896

9 years agoRemove a bugus test.
Rafael Espindola [Wed, 11 Mar 2015 00:28:59 +0000 (00:28 +0000)]
Remove a bugus test.

This was using the driver to test LLVM.

I checked that disabling the code path that the test was testing causes
llvm tests to fail.

llvm-svn: 231895

9 years agoFix a grammar issue I introduced.
Chandler Carruth [Wed, 11 Mar 2015 00:19:01 +0000 (00:19 +0000)]
Fix a grammar issue I introduced.

llvm-svn: 231894

9 years agoInspired by r231891, use gender neutral pronouns in the places I've
Chandler Carruth [Wed, 11 Mar 2015 00:15:44 +0000 (00:15 +0000)]
Inspired by r231891, use gender neutral pronouns in the places I've
found in LLVM.

llvm-svn: 231893

9 years agoFor PR22870: produce an error rather than asserting if a designated initializer appea...
Richard Smith [Wed, 11 Mar 2015 00:12:17 +0000 (00:12 +0000)]
For PR22870: produce an error rather than asserting if a designated initializer appears in a signature.

llvm-svn: 231892

9 years agoGender-neutralize a comment.
Nico Weber [Wed, 11 Mar 2015 00:05:26 +0000 (00:05 +0000)]
Gender-neutralize a comment.

llvm-svn: 231891

9 years ago[modules] Fix iterator invalidation issue with names being added to a module
Richard Smith [Wed, 11 Mar 2015 00:00:51 +0000 (00:00 +0000)]
[modules] Fix iterator invalidation issue with names being added to a module
while we're writing out the identifier table.

llvm-svn: 231890

9 years agoFix Value dangling reference debug output
Andrew Kaylor [Tue, 10 Mar 2015 23:55:38 +0000 (23:55 +0000)]
Fix Value dangling reference debug output

llvm-svn: 231889

9 years agoHave TargetRegisterInfo::getLargestLegalSuperClass take a
Eric Christopher [Tue, 10 Mar 2015 23:46:01 +0000 (23:46 +0000)]
Have TargetRegisterInfo::getLargestLegalSuperClass take a
MachineFunction argument so that it can look up the subtarget
rather than using a cached one in some Targets.

llvm-svn: 231888

9 years agoRemove subtarget dependence from HexagonRegisterInfo.
Eric Christopher [Tue, 10 Mar 2015 23:45:55 +0000 (23:45 +0000)]
Remove subtarget dependence from HexagonRegisterInfo.

llvm-svn: 231887

9 years agoSplit test in two to handle building without x86.
Rafael Espindola [Tue, 10 Mar 2015 23:44:12 +0000 (23:44 +0000)]
Split test in two to handle building without x86.

llvm-svn: 231886

9 years agoIf the user specifies a kernel binary that isn't correct for the current
Jason Molenda [Tue, 10 Mar 2015 23:34:52 +0000 (23:34 +0000)]
If the user specifies a kernel binary that isn't correct for the current
kernel debug session, instead of issuing a warning (which on one ever
sees), drop the user-specified kernel binary Module from the target and
try to discover the correct one dynamically.
<rdar://problem/19450329>

llvm-svn: 231885

9 years agoUpdate build instructions / coding conventions.
Zachary Turner [Tue, 10 Mar 2015 23:22:25 +0000 (23:22 +0000)]
Update build instructions / coding conventions.

This improves the instructions for checking out LLDB, adds
more links to LLVM instructions, and more explicitly calls out
when we differ from the style guide.

Also updates the clang-format configuration file to correctly
reflect a 120 column limit.

Reviewed by: Jim Ingham
Differential Revision: http://reviews.llvm.org/D8222

llvm-svn: 231884

9 years agoRemove dead code.
Eric Christopher [Tue, 10 Mar 2015 23:22:04 +0000 (23:22 +0000)]
Remove dead code.

llvm-svn: 231883

9 years agoAdd missing section symbol to COFF's .debug_types.dwo.
Rafael Espindola [Tue, 10 Mar 2015 23:06:32 +0000 (23:06 +0000)]
Add missing section symbol to COFF's .debug_types.dwo.

Should bring the cygwin bots back.

I added a triple to the test that was failing so that it would have failed
on Linux.

llvm-svn: 231882

9 years agoIf a conditional branch jumps to the same target, remove the condition
Philip Reames [Tue, 10 Mar 2015 22:52:37 +0000 (22:52 +0000)]
If a conditional branch jumps to the same target, remove the condition

Given that large parts of inst combine is restricted to instructions which have one use, getting rid of a use on the condition can help the effectiveness of the optimizer. Also, it allows the condition to potentially be deleted by instcombine rather than waiting for another pass.

I noticed this completely by accident in another test case. It's not anything that actually came from a real workload.

p.s. We should probably do the same thing for switch instructions.

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

llvm-svn: 231881

9 years agoEmit correct linkage-name attribute based on DWARF version.
Paul Robinson [Tue, 10 Mar 2015 22:44:45 +0000 (22:44 +0000)]
Emit correct linkage-name attribute based on DWARF version.

There are still 4 tests that check for DW_AT_MIPS_linkage_name,
because they specify DWARF 2 or 3 in the module metadata. So, I didn't
create an explicit version-based test for the attribute.

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

llvm-svn: 231880

9 years agoInfer known bits from dominating conditions
Philip Reames [Tue, 10 Mar 2015 22:43:20 +0000 (22:43 +0000)]
Infer known bits from dominating conditions

This patch adds limited support in ValueTracking for inferring known bits of a value from conditional expressions which must be true to reach the instruction we're trying to optimize. At this time, the feature is off by default. Once landed, I'm hoping for feedback from others on both profitability and compile time impact.

Forms of conditional value propagation have been tried in LLVM before and have failed due to compile time problems.  In an attempt to side step that, this patch only considers conditions where the edge leaving the branch dominates the context instruction. It does not attempt full dataflow.  Even with that restriction, it handles many interesting cases:
 * Early exits from functions
 * Early exits from loops (for context instructions in the loop and after the check)
 * Conditions which control entry into loops, including multi-version loops (such as those produced during vectorization, IRCE, loop unswitch, etc..)

Possible applications include optimizing using information provided by constructs such as: preconditions, assumptions, null checks, & range checks.

This patch implements two approaches to the problem that need further benchmarking.  Approach 1 is to directly walk the dominator tree looking for interesting conditions.  Approach 2 is to inspect other uses of the value being queried for interesting comparisons.  From initial benchmarking, it appears that Approach 2 is faster than Approach 1, but this needs to be further validated.

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

llvm-svn: 231879

9 years agoAssert in isl expression builder if id can not be found [NFC]
Tobias Grosser [Tue, 10 Mar 2015 22:35:43 +0000 (22:35 +0000)]
Assert in isl expression builder if id can not be found [NFC]

llvm-svn: 231865

9 years agoCopy data files to the remote runner.
Dan Albert [Tue, 10 Mar 2015 22:31:49 +0000 (22:31 +0000)]
Copy data files to the remote runner.

Summary:
The data files for any given test will be in the same directory as the
source with a file name that matches *.dat. To make these available to
tests running remotely (such as over adb or ssh), copy them into the
test's remote working directory.

Note that we will perform more copies than we actually need. The data
files in the directory may only be used by one of the tests, but will
be copied for all tests in the same directory.

This patch also moves the remote test binary into the working
directory (previously it was only invoked from the working directory
rather than existing in it).

Reviewers: EricWF, jroelofs

Reviewed By: jroelofs

Subscribers: cfe-commits

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

llvm-svn: 231864

9 years ago[analyzer] Make getCheckIfTracked() return either leak or regular checker.
Anton Yartsev [Tue, 10 Mar 2015 22:24:21 +0000 (22:24 +0000)]
[analyzer] Make getCheckIfTracked() return either leak or regular checker.

llvm-svn: 231863

9 years agoUpdate clang for llvm r231861.
Eric Christopher [Tue, 10 Mar 2015 22:03:27 +0000 (22:03 +0000)]
Update clang for llvm r231861.

llvm-svn: 231862

9 years agoRemove the use of the subtarget in MCCodeEmitter creation and
Eric Christopher [Tue, 10 Mar 2015 22:03:14 +0000 (22:03 +0000)]
Remove the use of the subtarget in MCCodeEmitter creation and
update all ports accordingly. Required a couple of small rewrites
in handling subtarget features during creation in PPC.

llvm-svn: 231861

9 years agoCreate symbols marking the start of a section earlier.
Rafael Espindola [Tue, 10 Mar 2015 22:00:25 +0000 (22:00 +0000)]
Create symbols marking the start of a section earlier.

This lets us pass the symbol to the constructor and avoid the mutable field.

This also opens the way for outputting the symbol only when needed, instead
of outputting them at the start of the file.

llvm-svn: 231859

9 years agoAdd =shlibs-added/=shlibs-removed notifications (MI)
Ilia K [Tue, 10 Mar 2015 21:59:55 +0000 (21:59 +0000)]
Add =shlibs-added/=shlibs-removed notifications (MI)

Summary:
This patch adds =shlibs-added/=shlibs-removed notifications in lldb-mi. In more detail:
# Add Target::ModulesDidLoad/ModulesDidUnload notifications
# Improve Target::TargetEventData:
## Refactoring
## Move it back to include/lldb/Target/Target.h
## Add Target::{GetModuleListFromEvent,GetModuleList}; Add Target::m_module_list
# Add SBModule::{GetSymbolVendorMainFileSpec,GetObjectFileHeaderAddress}
# Add SBTarget::{EventIsTaretEvent,GetTargetFromEvent,GetNumModulesFromEvent,GetModuleAtIndexFromEvent}

All tests pass on OS X.

Reviewers: abidh, zturner, jingham, clayborg

Reviewed By: clayborg

Subscribers: jingham, zturner, lldb-commits, clayborg, abidh

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

llvm-svn: 231858

9 years agoRemove createAMDGPUMCCodeEmitter and instead just register the correct
Eric Christopher [Tue, 10 Mar 2015 21:57:34 +0000 (21:57 +0000)]
Remove createAMDGPUMCCodeEmitter and instead just register the correct
MCCodeEmitter creation routine based on TargetMachine since the only
64-bit R600 gpus are part of the GCN target.

llvm-svn: 231856

9 years ago[CodeGenPrepare] Refine the cost model provided by the promotion helper.
Quentin Colombet [Tue, 10 Mar 2015 21:48:15 +0000 (21:48 +0000)]
[CodeGenPrepare] Refine the cost model provided by the promotion helper.
- Use TargetLowering to check for the actual cost of each extension.
- Provide a factorized method to check for the cost of an extension:
  TargetLowering::isExtFree.
- Provide a virtual method TargetLowering::isExtFreeImpl for targets to be able
  to tune the cost of non-free extensions.

This refactoring offers a better granularity to model what really happens on
different targets.

No performance changes and very few code differences.

Part of <rdar://problem/19267165>

llvm-svn: 231855

9 years ago[LoopAccesses] Add debug message to indicate the result of the analysis
Adam Nemet [Tue, 10 Mar 2015 21:47:39 +0000 (21:47 +0000)]
[LoopAccesses] Add debug message to indicate the result of the analysis

The debug message was pretty confusing here.  It only reported the
situation with memchecks without the result of the dependence analysis.

Now it prints whether the loop is safe from the POV of the dependence
analysis and if yes, whether we need memchecks.

llvm-svn: 231854

9 years agoMove a non-trivial virtual function out of line.
Rafael Espindola [Tue, 10 Mar 2015 21:35:16 +0000 (21:35 +0000)]
Move a non-trivial virtual function out of line.

llvm-svn: 231853

9 years agoRemove unneeded const_cast in readPointerHelper. Pointed out by jroelofs
Eric Fiselier [Tue, 10 Mar 2015 21:32:53 +0000 (21:32 +0000)]
Remove unneeded const_cast in readPointerHelper. Pointed out by jroelofs

llvm-svn: 231852

9 years ago[Objective-C Sema]. Remove -Wreceiver-is-weak warning.
Fariborz Jahanian [Tue, 10 Mar 2015 21:28:33 +0000 (21:28 +0000)]
[Objective-C Sema]. Remove -Wreceiver-is-weak warning.
It is incorrect and better warning is issued under
-Warc-repeated-use-of-weak. rdar://16316934.

llvm-svn: 231851

9 years ago[Hexagon] Adding frame index + add load/store patterns.
Colin LeMahieu [Tue, 10 Mar 2015 21:24:13 +0000 (21:24 +0000)]
[Hexagon] Adding frame index + add load/store patterns.

llvm-svn: 231850

9 years agoAdd SymbolVendor::GetMainFileSpec and simplify CommandObjectTargetModulesList::PrintM...
Ilia K [Tue, 10 Mar 2015 21:18:59 +0000 (21:18 +0000)]
Add SymbolVendor::GetMainFileSpec and simplify CommandObjectTargetModulesList::PrintModule

Summary:
Add SymbolVendor::GetMainFileSpec and simplify CommandObjectTargetModulesList::PrintModule.

All tests pass on OS X.

Reviewers: abidh, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits, clayborg, abidh

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

llvm-svn: 231849

9 years agoclang-format code that is about to change.
Rafael Espindola [Tue, 10 Mar 2015 21:16:18 +0000 (21:16 +0000)]
clang-format code that is about to change.

llvm-svn: 231848

9 years ago[Hexagon] Simplifying deallocret definitions.
Colin LeMahieu [Tue, 10 Mar 2015 21:12:32 +0000 (21:12 +0000)]
[Hexagon] Simplifying deallocret definitions.

llvm-svn: 231847

9 years agoclang-format these declarations. NFC.
Rafael Espindola [Tue, 10 Mar 2015 21:05:09 +0000 (21:05 +0000)]
clang-format these declarations. NFC.

llvm-svn: 231846

9 years agoDon't repeat names in comments. NFC.
Rafael Espindola [Tue, 10 Mar 2015 21:01:50 +0000 (21:01 +0000)]
Don't repeat names in comments. NFC.

llvm-svn: 231845

9 years ago[Hexagon] Separating InstHexagon from OpcodeHexagon.
Colin LeMahieu [Tue, 10 Mar 2015 20:56:22 +0000 (20:56 +0000)]
[Hexagon] Separating InstHexagon from OpcodeHexagon.

llvm-svn: 231844

9 years agoAdd support for part-word atomics for PPC
Nemanja Ivanovic [Tue, 10 Mar 2015 20:51:07 +0000 (20:51 +0000)]
Add support for part-word atomics for PPC
http://reviews.llvm.org/D8090#inline-67337

llvm-svn: 231843

9 years agoAdd new LLVM_OPTIMIZED_TABLEGEN build setting which configures, builds and uses a...
Chris Bieneman [Tue, 10 Mar 2015 20:48:02 +0000 (20:48 +0000)]
Add new LLVM_OPTIMIZED_TABLEGEN build setting which configures, builds and uses a release tablegen build when LLVM is configured with assertions enabled.

Summary: This change leverages the cross-compiling functionality in the build system to build a release tablegen executable for use during the build.

Reviewers: resistor, rnk

Reviewed By: rnk

Subscribers: rnk, joker.eph, llvm-commits

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

llvm-svn: 231842

9 years agoUse generic feature name for sanitizers that replace new and delete
Eric Fiselier [Tue, 10 Mar 2015 20:46:04 +0000 (20:46 +0000)]
Use generic feature name for sanitizers that replace new and delete

llvm-svn: 231841

9 years ago[AArch64] Avoid going through GPRs for across-vector instructions.
Ahmed Bougacha [Tue, 10 Mar 2015 20:45:38 +0000 (20:45 +0000)]
[AArch64] Avoid going through GPRs for across-vector instructions.

This adds new node types for each intrinsic.
For instance, for addv, we have AArch64ISD::UADDV, such that:
  (v4i32 (uaddv ...))
is the same as
  (v4i32 (scalar_to_vector (i32 (int_aarch64_neon_uaddv ...))))
that is,
  (v4i32 (INSERT_SUBREG (v4i32 (IMPLICIT_DEF)),
           (i32 (int_aarch64_neon_uaddv ...)), ssub)

In a combine, we transform all such across-vector-lanes intrinsics to:

  (i32 (extract_vector_elt (uaddv ...), 0))

This has one big advantage: by making the extract_element explicit, we
enable the existing patterns for lane-aware instructions to fire.
This lets us avoid needlessly going through the GPRs.  Consider:

    uint32x4_t test_mul(uint32x4_t a, uint32x4_t b) {
        return vmulq_n_u32(a, vaddvq_u32(b));
    }

We now generate:
    addv.4s  s1, v1
    mul.4s   v0, v0, v1[0]
instead of the previous:
    addv.4s  s1, v1
    fmov     w8, s1
    dup.4s   v1, w8
    mul.4s   v0, v1, v0

rdar://20044838

llvm-svn: 231840