platform/upstream/llvm.git
9 years agoFix double (gdb) prompt when command doesn't exist
Ilia K [Thu, 19 Mar 2015 09:17:06 +0000 (09:17 +0000)]
Fix double (gdb) prompt when command doesn't exist

llvm-svn: 232715

9 years agoAdd support for kfreebsd. Thanks to Jan Henke
Sylvestre Ledru [Thu, 19 Mar 2015 09:03:58 +0000 (09:03 +0000)]
Add support for kfreebsd. Thanks to Jan Henke
Reported on the Debian BTS:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=780106

llvm-svn: 232714

9 years agoFix error handling in CMIDriver::DoMainLoop after r215223 (MI)
Ilia K [Thu, 19 Mar 2015 08:54:17 +0000 (08:54 +0000)]
Fix error handling in CMIDriver::DoMainLoop after r215223 (MI)

llvm-svn: 232713

9 years ago[OPENMP] Fixed bug in codegen of 'atomic write'.
Alexey Bataev [Thu, 19 Mar 2015 08:44:10 +0000 (08:44 +0000)]
[OPENMP] Fixed bug in codegen of 'atomic write'.

Fixed codegen for exit/continue order after success/failed atomic cmpxchg instruction for 'atomic write' construct.

llvm-svn: 232712

9 years agoAdd some missing __isl_give/__isl_keep annotations
Tobias Grosser [Thu, 19 Mar 2015 07:43:35 +0000 (07:43 +0000)]
Add some missing __isl_give/__isl_keep annotations

llvm-svn: 232711

9 years agoAdd forgotten 'FileCheck' to tiling test cases
Tobias Grosser [Thu, 19 Mar 2015 07:39:34 +0000 (07:39 +0000)]
Add forgotten 'FileCheck' to tiling test cases

These test cases did not verify the CHECK lines at all. We add the FileCheck
and also fix some broken CHECK lines. Being here, we extend the checks to
cover the whole loop structure.

llvm-svn: 232710

9 years agoUpdate isl to 94d707d
Tobias Grosser [Thu, 19 Mar 2015 07:27:29 +0000 (07:27 +0000)]
Update isl to 94d707d

The major improvements are:

  - Extended schedule tree support
  - AST generation from schedule trees

llvm-svn: 232709

9 years ago[ARM] Implement static (initial exec) TLS model
Denis Protivensky [Thu, 19 Mar 2015 06:47:44 +0000 (06:47 +0000)]
[ARM] Implement static (initial exec) TLS model

This includes handling of R_ARM_TLS_IE32 and R_ARM_TLS_LE32 relocs.

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

llvm-svn: 232708

9 years ago[Mips] Implement R_MIPS_PC21_S2 relocation handling
Simon Atanasyan [Thu, 19 Mar 2015 05:44:22 +0000 (05:44 +0000)]
[Mips] Implement R_MIPS_PC21_S2 relocation handling

llvm-svn: 232707

9 years ago[Mips] Recognize and check compatibility MIPS32R6 / MIPS64R6 ISA's
Simon Atanasyan [Thu, 19 Mar 2015 05:44:13 +0000 (05:44 +0000)]
[Mips] Recognize and check compatibility MIPS32R6 / MIPS64R6 ISA's

llvm-svn: 232706

9 years ago[Mips] Replace "hand-made" function by the `llvm::SignExtend32()` routine
Simon Atanasyan [Thu, 19 Mar 2015 05:44:04 +0000 (05:44 +0000)]
[Mips] Replace "hand-made" function by the `llvm::SignExtend32()` routine

No functional changes.

llvm-svn: 232705

9 years agollvm-cov: Rename -color={always|never} to -use-color[=0]
Justin Bogner [Thu, 19 Mar 2015 04:45:16 +0000 (04:45 +0000)]
llvm-cov: Rename -color={always|never} to -use-color[=0]

This is an ugly hack to fix the configure --enable-shared build. It
turns out that *every cl::opt in LLVM* shows up in *every tool* in
that configuration, which is hopelessly broken. This skirts around the
issue by not colliding with another option's name, for now.

I've also simplified the option implementation - the other "color"
option used cl::boolOrDefault and was much nicer than what I'd written
before.

llvm-svn: 232704

9 years agoFix use after free and calls to operator comma in debug mode
Eric Fiselier [Thu, 19 Mar 2015 03:20:02 +0000 (03:20 +0000)]
Fix use after free and calls to operator comma in debug mode

llvm-svn: 232703

9 years agoAdd NameMatches.h header to fix FreeBSD build after r232673
Ed Maste [Thu, 19 Mar 2015 02:47:36 +0000 (02:47 +0000)]
Add NameMatches.h header to fix FreeBSD build after r232673

llvm-svn: 232702

9 years agoNote that we don't support COFF on PPC.
Rafael Espindola [Thu, 19 Mar 2015 02:40:56 +0000 (02:40 +0000)]
Note that we don't support COFF on PPC.

Should bring back the windows bots.

