platform/upstream/llvm.git
8 years agoFix GOLD plugin build after r262976
Mehdi Amini [Wed, 9 Mar 2016 01:55:15 +0000 (01:55 +0000)]
Fix GOLD plugin build after r262976

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

8 years agoRemove trailing newline from test case; NFC
Sanjoy Das [Wed, 9 Mar 2016 01:51:44 +0000 (01:51 +0000)]
Remove trailing newline from test case; NFC

llvm-svn: 262980

8 years ago[SCEV] Slightly generalize getRangeViaFactoring
Sanjoy Das [Wed, 9 Mar 2016 01:51:02 +0000 (01:51 +0000)]
[SCEV] Slightly generalize getRangeViaFactoring

Building on the previous change, this generalizes
ScalarEvolution::getRangeViaFactoring to work with
{Ext(C?A:B)+k0,+,Ext(C?A:B)+k1} where Ext can be a zero extend, sign
extend or truncate operation, and k0 and k1 are constants.

llvm-svn: 262979

8 years ago[SCEV] Slightly generalize getRangeViaFactoring
Sanjoy Das [Wed, 9 Mar 2016 01:50:57 +0000 (01:50 +0000)]
[SCEV] Slightly generalize getRangeViaFactoring

This change generalizes ScalarEvolution::getRangeViaFactoring to work
with {Ext(C?A:B),+,Ext(C?A:B)} where Ext can be a zero extend, sign
extend or truncate operation.

llvm-svn: 262978

8 years agolibLTO: add a ThinLTOCodeGenerator on the model of LTOCodeGenerator.
Mehdi Amini [Wed, 9 Mar 2016 01:37:22 +0000 (01:37 +0000)]
libLTO: add a ThinLTOCodeGenerator on the model of LTOCodeGenerator.

This is intended to provide a parallel (threaded) ThinLTO scheme
for linker plugin use through the libLTO C API.

The intent of this patch is to provide a first implementation as a
proof-of-concept and allows linker to start supporting ThinLTO by
definiing the libLTO C API. Some part of the libLTO API are left
unimplemented yet. Following patches will add support for these.

The current implementation can link all clang/llvm binaries.

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

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

8 years agoFunctionIndex is not optional for renameModuleForThinLTO(), make it a reference ...
Mehdi Amini [Wed, 9 Mar 2016 01:37:14 +0000 (01:37 +0000)]
FunctionIndex is not optional for renameModuleForThinLTO(), make it a reference (NFC)

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

8 years ago[lto] Record whether a variable is TLS.
Sean Silva [Wed, 9 Mar 2016 00:47:47 +0000 (00:47 +0000)]
[lto] Record whether a variable is TLS.

Summary:

Reviewers: rafael

Subscribers: Bigcheese, llvm-commits, joker.eph

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

llvm-svn: 262975

8 years agoAssume GV is not null for now.
Rafael Espindola [Wed, 9 Mar 2016 00:31:06 +0000 (00:31 +0000)]
Assume GV is not null for now.

It will come back when we add support for inline asm in .bc files.

llvm-svn: 262972

8 years agoReadd testcase accidentally removed in r262888.
Richard Smith [Wed, 9 Mar 2016 00:12:38 +0000 (00:12 +0000)]
Readd testcase accidentally removed in r262888.

llvm-svn: 262971

8 years ago[TestRegisterVariables] Adjust compiler range in expected failure decorator.
Siva Chandra [Wed, 9 Mar 2016 00:02:00 +0000 (00:02 +0000)]
[TestRegisterVariables] Adjust compiler range in expected failure decorator.

Subscribers: lldb-commits

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

llvm-svn: 262970

8 years ago[Modules] Modernize, use range-based loops.
Davide Italiano [Tue, 8 Mar 2016 23:58:08 +0000 (23:58 +0000)]
[Modules] Modernize, use range-based loops.

llvm-svn: 262969

8 years ago[lto] Don't add variables with private linkage to the symbol table.
Sean Silva [Tue, 8 Mar 2016 23:50:56 +0000 (23:50 +0000)]
[lto] Don't add variables with private linkage to the symbol table.

Summary:
This causes the issue in PR26872 to go away now that we aren't creating
symbols for the string literals, but that may just be concealing a
deeper problem, so best to keep that PR open.

Reviewers: rafael

Subscribers: Bigcheese, llvm-commits, joker.eph

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

llvm-svn: 262968

8 years agoFix crash in access check for aggregate initialization of base classes. It's
Richard Smith [Tue, 8 Mar 2016 23:17:35 +0000 (23:17 +0000)]
Fix crash in access check for aggregate initialization of base classes. It's
not obvious how to access-check these, so pick a conservative rule until we get
feedback from CWG.

llvm-svn: 262966

8 years agoFix -Werror build.
Richard Smith [Tue, 8 Mar 2016 23:16:16 +0000 (23:16 +0000)]
Fix -Werror build.

