platform/upstream/llvm.git
9 years agoRemove unused variable, initializer, and accessor.
Eric Christopher [Fri, 19 Dec 2014 23:46:53 +0000 (23:46 +0000)]
Remove unused variable, initializer, and accessor.

llvm-svn: 224650

9 years agoTweak the assert in ModuleBuilder from r224533 (PR21989)
Hans Wennborg [Fri, 19 Dec 2014 23:35:11 +0000 (23:35 +0000)]
Tweak the assert in ModuleBuilder from r224533 (PR21989)

Turns out there will be left-over deferred inline methods if there have
been errors, because in that case HandleTopLevelDecl bails out early.

llvm-svn: 224649

9 years agoR600: Remove outdated comment
Matt Arsenault [Fri, 19 Dec 2014 23:29:13 +0000 (23:29 +0000)]
R600: Remove outdated comment

llvm-svn: 224648

9 years agoMasked load and store codegen - fixed 128-bit vectors
Elena Demikhovsky [Fri, 19 Dec 2014 23:27:57 +0000 (23:27 +0000)]
Masked load and store codegen - fixed 128-bit vectors
The codegen failed on 128-bit types on AVX2.
I added patterns and in td files and tests.

llvm-svn: 224647

9 years agoR600/SI: Only form min/max with 1 use.
Matt Arsenault [Fri, 19 Dec 2014 23:15:30 +0000 (23:15 +0000)]
R600/SI: Only form min/max with 1 use.

If the condition is used for something else, this increases
the number of instructions.

llvm-svn: 224646

9 years ago[sanitizer] initialize two flas in SetCommonFlagsDefaults
Kostya Serebryany [Fri, 19 Dec 2014 23:09:59 +0000 (23:09 +0000)]
[sanitizer] initialize two flas in SetCommonFlagsDefaults

llvm-svn: 224645

9 years ago[TestEvents] Replace expectedFailureLinux with skipIfLinux
Siva Chandra [Fri, 19 Dec 2014 22:41:43 +0000 (22:41 +0000)]
[TestEvents] Replace expectedFailureLinux with skipIfLinux

Summary:
If we do not mark them as skip, they are still executed, which in
turn is leading to an assertion failure. The change also adds
skipIfLinux to a testlet which was not previously marked with
skipIfLinux. This is because running even that test let leads to an
assertion failure.

Test Plan: dotest.py -C clang -p TestEvents.py

Reviewers: vharron

Reviewed By: vharron

Subscribers: lldb-commits

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

llvm-svn: 224644

9 years ago[TestStaticVariables] Mark the one unmarked test let also expectedFailure.
Siva Chandra [Fri, 19 Dec 2014 22:40:05 +0000 (22:40 +0000)]
[TestStaticVariables] Mark the one unmarked test let also expectedFailure.

Summary:
The test is question here is already annotated
with @expectedFailureDarwin(9980907).

This change also removes an uneccessary (and probably wrong) logic of
byssing few asserts if the compiler is not clang or llvm-gcc.

Both GCC and Clang emit incomplete debug info. Clang emits this:

< 1><0x00000026>    DW_TAG_class_type
                      DW_AT_name                  "A"
                      DW_AT_byte_size             0x00000001
                      DW_AT_decl_file             0x00000001
                      DW_AT_decl_line             0x0000001b
< 2><0x0000002e>      DW_TAG_member
                        DW_AT_name                  "g_points"
                        DW_AT_type                  <0x0000003b>
                        DW_AT_decl_file             0x00000001
                        DW_AT_decl_line             0x0000001e
                        DW_AT_external              yes(1)
                        DW_AT_declaration           yes(1)
                        DW_AT_accessibility         DW_ACCESS_public
< 1><0x0000003b>    DW_TAG_array_type
                      DW_AT_type                  <0x00000046>
< 2><0x00000040>      DW_TAG_subrange_type
                        DW_AT_type                  <0x0000007b>

Notice that the DIE at 0x40 does not specify an upperbound. This is with
Clang-3.5 and Clang ToT.

GCC emits this:

< 1><0x000000aa>    DW_TAG_class_type
                      DW_AT_name                  "A"
                      DW_AT_byte_size             0x00000001
                      DW_AT_decl_file             0x00000001
                      DW_AT_decl_line             0x0000001b
                      DW_AT_sibling               <0x000000c1>
< 2><0x000000b4>      DW_TAG_member
                        DW_AT_name                  "g_points"
                        DW_AT_decl_file             0x00000001
                        DW_AT_decl_line             0x0000001e
                        DW_AT_type                  <0x000000c1>
                        DW_AT_external              yes(1)
                        DW_AT_accessibility         DW_ACCESS_public
                        DW_AT_declaration           yes(1)
< 1><0x000000c1>    DW_TAG_array_type
                      DW_AT_type                  <0x0000007e>
                      DW_AT_sibling               <0x000000cc>
< 2><0x000000ca>      DW_TAG_subrange_type

The DIE at 0xca is missing attributes. This is with gcc-4.8.2.

Test Plan: dotest.py -C clang -P TestStaticVariables.py

Reviewers: clayborg

Reviewed By: clayborg

Subscribers: lldb-commits

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

llvm-svn: 224643

9 years ago[TestCompletion] Spawn LLDB with '--no-use-colors'.
Siva Chandra [Fri, 19 Dec 2014 22:37:23 +0000 (22:37 +0000)]
[TestCompletion] Spawn LLDB with '--no-use-colors'.