llvm-svn: 232701

9 years agollvm-cov: Continue trying to appease a bot
Justin Bogner [Thu, 19 Mar 2015 02:00:54 +0000 (02:00 +0000)]
llvm-cov: Continue trying to appease a bot

This bot doesn't like me. I don't know why:

    http://lab.llvm.org:8011/builders/clang-hexagon-elf/builds/24425

Move the color option enum's definition out of the function that
creates the cl::opt.

llvm-svn: 232700

9 years agoSplit the object streamer callback in one per file format.
Rafael Espindola [Thu, 19 Mar 2015 01:50:16 +0000 (01:50 +0000)]
Split the object streamer callback in one per file format.

There are two main advantages to doing this

* Targets that only need to handle one of the formats specially don't have
  to worry about the others. For example, x86 now only registers a
  constructor for the COFF streamer.

* Changes to the arguments passed to one format constructor will not impact
  the other formats.

llvm-svn: 232699

9 years agollvm-cov: Try to appease a bot
Justin Bogner [Thu, 19 Mar 2015 01:07:22 +0000 (01:07 +0000)]
llvm-cov: Try to appease a bot

The clang-hexagon elf bot was complaining that "Option 'color'
registered more than once!":

    http://lab.llvm.org:8011/builders/clang-hexagon-elf/builds/24425

I don't understand why this error is happening, and I don't see it on
any other bots or on my own machine, so I'm kind of grasping at
straws. Try using an unscoped enum and specifying a cl::init to see if
they help.

llvm-svn: 232698

9 years agoSelectionDAGBuilder: update comment in HandlePHINodesInSuccessorBlocks.
Hans Wennborg [Thu, 19 Mar 2015 00:57:51 +0000 (00:57 +0000)]
SelectionDAGBuilder: update comment in HandlePHINodesInSuccessorBlocks.

From what I can tell, the code is checking for PHIs that expect any value from
this block, not just constants.

llvm-svn: 232697

9 years agoDo not track subregister liveness when it brings no benefits
Matthias Braun [Thu, 19 Mar 2015 00:21:58 +0000 (00:21 +0000)]
Do not track subregister liveness when it brings no benefits

Some subregisters are only to indicate different access sizes, while not
providing any way to actually divide the register up into multiple
disjunct parts. Avoid tracking subregister liveness in these cases as it
is not beneficial.

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

llvm-svn: 232695

9 years agoParse: Don't assume tokens have a length
David Majnemer [Thu, 19 Mar 2015 00:10:23 +0000 (00:10 +0000)]
Parse: Don't assume tokens have a length

Don't crash if the last token in a bad inline method body is an
annotation token.

llvm-svn: 232694

9 years agollvm-cov: Only emit colour by default if the output is a tty
Justin Bogner [Thu, 19 Mar 2015 00:02:23 +0000 (00:02 +0000)]
llvm-cov: Only emit colour by default if the output is a tty

This replaces the -no-color flag with a -color={auto|always|never}
option, with auto as the default, which is much saner.

llvm-svn: 232693

9 years agoSelectionDAGIsel: Fix comment about terminators being "handled below".
Hans Wennborg [Thu, 19 Mar 2015 00:02:22 +0000 (00:02 +0000)]
SelectionDAGIsel: Fix comment about terminators being "handled below".

That changed in r102128.

llvm-svn: 232692

9 years ago[CodeGenPrepare] Remove broken, dead, code.
Quentin Colombet [Wed, 18 Mar 2015 23:17:28 +0000 (23:17 +0000)]
[CodeGenPrepare] Remove broken, dead, code.
NFC.

llvm-svn: 232690

9 years agoComment discouraging writing command based test cases.
Jim Ingham [Wed, 18 Mar 2015 23:16:58 +0000 (23:16 +0000)]
Comment discouraging writing command based test cases.

llvm-svn: 232689

9 years agotwo or more, use a for.
Rafael Espindola [Wed, 18 Mar 2015 23:15:49 +0000 (23:15 +0000)]
two or more, use a for.

llvm-svn: 232688

9 years agoEnable TestCallStdStringFunction for GCC.
Siva Chandra [Wed, 18 Mar 2015 23:02:28 +0000 (23:02 +0000)]
Enable TestCallStdStringFunction for GCC.

Test Plan: dotest.py -C gcc -p TestCallStdStringFunction

Reviewers: vharron

Subscribers: lldb-commits

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

llvm-svn: 232687

9 years ago[libc++] Fix PR22922 - Allocator support for std::function does not know how to rebind.
Eric Fiselier [Wed, 18 Mar 2015 22:56:50 +0000 (22:56 +0000)]
[libc++] Fix PR22922 - Allocator support for std::function does not know how to rebind.

Summary:
This patch changes std::function to use allocator_traits to rebind the allocator instead of allocator itself.

It also changes most of the tests to use `bare_allocator` where possible instead of `test_allocator`.

Reviewers: mclow.lists

Reviewed By: mclow.lists

