platform/upstream/llvm.git
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

9 years ago[OPENMP] Fix crash on code emitting if errors are found.
Alexey Bataev [Wed, 18 Mar 2015 04:13:55 +0000 (04:13 +0000)]
[OPENMP] Fix crash on code emitting if errors are found.

Codegen for threadprivate variables (and in some other cases) may cause crash of the compiler if some diagnostic is produced later. This happens because some of the autogenerated globals are not removed from InternalVars StringMap when llvm::Module is reset.
Differential Revision: http://reviews.llvm.org/D8360

llvm-svn: 232610

9 years agoMS ABI: Empty pack expansions had their mangling changed in 2013->2015
David Majnemer [Wed, 18 Mar 2015 03:56:27 +0000 (03:56 +0000)]
MS ABI: Empty pack expansions had their mangling changed in 2013->2015

We used to support the 2013 mangling and changed it to the more
reasonable 2015 mangling.  Let's make the mangling conditional on what
version of MSVC is targeted.

This fixes PR21888.

llvm-svn: 232609

9 years agoSplit comma-separated \param(s). [-Wdocumentation]
NAKAMURA Takumi [Wed, 18 Mar 2015 02:09:25 +0000 (02:09 +0000)]
Split comma-separated \param(s). [-Wdocumentation]

llvm-svn: 232584

9 years agoMake module files passed to a module build via -fmodule-file= available to
Richard Smith [Wed, 18 Mar 2015 01:42:29 +0000 (01:42 +0000)]
Make module files passed to a module build via -fmodule-file= available to
consumers of that module.

Previously, such a file would only be available if the module happened to
actually import something from that module.

llvm-svn: 232583

9 years agoFix test in release mode. This reapplies r232456, corresponding to r232579.
NAKAMURA Takumi [Wed, 18 Mar 2015 01:41:58 +0000 (01:41 +0000)]
Fix test in release mode. This reapplies r232456, corresponding to r232579.

llvm-svn: 232582

9 years ago[bpf] fix build
Alexei Starovoitov [Wed, 18 Mar 2015 01:39:40 +0000 (01:39 +0000)]
[bpf] fix build

fix BPF backend build broken by r232429

Patch by Brenden Blanco

llvm-svn: 232581

9 years agoAdd testcases for BEXTR.
Josh Magee [Wed, 18 Mar 2015 01:34:06 +0000 (01:34 +0000)]
Add testcases for BEXTR.

These BEXTR cases are a check for the 64-bit load form and two negative cases where the bitrange is non-contiguous.  From a private patch equivalent to r189742/PR17028.

llvm-svn: 232580

9 years agoFix the LLVM type used when lowering initializer list reference temporaries to global...
Nick Lewycky [Wed, 18 Mar 2015 01:06:24 +0000 (01:06 +0000)]
Fix the LLVM type used when lowering initializer list reference temporaries to global variables. Reapplies r232454 with fix for PR22940.

llvm-svn: 232579

9 years agoMissed testcase for r232577
Krzysztof Parzyszek [Wed, 18 Mar 2015 00:44:46 +0000 (00:44 +0000)]
Missed testcase for r232577

llvm-svn: 232578

9 years agoGenerate bit manipulation instructions on Hexagon
Krzysztof Parzyszek [Wed, 18 Mar 2015 00:43:46 +0000 (00:43 +0000)]
Generate bit manipulation instructions on Hexagon

llvm-svn: 232577

9 years ago[SCEV] Make isImpliedCond smarter.
Sanjoy Das [Wed, 18 Mar 2015 00:41:29 +0000 (00:41 +0000)]
[SCEV] Make isImpliedCond smarter.

Summary:
This change teaches isImpliedCond to infer things like "X sgt 0" => "X -
1 sgt -1".  The `ConstantRange` class has the logic to do the heavy
lifting, this change simply gets ScalarEvolution to exploit that when
reasonable.

Depends on D8345

Reviewers: atrick

Subscribers: llvm-commits

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

llvm-svn: 232576

9 years ago[ConstantRange] Split makeICmpRegion in two.
Sanjoy Das [Wed, 18 Mar 2015 00:41:24 +0000 (00:41 +0000)]
[ConstantRange] Split makeICmpRegion in two.

Summary:
This change splits `makeICmpRegion` into `makeAllowedICmpRegion` and
`makeSatisfyingICmpRegion` with slightly different contracts.  The first
one is useful for determining what values some expression //may// take,
given that a certain `icmp` evaluates to true.  The second one is useful
for determining what values are guaranteed to //satisfy// a given
`icmp`.