llvm-svn: 262965

8 years agoAArch64: remove tests of intrinsics completely duplicated elsewhere.
Tim Northover [Tue, 8 Mar 2016 23:10:58 +0000 (23:10 +0000)]
AArch64: remove tests of intrinsics completely duplicated elsewhere.

llvm-svn: 262964

8 years agoP0017R1: In C++1z, an aggregate class can have (public non-virtual) base classes...
Richard Smith [Tue, 8 Mar 2016 22:17:41 +0000 (22:17 +0000)]
P0017R1: In C++1z, an aggregate class can have (public non-virtual) base classes; these are initialized as if they were data members.

llvm-svn: 262963

8 years ago[llvm-pdbdump] Dump line table information.
Zachary Turner [Tue, 8 Mar 2016 21:42:24 +0000 (21:42 +0000)]
[llvm-pdbdump] Dump line table information.

This patch adds the -lines command line option which will dump
source/line information for each compiland and source file.

llvm-svn: 262962

8 years agofix typo; NFC
Sanjay Patel [Tue, 8 Mar 2016 21:41:13 +0000 (21:41 +0000)]
fix typo; NFC

llvm-svn: 262961

8 years agoSilence duplicate diagnostics because parsing of a standards-based attribute triggers...
Aaron Ballman [Tue, 8 Mar 2016 21:31:32 +0000 (21:31 +0000)]
Silence duplicate diagnostics because parsing of a standards-based attribute triggers parsing diagnostics that may also be picked up during semantic analysis.

llvm-svn: 262960

8 years agoAdd CommandAlias.cpp to CMakeLists
Enrico Granata [Tue, 8 Mar 2016 21:29:49 +0000 (21:29 +0000)]
Add CommandAlias.cpp to CMakeLists

llvm-svn: 262959

8 years agoMove CommandAlias to its own file; also
Enrico Granata [Tue, 8 Mar 2016 21:23:30 +0000 (21:23 +0000)]
Move CommandAlias to its own file; also
Store std::unique_ptr<CommandAlias> instead of instances

llvm-svn: 262958

8 years agoRemove an unnecessary hack.
Rafael Espindola [Tue, 8 Mar 2016 21:17:31 +0000 (21:17 +0000)]
Remove an unnecessary hack.

It doesn't look like anything is depending on using local dynamic tls
relocations with preemptable  symbols.

llvm-svn: 262957

8 years agouse range-based for loop; NFCI
Sanjay Patel [Tue, 8 Mar 2016 20:53:48 +0000 (20:53 +0000)]
use range-based for loop; NFCI

llvm-svn: 262956

8 years agoDelete isTlsDynRel.
Rafael Espindola [Tue, 8 Mar 2016 20:24:36 +0000 (20:24 +0000)]
Delete isTlsDynRel.

It was a badly specified hack for when a tls relocation should be
propagated to the dynamic relocation table.

This replaces it with a not as bad hack of saying that a local dynamic
tls relocation is never preempted.

I will try to remove even that second hack in the next patch.

llvm-svn: 262955

8 years agoUse defined hidden symbols for out of range tests.
Rafael Espindola [Tue, 8 Mar 2016 19:51:58 +0000 (19:51 +0000)]
Use defined hidden symbols for out of range tests.

When the symbol can be preempted the error is not entirely accurate.

This just makes upcoming patches more readable.

llvm-svn: 262954

8 years agofix variable name; NFC
Sanjay Patel [Tue, 8 Mar 2016 19:07:42 +0000 (19:07 +0000)]
fix variable name; NFC

llvm-svn: 262953

8 years agouse range-based loop; NFCI
Sanjay Patel [Tue, 8 Mar 2016 19:06:12 +0000 (19:06 +0000)]
use range-based loop; NFCI

llvm-svn: 262952

8 years agoAdd self to CODE_OWNERS
Hans Wennborg [Tue, 8 Mar 2016 19:01:15 +0000 (19:01 +0000)]
Add self to CODE_OWNERS

Apparently this makes my email address easier to find.

llvm-svn: 262951

8 years agoMade self.expect() errors a little more readable in the testsuite.
Sean Callanan [Tue, 8 Mar 2016 18:58:48 +0000 (18:58 +0000)]
Made self.expect() errors a little more readable in the testsuite.

self.expect() had two problems:

- If there was a substrs argument, then it overwrote the variable containing
  the command to run with the last substr.  That meant nonsense command text in
  testsuite errors.

- The actual output is not printed, which makes fixing testsuite failures a bit
  annoying (you end up having to use the -tv arguments to dotest).

This fixes both of these issues.  We could do even better, pretty-printing the
criteria for "correct" output, but this at least makes dealing with errors a bit
better.

llvm-svn: 262950