Subscribers: cfe-commits

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

llvm-svn: 232686

9 years agoFixed failing test due to missing target triple causing different results on differen...
Simon Pilgrim [Wed, 18 Mar 2015 22:51:45 +0000 (22:51 +0000)]
Fixed failing test due to missing target triple causing different results on different buildbots.

llvm-svn: 232685

9 years agoTeach getDefaultFormat that we only support ELF on some architectures.
Rafael Espindola [Wed, 18 Mar 2015 22:19:16 +0000 (22:19 +0000)]
Teach getDefaultFormat that we only support ELF on some architectures.

This should bring the windows bots back.

It is a bit ugly, but it is better than what we had before: The triple would
say that the object format was COFF, but llc/llvm-mc would produce an ELF.

llvm-svn: 232683

9 years ago[X86][SSE] Avoid scalarization of v2i64 vector shifts (REAPPLIED)
Simon Pilgrim [Wed, 18 Mar 2015 22:18:51 +0000 (22:18 +0000)]
[X86][SSE] Avoid scalarization of v2i64 vector shifts (REAPPLIED)

Fixed broken tests.

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

llvm-svn: 232682

9 years ago[PowerPC] Correct typo in PPCInstrAltivec.td
Bill Schmidt [Wed, 18 Mar 2015 22:13:03 +0000 (22:13 +0000)]
[PowerPC] Correct typo in PPCInstrAltivec.td

llvm-svn: 232681

9 years agoMS ABI: Don't try to emit VF/VB-Tables for extern class templates
David Majnemer [Wed, 18 Mar 2015 22:04:43 +0000 (22:04 +0000)]
MS ABI: Don't try to emit VF/VB-Tables for extern class templates

There will be an explicit template instantiation in another translation
unit which will provide the definition of the VF/VB-Tables.

This fixes PR22932.

llvm-svn: 232680

9 years ago[sanitizer] change the sanitizer coverage format once again, this time adding a magic...
Kostya Serebryany [Wed, 18 Mar 2015 22:03:39 +0000 (22:03 +0000)]
[sanitizer] change the sanitizer coverage format once again, this time adding a magic to the beginning of the file

llvm-svn: 232679

9 years agoCleanup to simplify the formatter for std::map of libstdc++.
Siva Chandra [Wed, 18 Mar 2015 22:01:45 +0000 (22:01 +0000)]
Cleanup to simplify the formatter for std::map of libstdc++.

Summary:
GCC does not emit some DWARF required for the simplified formatter
to work. A workaround for it has been incorporated in the formatter.
The corresponding test TestDataFormatterStdMap has also been enabled
for GCC.

Test Plan: dotest.py -C <clang|gcc> -p TestDataFormatterStdMap

Reviewers: clayborg, vharron, granata.enrico

Subscribers: lldb-commits

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

llvm-svn: 232678

9 years agoUpdate 3.7 Release Note mentionning the non-optionality of the DataLayout
Mehdi Amini [Wed, 18 Mar 2015 22:01:44 +0000 (22:01 +0000)]
Update 3.7 Release Note mentionning the non-optionality of the DataLayout

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 232677

9 years agoRevert "Generate targets for each lit suite."
Chris Bieneman [Wed, 18 Mar 2015 21:53:29 +0000 (21:53 +0000)]
Revert "Generate targets for each lit suite."

This change broke Polly. I'll track down the failure when I have a chance and re-apply the change.

llvm-svn: 232676

9 years agoWhen cloning LocalInstantiationScope's, don't update the current scope in Sema.
Richard Trieu [Wed, 18 Mar 2015 21:52:47 +0000 (21:52 +0000)]
When cloning LocalInstantiationScope's, don't update the current scope in Sema.

Construction of LocalInstantiationScope automatically updates the current scope
inside Sema.  However, when cloning a scope, the current scope does not change.
Change the cloning function to preserve the current scope.

Review: http://reviews.llvm.org/D8407
BUG: https://llvm.org/bugs/show_bug.cgi?id=22931
llvm-svn: 232675

9 years agomath: Implement erfc
Aaron Watry [Wed, 18 Mar 2015 21:52:07 +0000 (21:52 +0000)]
math: Implement erfc

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 232674

9 years agoMove some functions from source/lldb.cpp to Utility.
Zachary Turner [Wed, 18 Mar 2015 21:31:45 +0000 (21:31 +0000)]
Move some functions from source/lldb.cpp to Utility.

Specifically, there were some functions for converting enums
to strings and a function for matching a string using a specific
matching algorithm.  This moves those functions to more appropriate
headers in lldb/Utility and updates references to include the
new headers.

llvm-svn: 232673

9 years agoasan: Cargo cult the linux test changes in r232501 to the darwin tests
Justin Bogner [Wed, 18 Mar 2015 21:30:46 +0000 (21:30 +0000)]
asan: Cargo cult the linux test changes in r232501 to the darwin tests

This gets check-asan working again on Darwin - it looks like it was
just an omission not to update this as part of r232501.