Reviewers: nlewycky

Reviewed By: nlewycky

Subscribers: llvm-commits

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

llvm-svn: 232575

9 years ago[sanitizer] add run-time a flag coverage_order_pcs. When true, the PCs are dumped...
Kostya Serebryany [Wed, 18 Mar 2015 00:23:44 +0000 (00:23 +0000)]
[sanitizer] add run-time a flag coverage_order_pcs. When true, the PCs are dumped in the order of their appearance

llvm-svn: 232573

9 years agoDAGCombiner: fold (xor (shl 1, x), -1) -> (rotl ~1, x)
David Majnemer [Wed, 18 Mar 2015 00:03:36 +0000 (00:03 +0000)]
DAGCombiner: fold (xor (shl 1, x), -1) -> (rotl ~1, x)

Targets which provide a rotate make it possible to replace a sequence of
(XOR (SHL 1, x), -1) with (ROTL ~1, x).  This saves an instruction on
architectures like X86 and POWER(64).

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

llvm-svn: 232572

9 years agoBasic: Update clang to reflect changes made to LLVM datalayout
David Majnemer [Tue, 17 Mar 2015 23:55:00 +0000 (23:55 +0000)]
Basic: Update clang to reflect changes made to LLVM datalayout

We now give x86-64 COFF targets a different mangling code, update clang
to use it.

llvm-svn: 232571

9 years agoCOFF: Let globals with private linkage reside in their own section
David Majnemer [Tue, 17 Mar 2015 23:54:51 +0000 (23:54 +0000)]
COFF: Let globals with private linkage reside in their own section

COFF COMDATs (for selection kinds other than 'select any') require at
least one non-section symbol in the symbol table.
Satisfy this by morally enhancing the linkage from private to internal.

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

llvm-svn: 232570

9 years agoRemove unneeded selection functions from HexagonISelDAGToDAG
Krzysztof Parzyszek [Tue, 17 Mar 2015 23:54:48 +0000 (23:54 +0000)]
Remove unneeded selection functions from HexagonISelDAGToDAG

- SelectSelect, and
- SelectTruncate

llvm-svn: 232569

9 years agoFix a crash when the size of an 'auto' is needed and its initalizer
Kaelyn Takata [Tue, 17 Mar 2015 23:50:12 +0000 (23:50 +0000)]
Fix a crash when the size of an 'auto' is needed and its initalizer
contained a typo correction (the auto decl was being marked as dependent
unnecessarily, which triggered an assertion in cases where the size of
the type is needed).

llvm-svn: 232568

9 years agoImprove SUMMARY reporting in sanitizers.
Alexey Samsonov [Tue, 17 Mar 2015 23:46:06 +0000 (23:46 +0000)]
Improve SUMMARY reporting in sanitizers.

Make sure SUMMARY is always reported unless print_summary flag is set to
false, even if symbolizer is unavailable or report stack trace is empty.
If file/line info for PC can't be evaluated, print module name/offset
like we do in stack trace.

llvm-svn: 232567

9 years agodocs: Update LangRef and SourceLevelDebugging
Duncan P. N. Exon Smith [Tue, 17 Mar 2015 23:41:05 +0000 (23:41 +0000)]
docs: Update LangRef and SourceLevelDebugging

Cleanup some bitrot in SourceLevelDebugging.rst.

  - Pull the still-relevant details about individual descriptors into
    LangRef.rst.  Cut a lot of it to avoid over-describing the fields,
    as the C++ classes and assembly format are mostly self-describing
    now.  If there's anything specific that I shouldn't have cut, let me
    know and I'll add it back.
  - Rewrite the remaining sections to refer to the new debug info
    hierarchy in LangRef.rst.

llvm-svn: 232566

9 years agoAdd cgo dependency to llgo-stage2 and llgoi.
Peter Collingbourne [Tue, 17 Mar 2015 23:17:38 +0000 (23:17 +0000)]
Add cgo dependency to llgo-stage2 and llgoi.

llvm-svn: 232564

9 years agoBuild fix for building debugserver for ios.
Jason Molenda [Tue, 17 Mar 2015 23:16:42 +0000 (23:16 +0000)]
Build fix for building debugserver for ios.

llvm-svn: 232563

9 years agoFix bug while building FP16 constant vectors for AArch64
Pirama Arumuga Nainar [Tue, 17 Mar 2015 23:10:29 +0000 (23:10 +0000)]
Fix bug while building FP16 constant vectors for AArch64