8 years agocmake: include what you use
Saleem Abdulrasool [Tue, 8 Mar 2016 18:56:00 +0000 (18:56 +0000)]
cmake: include what you use

Add a missing include.  This is important in the case HandleLLVMOptions is
included prior to the missing CheckCXXSourceCompiles or CheckCXXCompilerFlag
which includes CheckCXXSourceCompiles.

llvm-svn: 262949

8 years ago[CMake] Refactor add_llvm_implicit_projects to be reusable
Chris Bieneman [Tue, 8 Mar 2016 18:43:28 +0000 (18:43 +0000)]
[CMake] Refactor add_llvm_implicit_projects to be reusable

This adds llvm_add_implicit_projects which takes a project name and is wrapped by add_llvm_implicit_projects.

llvm-svn: 262948

8 years agoSupport floating point values in 128-bit SSE vector registers
Adrian Prantl [Tue, 8 Mar 2016 18:35:09 +0000 (18:35 +0000)]
Support floating point values in 128-bit SSE vector registers

The System-V x86_64 ABI requires floating point values to be passed
in 128-but SSE vector registers (xmm0, ...). When printing such a
variable this currently yields an <invalid load address>.

This patch makes LLDB's DWARF expression evaluator accept 128-bit
registers as scalars. It also relaxes the check that the size of the
result of the DWARF expression be equal to the size of the variable to a
greater-than. DWARF defers to the ABI how smaller values are being placed
in a larger register.

Implementation note: I found the code in Value::SetContext() that changes
the m_value_type after the fact to be questionable. I added a sanity check
that the Value's memory buffer has indeed been written to (this is
necessary, because we may have a scalar value in a vector register), but
really I feel like this is the wrong place to be setting it.

Reviewed by Greg Clayton.

http://reviews.llvm.org/D17897
rdar://problem/24944340

llvm-svn: 262947

8 years ago[AArch64] Disable the MI scheduler to turn bots green after r262942.
Chad Rosier [Tue, 8 Mar 2016 17:33:34 +0000 (17:33 +0000)]
[AArch64] Disable the MI scheduler to turn bots green after r262942.

llvm-svn: 262944

8 years agoRevert r262759 and r262760.
Quentin Colombet [Tue, 8 Mar 2016 17:29:11 +0000 (17:29 +0000)]
Revert r262759 and r262760.
The fix consisting in using the library call for atomic compare and swap when
the instruction is not safe to use may be incorrect. Indeed the library call may
not exist on all platform. In other words, we need a better fix!

llvm-svn: 262943

8 years ago[AArch64] Add MMOs to unscaled pairs.
Chad Rosier [Tue, 8 Mar 2016 17:16:38 +0000 (17:16 +0000)]
[AArch64] Add MMOs to unscaled pairs.

Test to be committed in follow up commit, per discussion in D17097.
http://reviews.llvm.org/D17097

llvm-svn: 262942

8 years agoRevert "ELF: Add /lib and /usr/lib as default search paths."
Rafael Espindola [Tue, 8 Mar 2016 17:13:12 +0000 (17:13 +0000)]
Revert "ELF: Add /lib and /usr/lib as default search paths."

It was causing errors like

/lib/libc.so.6 is incompatible with elf_x86_64

when linking on Fedora.

Every system has different default paths. It seems better to just trust
the driver to pass the correct -L options.

This reverts commit 262910.

llvm-svn: 262941

8 years agorangify, fix function names; NFCI
Sanjay Patel [Tue, 8 Mar 2016 17:12:32 +0000 (17:12 +0000)]
rangify, fix function names; NFCI

llvm-svn: 262940

8 years agoInvoke DAG postprocessing in the post-RA scheduler
Krzysztof Parzyszek [Tue, 8 Mar 2016 16:54:20 +0000 (16:54 +0000)]
Invoke DAG postprocessing in the post-RA scheduler

This was inadvertently omitted from r262774, which added the mutation
interface.

llvm-svn: 262939

8 years agoTurning on the /bigobj flag for two more files that will not link with MSVC 2015...
Aaron Ballman [Tue, 8 Mar 2016 16:34:37 +0000 (16:34 +0000)]
Turning on the /bigobj flag for two more files that will not link with MSVC 2015 Win64 Debug due to the section limit.

llvm-svn: 262938

8 years agodon't repeat function names in documentation comments; NFC
Sanjay Patel [Tue, 8 Mar 2016 16:26:39 +0000 (16:26 +0000)]
don't repeat function names in documentation comments; NFC

llvm-svn: 262937

8 years ago[ARM] Simplify ARMInstr*.td by getting rid of identity PatFrags (NFC)
Artyom Skrobov [Tue, 8 Mar 2016 16:23:54 +0000 (16:23 +0000)]
[ARM] Simplify ARMInstr*.td by getting rid of identity PatFrags (NFC)

Reviewers: t.p.northover, grosbach, resistor