llvm-svn: 232672

9 years agoGenerate targets for each lit suite.
Chris Bieneman [Wed, 18 Mar 2015 21:19:06 +0000 (21:19 +0000)]
Generate targets for each lit suite.

Summary:
This change makes CMake scan for lit suites and generate a target for each lit test suite. The targets follow the format check-<project>-<suite path>.

For example:
check-llvm-unit - Runs the LLVM unit tests
check-llvm-codegen-arm - Runs the ARM codeine tests

Note: These targets are not generated during multi-configuration generators (i.e. Xcode and Visual Studio) because target clutter impacts UI usability.

Reviewers: chandlerc

Subscribers: aemerson, llvm-commits

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

llvm-svn: 232671

9 years agoRevert "[X86][SSE] Avoid scalarization of v2i64 vector shifts" as it
Eric Christopher [Wed, 18 Mar 2015 21:01:00 +0000 (21:01 +0000)]
Revert "[X86][SSE] Avoid scalarization of v2i64 vector shifts" as it
appears to have broken tests/bots.

This reverts commit r232660.

llvm-svn: 232670

9 years agoTry to fix the Makefile build.
Zachary Turner [Wed, 18 Mar 2015 20:58:39 +0000 (20:58 +0000)]
Try to fix the Makefile build.

I deleted lldb-log.cpp, but the Makefile build lists this file
explicitly, so it is removed in this patch.

llvm-svn: 232669

9 years agoDon't load register data from memory.
Greg Clayton [Wed, 18 Mar 2015 20:45:28 +0000 (20:45 +0000)]
Don't load register data from memory.

llvm-svn: 232668

9 years agoRevert "Add a TargetMachine local MCRegisterInfo and MCInstrInfo so that"
Eric Christopher [Wed, 18 Mar 2015 20:41:44 +0000 (20:41 +0000)]
Revert "Add a TargetMachine local MCRegisterInfo and MCInstrInfo so that"
Committed too early.

This reverts commit r232666.

llvm-svn: 232667

9 years agoAdd a TargetMachine local MCRegisterInfo and MCInstrInfo so that
Eric Christopher [Wed, 18 Mar 2015 20:37:36 +0000 (20:37 +0000)]
Add a TargetMachine local MCRegisterInfo and MCInstrInfo so that
they can be used without a subtarget in constructing subtarget
independent passes.

llvm-svn: 232666

9 years agoRevert "Migrate the AArch64 TargetRegisterInfo to its TargetMachine"
Eric Christopher [Wed, 18 Mar 2015 20:37:30 +0000 (20:37 +0000)]
Revert "Migrate the AArch64 TargetRegisterInfo to its TargetMachine"
as we don't necessarily need to do this yet - though we could move
the base class to the TargetMachine as it isn't subtarget dependent.

This reverts commit r232103.

llvm-svn: 232665

9 years agoUse WinEHPrepare to outline SEH finally blocks
Reid Kleckner [Wed, 18 Mar 2015 20:26:53 +0000 (20:26 +0000)]
Use WinEHPrepare to outline SEH finally blocks

No outlining is necessary for SEH catch blocks. Use the blockaddr of the
handler in place of the usual outlined function.

Reviewers: majnemer, andrew.w.kaylor

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

llvm-svn: 232664

9 years agoFix cmake build.
Rafael Espindola [Wed, 18 Mar 2015 20:21:06 +0000 (20:21 +0000)]
Fix cmake build.

llvm-svn: 232663

9 years agoCMake: Disable ENABLE_EXPORTS for executables with MSVC
Reid Kleckner [Wed, 18 Mar 2015 20:09:13 +0000 (20:09 +0000)]
CMake: Disable ENABLE_EXPORTS for executables with MSVC

The MSVC linker won't produce a .lib file for an executable that doesn't
export anything, and LLVM doesn't maintain dllexport annotations or .def
files listing all C++ symbols. It also doesn't support exporting all
symbols, like binutils ld.

CMake 3.2 changed the Ninja generator to list both the .exe and .lib
files as outputs of executable build targets. Ninja would always re-link
executables with ENABLE_EXPORTS because the .lib output file was not
present, and therefore the target was out of date.

llvm-svn: 232662

9 years agoFix use of uninitialized valued.
Rafael Espindola [Wed, 18 Mar 2015 19:49:29 +0000 (19:49 +0000)]
Fix use of uninitialized valued.

Should bring the bots back.

llvm-svn: 232661

9 years ago[X86][SSE] Avoid scalarization of v2i64 vector shifts
Simon Pilgrim [Wed, 18 Mar 2015 19:35:31 +0000 (19:35 +0000)]
[X86][SSE] Avoid scalarization of v2i64 vector shifts

Currently v2i64 vectors shifts (non-equal shift amounts) are scalarized, costing 4 x extract, 2 x x86-shifts and 2 x insert instructions - and it gets even more awkward on 32-bit targets.