Summary: Building FP16 constant vectors caused the FP16 data to be bitcast to i64.  This patch creates a BITCAST node with the correct value, and adds a test to verify correct handling.

Reviewers: mcrosier

Reviewed By: mcrosier

Subscribers: mcrosier, jmolloy, ab, srhines, llvm-commits, rengolin, aemerson

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

llvm-svn: 232562

9 years agoAppease AArch64ISelLowering.cpp miscompiled by g++-4.7.2.
NAKAMURA Takumi [Tue, 17 Mar 2015 22:55:01 +0000 (22:55 +0000)]
Appease AArch64ISelLowering.cpp miscompiled by g++-4.7.2.

I will revert this when 4.7.3 is ready.

llvm-svn: 232561

9 years agoConvert CRLF to LF.
Zachary Turner [Tue, 17 Mar 2015 22:51:21 +0000 (22:51 +0000)]
Convert CRLF to LF.

I accidentally let some Windows line endings slip in.  This is a
good reminder for me to use core.eol=lf.

llvm-svn: 232560

9 years agoMS ABI: Fix a couple of -Winconsistent-missing-override warnings
Justin Bogner [Tue, 17 Mar 2015 22:31:34 +0000 (22:31 +0000)]
MS ABI: Fix a couple of -Winconsistent-missing-override warnings

llvm-svn: 232559

9 years agoAdd the option -no-symbolic-operands to llvm-objdump used with -macho and
Kevin Enderby [Tue, 17 Mar 2015 22:26:11 +0000 (22:26 +0000)]
Add the option -no-symbolic-operands to llvm-objdump used with -macho and
-disassemble to not symbolic operands when disassembling.

llvm-svn: 232558

9 years agoXformToShuffleWithZero - Added clearer early outs and general tidy up. NFCI
Simon Pilgrim [Tue, 17 Mar 2015 22:19:08 +0000 (22:19 +0000)]
XformToShuffleWithZero - Added clearer early outs and general tidy up. NFCI

llvm-svn: 232557

9 years agoImply linker arguments from '-fveclib' option.
Michael Zolotukhin [Tue, 17 Mar 2015 22:13:05 +0000 (22:13 +0000)]
Imply linker arguments from '-fveclib' option.

Summary: As discussed in D8097, we should provide corresponding linking flags when 'fveclib' is specified.

Reviewers: hfinkel

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

llvm-svn: 232556

9 years ago[sanitizer] change the format of coverage dump: instead of always dumping 32-bit...
Kostya Serebryany [Tue, 17 Mar 2015 22:09:19 +0000 (22:09 +0000)]
[sanitizer] change the format of coverage dump: instead of always dumping 32-bit offsets dump 32-bit offsets on 32-bit arch and 64-bit offsets on 64-bit arch. Also add the 'bits' parameter to sancov.py. This is a user-visible interface change.

llvm-svn: 232555

9 years agoMS ABI: Build C++ default argument exprs for exported template classes
Reid Kleckner [Tue, 17 Mar 2015 21:51:43 +0000 (21:51 +0000)]
MS ABI: Build C++ default argument exprs for exported template classes

This was an omission from r232229.

llvm-svn: 232554

9 years agoSelection DAG preprocessing on Hexagon
Krzysztof Parzyszek [Tue, 17 Mar 2015 21:47:16 +0000 (21:47 +0000)]
Selection DAG preprocessing on Hexagon

Simplify: (or (select c x 0) z)  ->  (select c (or x z) z)
          (or (select c 0 y) z)  ->  (select c z (or y z))
llvm-svn: 232553

9 years agoEnable TestDataFormatterStdIterator with GCC.
Siva Chandra [Tue, 17 Mar 2015 21:43:01 +0000 (21:43 +0000)]
Enable TestDataFormatterStdIterator with GCC.

Summary:
This test now passes for Clang and GCC. I do not know why it was
disabled for GCC with link to a bug which should not have had an
effect on this test.

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

Reviewers: vharron

Subscribers: lldb-commits

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

llvm-svn: 232552

9 years agoRemove StringRef->std::string->StringRef conversions.
Yaron Keren [Tue, 17 Mar 2015 21:33:38 +0000 (21:33 +0000)]
Remove StringRef->std::string->StringRef conversions.

As StringInit::get() accepts StringRef there is no need
to construct a std::string out of the StringRef input and
then construct a new StringRef from the std::string.

llvm-svn: 232551