Summary:
TestCompletion was broken for Ubuntu (and probably for Debian also).
The issue was that the lldb prompt in color (which is the default
behavior) was confusing pexpect.

Test Plan: "http://199.223.233.39:8011/lldb-try-clang-build-clang-test/"

Reviewers: zturner, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits

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

llvm-svn: 224642

9 years agoEH: Sink computation of local PadMap variable into function that uses it
Reid Kleckner [Fri, 19 Dec 2014 22:30:08 +0000 (22:30 +0000)]
EH: Sink computation of local PadMap variable into function that uses it

No functionality change.

llvm-svn: 224635

9 years ago[LIT] Add JSONMetricValue type to wrap types supported by the json encoder.
Eric Fiselier [Fri, 19 Dec 2014 22:29:12 +0000 (22:29 +0000)]
[LIT] Add JSONMetricValue type to wrap types supported by the json encoder.

Summary:
The following types can be encoded and decoded by the json library:
`dict`, `list`, `tuple`, `str`, `unicode`, `int`, `long`, `float`, `bool`, `NoneType`.

`JSONMetricValue` can be constructed with any of these types, and used as part of Test.Result.
This patch also adds a toMetricValue function that converts a value into a MetricValue.

Reviewers: ddunbar, EricWF

Reviewed By: EricWF

Subscribers: cfe-commits, llvm-commits

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

llvm-svn: 224628

9 years agoAdd printing the LC_ROUTINES load commands with llvm-objdump’s -private-headers.
Kevin Enderby [Fri, 19 Dec 2014 22:25:22 +0000 (22:25 +0000)]
Add printing the LC_ROUTINES load commands with llvm-objdump’s -private-headers.

llvm-svn: 224627

9 years ago[libcxx] Add <experimental/type_traits> for LFTS
Eric Fiselier [Fri, 19 Dec 2014 22:21:44 +0000 (22:21 +0000)]
[libcxx] Add <experimental/type_traits> for LFTS

Summary:
This adds the <experimental/type_traits> (minus invocation traits). Mostly just the `_v` traits.

Reviewers: K-ballo, mclow.lists

Reviewed By: mclow.lists

Subscribers: cfe-commits

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

llvm-svn: 224626

9 years agoAdd the ExceptionHandling::MSVC enumeration
Reid Kleckner [Fri, 19 Dec 2014 22:19:48 +0000 (22:19 +0000)]
Add the ExceptionHandling::MSVC enumeration

It is intended to be used for a family of personality functions that
have similar IR preparation requirements. Typically when interoperating
with MSVC personality functions, bits of functionality need to be
outlined from the main function into helper functions. There is also
usually more than one landing pad per invoke, which does not match the
LLVM IR landingpad representation.

None of this is implemented yet. This change just adds a new enum that
is active for *-windows-msvc and delegates to the EH removal preparation
pass.  No functionality change for other targets.

llvm-svn: 224625

9 years agoModel sqrtss as a binary operation with one source operand tied to the destination...
Sanjay Patel [Fri, 19 Dec 2014 22:16:28 +0000 (22:16 +0000)]
Model sqrtss as a binary operation with one source operand tied to the destination (PR14221)