This patch separately shifts the vector by both shift amounts and then shuffles the partial results back together, costing 2 x shuffles and 2 x sse-shifts instructions (+ 2 movs on pre-AVX hardware).

Note - this patch only improves the SHL / LSHR logical shifts as only these are supported in SSE hardware.

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

llvm-svn: 232660

9 years ago[Objdump] DumpBytes of uint8_t from ArrayRef<uint8_t> instead of char from StringRef...
Colin LeMahieu [Wed, 18 Mar 2015 19:27:31 +0000 (19:27 +0000)]
[Objdump] DumpBytes of uint8_t from ArrayRef<uint8_t> instead of char from StringRef.  Removing reinterpret_casts.

llvm-svn: 232659

9 years agoAdd a default implementation of createObjectStreamer.
Rafael Espindola [Wed, 18 Mar 2015 19:08:20 +0000 (19:08 +0000)]
Add a default implementation of createObjectStreamer.

This removes duplicated code from backends that don't need to do anything
fancy.

llvm-svn: 232658

9 years ago[Hexagon] Use pseudo-instructions for true/false predicate values
Krzysztof Parzyszek [Wed, 18 Mar 2015 19:07:53 +0000 (19:07 +0000)]
[Hexagon] Use pseudo-instructions for true/false predicate values

llvm-svn: 232657

9 years agoRevert "[Hexagon] Use pseudo-instructions for true/false predicate values"
Krzysztof Parzyszek [Wed, 18 Mar 2015 18:50:06 +0000 (18:50 +0000)]
Revert "[Hexagon] Use pseudo-instructions for true/false predicate values"

This reverts r232650.

Missed a piece of code in the previous commit.

llvm-svn: 232656

9 years agoFix the Xcode build after the MIPS64 changes
Enrico Granata [Wed, 18 Mar 2015 18:42:41 +0000 (18:42 +0000)]
Fix the Xcode build after the MIPS64 changes

llvm-svn: 232655

9 years ago[Objdump] Removing size limit on DumpBytes and changing to range based for loop.
Colin LeMahieu [Wed, 18 Mar 2015 18:41:23 +0000 (18:41 +0000)]
[Objdump] Removing size limit on DumpBytes and changing to range based for loop.

llvm-svn: 232654

9 years agoMove lldb-log.cpp to core/Logging.cpp
Zachary Turner [Wed, 18 Mar 2015 18:20:42 +0000 (18:20 +0000)]
Move lldb-log.cpp to core/Logging.cpp

So that we don't have to update every single #include in the entire
codebase to #include this new header (which used to get included by
lldb-private-log.h, we automatically #include "Logging.h" from
within "Log.h".

llvm-svn: 232653

9 years agoTableGen: Fix register class lane masks being too conservative.
Matthias Braun [Wed, 18 Mar 2015 17:56:09 +0000 (17:56 +0000)]
TableGen: Fix register class lane masks being too conservative.

When calculating the lanemask of a register class we have to include the
masks of subregisters supported by any of the class members, not just
the ones supported by all class members.

This fixes problems when coalescing towards a subclass with additional
subregisters available.

The attached testcase works fine as is, but does crash if you enable
subregister liveness on x86 without this change applied.

llvm-svn: 232652

9 years agoHandle X86::reloc_riprel_4byte in 32 bits mode.
Rafael Espindola [Wed, 18 Mar 2015 17:33:40 +0000 (17:33 +0000)]
Handle X86::reloc_riprel_4byte in 32 bits mode.

We can get there with .code64.

Fixes pr22349.

llvm-svn: 232651

9 years ago[Hexagon] Use pseudo-instructions for true/false predicate values
Krzysztof Parzyszek [Wed, 18 Mar 2015 17:20:51 +0000 (17:20 +0000)]
[Hexagon] Use pseudo-instructions for true/false predicate values

llvm-svn: 232650

9 years agoAlways add some fake threads with x86_64 registers no matter what the architecture...
Greg Clayton [Wed, 18 Mar 2015 17:03:13 +0000 (17:03 +0000)]
Always add some fake threads with x86_64 registers no matter what the architecture since this is just for testing that we can add new threads with completely different registers contexts to a process.

llvm-svn: 232649

9 years agoFix linking of unit tests via CMake on Windows.
Zachary Turner [Wed, 18 Mar 2015 16:56:24 +0000 (16:56 +0000)]
Fix linking of unit tests via CMake on Windows.

A previous attempt to make the unit tests link properly on
Linux broke it for Windows.  This patch fixes it for both platforms.

llvm-svn: 232648

9 years agoUse utils/update_llc_test_checks.py to update all CHECKs
Sanjay Patel [Wed, 18 Mar 2015 16:38:44 +0000 (16:38 +0000)]
Use utils/update_llc_test_checks.py to update all CHECKs

The checks here were so vague that we could nuke intrinsics
from existence and still pass the test because we'd match
the function name.

llvm-svn: 232647