Subscribers: aemerson, rengolin, llvm-commits

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

llvm-svn: 262936

8 years agoRevert r262599 "[X86][SSE] Improve vector ZERO_EXTEND by combining to ZERO_EXTEND_VEC...
Hans Wennborg [Tue, 8 Mar 2016 16:21:41 +0000 (16:21 +0000)]
Revert r262599 "[X86][SSE] Improve vector ZERO_EXTEND by combining to ZERO_EXTEND_VECTOR_INREG"

This caused PR26870.

llvm-svn: 262935

8 years agoFix problem with uninitilialized bool found by asan.
Manuel Klimek [Tue, 8 Mar 2016 16:17:48 +0000 (16:17 +0000)]
Fix problem with uninitilialized bool found by asan.

llvm-svn: 262934

8 years agoAdd Visual Studio native visualizers for several Clang types
Mike Spertus [Tue, 8 Mar 2016 16:14:23 +0000 (16:14 +0000)]
Add Visual Studio native visualizers for several Clang types

This is one of a series of changes to improve the MSVC visualization of Clang types.
This one focuses on Record and SubstTemplateTypeParmType meaning that, for example,
a TemplateArgumentLoc no longer displays incomprehensibly in the locals window as

  {Argument={DeclArg={Kind=1 QT=0x033acb00 D=0xcccccccc {DeclType=???}}...

but instead much more usefully as

  Type template parameter: SubstTemplateTypeParm: {Identifier (("T"))} => Record, {Identifier (("A"))}

Additional types and improvements will be made in subsequent commits

llvm-svn: 262933

8 years agoRemove a couple tabs that crept in
Marshall Clow [Tue, 8 Mar 2016 15:45:06 +0000 (15:45 +0000)]
Remove a couple tabs that crept in

llvm-svn: 262932

8 years agoImplement P0272R1: Give 'std::string' a non-const '.data()' member function
Marshall Clow [Tue, 8 Mar 2016 15:44:30 +0000 (15:44 +0000)]
Implement P0272R1: Give 'std::string' a non-const '.data()' member function

llvm-svn: 262931

8 years agoAdd DAG mutation interface to the DFA packetizer
Krzysztof Parzyszek [Tue, 8 Mar 2016 15:33:51 +0000 (15:33 +0000)]
Add DAG mutation interface to the DFA packetizer

llvm-svn: 262930

8 years agoAVX512: Add extract_subvector patterns v8i1->v4i1 , v4i1->v2i1.
Igor Breger [Tue, 8 Mar 2016 15:21:25 +0000 (15:21 +0000)]
AVX512: Add extract_subvector patterns v8i1->v4i1 , v4i1->v2i1.

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

llvm-svn: 262929

8 years agoImplement P0253R1: Fixing a design mistake in the searchers interface.
Marshall Clow [Tue, 8 Mar 2016 15:12:52 +0000 (15:12 +0000)]
Implement P0253R1: Fixing a design mistake in the searchers interface.

llvm-svn: 262928

8 years ago[Fix r262788] Fix missed prototype with the old llvm* name.
Filipe Cabecinhas [Tue, 8 Mar 2016 14:22:13 +0000 (14:22 +0000)]
[Fix r262788] Fix missed prototype with the old llvm* name.

llvm-svn: 262927

8 years ago[gold] Avoid assertion failures when taking a pointer to an empty vector.
Benjamin Kramer [Tue, 8 Mar 2016 14:02:46 +0000 (14:02 +0000)]
[gold] Avoid assertion failures when taking a pointer to an empty vector.

llvm-svn: 262926

8 years agoFix log in Broadcaster causing a crash
Tamas Berghammer [Tue, 8 Mar 2016 13:33:14 +0000 (13:33 +0000)]
Fix log in Broadcaster causing a crash

llvm-svn: 262925

8 years ago[llvm-config] Get rid of code related to the Makefile builds
Filipe Cabecinhas [Tue, 8 Mar 2016 11:49:24 +0000 (11:49 +0000)]
[llvm-config] Get rid of code related to the Makefile builds

Summary: I left --build-system for backwards compat, in case there are scripts using it. Feel free to ask for its removal too.

Reviewers: chapuni, tstellarAMD

Subscribers: llvm-commits

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

llvm-svn: 262924

8 years agoTry to fix windows build after rL262863
Tamas Berghammer [Tue, 8 Mar 2016 11:43:56 +0000 (11:43 +0000)]
Try to fix windows build after rL262863

llvm-svn: 262923

8 years agoBump libclang API version after r262318
Kevin Funk [Tue, 8 Mar 2016 10:34:23 +0000 (10:34 +0000)]
Bump libclang API version after r262318

llvm-svn: 262922

8 years agoSema: Methods in unavailable classes are unavailable
Duncan P. N. Exon Smith [Tue, 8 Mar 2016 10:28:52 +0000 (10:28 +0000)]
Sema: Methods in unavailable classes are unavailable

Similar to the template cases in r262050, when a C++ method in an
unavailable struct/class calls unavailable API, don't diagnose an error.
I.e., this case was failing:

    void foo() __attribute__((unavailable));
    struct __attribute__((unavailable)) A {
      void bar() { foo(); }
    };

Since A is unavailable, A::bar is allowed to call foo.  However, we were
emitting a diagnostic here.  This commit checks up the context chain
from A::bar, in a manner inspired by SemaDeclAttr.cpp:isDeclUnavailable.

I expected to find other related issues but failed to trigger them:

- I wondered if DeclBase::getAvailability should check for
  `TemplateDecl` instead of `FunctionTemplateDecl`, but I couldn't find
  a way to trigger this.  I left behind a few extra tests to make sure
  we don't regress.

- I wondered if Sema::isFunctionConsideredUnavailable should be
  symmetric, checking up the context chain of the callee (this commit
  only checks up the context chain of the caller).  However, I couldn't
  think of a testcase that didn't require first referencing the
  unavailable type; this, we already diagnose.

rdar://problem/25030656

llvm-svn: 262921

8 years agoUse c_str() instead of GetCString() to fix build
Ewan Crawford [Tue, 8 Mar 2016 10:03:23 +0000 (10:03 +0000)]
Use c_str() instead of GetCString() to fix build

llvm-svn: 262920

8 years ago[X86] Regenerated vector float extension tests
Simon Pilgrim [Tue, 8 Mar 2016 09:17:12 +0000 (09:17 +0000)]
[X86] Regenerated vector float extension tests

llvm-svn: 262919

8 years agoRemove pr25342 test-case.
Junmo Park [Tue, 8 Mar 2016 07:42:12 +0000 (07:42 +0000)]
Remove pr25342 test-case.

This commit removes pr25342 for reverting r262670 clearly.

llvm-svn: 262918

8 years agoAlso clang-format *.c run-time library files
Tobias Grosser [Tue, 8 Mar 2016 07:34:58 +0000 (07:34 +0000)]
Also clang-format *.c run-time library files

llvm-svn: 262917

8 years agoRevert "[InstCombine] Combine A->B->A BitCast"
Junmo Park [Tue, 8 Mar 2016 07:09:46 +0000 (07:09 +0000)]
Revert "[InstCombine] Combine A->B->A BitCast"

This reverts commit r262670 due to compile failure.

llvm-svn: 262916

8 years agoSema: Treat 'strict' availability flag like unavailable
Duncan P. N. Exon Smith [Tue, 8 Mar 2016 06:12:54 +0000 (06:12 +0000)]
Sema: Treat 'strict' availability flag like unavailable

This is a follow-up to r261512, which made the 'strict' availability
attribute flag behave like 'unavailable'.  However, that fix was
insufficient.  The following case would (erroneously) error when the
deployment target was older than 10.9:

    struct __attribute__((availability(macosx,strict,introduced=10.9))) A;
    __attribute__((availability(macosx,strict,introduced=10.9))) void f(A*);

The use of A* in the argument list for f is valid here, since f and A
have the same availability.

The fix is to return AR_Unavailable from DeclBase::getAvailability
instead of AR_NotYetIntroduced.  This also reverts the special handling
added in r261163, instead relying on the well-tested logic for
AR_Unavailable.

rdar://problem/23791325

llvm-svn: 262915

8 years agoThis is actually a FileSpec, so use .GetCString() instead
Enrico Granata [Tue, 8 Mar 2016 05:59:47 +0000 (05:59 +0000)]
This is actually a FileSpec, so use .GetCString() instead

llvm-svn: 262914

8 years agoUse .c_str() here to unbreak the Linux build
Enrico Granata [Tue, 8 Mar 2016 05:57:52 +0000 (05:57 +0000)]
Use .c_str() here to unbreak the Linux build

llvm-svn: 262913

8 years agoA few more improvements on the way to the command alias refactoring
Enrico Granata [Tue, 8 Mar 2016 05:37:15 +0000 (05:37 +0000)]
A few more improvements on the way to the command alias refactoring

- move alias help generation to CommandAlias, out of CommandInterpreter
- make alias creation use argument strings instead of OptionArgVectorSP; the former is a more reasonable currency than the latter
- remove m_is_alias from CommandObject, it wasn't actually being used

llvm-svn: 262912

8 years agoELF: Rename NoInhibitExec -> NoinhibitExec.
Rui Ueyama [Tue, 8 Mar 2016 04:06:29 +0000 (04:06 +0000)]
ELF: Rename NoInhibitExec -> NoinhibitExec.

The variables corresponding to command line options are named mechanically.
Because the option for the variable is -noinhibit-exec and not -no-inhibit-exec,
it should be name this way.

llvm-svn: 262911

8 years agoELF: Add /lib and /usr/lib as default search paths.
Rui Ueyama [Tue, 8 Mar 2016 04:06:27 +0000 (04:06 +0000)]
ELF: Add /lib and /usr/lib as default search paths.

GNU ld and gold have these paths as default search paths.
If you don't want these directories, pass -nostdlib.

llvm-svn: 262910

8 years agoTurn GetAliasOptions() into GetAlias()
Enrico Granata [Tue, 8 Mar 2016 03:56:12 +0000 (03:56 +0000)]
Turn GetAliasOptions() into GetAlias()

Eventually, there will be more things that CommandAlias contains, and I don't want accessors for each of them on the CommandIntepreter
Eventually, we also won't pass around copies of CommandAlias, but that's for a later patch

llvm-svn: 262909

8 years agoSelectionDAG: Appease the bots that don't like my union
Justin Bogner [Tue, 8 Mar 2016 03:51:58 +0000 (03:51 +0000)]
SelectionDAG: Appease the bots that don't like my union

Should fix the breakage in r262902.

llvm-svn: 262908

8 years agoFix evaluation order. Spotted by Alexander Riccio!
Peter Collingbourne [Tue, 8 Mar 2016 03:50:36 +0000 (03:50 +0000)]
Fix evaluation order. Spotted by Alexander Riccio!

llvm-svn: 262907

8 years ago[Power9] Implement new vsx instructions: load, store instructions for vector and...
Kit Barton [Tue, 8 Mar 2016 03:49:13 +0000 (03:49 +0000)]
[Power9] Implement new vsx instructions: load, store instructions for vector and scalar

We follow the comments mentioned in http://reviews.llvm.org/D16842#344378 to
implement this new patch.

This patch implements the following vsx instructions:

Vector load/store:
lxv lxvx lxvb16x lxvl lxvll lxvh8x lxvwsx
stxv stxvb16x stxvh8x stxvl stxvll stxvx
Scalar load/store:
lxsd lxssp lxsibzx lxsihzx
stxsd stxssp stxsibx stxsihx
21 instructions

Phabricator: http://reviews.llvm.org/D16919
llvm-svn: 262906

8 years agoAttempt to fix the Ubuntu buildbot by making FindLongestCommandWord a free template...
Enrico Granata [Tue, 8 Mar 2016 03:48:41 +0000 (03:48 +0000)]
Attempt to fix the Ubuntu buildbot by making FindLongestCommandWord a free template function in lldb_private

llvm-svn: 262905

8 years agoUnbreak linux build broken by r262901
Jason Molenda [Tue, 8 Mar 2016 03:24:13 +0000 (03:24 +0000)]
Unbreak linux build broken by r262901

llvm-svn: 262904

8 years ago[WebAssembly] Update for spec change from tableswitch to br_table.
Dan Gohman [Tue, 8 Mar 2016 03:18:12 +0000 (03:18 +0000)]
[WebAssembly] Update for spec change from tableswitch to br_table.

Also note that the operand order changed; the default label is now listed
after the regular labels.

llvm-svn: 262903

8 years agoRe-apply "SelectionDAG: Store SDNode operands in an ArrayRecycler"
Justin Bogner [Tue, 8 Mar 2016 03:14:29 +0000 (03:14 +0000)]
Re-apply "SelectionDAG: Store SDNode operands in an ArrayRecycler"

This re-applies r262886 with a fix for 32 bit platforms that have 8 byte
pointer alignment, effectively reverting r262892.

Original Message:

  Currently some SDNode operands are malloc'd, some are stored inline in
  subclasses of SDNode, and some are thrown into a BumpPtrAllocator.
  This scheme is complex, inconsistent, and makes refactoring SDNodes
  fairly difficult.

  Instead, we can allocate all of the operands using an ArrayRecycler
  that wraps a BumpPtrAllocator. This keeps the cache locality when
  iterating operands, improves locality when iterating SDNodes without
  looking at operands, and vastly simplifies the ownership semantics.

  It also means we stop overallocating SDNodes by 2-3x and will make it
  simpler to fix the rampant undefined behaviour we have in how we
  mutate SDNodes from one kind to another (See llvm.org/pr26808).

  This is NFC other than the changes in memory behaviour, and I ran some
  LNT tests to make sure this didn't hurt compile time. Not many tests
  changed: there were a couple of 1-2% regressions reported, but there
  were more improvements (of up to 4%) than regressions.

llvm-svn: 262902

8 years agoMove ProcessAliasOptionsArgs to be a static on CommandAlias; it wasn't using any...
Enrico Granata [Tue, 8 Mar 2016 03:00:27 +0000 (03:00 +0000)]
Move ProcessAliasOptionsArgs to be a static on CommandAlias; it wasn't using any instance data on the CommandInterpreter anyway

This small step removes one piece of alias machinery from the CommandInterpreter into the CommandAlias

llvm-svn: 262901

8 years agoChange the way command aliases are stored. Go from a model where a map holds the...
Enrico Granata [Tue, 8 Mar 2016 02:49:15 +0000 (02:49 +0000)]
Change the way command aliases are stored. Go from a model where a map holds the alias -> underlying command binding and another map holds the alias -> options, to a model where one single map holds the alias -> (all useful data) combination

Right now, obviously, this is just the pair of (CommandObjectSP,OptionArgVectorSP), so NFC

This is step one of a larger - and tricky - refactoring which will turn command aliases into interesting objects instead of passive storage that the command interpreter does smart things to
This refactoring, in turn, will allow us to do interesting things with aliases, such as intelligent and customizable help

llvm-svn: 262900

8 years ago[MIR] Change the token name for '<' and '>' to be consitent with the LLVM IR parser.
Quentin Colombet [Tue, 8 Mar 2016 02:00:43 +0000 (02:00 +0000)]
[MIR] Change the token name for '<' and '>' to be consitent with the LLVM IR parser.
Thanks to Ahmed Bougacha for noticing!

llvm-svn: 262899

8 years ago[AArch64][GlobalISel] Add a test case for the IRTranslator.
Quentin Colombet [Tue, 8 Mar 2016 01:48:08 +0000 (01:48 +0000)]
[AArch64][GlobalISel] Add a test case for the IRTranslator.

llvm-svn: 262898

8 years ago[AArch64] Initialize GlobalISel as part of the target initialization.
Quentin Colombet [Tue, 8 Mar 2016 01:45:36 +0000 (01:45 +0000)]
[AArch64] Initialize GlobalISel as part of the target initialization.

llvm-svn: 262897

8 years ago[GlobalISel] Introduce initializer method to support start/stop-after features.
Quentin Colombet [Tue, 8 Mar 2016 01:38:55 +0000 (01:38 +0000)]
[GlobalISel] Introduce initializer method to support start/stop-after features.

llvm-svn: 262896

8 years agoAdd doxygen comments to bmiintrin.h's intrinsics.
Ekaterina Romanova [Tue, 8 Mar 2016 01:36:59 +0000 (01:36 +0000)]
Add doxygen comments to bmiintrin.h's intrinsics.
The doxygen comments are automatically generated based on Sony's intrinsics document.

I got an OK from Eric Christopher to commit doxygen comments without prior code review upstream.

llvm-svn: 262895

8 years ago[analyzer] Fix missed leak from MSVC specific allocation functions
Anna Zaks [Tue, 8 Mar 2016 01:21:51 +0000 (01:21 +0000)]
[analyzer] Fix missed leak from MSVC specific allocation functions

Add the wide character strdup variants (wcsdup, _wcsdup) and the MSVC
version of alloca (_alloca) and other differently named function used
by the Malloc checker.

A patch by Alexander Riccio!

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

llvm-svn: 262894

8 years ago[MIR] Teach the parser/printer that generic virtual registers do not need a register...
Quentin Colombet [Tue, 8 Mar 2016 01:17:03 +0000 (01:17 +0000)]
[MIR] Teach the parser/printer that generic virtual registers do not need a register class.

llvm-svn: 262893

8 years agoRevert "SelectionDAG: Store SDNode operands in an ArrayRecycler"
Justin Bogner [Tue, 8 Mar 2016 01:07:03 +0000 (01:07 +0000)]
Revert "SelectionDAG: Store SDNode operands in an ArrayRecycler"

Looks like the largest SDNode is different between 32 and 64 bit now,
so this is breaking 32 bit bots. Reverting while I figure out a fix.

This reverts r262886.

llvm-svn: 262892

8 years agoA couple more UB fixes for C++14 sized deallocation.
Richard Smith [Tue, 8 Mar 2016 00:59:44 +0000 (00:59 +0000)]
A couple more UB fixes for C++14 sized deallocation.

llvm-svn: 262891

8 years ago[MIR] Teach the parser how to parse complex types of generic machine instructions.
Quentin Colombet [Tue, 8 Mar 2016 00:57:31 +0000 (00:57 +0000)]
[MIR] Teach the parser how to parse complex types of generic machine instructions.
By complex types, I mean aggregate or vector types.

llvm-svn: 262890

8 years agoUse class="svn" for features with SVN status.
Richard Smith [Tue, 8 Mar 2016 00:45:37 +0000 (00:45 +0000)]
Use class="svn" for features with SVN status.

llvm-svn: 262889

8 years agoMove [[nodiscard]] tests into test/CXX tree.
Richard Smith [Tue, 8 Mar 2016 00:44:49 +0000 (00:44 +0000)]
Move [[nodiscard]] tests into test/CXX tree.

llvm-svn: 262888

8 years agoDefine __has_cpp_attribute(fallthrough) to a more reasonable value. (What year is...
Richard Smith [Tue, 8 Mar 2016 00:40:32 +0000 (00:40 +0000)]
Define __has_cpp_attribute(fallthrough) to a more reasonable value. (What year is it?!)

llvm-svn: 262887

8 years agoSelectionDAG: Store SDNode operands in an ArrayRecycler
Justin Bogner [Tue, 8 Mar 2016 00:39:51 +0000 (00:39 +0000)]
SelectionDAG: Store SDNode operands in an ArrayRecycler

Currently some SDNode operands are malloc'd, some are stored inline in
subclasses of SDNode, and some are thrown into a BumpPtrAllocator.
This scheme is complex, inconsistent, and makes refactoring SDNodes
fairly difficult.

Instead, we can allocate all of the operands using an ArrayRecycler
that wraps a BumpPtrAllocator. This keeps the cache locality when
iterating operands, improves locality when iterating SDNodes without
looking at operands, and vastly simplifies the ownership semantics.

It also means we stop overallocating SDNodes by 2-3x and will make it
simpler to fix the rampant undefined behaviour we have in how we
mutate SDNodes from one kind to another (See llvm.org/pr26808).

This is NFC other than the changes in memory behaviour, and I ran some
LNT tests to make sure this didn't hurt compile time. Not many tests
changed: there were a couple of 1-2% regressions reported, but there
were more improvements (of up to 4%) than regressions.

llvm-svn: 262886

8 years ago[MIR] Teach the printer how to print complex types for generic machine instructions.
Quentin Colombet [Tue, 8 Mar 2016 00:38:01 +0000 (00:38 +0000)]
[MIR] Teach the printer how to print complex types for generic machine instructions.

Before this change, we would get the type definition in the middle
of the instruction.
E.g., %0(48) = G_ADD %struct_alias = type { i32, i16 } %edi, %edi

Now, we have just the expected type name:
%0(48) = G_ADD %struct_alias %edi, %edi

llvm-svn: 262885

8 years ago[AsmParser] Expose an API to parse a string starting with a type.
Quentin Colombet [Tue, 8 Mar 2016 00:37:07 +0000 (00:37 +0000)]
[AsmParser] Expose an API to parse a string starting with a type.

Without actually parsing a type it is difficult to perdict where
the type definition ends. In other words, instead of expecting
the user of the parser API to hand over only the relevant bits
of the string being parsed, take the whole string, parse the type,
and get back the number of characters that have been read.

This will be used by the MIR testing infrastructure.

llvm-svn: 262884

8 years agoRevert revisions 262636, 262643, 262679, and 262682.
Easwaran Raman [Tue, 8 Mar 2016 00:36:35 +0000 (00:36 +0000)]
Revert revisions 262636, 262643, 262679, and 262682.

llvm-svn: 262883

8 years agoAdd accidentally forgotten testcase from r262881.
Richard Smith [Tue, 8 Mar 2016 00:34:49 +0000 (00:34 +0000)]
Add accidentally forgotten testcase from r262881.

llvm-svn: 262882

8 years agoP0188R1: add support for standard [[fallthrough]] attribute. This is almost
Richard Smith [Tue, 8 Mar 2016 00:32:55 +0000 (00:32 +0000)]
P0188R1: add support for standard [[fallthrough]] attribute. This is almost
exactly the same as clang's existing [[clang::fallthrough]] attribute, which
has been updated to have the same semantics. The one significant difference
is that [[fallthrough]] is ill-formed if it's not used immediately before a
switch label (even when -Wimplicit-fallthrough is disabled). To support that,
we now build a CFG of any function that uses a '[[fallthrough]];' statement
to check.

In passing, fix some bugs with our support for statement attributes -- in
particular, diagnose their use on declarations, rather than asserting.

llvm-svn: 262881

8 years ago[MIR] Print the type of generic machine instructions.
Quentin Colombet [Tue, 8 Mar 2016 00:29:15 +0000 (00:29 +0000)]
[MIR] Print the type of generic machine instructions.

llvm-svn: 262880

8 years ago[MIR] Teach the mir parser about types on generic machine instructions.
Quentin Colombet [Tue, 8 Mar 2016 00:20:48 +0000 (00:20 +0000)]
[MIR] Teach the mir parser about types on generic machine instructions.

llvm-svn: 262879

8 years ago[lit] Teach lit about global-isel requirement.
Quentin Colombet [Tue, 8 Mar 2016 00:03:40 +0000 (00:03 +0000)]
[lit] Teach lit about global-isel requirement.

llvm-svn: 262878

8 years ago[llvm-config] Teach llvm-config about global-isel.
Quentin Colombet [Tue, 8 Mar 2016 00:02:50 +0000 (00:02 +0000)]
[llvm-config] Teach llvm-config about global-isel.

llvm-config can know tell whether or not a build has been configured to support
global-isel.
Use '--has-global-isel' for that.

llvm-svn: 262877