This is a continuation of r167064 ( http://llvm.org/viewvc/llvm-project?view=revision&revision=167064 ).
That patch started to fix PR14221 ( http://llvm.org/bugs/show_bug.cgi?id=14221 ), but it was not completed.

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

llvm-svn: 224624

9 years agoR600/SI: isLegalOperand() shouldn't check constant bus for SALU instructions
Tom Stellard [Fri, 19 Dec 2014 22:15:37 +0000 (22:15 +0000)]
R600/SI: isLegalOperand() shouldn't check constant bus for SALU instructions

The constant bus restrictions only apply to VALU instructions.  This
enables SIFoldOperands to fold immediates into SALU instructions.

llvm-svn: 224623

9 years agoR600/SI: Make sure non-inline constants aren't folded into mubuf soffset operand
Tom Stellard [Fri, 19 Dec 2014 22:15:30 +0000 (22:15 +0000)]
R600/SI: Make sure non-inline constants aren't folded into mubuf soffset operand

mubuf instructions now define the soffset field using the SCSrc_32
register class which indicates that only SGPRs and inline constants
are allowed.

llvm-svn: 224622

9 years agoRemove isSubroutineType test for isCompositeType, getTag() is enough.
Yaron Keren [Fri, 19 Dec 2014 22:15:09 +0000 (22:15 +0000)]
Remove isSubroutineType test for isCompositeType, getTag() is enough.

llvm-svn: 224621

9 years agoDR1048: drop top-level cv-qualifiers when deducing the return type of a
Richard Smith [Fri, 19 Dec 2014 22:10:51 +0000 (22:10 +0000)]
DR1048: drop top-level cv-qualifiers when deducing the return type of a
lambda-expression in C++11, to match the C++14 rules.

llvm-svn: 224620

9 years agoUpdate SmallPtrSet::insert's doc comment to match the new return type
David Blaikie [Fri, 19 Dec 2014 21:45:11 +0000 (21:45 +0000)]
Update SmallPtrSet::insert's doc comment to match the new return type

llvm-svn: 224619

9 years agoRemove unneeded configuration code.
Eric Fiselier [Fri, 19 Dec 2014 21:42:17 +0000 (21:42 +0000)]
Remove unneeded configuration code.

llvm-svn: 224618

9 years ago[Sanitizer] Refactor CommonFlags interface. NFC.
Alexey Samsonov [Fri, 19 Dec 2014 21:40:04 +0000 (21:40 +0000)]
[Sanitizer] Refactor CommonFlags interface. NFC.

Add CommonFlags::SetDefaults() and CommonFlags::ParseFromString(),
so that this object can be easily tested. Enforce
that ParseCommonFlagsFromString() and SetCommonFlagsDefaults()
work only with singleton CommonFlags, shared across all sanitizer
runtimes.

llvm-svn: 224617

9 years agoAdd printing the LC_SUB_CLIENT load command with llvm-objdump’s -private-headers.
Kevin Enderby [Fri, 19 Dec 2014 21:06:24 +0000 (21:06 +0000)]
Add printing the LC_SUB_CLIENT load command with llvm-objdump’s -private-headers.

llvm-svn: 224616

9 years agoCodeGen: do not attempt to invalidate virtual registers for zero-sized phis.
Peter Collingbourne [Fri, 19 Dec 2014 20:50:07 +0000 (20:50 +0000)]
CodeGen: do not attempt to invalidate virtual registers for zero-sized phis.

llvm-svn: 224615

9 years ago[ASan] Change activation strategy.
Alexey Samsonov [Fri, 19 Dec 2014 20:35:53 +0000 (20:35 +0000)]
[ASan] Change activation strategy.

Now ASan deactivation doesn't modify common or ASan-specific runtime
flags. Flags stay constant after initialization, and "deactivation"
instead stashes initialized runtime state, and deactivates the
runtime. Activation then just restores the original state (possibly,
overriden by some activation flags provided in system property on
Android).

llvm-svn: 224614

9 years ago[Sanitizer] Make Quarantine::Init slightly safer.
Alexey Samsonov [Fri, 19 Dec 2014 20:35:50 +0000 (20:35 +0000)]
[Sanitizer] Make Quarantine::Init slightly safer.

ASan Quarantine can be reinitialized at activation/deactivation.
Make max_size_/min_size_ atomic.

llvm-svn: 224613

9 years ago[Hexagon] Removing old variants of instructions and updating references.
Colin LeMahieu [Fri, 19 Dec 2014 20:29:29 +0000 (20:29 +0000)]
[Hexagon] Removing old variants of instructions and updating references.

llvm-svn: 224612

9 years agomerge consecutive stores of extracted vector elements
Sanjay Patel [Fri, 19 Dec 2014 20:23:41 +0000 (20:23 +0000)]
merge consecutive stores of extracted vector elements

Add a path to DAGCombiner::MergeConsecutiveStores()
to combine multiple scalar stores when the store operands
are extracted vector elements. This is a partial fix for
PR21711 ( http://llvm.org/bugs/show_bug.cgi?id=21711 ).

For the new test case, codegen improves from:

   vmovss  %xmm0, (%rdi)
   vextractps      $1, %xmm0, 4(%rdi)
   vextractps      $2, %xmm0, 8(%rdi)
   vextractps      $3, %xmm0, 12(%rdi)
   vextractf128    $1, %ymm0, %xmm0
   vmovss  %xmm0, 16(%rdi)
   vextractps      $1, %xmm0, 20(%rdi)
   vextractps      $2, %xmm0, 24(%rdi)
   vextractps      $3, %xmm0, 28(%rdi)
   vzeroupper
   retq

To:

   vmovups %ymm0, (%rdi)
   vzeroupper
   retq

Patch reviewed by Nadav Rotem.

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

llvm-svn: 224611

9 years ago[Hexagon] Adding bit extraction and table indexing instructions.
Colin LeMahieu [Fri, 19 Dec 2014 20:01:08 +0000 (20:01 +0000)]
[Hexagon] Adding bit extraction and table indexing instructions.

llvm-svn: 224610

9 years ago[Hexagon] Adding bit insertion instructions.
Colin LeMahieu [Fri, 19 Dec 2014 19:54:38 +0000 (19:54 +0000)]
[Hexagon] Adding bit insertion instructions.

llvm-svn: 224609

9 years ago[Hexagon] Adding more xtype shift instructions.
Colin LeMahieu [Fri, 19 Dec 2014 19:51:35 +0000 (19:51 +0000)]
[Hexagon] Adding more xtype shift instructions.

llvm-svn: 224608

9 years agoAdd printing the LC_SUB_LIBRARY load command with llvm-objdump’s -private-headers.
Kevin Enderby [Fri, 19 Dec 2014 19:48:16 +0000 (19:48 +0000)]
Add printing the LC_SUB_LIBRARY load command with llvm-objdump’s -private-headers.

llvm-svn: 224607

9 years agoDon't emit the "WARNING: no locations" message when breakpoints are set in
Jim Ingham [Fri, 19 Dec 2014 19:45:31 +0000 (19:45 +0000)]
Don't emit the "WARNING: no locations" message when breakpoints are set in
the dummy target.  Say they were set in the dummy target instead.

llvm-svn: 224606

9 years ago[ASan] Introduce AllocatorOptions to configure allocator behavior.
Alexey Samsonov [Fri, 19 Dec 2014 19:35:11 +0000 (19:35 +0000)]
[ASan] Introduce AllocatorOptions to configure allocator behavior.

Summary:
Reduce the dependency of allocator code on runtime flags. Instead,
pass a bunch of options that configure allocator behavior at
initialization or re-initialization. That would allow us to
cleaner modify allocator behavior during a program execution
when ASan is activated or de-activated.

Test Plan: regression test suite

Reviewers: kcc

Subscribers: llvm-commits, eugenis

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

llvm-svn: 224605

9 years ago[Hexagon] Adding xtype shift instructions.
Colin LeMahieu [Fri, 19 Dec 2014 19:34:50 +0000 (19:34 +0000)]
[Hexagon] Adding xtype shift instructions.

llvm-svn: 224604

9 years ago[libcxx] Allow the use of ccache when running the test suite.
Eric Fiselier [Fri, 19 Dec 2014 19:27:32 +0000 (19:27 +0000)]
[libcxx] Allow the use of ccache when running the test suite.

Summary:
In order to get the bots running quicker I would like to be able to use ccache
with the test suite. This patch adds support for running the test suite using
ccache. To use ccache pass `--param=use_ccache=true` when running the test suite.

ccache will not cache any command that invokes ld, so the build step needs to be
split into two separate compile commands. The cost of splitting the build step
into two parts when not using ccache seems to be minimal. On my machine I saw a
difference of ~5 seconds on a 5 minute test suite run.

A full test suite run with ccache generates about 250MB of cached data.

I recorded the following times for running the test suite in the following configurations:
- no ccache: 340s
- initial ccache run: 380s
- rerun with ccache (no changes): 53s.
- rerun with ccache (<string> changed): 80s
- rerun with ccache (<cmath> changed): 169s
- rerun with ccache (<valarray> changed): 69s

Reviewers: mclow.lists, jroelofs, danalbert

Reviewed By: jroelofs

Subscribers: cfe-commits

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

llvm-svn: 224603

9 years agoAudit uses of ConstString::AsCString() to make sure they weren't assuming
Jim Ingham [Fri, 19 Dec 2014 19:20:44 +0000 (19:20 +0000)]
Audit uses of ConstString::AsCString() to make sure they weren't assuming
they would always get a non-NULL string back.

<rdar://problem/19298575>

llvm-svn: 224602

9 years ago[ASan] Restrict the set of flags overriden at activation.
Alexey Samsonov [Fri, 19 Dec 2014 19:16:07 +0000 (19:16 +0000)]
[ASan] Restrict the set of flags overriden at activation.

Summary:
Change the way ASan flag parsing is performed at activation: instead
of overwriting all ASan and common flags from the activation string,
ASan will now only override a handful of whitelisted flags.
This is a first step towards making runtime flags immutable after
initialization. I plan to re-factor the activation stragegy to
the following one:

  - Parse commandline flags. Override the defaults from compile
    definition, env var, etc. Flags are immutable at this point.
  - Initiailize the runtime from commandline flags.
  - If ASan needs to be started deactivated, stash the runtime
    state in "asan_deactivated_flags" and deactivate the runtime.
  - When ASan is activated, override "asan_deactivated_flags" with
    activation flags, and use it to re-activate the runtime.

Test Plan: regression test suite

Reviewers: eugenis, kcc

Subscribers: llvm-commits

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

llvm-svn: 224601

9 years ago[ASan] Move flag validation from ParseFlagsFromString() to InitializeFlags().
Alexey Samsonov [Fri, 19 Dec 2014 19:16:02 +0000 (19:16 +0000)]
[ASan] Move flag validation from ParseFlagsFromString() to InitializeFlags().

llvm-svn: 224600

9 years ago[Hexagon] Adding transfers to and from control registers.
Colin LeMahieu [Fri, 19 Dec 2014 19:06:32 +0000 (19:06 +0000)]
[Hexagon] Adding transfers to and from control registers.

llvm-svn: 224599

9 years ago[Hexagon] Adding doubleregs for control registers. Renaming control register class.
Colin LeMahieu [Fri, 19 Dec 2014 18:56:10 +0000 (18:56 +0000)]
[Hexagon] Adding doubleregs for control registers.  Renaming control register class.

llvm-svn: 224598

9 years agobuiltins: rely on the compiler for user label prefix
Saleem Abdulrasool [Fri, 19 Dec 2014 18:54:13 +0000 (18:54 +0000)]
builtins: rely on the compiler for user label prefix

clang does not like the definition of builtins.  In order to work around this,
we use a SUN CC to redefine the generated name.  However, this requires that we
account for the user label prefix.  Rather than hard coding that into the file,
rely on the compiler to tell us the information and use the preprocessor to
generate the name as we do in the assembly routines.  NFC.

llvm-svn: 224597

9 years agoAllow to disable all sanitizers with "-fno-sanitize=all" option.
Alexey Samsonov [Fri, 19 Dec 2014 18:41:43 +0000 (18:41 +0000)]
Allow to disable all sanitizers with "-fno-sanitize=all" option.

Summary:
This patch adds "all" sanitizer group. A shortcut "-fno-sanitize=all"
can be used to disable all sanitizers for a given source file.

"-fsanitize=all" option makes no sense, and will produce an error.

This group can also be useful when we add "-fsanitize-recover=<list>"
options (patch in http://reviews.llvm.org/D6302), as it would allow
to conveniently enable/disable recovery for all specified sanitizers.

Test Plan: regression test suite

Reviewers: kcc, rsmith

Subscribers: cfe-commits

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

llvm-svn: 224596

9 years agoAdded a fixit to remove empty parens from a C++11 attribute argument list when we...
Aaron Ballman [Fri, 19 Dec 2014 18:37:22 +0000 (18:37 +0000)]
Added a fixit to remove empty parens from a C++11 attribute argument list when we diagnose this as an error.

llvm-svn: 224595

9 years ago[DebugInfo] Move all DWARF headers to the public include directory.
Frederic Riss [Fri, 19 Dec 2014 18:26:33 +0000 (18:26 +0000)]
[DebugInfo] Move all DWARF headers to the public include directory.

dsymutil needs access to DWARF specific inforamtion, the small DIContext
wrapper isn't sufficient. Other DWARF consumers might want to use it too
(I'm looking at you lldb).

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

llvm-svn: 224594

9 years agoDon't generate lldb inline test Makefiles if Makefile already exists.
Zachary Turner [Fri, 19 Dec 2014 18:26:33 +0000 (18:26 +0000)]
Don't generate lldb inline test Makefiles if Makefile already exists.

Differential Revision: http://reviews.llvm.org/D6664
Reviewed by: Sean Callanan

llvm-svn: 224593

9 years agoFix an address space id reset with array decay's
Pekka Jaaskelainen [Fri, 19 Dec 2014 18:04:27 +0000 (18:04 +0000)]
Fix an address space id reset with array decay's
implicit conversion.

The issue was produced with OpenCL C code that
called a function with a constant string literal
argument.

llvm-svn: 224592

9 years ago(diagnostics) fix typo in test...
Andreas Simbuerger [Fri, 19 Dec 2014 17:22:46 +0000 (17:22 +0000)]
(diagnostics) fix typo in test...

llvm-svn: 224591

9 years ago[BBVectorize] Remove two more redundant assignments.
Tilmann Scheller [Fri, 19 Dec 2014 17:21:38 +0000 (17:21 +0000)]
[BBVectorize] Remove two more redundant assignments.

Found by the Clang static analyzer.

llvm-svn: 224590

9 years ago[BBVectorize] Remove redundant assignment.
Tilmann Scheller [Fri, 19 Dec 2014 17:13:12 +0000 (17:13 +0000)]
[BBVectorize] Remove redundant assignment.

Found by the Clang static analyzer.

llvm-svn: 224589

9 years agoReapply: [InstCombine] Fix visitSwitchInst to use right operand types for sub cstexpr
Bruno Cardoso Lopes [Fri, 19 Dec 2014 17:12:35 +0000 (17:12 +0000)]
Reapply: [InstCombine] Fix visitSwitchInst to use right operand types for sub cstexpr

The visitSwitchInst generates SUB constant expressions to recompute the
switch condition. When truncating the condition to a smaller type, SUB
expressions should use the previous type (before trunc) for both
operands. Also, fix code to also return the modified switch when only
the truncation is performed.

This fixes an assertion crash.

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

rdar://problem/19191835

llvm-svn: 224588

9 years ago[LoopVectorize] Remove redundant assignment.
Tilmann Scheller [Fri, 19 Dec 2014 17:02:31 +0000 (17:02 +0000)]
[LoopVectorize] Remove redundant assignment.

Found by the Clang static analyzer.

llvm-svn: 224587

9 years ago[ARM] Remove dead assignment.
Tilmann Scheller [Fri, 19 Dec 2014 16:57:33 +0000 (16:57 +0000)]
[ARM] Remove dead assignment.

Found by the Clang static analyzer.

llvm-svn: 224586

9 years agoUse ObjCMultipleMethodNames to match the option.
Fariborz Jahanian [Fri, 19 Dec 2014 16:55:51 +0000 (16:55 +0000)]
Use ObjCMultipleMethodNames to match the option.

llvm-svn: 224585

9 years ago(diagnostics) Fix typo.
Andreas Simbuerger [Fri, 19 Dec 2014 16:49:39 +0000 (16:49 +0000)]
(diagnostics) Fix typo.

Thanks Albert Cohen.

llvm-svn: 224584

9 years agouse -0.0 when creating an fneg instruction
Sanjay Patel [Fri, 19 Dec 2014 16:44:08 +0000 (16:44 +0000)]
use -0.0 when creating an fneg instruction

Backends recognize (-0.0 - X) as the canonical form for fneg
and produce better code. Eg, ppc64 with 0.0:

   lis r2, ha16(LCPI0_0)
   lfs f0, lo16(LCPI0_0)(r2)
   fsubs f1, f0, f1
   blr

vs. -0.0:

   fneg f1, f1
   blr

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

llvm-svn: 224583

9 years agoAttributes accepting an EnumArgument are allowed to pass a string literal, or an...
Aaron Ballman [Fri, 19 Dec 2014 16:42:04 +0000 (16:42 +0000)]
Attributes accepting an EnumArgument are allowed to pass a string literal, or an identifier. VariadicEnumArguments now behave consistently instead of only accepting a string literal.

This change affects the only attribute accepting a variadic enumeration: callable_when.

llvm-svn: 224582

9 years agoFixed a typo in a comment. NFC.
Alexander Kornienko [Fri, 19 Dec 2014 15:37:02 +0000 (15:37 +0000)]
Fixed a typo in a comment. NFC.

llvm-svn: 224581

9 years ago[lsan] Add debug output to leak_check_before_thread_started.cc.
Sergey Matveev [Fri, 19 Dec 2014 15:33:13 +0000 (15:33 +0000)]
[lsan] Add debug output to leak_check_before_thread_started.cc.

Trying to investigate why this test is flaky.

llvm-svn: 224580

9 years agoPutting unevaluated expression warnings, and evaluated typeid warnings, under their...
Aaron Ballman [Fri, 19 Dec 2014 14:56:49 +0000 (14:56 +0000)]
Putting unevaluated expression warnings, and evaluated typeid warnings, under their own warning flags. Amends r224465.

llvm-svn: 224578

9 years ago[sanitizer] Rename InitIfLinkerInitialized to InitLinkerInitialized.
Sergey Matveev [Fri, 19 Dec 2014 14:45:19 +0000 (14:45 +0000)]
[sanitizer] Rename InitIfLinkerInitialized to InitLinkerInitialized.

llvm-svn: 224577

9 years agoRevert "[InstCombine] Fix visitSwitchInst to use right operand types for sub cstexpr"
Bruno Cardoso Lopes [Fri, 19 Dec 2014 14:36:24 +0000 (14:36 +0000)]
Revert "[InstCombine] Fix visitSwitchInst to use right operand types for sub cstexpr"

Reverts commit r224574 to appease buildbots:

The visitSwitchInst generates SUB constant expressions to recompute the
switch condition. When truncating the condition to a smaller type, SUB
expressions should use the previous type (before trunc) for both
operands. This fixes an assertion crash.

llvm-svn: 224576

9 years agotsan: intercept closedir
Dmitry Vyukov [Fri, 19 Dec 2014 14:29:40 +0000 (14:29 +0000)]
tsan: intercept closedir

llvm-svn: 224575

9 years ago[InstCombine] Fix visitSwitchInst to use right operand types for sub cstexpr
Bruno Cardoso Lopes [Fri, 19 Dec 2014 14:23:15 +0000 (14:23 +0000)]
[InstCombine] Fix visitSwitchInst to use right operand types for sub cstexpr

The visitSwitchInst generates SUB constant expressions to recompute the
switch condition. When truncating the condition to a smaller type, SUB
expressions should use the previous type (before trunc) for both
operands. This fixes an assertion crash.

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

rdar://problem/19191835

llvm-svn: 224574

9 years ago[asan] Test BB- and edge- level coverage on Android.
Evgeniy Stepanov [Fri, 19 Dec 2014 12:21:40 +0000 (12:21 +0000)]
[asan] Test BB- and edge- level coverage on Android.

llvm-svn: 224572

9 years ago[asan] Add tests for direct (mmap-ed) mode for BB- and edge-level coverage.
Evgeniy Stepanov [Fri, 19 Dec 2014 11:49:46 +0000 (11:49 +0000)]
[asan] Add tests for direct (mmap-ed) mode for BB- and edge-level coverage.

llvm-svn: 224571

9 years agoRemove redundant assignment.
Tilmann Scheller [Fri, 19 Dec 2014 11:29:34 +0000 (11:29 +0000)]
Remove redundant assignment.

Found with the Clang static analyzer.

llvm-svn: 224570

9 years ago[asan] Resurrect sanitize-coverage test on Android.
Evgeniy Stepanov [Fri, 19 Dec 2014 10:40:14 +0000 (10:40 +0000)]
[asan] Resurrect sanitize-coverage test on Android.

The test got silently disabled because of a typo in the lit config.
Also, compiler flags have changed (asan-coverage -> fsanitize-coverage).

llvm-svn: 224569

9 years agoRemove wrong semi-colons
Jeroen Ketema [Fri, 19 Dec 2014 09:18:23 +0000 (09:18 +0000)]
Remove wrong semi-colons

Patch by Alastair Donaldson

llvm-svn: 224568

9 years agoLTO: Export local context symbols
Duncan P. N. Exon Smith [Fri, 19 Dec 2014 07:19:50 +0000 (07:19 +0000)]
LTO: Export local context symbols

Export symbols in libLTO.dylib for the local context-related functions
added in r221733 (`LTO_API_VERSION=11`)... and add the missing
definition for `lto_codegen_create_in_local_context()`.

llvm-svn: 224567

9 years agoRename MapValue(Metadata*) to MapMetadata()
Duncan P. N. Exon Smith [Fri, 19 Dec 2014 06:06:18 +0000 (06:06 +0000)]
Rename MapValue(Metadata*) to MapMetadata()

Instead of reusing the name `MapValue()` when mapping `Metadata`, use
`MapMetadata()`.  The old name doesn't make much sense after the
`Metadata`/`Value` split.

llvm-svn: 224566

9 years agoTest commit
Andrew Wilkins [Fri, 19 Dec 2014 02:45:48 +0000 (02:45 +0000)]
Test commit

Just changing whitespace to test commit access...

llvm-svn: 224565

9 years ago[Sanitizer] Get rid of parseArgument helper function. NFC.
Alexey Samsonov [Fri, 19 Dec 2014 02:35:16 +0000 (02:35 +0000)]
[Sanitizer] Get rid of parseArgument helper function. NFC.

llvm-svn: 224564

9 years ago[Object] Don't crash on empty export lists.
Juergen Ributzka [Fri, 19 Dec 2014 02:31:01 +0000 (02:31 +0000)]
[Object] Don't crash on empty export lists.

Summary: This fixes the exports iterator if the export list is empty.

Reviewers: Bigcheese, kledzik

Subscribers: llvm-commits

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

llvm-svn: 224563

9 years agoFix layering violation, Lex shouldn't know about Decl
David Majnemer [Fri, 19 Dec 2014 02:13:56 +0000 (02:13 +0000)]
Fix layering violation, Lex shouldn't know about Decl

llvm-svn: 224562

9 years agoPR21969: Improve diagnostics for a conversion function that has any pieces of a
Richard Smith [Fri, 19 Dec 2014 02:07:47 +0000 (02:07 +0000)]
PR21969: Improve diagnostics for a conversion function that has any pieces of a
declared return type (including a trailing-return-type in C++14).

llvm-svn: 224561

9 years agoRegisterCoalescer: rewrite eliminateUndefCopy().
Matthias Braun [Fri, 19 Dec 2014 01:39:46 +0000 (01:39 +0000)]
RegisterCoalescer: rewrite eliminateUndefCopy().

This also fixes problems with undef copies of subregisters. I can't
attach a testcase for that as none of the targets in trunk has
subregister liveness tracking enabled.

llvm-svn: 224560

9 years agoFixed an issue that could cause GetPointeeData() to fail when passing in a non-zero...
Greg Clayton [Fri, 19 Dec 2014 01:28:42 +0000 (01:28 +0000)]
Fixed an issue that could cause GetPointeeData() to fail when passing in a non-zero index.

The issue was we had a global variable that was a pointer, and the address type of the children wasn't "load address" when it needed to be. Full details are in the comments of the changes.

<rdar://problem/15107937>

llvm-svn: 224559

9 years agoCorrect delayed typos in the operand to typeof expressions.
Kaelyn Takata [Fri, 19 Dec 2014 01:28:40 +0000 (01:28 +0000)]
Correct delayed typos in the operand to typeof expressions.

Fixes PR21947.

llvm-svn: 224558

9 years agoFix a typo.
Adrian Prantl [Fri, 19 Dec 2014 01:02:11 +0000 (01:02 +0000)]
Fix a typo.

llvm-svn: 224557

9 years ago[Hexagon] Adding loop0/1 sp0/1/2loop0 instructions.
Colin LeMahieu [Fri, 19 Dec 2014 00:06:53 +0000 (00:06 +0000)]
[Hexagon] Adding loop0/1 sp0/1/2loop0 instructions.

llvm-svn: 224556

9 years agoExplain why LLVM is emitting a DW_AT_containing_type inside of a class.
Adrian Prantl [Fri, 19 Dec 2014 00:01:20 +0000 (00:01 +0000)]
Explain why LLVM is emitting a DW_AT_containing_type inside of a class.

llvm-svn: 224555

9 years ago[cmake] Unbreak LLVM-Config.cmake / llvm_expand_dependencies.
Peter Zotov [Thu, 18 Dec 2014 23:56:52 +0000 (23:56 +0000)]
[cmake] Unbreak LLVM-Config.cmake / llvm_expand_dependencies.

The algorithm for sorting libraries in topological order, as
previously implemented, had a few issues:
  * It didn't make any sense.
  * It didn't actually sort libraries in topological order.
  * It hung on some inputs, e.g. "LLVMipo".

This commit replaces the old algorithm with a straightforward port
from llvm-config.cpp.

llvm-svn: 224554

9 years agoConstantFold: Shifting undef by zero results in undef
David Majnemer [Thu, 18 Dec 2014 23:54:43 +0000 (23:54 +0000)]
ConstantFold: Shifting undef by zero results in undef

llvm-svn: 224553

9 years agoReverting 224550, was not ready for commit.
Colin LeMahieu [Thu, 18 Dec 2014 23:36:15 +0000 (23:36 +0000)]
Reverting 224550, was not ready for commit.

llvm-svn: 224552

9 years agoRemove an extra ';' on line 1120 include/llvm/Support/MachO.h .
Kevin Enderby [Thu, 18 Dec 2014 23:34:16 +0000 (23:34 +0000)]
Remove an extra ';' on line 1120 include/llvm/Support/MachO.h .

Caught by Mike Edwards!

llvm-svn: 224551

9 years ago[Hexagon] Adding loop0/1 sp0/1/2loop0 instructions.
Colin LeMahieu [Thu, 18 Dec 2014 23:27:51 +0000 (23:27 +0000)]
[Hexagon] Adding loop0/1 sp0/1/2loop0 instructions.

llvm-svn: 224550

9 years ago[c Sema]. Patch fixes pointer-bool-conversion warning on C code
Fariborz Jahanian [Thu, 18 Dec 2014 23:14:51 +0000 (23:14 +0000)]
[c Sema]. Patch fixes pointer-bool-conversion warning on C code
when source range is incorrect causing the warning to be
issued when it should not because expression is in a macro.
rdar://19256338

llvm-svn: 224549

9 years agoAdd printing the LC_SUB_UMBRELLA load command with llvm-objdump’s -private-headers.
Kevin Enderby [Thu, 18 Dec 2014 23:13:26 +0000 (23:13 +0000)]
Add printing the LC_SUB_UMBRELLA load command with llvm-objdump’s -private-headers.

llvm-svn: 224548

9 years agoInstead of explicitely comparing both lowercase and uppercase variants.
Roman Divacky [Thu, 18 Dec 2014 23:12:34 +0000 (23:12 +0000)]
Instead of explicitely comparing both lowercase and uppercase variants.
.lower() the Name and compare only the lowecase. Removing 81 compares/lines of
code. This changes the accepted string to be mixed lower/upper case but it
should be ok.

Discussed with Jim Grosbach.

llvm-svn: 224547

9 years agoRevert "Change -save-temps to emit unoptimized bitcode files."
Reid Kleckner [Thu, 18 Dec 2014 23:07:04 +0000 (23:07 +0000)]
Revert "Change -save-temps to emit unoptimized bitcode files."

This reverts commit r224503.

It broke compilation of fortran through the Clang driver. Previously
`clang -c t.f` would invoke `gcc t.f` and `clang -cc1as`, but now it
tries to call `clang -cc1 t.f` which fails for obvious reasons.

llvm-svn: 224546

9 years ago[CMake] Add check-asan-dynamic command to external compiler-rt setup.
Alexey Samsonov [Thu, 18 Dec 2014 21:40:39 +0000 (21:40 +0000)]
[CMake] Add check-asan-dynamic command to external compiler-rt setup.

llvm-svn: 224545

9 years ago[macho] -rpath support
Jean-Daniel Dupas [Thu, 18 Dec 2014 21:33:38 +0000 (21:33 +0000)]
[macho] -rpath support

Summary:
Work on adding -rpath support to the mach-o linker.
This patch is based on the ld64 behavior for the command line option validation.

It includes a basic test to check that the LC_RPATH load commands are properly generated when that option is used.

It also add LC_RPATH support to the binary reader, but I don't know how to test it though.

Reviewers: kledzik

Subscribers: llvm-commits

Projects: #lld

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

llvm-svn: 224544

9 years agoAlways use python-based SWIG generation script for CMake.
Zachary Turner [Thu, 18 Dec 2014 21:25:53 +0000 (21:25 +0000)]
Always use python-based SWIG generation script for CMake.

As a first step in addressing Bug #21921 this patch prefers
the python-based SWIG generation by default rather than the
shell-based SWIG generation any time python is enabled
(e.g. LLDB_DISABLE_PYTHON is 0).

Additionally, this patch changes the default value of
LLDB_DISABLE_PYTHON from 1 to 0 on Windows.

Anyone not using the CMake build is unaffected by this patch.

llvm-svn: 224543

9 years agofix formatting; NFC
Sanjay Patel [Thu, 18 Dec 2014 21:11:09 +0000 (21:11 +0000)]
fix formatting; NFC

llvm-svn: 224542

9 years agoHave llvm-c-test only use libLLVM if libLLVM has all the right components.
Chris Bieneman [Thu, 18 Dec 2014 21:03:49 +0000 (21:03 +0000)]
Have llvm-c-test only use libLLVM if libLLVM has all the right components.

Summary: We should only have llvm-c-test use libLLVM if the library is built with the default set of components or if LLVM_DYLIB_COMPONENTS includes all the LLVM_LINK_COMPONENTS required for llvm-c-test. Making libLLVM always used causes build failures if libLLVM doesn't include all

Reviewers: chapuni, ributzka

Reviewed By: ributzka

Subscribers: ributzka, llvm-commits

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

llvm-svn: 224541

9 years agoDisplay local kernel version only when non-remote in PlatformLinux.
Stephane Sezer [Thu, 18 Dec 2014 20:24:32 +0000 (20:24 +0000)]
Display local kernel version only when non-remote in PlatformLinux.

Summary:
This is part of the Linux remote platform work. Displaying the local
kernel information when remote debugging doesn't make sense, so we
should verify if we are in host mode before doing so.

Test Plan:
Connect to a remote linux platform mode daemon with `platform select
remote-linux` followed by `platform connect ...`, and look at the output
of `platform status`.

Reviewers: tfiala, clayborg, vharron, compnerd

Subscribers: lldb-commits

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

llvm-svn: 224540

9 years ago[NFC] Removing extra semicolon.
Colin LeMahieu [Thu, 18 Dec 2014 20:15:32 +0000 (20:15 +0000)]
[NFC] Removing extra semicolon.

llvm-svn: 224539

9 years agoLiveIntervalAnalysis: Cleanup computeDeadValues
Matthias Braun [Thu, 18 Dec 2014 19:58:52 +0000 (19:58 +0000)]
LiveIntervalAnalysis: Cleanup computeDeadValues

- This also fixes a bug introduced in r223880 where values were not
  correctly marked as Dead anymore.
- Cleanup computeDeadValues(): split up SubRange code variant, simplify
  arguments.

llvm-svn: 224538

9 years agoWe don't really handle printing embedded NULs in strings, but if we were to, we would...
Enrico Granata [Thu, 18 Dec 2014 19:43:29 +0000 (19:43 +0000)]
We don't really handle printing embedded NULs in strings, but if we were to, we would need to have this logic inside the StringPrinter. So, add it.. For, you know, one day in the future where we might want to handle embedded NULs in strings...

llvm-svn: 224537