9 years agoPECOFF: Do not copy all undefined symbols to a set. NFC.
Rui Ueyama [Wed, 18 Mar 2015 16:28:33 +0000 (16:28 +0000)]
PECOFF: Do not copy all undefined symbols to a set. NFC.

llvm-svn: 232646

9 years ago[Hexagon] Intrinsics for circular and bit-reversed loads and stores
Krzysztof Parzyszek [Wed, 18 Mar 2015 16:23:44 +0000 (16:23 +0000)]
[Hexagon] Intrinsics for circular and bit-reversed loads and stores

llvm-svn: 232645

9 years agofixed to test features, not CPU model
Sanjay Patel [Wed, 18 Mar 2015 16:07:10 +0000 (16:07 +0000)]
fixed to test features, not CPU model

The 'vmovntdq' was only passing due to a fluke in
SandyBridge codegen that splits 32-byte stores in half,
but that meant that the test was not correctly checking
for the 32-byte store that we thought we were generating.

The lax checking in this file will be addressed in
another commit. There are bigger problems here.

llvm-svn: 232644

9 years ago[Hexagon] Handle ENDLOOP0 in InsertBranch and RemoveBranch
Krzysztof Parzyszek [Wed, 18 Mar 2015 15:56:43 +0000 (15:56 +0000)]
[Hexagon] Handle ENDLOOP0 in InsertBranch and RemoveBranch

llvm-svn: 232643

9 years ago[ARM] Remove XFAIL from passing RT test
Renato Golin [Wed, 18 Mar 2015 15:42:15 +0000 (15:42 +0000)]
[ARM] Remove XFAIL from passing RT test

This test started passing without warning, so in theory, we shouldn't mark
is as XPASS, but the buildbots are red and there's been an uncaught regression
meanwhile. Since it's passing on {ARM,Thumb2} x {NEON,VFPv3}, I'll risk future
failures for the benefit of getting the bots green again.

llvm-svn: 232642

9 years agoProvide std::abs(<floating-point>) in <cmath> on Solaris.
Eric Fiselier [Wed, 18 Mar 2015 15:24:18 +0000 (15:24 +0000)]
Provide std::abs(<floating-point>) in <cmath> on Solaris.

1) <cstdlib> header should define std::abs([int|long|long long])
functions. They use "using ::abs" to import these functions (which are
declared in <stdlib.h>) into std namespace.
2) <cmath> header should define std::abs([float|double|long double])
function. If we try define new functions in std namespace, then it
will cause compile error in <cstdlib> because "using ::abs" will try
import not only [int|long|long long] functions, but also
[float|double|long double] which are defined in <math.h> header on
solaris.

Patch by C Bergstrom.

llvm-svn: 232641

9 years agoSkip intermittently failing test on FreeBSD
Ed Maste [Wed, 18 Mar 2015 15:23:53 +0000 (15:23 +0000)]
Skip intermittently failing test on FreeBSD

It is already skipped on the other platforms anyhow.

llvm.org/pr19246

llvm-svn: 232640

9 years agoRemove unused parameter.
Rui Ueyama [Wed, 18 Mar 2015 15:12:55 +0000 (15:12 +0000)]
Remove unused parameter.

llvm-svn: 232639

9 years agoAppease clang/test/Parser/opencl-atomics-cl20.cl for 32-bit targets with explicit...
NAKAMURA Takumi [Wed, 18 Mar 2015 15:07:54 +0000 (15:07 +0000)]
Appease clang/test/Parser/opencl-atomics-cl20.cl for 32-bit targets with explicit triple.

llvm-svn: 232638

9 years agoAdd support for .ifnes psuedo-op.
Sid Manning [Wed, 18 Mar 2015 14:20:54 +0000 (14:20 +0000)]
Add support for .ifnes psuedo-op.

llvm-svn: 232636

9 years agoclang-format: Fix bad wrapping after "*" introduced in r232044.
Daniel Jasper [Wed, 18 Mar 2015 14:20:13 +0000 (14:20 +0000)]
clang-format: Fix bad wrapping after "*" introduced in r232044.

Before:
  void aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaa*
                                              const aaaaaaaaaaaa) {}

After:
  void aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
      aaaaaaaaaaaaaaaaaaaaaaaaa* const aaaaaaaaaaaa) {}

llvm-svn: 232635

9 years agoConvert open options for POSIX open on target platform.
Robert Flack [Wed, 18 Mar 2015 13:55:48 +0000 (13:55 +0000)]
Convert open options for POSIX open on target platform.

This moves the conversion of the open options to the target platform. On mac fcntl.h has different values for O_CREAT and O_TRUNC than on linux so by transmitting the standardized lldb open options we can correctly convert them on the target platform.

Test Plan:
On linux:
  lldb-server p --listen *:1234
On mac:
  lldb
  platform select remote-linux
  platform connect connect://ip-of-linux-box:1234
  target create ~/path/to/linux/binary
  b main
  process launch
Binary is successfully pushed to linux remote, process successfully launches and break in the main method.

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

llvm-svn: 232634

9 years agoFix comment in tools/lldb-mi/MIDriver.cpp
Ilia K [Wed, 18 Mar 2015 13:08:52 +0000 (13:08 +0000)]
Fix comment in tools/lldb-mi/MIDriver.cpp

llvm-svn: 232633

9 years ago[clang-format] Add missing test for std::function<void( int, int )>
Daniel Jasper [Wed, 18 Mar 2015 12:59:19 +0000 (12:59 +0000)]
[clang-format] Add missing test for std::function<void( int, int )>
spacing also fixed by r230473.

The fix in r230473 was done to enable fixing the spacing for
  std::function<void( int, int )>.
I did not realized that it also fixed this
issue.  Since it is fairly different from
  Deleted &operator=(const Deleted &)& = default;
fixed in r230473, it seems sensible to add the regression test for it.

Also cleaned up the test by removing duplicated code and comment, and kept
repeated test set consistent.

Result of running the new tests with r230473 backed out:
  [ RUN      ] FormatTest.ConfigurableSpacesInParentheses
  Actual: "std::function<void(int, int)> callback;"
  Expected: "std::function<void( int, int )> callback;"
  Actual: "std::function<void( int, int )> callback;"
  Expected: "std::function<void(int, int)> callback;"
  Actual: "std::function<void( int, int ) > callback;"
  Expected: "std::function<void(int, int)> callback;"
  [  FAILED  ] FormatTest.ConfigurableSpacesInParentheses (402 ms)

Result of new tests with r230473:
  [ RUN      ] FormatTest.ConfigurableSpacesInParentheses
  [       OK ] FormatTest.ConfigurableSpacesInParentheses (209 ms)

Review: http://reviews.llvm.org/D7922

Patch by Jean-Philippe Dufraigne. Thanks!

llvm-svn: 232632

9 years agoOpenCL: CL2.0 atomic types
Anastasia Stulova [Wed, 18 Mar 2015 12:55:29 +0000 (12:55 +0000)]
OpenCL: CL2.0 atomic types

OpenCL C Spec v2.0 Section 6.13.11

- Made c11 _Atomic being not accepted for OpenCL

- 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: 232631

9 years agoclang-format these lines to fix Visual C++ warning.
Yaron Keren [Wed, 18 Mar 2015 12:50:00 +0000 (12:50 +0000)]
clang-format these lines to fix Visual C++ warning.

Visual C++ 2013 complains "warning C4138: '*/' found outside of comment"
about the code

 CallInst */*CI*/

but compiles OK. clang-formatting these lines adds an extra space and
makes Visual C++ satisfied.

llvm-svn: 232630

9 years agoChange test to accept an additional critical edge split.
Daniel Jasper [Wed, 18 Mar 2015 12:45:45 +0000 (12:45 +0000)]
Change test to accept an additional critical edge split.

The two hot blocks are right next to each other and I verified that
there is no performance regression by compressing/uncompressing some
files with a minigzip built with the different options.

llvm-svn: 232629

9 years ago[ARM] Align stack objects passed to memory intrinsics
John Brawn [Wed, 18 Mar 2015 12:01:59 +0000 (12:01 +0000)]
[ARM] Align stack objects passed to memory intrinsics

Memcpy, and other memory intrinsics, typically tries to use LDM/STM if
the source and target addresses are 4-byte aligned. In CodeGenPrepare
look for calls to memory intrinsics and, if the object is on the
stack, 4-byte align it if it's large enough that we expect that memcpy
would want to use LDM/STM to copy it.

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

llvm-svn: 232627

9 years agoAdd missing newline to end of test file.
John Brawn [Wed, 18 Mar 2015 10:45:12 +0000 (10:45 +0000)]
Add missing newline to end of test file.

llvm-svn: 232626

9 years agoParse .note.android.ident header from elf files
Tamas Berghammer [Wed, 18 Mar 2015 10:36:27 +0000 (10:36 +0000)]
Parse .note.android.ident header from elf files

In android a .note.android.ident section header is added to the elf
files to provide information for the debuggers that it is an android
specific module. This CL add logic to parse it out from the elf files
and set the module specification based on it.

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

llvm-svn: 232625

9 years agoFix another ternary Visual C++ is OK wiht but gcc not.
Yaron Keren [Wed, 18 Mar 2015 10:30:57 +0000 (10:30 +0000)]
Fix another ternary Visual C++ is OK wiht but gcc not.

llvm-svn: 232624

9 years agoFix gcc ambiguity error (Visual C++ was OK with these).
Yaron Keren [Wed, 18 Mar 2015 10:26:22 +0000 (10:26 +0000)]
Fix gcc ambiguity error (Visual C++ was OK with these).

llvm-svn: 232623

9 years agoRemove many superfluous SmallString::str() calls.
Yaron Keren [Wed, 18 Mar 2015 10:17:07 +0000 (10:17 +0000)]
Remove many superfluous SmallString::str() calls.

Now that SmallString is a first-class citizen, most SmallString::str()
calls are not required. This patch removes a whole bunch of them, yet
there are lots more.

There are two use cases where str() is really needed:
1) To use one of StringRef member functions which is not available in
SmallString.
2) To convert to std::string, as StringRef implicitly converts while
SmallString do not. We may wish to change this, but it may introduce
ambiguity.

llvm-svn: 232622

9 years agoMake lldb-mi handle only MI commands
Hafiz Abid Qadeer [Wed, 18 Mar 2015 10:07:46 +0000 (10:07 +0000)]
Make lldb-mi handle only MI commands

Summary:
Previously lldb-mi can also act as a driver like normal lldb. It needed a lot
of redundant code in the lldb-mi for that. I think that if a user wants command
line lldb driver then he/she should use the lldb for it. This change will cleanup
the code a lot. When this change goes in, it will allow us to remove some more
redundant code too.

All tests pass on Linux. Did some sanity testing on command line and with eclipse.

Reviewers: ki.stfu

Reviewed By: ki.stfu

Subscribers: lldb-commits

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

llvm-svn: 232621

9 years agoFix a typo in EmulateInstructioinMIPS64
Pavel Labath [Wed, 18 Mar 2015 09:57:10 +0000 (09:57 +0000)]
Fix a typo in EmulateInstructioinMIPS64

llvm-svn: 232620

9 years agoInitial Assembly profiler for mips64
Bhushan D. Attarde [Wed, 18 Mar 2015 09:21:29 +0000 (09:21 +0000)]
Initial Assembly profiler for mips64

Summary:
This is initial implementation of assembly profiler which only scans prologue/epilogue assembly instructions to create CFI instructions.

Reviewers: clayborg, jasonmolenda

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

llvm-svn: 232619

9 years agoClean up CommandObjectBreakpointNameList: remove duplicated 'protected' access modifier
Ilia K [Wed, 18 Mar 2015 09:14:49 +0000 (09:14 +0000)]
Clean up CommandObjectBreakpointNameList: remove duplicated 'protected' access modifier

llvm-svn: 232618

9 years agollgoi: Fix type identity for imported binary packages.
Peter Collingbourne [Wed, 18 Mar 2015 08:34:40 +0000 (08:34 +0000)]
llgoi: Fix type identity for imported binary packages.

go/loader creates a fresh package map for each source package it imports. In
llgoi this caused binary imported packages to be imported anew for every input
line, resulting in spurious type errors and panics in go/ssa when encountering
previously imported types. Fix this by setting types.Config.Packages to our
internal package map.

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

llvm-svn: 232617

9 years agoLex: Don't call getIdentifierInfo on annotation tokens
David Majnemer [Wed, 18 Mar 2015 07:53:20 +0000 (07:53 +0000)]
Lex: Don't call getIdentifierInfo on annotation tokens

These calls are usually guarded by checks for isAnnotation() but it
looks like we missed a spot.  This would cause the included test to
crash clang.

llvm-svn: 232616

9 years agoMS ABI: Define _HAS_CHAR16_T_LANGUAGE_SUPPORT when appropriate
David Majnemer [Wed, 18 Mar 2015 07:53:18 +0000 (07:53 +0000)]
MS ABI: Define _HAS_CHAR16_T_LANGUAGE_SUPPORT when appropriate

If we are in MSVC 2015 compatibility mode and C++11 language conformance
is enabled, define _HAS_CHAR16_T_LANGUAGE_SUPPORT to 1.

llvm-svn: 232615

9 years agoAdd llgo-go to installation.
Peter Collingbourne [Wed, 18 Mar 2015 07:35:17 +0000 (07:35 +0000)]
Add llgo-go to installation.

llvm-svn: 232614

9 years ago[mips] Add itineraries for ext and ins instructions.
Kai Nacke [Wed, 18 Mar 2015 06:28:38 +0000 (06:28 +0000)]
[mips] Add itineraries for ext and ins instructions.

Currently, there are no itineraries defined for ext and ins instructions.
This patch adds these itineraries and uses them in the instruction definitions.

Reviewed By: dsanders

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

llvm-svn: 232613

9 years agollgoi: Fix importing source packages together with dependent binary packages.
Peter Collingbourne [Wed, 18 Mar 2015 06:04:22 +0000 (06:04 +0000)]
llgoi: Fix importing source packages together with dependent binary packages.

Note that this means that llgoi does not support the case
where a package's pkgpath is different from its import path,
but I don't think this should actually happen with llgoi.

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

llvm-svn: 232612

9 years agoMSVC Compat: Permit char16_t, char32_t and _Atomic when targeting > 2013
David Majnemer [Wed, 18 Mar 2015 04:15:23 +0000 (04:15 +0000)]
MSVC Compat: Permit char16_t, char32_t and _Atomic when targeting > 2013

We disabled support for _Atomic because the STL had name conflicts,
they've been resolved in 2015.  Similarly, reenable char16_t and
char32_t.

llvm-svn: 232611