platform/upstream/llvm.git
6 years agoAdd vector add/sub/mul/div by scalar tests (PR27085)
Simon Pilgrim [Sat, 10 Feb 2018 17:55:23 +0000 (17:55 +0000)]
Add vector add/sub/mul/div by scalar tests (PR27085)

Ensure the scalar is correctly splatted to all lanes

llvm-svn: 324818

6 years ago[x86] preserve test intent by removing undef
Sanjay Patel [Sat, 10 Feb 2018 15:36:23 +0000 (15:36 +0000)]
[x86] preserve test intent by removing undef

D43141 proposes to correct undef folding in the DAG,
and this test would not survive that change.

llvm-svn: 324817

6 years ago[x86] preserve test intent by removing undef
Sanjay Patel [Sat, 10 Feb 2018 15:28:08 +0000 (15:28 +0000)]
[x86] preserve test intent by removing undef

D43141 proposes to correct undef folding in the DAG,
and this test would not survive that change.

llvm-svn: 324816

6 years agoFix Wdocumentation warning. NFCI.
Simon Pilgrim [Sat, 10 Feb 2018 15:14:00 +0000 (15:14 +0000)]
Fix Wdocumentation warning. NFCI.

llvm-svn: 324815

6 years ago[ARM] preserve test intent by removing undef
Sanjay Patel [Sat, 10 Feb 2018 15:14:00 +0000 (15:14 +0000)]
[ARM] preserve test intent by removing undef

D43141 proposes to correct undef folding in the DAG,
and this test would not survive that change.

llvm-svn: 324814

6 years agoFix Wdocumentation warnings. NFCI.
Simon Pilgrim [Sat, 10 Feb 2018 15:02:07 +0000 (15:02 +0000)]
Fix Wdocumentation warnings. NFCI.

llvm-svn: 324813

6 years ago[X86][SSE] Regenerate old sitofp v2i32 test
Simon Pilgrim [Sat, 10 Feb 2018 14:45:58 +0000 (14:45 +0000)]
[X86][SSE] Regenerate old sitofp v2i32 test

llvm-svn: 324812

6 years agoCorrect a typo in tsan_pthread_setname_np in the FreeBSD code
Kamil Rytarowski [Sat, 10 Feb 2018 14:44:12 +0000 (14:44 +0000)]
Correct a typo in tsan_pthread_setname_np in the FreeBSD code

Noted by David CARLIER.

llvm-svn: 324811

6 years agoMark the textdomain.cc test as unsupported on BSDs
Kamil Rytarowski [Sat, 10 Feb 2018 14:36:55 +0000 (14:36 +0000)]
Mark the textdomain.cc test as unsupported on BSDs

textdomain is a part of -lintl on BSDs. In GLIBC it's in libc.

We assume that -lintl will need to be rebuilt with sanitizers
in order to sanitize programs using its features.

This is a proper continuation of D41013.

The original patch has been reverted (adding -lintl).

llvm-svn: 324810

6 years agoMake a build bot happy.
Gabor Horvath [Sat, 10 Feb 2018 14:26:53 +0000 (14:26 +0000)]
Make a build bot happy.

llvm-svn: 324809

6 years ago[Templight] Template Instantiation Observer
Gabor Horvath [Sat, 10 Feb 2018 14:04:45 +0000 (14:04 +0000)]
[Templight] Template Instantiation Observer

This patch adds a base-class called TemplateInstantiationObserver which gets
notified whenever a template instantiation is entered or exited during
semantic analysis. This is a base class used to implement the template
profiling and debugging tool called
Templight (https://github.com/mikael-s-persson/templight).

The patch also makes a few more changes:

* ActiveTemplateInstantiation class is moved out of the Sema class (so it can be used with inclusion of Sema.h).
* CreateFrontendAction function in front-end utilities is given external linkage (not longer a hidden static function).
* TemplateInstObserverChain data member added to Sema class to hold the list of template-inst observers.
* Notifications to the template-inst observer are added at the key places where templates are instantiated.

Patch by: Abel Sinkovics!

Differential Revision: https://reviews.llvm.org/D5767

llvm-svn: 324808

6 years ago[XRay] Rename Buffer.Buffer to Buffer.Data
Dean Michael Berris [Sat, 10 Feb 2018 09:07:34 +0000 (09:07 +0000)]
[XRay] Rename Buffer.Buffer to Buffer.Data

Summary: some compiler (msvc) treats Buffer.Buffer as constructor and refuse to compile. NFC

Authored by comicfans44.

Reviewers: rnk, dberris

Reviewed By: dberris

Subscribers: llvm-commits

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D40346

llvm-svn: 324807

6 years ago[X86] Custom legalize (v2i1 (fp_to_uint/fp_to_sint v2f64)) without AVX512VL.
Craig Topper [Sat, 10 Feb 2018 08:39:31 +0000 (08:39 +0000)]
[X86] Custom legalize (v2i1 (fp_to_uint/fp_to_sint v2f64)) without AVX512VL.

Strangely the code was already present, just the setOperationAction wasn't being called without VLX.

llvm-svn: 324806

6 years ago[X86] Legalize zero extends from vXi1 to vXi16/vXi32/vXi64 using a sign extend and...
Craig Topper [Sat, 10 Feb 2018 08:06:52 +0000 (08:06 +0000)]
[X86] Legalize zero extends from vXi1 to vXi16/vXi32/vXi64 using a sign extend and a shift.

This avoids a constant pool load to create 1.

The int->float are showing converts to mask and back. We probably need to widen inputs to sint_to_fp/uint_to_fp before type legalization.

llvm-svn: 324805

6 years ago[X86] Teach combineExtSetcc to handle ZERO_EXTEND by widening the setcc and then...
Craig Topper [Sat, 10 Feb 2018 08:06:49 +0000 (08:06 +0000)]
[X86] Teach combineExtSetcc to handle ZERO_EXTEND by widening the setcc and then masking. A later DAG combine will convert to a shift.

This helps to avoid a constant pool load needed to zero extend from the mask.

llvm-svn: 324804

6 years ago[utils] Refactor utils/update_{,llc_}test_checks.py to share more code
Fangrui Song [Sat, 10 Feb 2018 05:01:33 +0000 (05:01 +0000)]
[utils] Refactor utils/update_{,llc_}test_checks.py to share more code

Summary:
This revision refactors 1. parser 2. CHECK line adder of utils/update_{,llc_}test_checks.py
so that thir functionality can be re-used by other utility scripts (e.g.  D42712)

Reviewers: asb, craig.topper, RKSimon, echristo

Subscribers: llvm-commits, spatel

Differential Revision: https://reviews.llvm.org/D42805

llvm-svn: 324803

6 years ago[analyzer] NFC: Assert that our fix for noreturn destructors keeps working.
Artem Dergachev [Sat, 10 Feb 2018 03:14:22 +0000 (03:14 +0000)]
[analyzer] NFC: Assert that our fix for noreturn destructors keeps working.

Massive false positives were known to be caused by continuing the analysis
after a destructor with a noreturn attribute has been executed in the program
but not modeled in the analyzer due to being missing in the CFG.

Now that work is being done on enabling the modeling of temporary constructors
and destructors in the CFG, we need to make sure that the heuristic that
suppresses these false positives keeps working when such modeling is disabled.
In particular, different code paths open up when the corresponding constructor
is being inlined during analysis.

Differential Revision: https://reviews.llvm.org/D42779

llvm-svn: 324802

6 years ago[analyzer] Fix a merge error in -analyzer-config tests.
Artem Dergachev [Sat, 10 Feb 2018 03:04:59 +0000 (03:04 +0000)]
[analyzer] Fix a merge error in -analyzer-config tests.

It was introduced when two -analyzer-config options were added almost
simultaneously in r324793 and r324668 and the option count was not
rebased correctly in the tests.

Fixes the buildbots.

llvm-svn: 324801

6 years ago[analyzer] NFC: Use CFG construction contexts instead of homemade lookahead.
Artem Dergachev [Sat, 10 Feb 2018 02:55:08 +0000 (02:55 +0000)]
[analyzer] NFC: Use CFG construction contexts instead of homemade lookahead.

The analyzer was relying on peeking the next CFG element during analysis
whenever it was trying to figure out what object is being constructed
by a given constructor. This information is now available in the current CFG
element in all cases that were previously supported by the analyzer,
so no complicated lookahead is necessary anymore.

No functional change intended - the context in the CFG should for now be
available if and only if it was previously discoverable via CFG lookahead.

Differential Revision: https://reviews.llvm.org/D42721

llvm-svn: 324800

6 years agoUse multi-key tree search for {map, set}::{count, equal_range}
Eric Fiselier [Sat, 10 Feb 2018 02:53:47 +0000 (02:53 +0000)]
Use multi-key tree search for {map, set}::{count, equal_range}

Patch from ngolovliov@gmail.com
Reviewed as: https://reviews.llvm.org/D42344

As described in llvm.org/PR30959, the current
implementation of std::{map, key}::{count, equal_range} in libcxx is
non-conforming. Quoting the C++14 standard [associative.reqmts]p3

> The phrase “equivalence of keys” means the equivalence relation imposed by
> the comparison and not the operator== on keys. That is, two keys k1 and k2 are
> considered to be equivalent if for the comparison object comp,
> comp(k1, k2) == false && comp(k2, k1) == false.

In the same section, the requirements table states the following:

> a.equal_range(k) equivalent to make_pair(a.lower_bound(k), a.upper_bound(k))
> a.count(k) returns the number of elements with key equivalent to k

The behaviour of libstdc++ seems to conform to the standard here.

llvm-svn: 324799

6 years ago[CFG] Provide construction contexts when constructors have cleanups.
Artem Dergachev [Sat, 10 Feb 2018 02:46:14 +0000 (02:46 +0000)]
[CFG] Provide construction contexts when constructors have cleanups.

Now that we make it possible to query the CFG constructor element to find
information about the construction site, possible cleanup work represented by
ExprWithCleanups should not prevent us from providing this information.

This allows us to have a correct construction context for variables initialized
"by value" via elidable copy-constructors, such as 'i' in

  iterator i = vector.begin();

Differential Revision: https://reviews.llvm.org/D42719

llvm-svn: 324798

6 years ago[DAG] Make early exit hasPredecessorHelper return true. NFCI.
Nirav Dave [Sat, 10 Feb 2018 02:41:22 +0000 (02:41 +0000)]
[DAG] Make early exit hasPredecessorHelper return true. NFCI.

All uses conservatively assume in early exit case that it will be a
predecessor. Changing default removes checking code in all uses.

llvm-svn: 324797

6 years ago[CFG] Add construction context for constructor initializers.
Artem Dergachev [Sat, 10 Feb 2018 02:18:04 +0000 (02:18 +0000)]
[CFG] Add construction context for constructor initializers.

CFG elements for constructors of fields and base classes that are being
initialized before the body of the whole-class constructor starts can now be
queried to discover that they're indeed participating in initialization of their
respective fields or bases before the whole-class constructor kicks in.

CFG construction contexts are now capable of representing CXXCtorInitializer
triggers, which aren't considered to be statements in the Clang AST.

Differential Revision: https://reviews.llvm.org/D42700

llvm-svn: 324796

6 years agoLooks like this fails when built i386 on linux bots, possible target
Jason Molenda [Sat, 10 Feb 2018 01:57:33 +0000 (01:57 +0000)]
Looks like this fails when built i386 on linux bots, possible target
arch incompat with spec in file so it's rejected and the test fails.
will look into this later, will be a test case issue not a test issue;
test case may only be valid when lldb is built for/running on an x86_64
system.

llvm-svn: 324795

6 years ago[CFG] Add construction context for simple variable declarations.
Artem Dergachev [Sat, 10 Feb 2018 01:55:23 +0000 (01:55 +0000)]
[CFG] Add construction context for simple variable declarations.

Constructors of simple variables now can be queried to discover that they're
constructing into simple variables.

Differential Revision: https://reviews.llvm.org/D42699

llvm-svn: 324794

6 years ago[analyzer] Serialize statistics to plist when serialize-stats=true is set
George Karpenkov [Sat, 10 Feb 2018 01:49:20 +0000 (01:49 +0000)]
[analyzer] Serialize statistics to plist when serialize-stats=true is set

Differential Revision: https://reviews.llvm.org/D43131

llvm-svn: 324793

6 years agoAdd test case for x86_64 architecture recognition in the
Jason Molenda [Sat, 10 Feb 2018 01:13:34 +0000 (01:13 +0000)]
Add test case for x86_64 architecture recognition in the
target.xml packet if it is included.

llvm-svn: 324792

6 years ago[X86] Teach combineInsertSubvector how to combine some k-register insert_subvectors...
Craig Topper [Sat, 10 Feb 2018 01:00:41 +0000 (01:00 +0000)]
[X86] Teach combineInsertSubvector how to combine some k-register insert_subvectors and extract_subvector sequences to remove extra zeroing.wq

llvm-svn: 324791

6 years ago[analyzer] Add missing pre-post-statement callbacks for OffsetOfExpr.
Artem Dergachev [Sat, 10 Feb 2018 00:55:49 +0000 (00:55 +0000)]
[analyzer] Add missing pre-post-statement callbacks for OffsetOfExpr.

This expression may or may not be evaluated in compile time, so tracking the
result symbol is of potential interest. However, run-time offsetof is not yet
supported by the analyzer, so for now this callback is only there to assist
future implementation.

Patch by Henry Wong!

Differential Revision: https://reviews.llvm.org/D42300

llvm-svn: 324790

6 years ago[analyzer] Add support for __builtin_constant_p.
Artem Dergachev [Sat, 10 Feb 2018 00:51:47 +0000 (00:51 +0000)]
[analyzer] Add support for __builtin_constant_p.

This builtin is evaluated in compile time. But in the analyzer we don't yet
automagically evaluate all calls that can be evaluated in compile time.

Patch by Felix Kostenzer!

Differential Revision: https://reviews.llvm.org/D42745

llvm-svn: 324789

6 years agoMake LLVM timer reprintable: that is, make more than one print action on the same...
George Karpenkov [Sat, 10 Feb 2018 00:38:21 +0000 (00:38 +0000)]
Make LLVM timer reprintable: that is, make more than one print action on the same timer feasible

Currently, each LLVM timer can be only printed once, as the act of
printing clears the timer.

Moreover, the current printing mechanism implicitly assumes that the
timer is stopped -- and prints zero otherwise.
This patch relaxes this assumption and makes printing statistics
multiple time a possibility.

Differential Revision: https://reviews.llvm.org/D43136

llvm-svn: 324788

6 years agoREQUIRES: shell a couple of tests that require the shell
David Blaikie [Sat, 10 Feb 2018 00:14:54 +0000 (00:14 +0000)]
REQUIRES: shell a couple of tests that require the shell

One test uses diff, the other tries to change the PATH which doesn't
seem to work well ('not' is no longer accessible/found after the PATH is
changed - I think $PATH isn't expanded when setting PATH).

llvm-svn: 324787

6 years ago[LV] Fix analyzeInterleaving when -pass-remarks enabled
Mircea Trofin [Sat, 10 Feb 2018 00:07:45 +0000 (00:07 +0000)]
[LV] Fix analyzeInterleaving when -pass-remarks enabled

Summary:
If -pass-remarks=loop-vectorize, atomic ops will be seen by
analyzeInterleaving(), even though canVectorizeMemory() == false. This
is because we are requesting extra analysis instead of bailing out.

In such a case, we end up with a Group in both Load- and StoreGroups,
and then we'll try to access freed memory when traversing LoadGroups after having had released the Group when  iterating over StoreGroups.

The fix is to include mayWriteToMemory() when validating that two
instructions are the same kind of memory operation.

Reviewers: mssimpso, davidxl

Reviewed By: davidxl

Subscribers: hsaito, fhahn, llvm-commits

Differential Revision: https://reviews.llvm.org/D43064

llvm-svn: 324786

6 years ago[analyzer] Introduce statistics for the total number of visited basic blocks
George Karpenkov [Fri, 9 Feb 2018 23:37:47 +0000 (23:37 +0000)]
[analyzer] Introduce statistics for the total number of visited basic blocks

Differential Revision: https://reviews.llvm.org/D43133

llvm-svn: 324785

6 years ago[Hexagon] Update uses of deprecated IRBuilder CreateMemCpy/Move calls
Daniel Neilson [Fri, 9 Feb 2018 23:33:35 +0000 (23:33 +0000)]
[Hexagon] Update uses of deprecated IRBuilder CreateMemCpy/Move calls

Summary:
This change is part of step five in the series of changes to remove alignment argument from
memcpy/memmove/memset in favour of alignment attributes. In particular, this changes the
Hexagon LoopIdiom pass to cease using the old IRBuilder createMemCpy/createMemMove
single-alignment APIs in favour of the new API that allows setting source and
destination alignments independently.

Steps:
Step 1) Remove alignment parameter and create alignment parameter attributes for
memcpy/memmove/memset. ( rL322965, rC322964, rL322963 )
Step 2) Expand the IRBuilder API to allow creation of memcpy/memmove with differing
source and dest alignments. ( rL323597 )
Step 3) Update Clang to use the new IRBuilder API. ( rC323617 )
Step 4) Update Polly to use the new IRBuilder API. ( rL323618 )
Step 5) Update LLVM passes that create memcpy/memmove calls to use the new IRBuilder API,
and those that use use MemIntrinsicInst::[get|set]Alignment() to use [get|set]DestAlignment()
and [get|set]SourceAlignment() instead. ( rL323886, rL323891, rL324148, rL324273, rL324278,
rL324384, rL324395, rL324402, rL324626, rL324642, rL324653, rL324654, rL324773, rL324774,
rL324781 )
Step 6) Remove the single-alignment IRBuilder API for memcpy/memmove, and the
MemIntrinsicInst::[get|set]Alignment() methods.

Reference
   http://lists.llvm.org/pipermail/llvm-dev/2015-August/089384.html
   http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20151109/312083.html

llvm-svn: 324784

6 years ago[llvm-objcopy] Make modifications in-place if output is not specified
Alexander Shaposhnikov [Fri, 9 Feb 2018 23:33:31 +0000 (23:33 +0000)]
[llvm-objcopy] Make modifications in-place if output is not specified

If the output file is not specified make the modifications in-place
(like binutils objcopy does). In particular, this fixes
the behavior of Clang -gsplit-dwarf (if Clang is configured to use llvm-objcopy),
previously it was creating .dwo files, but still leaving *dwo* sections in
the original binary.

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D42873

llvm-svn: 324783

6 years ago[X86] Teach lower1BitVectorShuffle to recognize shuffles that are just filling upper...
Craig Topper [Fri, 9 Feb 2018 23:32:27 +0000 (23:32 +0000)]
[X86] Teach lower1BitVectorShuffle to recognize shuffles that are just filling upper elements with zero. Replace with insert_subvector.

There's still some extra kshifts in one of the modified test cases here, but hopefully that's only a DAG combine away.

llvm-svn: 324782

6 years ago[ARMFastISel] Replace deprecated calls to MemoryIntrinsic::getAlignment() (NFCI)
Daniel Neilson [Fri, 9 Feb 2018 23:31:37 +0000 (23:31 +0000)]
[ARMFastISel] Replace deprecated calls to MemoryIntrinsic::getAlignment() (NFCI)

This change is part of step five in the series of changes to remove alignment argument from
memcpy/memmove/memset in favour of alignment attributes. In particular, this changes
ARMFastISel to cease using the old getAlignment() API of MemoryIntrinsic in favour of getting
source & dest specific alignments through the new API.

Steps:
Step 1) Remove alignment parameter and create alignment parameter attributes for
memcpy/memmove/memset. ( rL322965, rC322964, rL322963 )
Step 2) Expand the IRBuilder API to allow creation of memcpy/memmove with differing
source and dest alignments. ( rL323597 )
Step 3) Update Clang to use the new IRBuilder API. ( rC323617 )
Step 4) Update Polly to use the new IRBuilder API. ( rL323618 )
Step 5) Update LLVM passes that create memcpy/memmove calls to use the new IRBuilder API,
and those that use use MemIntrinsicInst::[get|set]Alignment() to use [get|set]DestAlignment()
and [get|set]SourceAlignment() instead. ( rL323886, rL323891, rL324148, rL324273, rL324278,
rL324384, rL324395, rL324402, rL324626, rL324642, rL324653, rL324654, rL324773, rL324774 )
Step 6) Remove the single-alignment IRBuilder API for memcpy/memmove, and the
MemIntrinsicInst::[get|set]Alignment() methods.

Reference

http://lists.llvm.org/pipermail/llvm-dev/2015-August/089384.html
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20151109/312083.html

llvm-svn: 324781

6 years ago[NFC] Extract method to SourceManager for traversing the macro "stack"
George Karpenkov [Fri, 9 Feb 2018 23:30:07 +0000 (23:30 +0000)]
[NFC] Extract method to SourceManager for traversing the macro "stack"

The code for going up the macro arg expansion is duplicated in many
places (and we need it for the analyzer as well, so I did not want to
duplicate it two more times).

This patch is an NFC, so the semantics should remain the same.

Differential Revision: https://reviews.llvm.org/D42458

llvm-svn: 324780

6 years agoCMake: Allow specifying arbitrary CCACHE parameters
Justin Bogner [Fri, 9 Feb 2018 23:25:23 +0000 (23:25 +0000)]
CMake: Allow specifying arbitrary CCACHE parameters

Introduces the LLVM_CCACHE_PARAMS cmake variable, which can be used to
pass arbitrary parameters to ccache invocations.

llvm-svn: 324779

6 years ago[WebAssembly] Add mechanisms for specifying an explicit import module name.
Dan Gohman [Fri, 9 Feb 2018 23:13:22 +0000 (23:13 +0000)]
[WebAssembly] Add mechanisms for specifying an explicit import module name.

This adds a wasm-import-module function attribute and a .import_module
assembler directive, for specifying module import names for WebAssembly.
Currently these may only be used for function symbols; global variables
may be considered in the future.

WebAssembly has a two-level namespace scheme for symbols, and it's
normally the linker's job to assign the module name, which is the
first-level name. The attributes here allow users to specify their
own module names explicitly, which is useful for tools generating
bindings to modules defined in other languages.

This feature is not fully usable yet. It will evolve along with the
ongoing symbol table and lld changes.

Differential Revision: https://reviews.llvm.org/D42520

llvm-svn: 324778

6 years ago[WebAssembly] Add an LLVM_FALLTHROUGH to address a warning. NFC.
Dan Gohman [Fri, 9 Feb 2018 22:59:01 +0000 (22:59 +0000)]
[WebAssembly] Add an LLVM_FALLTHROUGH to address a warning. NFC.

llvm-svn: 324777

6 years ago[CodeGen] Use the zero initializer instead of storing an all zero representation.
Matt Davis [Fri, 9 Feb 2018 22:10:09 +0000 (22:10 +0000)]
[CodeGen] Use the zero initializer instead of storing an all zero representation.

Summary:
This change avoids the overhead of storing, and later crawling,
an initializer list of all zeros for arrays. When LLVM
visits this (llvm/IR/Constants.cpp) ConstantArray::getImpl()
it will scan the list looking for an array of all zero.

We can avoid the store, and short-cut the scan, by detecting
all zeros when clang builds-up the initialization representation.

This was brought to my attention when investigating PR36030

Reviewers: majnemer, rjmccall

Reviewed By: rjmccall

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D42549

llvm-svn: 324776

6 years agoMake LLDB's clang module cache path customizable
Adrian Prantl [Fri, 9 Feb 2018 22:08:26 +0000 (22:08 +0000)]
Make LLDB's clang module cache path customizable

This patch makes LLDB's clang module cache path customizable via
settings set target.clang-modules-cache-path <path> and uses it in the
LLDB testsuite to reuse the same location inside the build directory
for LLDB and clang.

Differential Revision: https://reviews.llvm.org/D43099

llvm-svn: 324775

6 years ago[AMDGPUPromoteAlloca] Replace deprecated memory intrinsic APIs (NFCI)
Daniel Neilson [Fri, 9 Feb 2018 21:56:15 +0000 (21:56 +0000)]
[AMDGPUPromoteAlloca] Replace deprecated memory intrinsic APIs (NFCI)

Summary:
This change is part of step five in the series of changes to remove alignment argument from
memcpy/memmove/memset in favour of alignment attributes. In particular, this changes the
AMDGPUPromoteAlloca pass to cease using:
1) The old getAlignment() API of MemoryIntrinsic in favour of getting source & dest specific
alignments through the new API.
2) The old IRBuilder createMemCpy/createMemMove single-alignment APIs in favour of the new
API that allows setting source and destination alignments independently.

Steps:
Step 1) Remove alignment parameter and create alignment parameter attributes for
memcpy/memmove/memset. ( rL322965, rC322964, rL322963 )
Step 2) Expand the IRBuilder API to allow creation of memcpy/memmove with differing
source and dest alignments. ( rL323597 )
Step 3) Update Clang to use the new IRBuilder API. ( rC323617 )
Step 4) Update Polly to use the new IRBuilder API. ( rL323618 )
Step 5) Update LLVM passes that create memcpy/memmove calls to use the new IRBuilder API,
and those that use use MemIntrinsicInst::[get|set]Alignment() to use [get|set]DestAlignment()
and [get|set]SourceAlignment() instead. ( rL323886, r323891, rL324148, rL324273, rL324278,
rL324384, rL324395, rL324402, rL324626, rL324642, rL324653, rL324654, rL324773 )
Step 6) Remove the single-alignment IRBuilder API for memcpy/memmove, and the
MemIntrinsicInst::[get|set]Alignment() methods.

Reference
   http://lists.llvm.org/pipermail/llvm-dev/2015-August/089384.html
   http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20151109/312083.html

llvm-svn: 324774

6 years ago[AArch64FastISel] Replace deprecated calls to MemoryIntrinsic::getAlignment() (NFCI)
Daniel Neilson [Fri, 9 Feb 2018 21:49:29 +0000 (21:49 +0000)]
[AArch64FastISel] Replace deprecated calls to MemoryIntrinsic::getAlignment() (NFCI)

Summary:
This change is part of step five in the series of changes to remove alignment argument from
memcpy/memmove/memset in favour of alignment attributes. In particular, this changes
AArch64FastISel to cease using the old getAlignment() API of MemoryIntrinsic in favour of getting
source & dest specific alignments through the new API.

Steps:
Step 1) Remove alignment parameter and create alignment parameter attributes for
memcpy/memmove/memset. ( rL322965, rC322964, rL322963 )
Step 2) Expand the IRBuilder API to allow creation of memcpy/memmove with differing
source and dest alignments. ( rL323597 )
Step 3) Update Clang to use the new IRBuilder API. ( rC323617 )
Step 4) Update Polly to use the new IRBuilder API. ( rL323618 )
Step 5) Update LLVM passes that create memcpy/memmove calls to use the new IRBuilder API,
and those that use use MemIntrinsicInst::[get|set]Alignment() to use [get|set]DestAlignment()
and [get|set]SourceAlignment() instead. ( rL323886, r323891, rL324148, rL324273, rL324278,
rL324384, rL324395, rL324402, rL324626, rL324642, rL324653, rL324654 )
Step 6) Remove the single-alignment IRBuilder API for memcpy/memmove, and the
MemIntrinsicInst::[get|set]Alignment() methods.

Reference
   http://lists.llvm.org/pipermail/llvm-dev/2015-August/089384.html
   http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20151109/312083.html

llvm-svn: 324773

6 years ago[X86][MC] Fix assembling rip-relative addressing + immediate displacements
Francis Visoiu Mistrih [Fri, 9 Feb 2018 21:47:07 +0000 (21:47 +0000)]
[X86][MC] Fix assembling rip-relative addressing + immediate displacements

In the rare case where the input contains rip-relative addressing with
immediate displacements, *and* the instruction ends with an immediate,
we encode the instruction in the wrong way:

movl $12345678, 0x400(%rdi) // all good, no rip-relative addr
movl %eax, 0x400(%rip) // all good, no immediate at the end of the instruction
movl $12345678, 0x400(%rip) // fails, encodes address as 0x3fc(%rip)

Offset is a label:

movl $12345678, foo(%rip)

we want to account for the size of the immediate (in this case,
$12345678, 4 bytes).

Offset is an immediate:

movl $12345678, 0x400(%rip)

we should not account for the size of the immediate, assuming the
immediate offset is what the user wanted.

Differential Revision: https://reviews.llvm.org/D43050

llvm-svn: 324772

6 years ago[CodeGen] Add lifetime markers to the list of meta-instructions.
Matt Davis [Fri, 9 Feb 2018 21:34:34 +0000 (21:34 +0000)]
[CodeGen] Add lifetime markers to the list of meta-instructions.

Summary:
Since the lifetime markers are metadata instructions, they should probably be treated as such by the isMetaInstruction predicate.
There was no issue that provoked this change, I just ran across it while investigating another issue.

Reviewers: aprantl, MatzeB

Reviewed By: aprantl

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D43111

llvm-svn: 324771

6 years ago[WebAssebmly] Report undefined symbols correctly in objdump
Sam Clegg [Fri, 9 Feb 2018 20:21:50 +0000 (20:21 +0000)]
[WebAssebmly] Report undefined symbols correctly in objdump

Peviously we were reporting undefined symbol as being defined
by the IMPORT sections.

This change reports undefined symbols in the same that other
formats do, and also removes the need to store the section
with each symbol (since it can be derived from the symbol
type).

Differential Revision: https://reviews.llvm.org/D43101

llvm-svn: 324770

6 years ago[CodeGen] Print predecessors as MIR comments in -debug output
Francis Visoiu Mistrih [Fri, 9 Feb 2018 19:46:02 +0000 (19:46 +0000)]
[CodeGen] Print predecessors as MIR comments in -debug output

Make -debug MBB headers more copy-pastable into mir files.

llvm-svn: 324769

6 years ago[lldb-mi] This test now passes consistently, unXFAIL it.
Davide Italiano [Fri, 9 Feb 2018 19:35:07 +0000 (19:35 +0000)]
[lldb-mi] This test now passes consistently, unXFAIL it.

llvm-svn: 324768

6 years agollvm-objdump when printing the Objective-C meta data also prints the Swift ABI
Kevin Enderby [Fri, 9 Feb 2018 19:31:27 +0000 (19:31 +0000)]
llvm-objdump when printing the Objective-C meta data also prints the Swift ABI
from the value stored in swift_version bits in the flags field in the
objc_image_info struct.  ABI version 3 thru 6 were previously added but this
code was not updated to print the Swift version.

rdar://35624067

llvm-svn: 324767

6 years ago[AArch64] Adjust the cost model for Exynos M3
Evandro Menezes [Fri, 9 Feb 2018 19:26:11 +0000 (19:26 +0000)]
[AArch64] Adjust the cost model for Exynos M3

Fix the modeling of transfers between a generic register and a partial ASIMD
one.

llvm-svn: 324766

6 years agoRemove "CHECK: entry" in test case.
Akira Hatanaka [Fri, 9 Feb 2018 19:25:31 +0000 (19:25 +0000)]
Remove "CHECK: entry" in test case.

rdar://problem/37397814

llvm-svn: 324765

6 years ago[Utils] Salvage debug info from dead 'or' instructions
Vedant Kumar [Fri, 9 Feb 2018 19:19:55 +0000 (19:19 +0000)]
[Utils] Salvage debug info from dead 'or' instructions

Extend salvageDebugInfo to preserve the debug info from a dead 'or'
with a constant.

Patch by Ismail Badawi!

Differential Revision: https://reviews.llvm.org/D43129

llvm-svn: 324764

6 years ago[Hexagon] Add code to select QTRUE and QFALSE
Krzysztof Parzyszek [Fri, 9 Feb 2018 19:10:46 +0000 (19:10 +0000)]
[Hexagon] Add code to select QTRUE and QFALSE

Fixes http://llvm.org/PR36320.

llvm-svn: 324763

6 years ago[analyzer] [tests] Fixing an error after non-atomic cherry-pick
George Karpenkov [Fri, 9 Feb 2018 18:48:31 +0000 (18:48 +0000)]
[analyzer] [tests] Fixing an error after non-atomic cherry-pick

llvm-svn: 324762

6 years agoIntroduce an API for LLDB to compute the default module cache path
Adrian Prantl [Fri, 9 Feb 2018 18:43:10 +0000 (18:43 +0000)]
Introduce an API for LLDB to compute the default module cache path

LLDB creates Clang modules and had an incomplete copy of the clang
Driver code that compute the -fmodule-cache-path. This patch makes the
clang driver code accessible to LLDB.

Differential Revision: https://reviews.llvm.org/D43128

llvm-svn: 324761

6 years agoDeclare PostDominatorTree as a class
Matt Arsenault [Fri, 9 Feb 2018 18:41:42 +0000 (18:41 +0000)]
Declare PostDominatorTree as a class

Before it was declared at a struct, which differs from
DominatorTree. Make it a class so both can be declared
the same way without hitting the warning about mismatched
struct vs. class declarations.

llvm-svn: 324760

6 years ago[analyzer] [tests] [NFC] Remove a fragile tightly-coupled component emulating parser...
George Karpenkov [Fri, 9 Feb 2018 18:39:47 +0000 (18:39 +0000)]
[analyzer] [tests] [NFC] Remove a fragile tightly-coupled component emulating parser output

...when we can just use the real parser instead.

Differential Revision: https://reviews.llvm.org/D43098

llvm-svn: 324759

6 years ago[tablegen] Fixed few !foreach evaluation issues.
Artem Belevich [Fri, 9 Feb 2018 18:37:55 +0000 (18:37 +0000)]
[tablegen] Fixed few !foreach evaluation issues.

* !foreach on lists didn't evaluate operands of the RHS operator.
  This made nested operators silently fail.
* A typo in the code could result in a wrong value substituted
  for an operation which produced a false '!foreach requires an operator' error.
* Keep recursion over the DAG within ForeachHelper. This simplifies
  things a bit as we no longer need to pass the Type around in order
  to prevent recursion.

Differential Revision: https://reviews.llvm.org/D43083

llvm-svn: 324758

6 years ago[ThinLTO] Teach ThinLTO about auto hide symbols
Steven Wu [Fri, 9 Feb 2018 18:34:08 +0000 (18:34 +0000)]
[ThinLTO] Teach ThinLTO about auto hide symbols

Summary:
For symbols that has linkonce_odr linkage and unnamed_addr, it can be
auto hide by linker to avoid weak external symbols. Teach ThinLTO to
perform auto hide so it can safely promote linkonce_odr to weak symbols
without breaking this nice property.

Reviewers: tejohnson, mehdi_amini

Reviewed By: tejohnson

Subscribers: inglorion, eraman, rnk, pcc, llvm-commits

Differential Revision: https://reviews.llvm.org/D43130

llvm-svn: 324757

6 years agoMake a lambda a static function to make the ICF main function shorter.
Rui Ueyama [Fri, 9 Feb 2018 18:00:46 +0000 (18:00 +0000)]
Make a lambda a static function to make the ICF main function shorter.

llvm-svn: 324756

6 years agoDo not print out removed ICF sections for -verbose.
Rui Ueyama [Fri, 9 Feb 2018 17:55:09 +0000 (17:55 +0000)]
Do not print out removed ICF sections for -verbose.

GNU gold doesn't print out ICF sections for -verbose. It only shows
them for -print-icf-sections. We printed out them for -verbose because
we didn't have -print-icf-sections. Now that we have the option, there's
no reason to print out for -verbose.

Differential Revision: https://reviews.llvm.org/D43100

llvm-svn: 324755

6 years ago[x86] remove duplicate undef tests; NFC
Sanjay Patel [Fri, 9 Feb 2018 17:46:38 +0000 (17:46 +0000)]
[x86] remove duplicate undef tests; NFC

These are incomplete and were made redundant with the consolidation in:
https://reviews.llvm.org/rL324678

llvm-svn: 324754

6 years ago[InstCombine] Add vector xor tests
Simon Pilgrim [Fri, 9 Feb 2018 17:45:45 +0000 (17:45 +0000)]
[InstCombine] Add vector xor tests

This doesn't cover everything in InstCombiner.visitXor yet, but increases coverage for a lot of tests

llvm-svn: 324753

6 years agoMake --export-dynamic-symbol to pull out object files from archives.
Rui Ueyama [Fri, 9 Feb 2018 17:39:06 +0000 (17:39 +0000)]
Make --export-dynamic-symbol to pull out object files from archives.

This is for compatiblity with GNU gold. GNU gold tries to resolve
symbols specified by --export-dynamic-symbol. So, if a symbol specified
by --export-dynamic-symbol is in an archive file, lld's result is
currently different from gold's.

Interestingly, that behavior is different for --dynamic-list.
I added a new test to ensure that.

Differential Revision: https://reviews.llvm.org/D43103

llvm-svn: 324752

6 years agoAMDGPU: Remove tied operand from si_else
Matt Arsenault [Fri, 9 Feb 2018 17:18:38 +0000 (17:18 +0000)]
AMDGPU: Remove tied operand from si_else

llvm-svn: 324751

6 years agoEmit smaller exception tables for non-SJLJ mode.
Rafael Espindola [Fri, 9 Feb 2018 17:13:37 +0000 (17:13 +0000)]
Emit smaller exception tables for non-SJLJ mode.

* Use uleb128 for code offsets in the LSDA call site table.
* Omit the TTBase offset if the type table is empty.

This change can reduce the size of the DWARF/Itanium LSDA by about half.

Patch by Ryan Prichard!

llvm-svn: 324750

6 years agoUse assembler expressions to lay out the EH LSDA.
Rafael Espindola [Fri, 9 Feb 2018 17:00:25 +0000 (17:00 +0000)]
Use assembler expressions to lay out the EH LSDA.

Rely on the assembler to finalize the layout of the DWARF/Itanium
exception-handling LSDA. Rather than calculate the exact size of each
thing in the LSDA, use assembler directives:

    To emit the offset to the TTBase label:

.uleb128 .Lttbase0-.Lttbaseref0
.Lttbaseref0:

    To emit the size of the call site table:

.uleb128 .Lcst_end0-.Lcst_begin0
.Lcst_begin0:
... call site table entries ...
.Lcst_end0:

    To align the type info table:

... action table ...
.balign 4
.long _ZTIi
.long _ZTIl
.Lttbase0:

Using assembler directives simplifies the compiler and allows switching
the encoding of offsets in the call site table from udata4 to uleb128 for
a large code size savings. (This commit does not change the encoding.)

The combination of the uleb128 followed by a balign creates an unfortunate
dependency cycle that the assembler must sometimes resolve either by
padding an LEB or by inserting zero padding before the type table. See
PR35809 or GNU as bug 4029.

Patch by Ryan Prichard!

llvm-svn: 324749

6 years agoAMDGPU: Update for datalayout change
Matt Arsenault [Fri, 9 Feb 2018 16:58:41 +0000 (16:58 +0000)]
AMDGPU: Update for datalayout change

llvm-svn: 324748

6 years agoReapply "AMDGPU: Add 32-bit constant address space"
Matt Arsenault [Fri, 9 Feb 2018 16:57:57 +0000 (16:57 +0000)]
Reapply "AMDGPU: Add 32-bit constant address space"

This reverts r324494 and reapplies r324487.

llvm-svn: 324747

6 years agoAMDGPU: Fix layering issue
Matt Arsenault [Fri, 9 Feb 2018 16:57:48 +0000 (16:57 +0000)]
AMDGPU: Fix layering issue

Move utility function that depends on codegen.
Fixes build with r324487 reapplied.

llvm-svn: 324746

6 years ago[AArch64] Refactor stand alone methods (NFC)
Evandro Menezes [Fri, 9 Feb 2018 16:14:41 +0000 (16:14 +0000)]
[AArch64] Refactor stand alone methods (NFC)

Make stand alone methods in AArch64InstrInfo static.

llvm-svn: 324745

6 years agoRefactor how we decide which sections to sort.
Rafael Espindola [Fri, 9 Feb 2018 16:09:22 +0000 (16:09 +0000)]
Refactor how we decide which sections to sort.

This is a bit more verbose, but it has a few advantages.

The logic on what to do with special sections like .init_array is not
duplicated. Before we would need keep isKnownNonreorderableSection in
sync.

I think with this the call graph based sorting can be implemented by
"just" returning a new order from buildSectionOrder.

llvm-svn: 324744

6 years ago[Testsuite] Remove leak tests, it's not useful anymore.
Davide Italiano [Fri, 9 Feb 2018 16:06:39 +0000 (16:06 +0000)]
[Testsuite] Remove leak tests, it's not useful anymore.

This only worked on MacOS, which now ships a newer version of
python without this bug. As such, we don't leak the fd, and
this test is not needed anymore (as it also hardcoded the python
version in the check).

llvm-svn: 324743

6 years ago[clang-move] Don't dump macro symbols.
Haojian Wu [Fri, 9 Feb 2018 15:57:30 +0000 (15:57 +0000)]
[clang-move] Don't dump macro symbols.

Reviewers: ioeric

Subscribers: klimek, cfe-commits

Differential Revision: https://reviews.llvm.org/D43075

llvm-svn: 324742

6 years agoclang-format: keep ObjC colon alignment with short object name
Francois Ferrand [Fri, 9 Feb 2018 15:41:56 +0000 (15:41 +0000)]
clang-format: keep ObjC colon alignment with short object name

Summary:
When the target object expression is short and the first selector name
is long, clang-format used to break the colon alignment:

  [I performSelectorOnMainThread:@selector(loadAccessories)
                       withObject:nil
                    waitUntilDone:false];

This happens because the colon is placed at `ContinuationIndent +
LongestObjCSelectorName`, so that any selector can be wrapped. This is
however not needed in case the longest selector is the firstone, and
not wrapped.

To overcome this, this patch does not include the first selector in
`LongestObjCSelectorName` computation (in TokenAnnotator), and lets
`ContinuationIndenter` decide how to account for the first selector
when wrapping. (Note this was already partly the case, see line 521
of ContinuationIndenter.cpp)

This way, the code gets properly aligned whenever possible without
breaking the continuation indent.

  [I performSelectorOnMainThread:@selector(loadAccessories)
                      withObject:nil
                   waitUntilDone:false];
  [I // force break
      performSelectorOnMainThread:@selector(loadAccessories)
                       withObject:nil
                    waitUntilDone:false];
  [I perform:@selector(loadAccessories)
      withSelectorOnMainThread:true
                 waitUntilDone:false];

Reviewers: krasimir, djasper, klimek

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D43121

llvm-svn: 324741

6 years agoPre-emptively fix test case for windows path separators
David Blaikie [Fri, 9 Feb 2018 15:39:04 +0000 (15:39 +0000)]
Pre-emptively fix test case for windows path separators

llvm-svn: 324740

6 years agoAdd IMPLEMENTATION NOTES describing lld's .a handling in the man page
Ed Maste [Fri, 9 Feb 2018 15:36:13 +0000 (15:36 +0000)]
Add IMPLEMENTATION NOTES describing lld's .a handling in the man page

This content is based on the description in NewLLD.rst.

Differential Revision: https://reviews.llvm.org/D43072

llvm-svn: 324739

6 years agoRemove some unnecessary REQUIRES: shell from a couple of llvm-symbolizer tests
David Blaikie [Fri, 9 Feb 2018 15:33:39 +0000 (15:33 +0000)]
Remove some unnecessary REQUIRES: shell from a couple of llvm-symbolizer tests

llvm-svn: 324738

6 years ago[Hexagon] Express calling conventions via .td file instead of hand-coding
Krzysztof Parzyszek [Fri, 9 Feb 2018 15:30:02 +0000 (15:30 +0000)]
[Hexagon] Express calling conventions via .td file instead of hand-coding

Additionally, simplify the rest of the argument/parameter lowering code.

llvm-svn: 324737

6 years ago[clangd] Fix crash in tests in debug mode.
Ilya Biryukov [Fri, 9 Feb 2018 15:11:07 +0000 (15:11 +0000)]
[clangd] Fix crash in tests in debug mode.

Caused by the lack of checking of an Expected value in the previous
commit.

llvm-svn: 324736

6 years ago[clangd] Collect definitions when indexing.
Sam McCall [Fri, 9 Feb 2018 14:42:01 +0000 (14:42 +0000)]
[clangd] Collect definitions when indexing.

Within a TU:
 - as now, collect a declaration from the first occurrence of a symbol
   (taking clang's canonical declaration)
 - when we first see a definition occurrence, copy the symbol and add it
Across TUs/sources:
 - mergeSymbol in Merge.h is responsible for combining matching Symbols.
   This covers dynamic/static merges and cross-TU merges in the static index.
 - it prefers declarations from Symbols that have a definition.
 - GlobalSymbolBuilderMain is modified to use mergeSymbol as a reduce step.
Random cleanups (can be pulled out):
 - SymbolFromYAML -> SymbolsFromYAML, new singular SymbolFromYAML added
 - avoid uninit'd SymbolLocations. Add an idiomatic way to check "absent".
 - CanonicalDeclaration (as well as Definition) are mapped as optional in YAML.
 - added operator<< for Symbol & SymbolLocation, for debugging

Reviewers: ioeric, hokein

Subscribers: klimek, ilya-biryukov, jkorous-apple, cfe-commits

Differential Revision: https://reviews.llvm.org/D42942

llvm-svn: 324735

6 years ago[DebugInfo] Don't insert DEBUG_VALUE after terminators
Stefan Maksimovic [Fri, 9 Feb 2018 14:03:26 +0000 (14:03 +0000)]
[DebugInfo] Don't insert DEBUG_VALUE after terminators

r314974 introduced insertion of DEBUG_VALUEs after
each redefinition of debug value register in the slot index range.

In case the instruction redefining the debug value register
was a terminator, machine verifier would complain since it
enforces the rule of no non-terminator instructions
following the first terminator.

Differential Revision: https://reviews.llvm.org/D42801

llvm-svn: 324734

6 years ago[SelectionDAG] Provide adequate register class for RegisterSDNode
Stefan Maksimovic [Fri, 9 Feb 2018 13:55:25 +0000 (13:55 +0000)]
[SelectionDAG] Provide adequate register class for RegisterSDNode

When adding operands to machine instructions in case of
RegisterSDNodes, generate a COPY node in case the register class
does not match the one in the instruction definition.

Differental Revision: https://reviews.llvm.org/D35561

llvm-svn: 324733

6 years ago[clangd] Fix crash when CompilerInvocation can't be created.
Ilya Biryukov [Fri, 9 Feb 2018 13:51:57 +0000 (13:51 +0000)]
[clangd] Fix crash when CompilerInvocation can't be created.

Summary:
This can happen if the CompileCommand provided by compilation database
is malformed.

Reviewers: hokein, ioeric, sammccall

Reviewed By: sammccall

Subscribers: klimek, jkorous-apple, cfe-commits

Differential Revision: https://reviews.llvm.org/D43122

llvm-svn: 324732

6 years ago[ELF] Print the .type assembly directive correctly for STT_NOTYPE
Oliver Stannard [Fri, 9 Feb 2018 13:34:39 +0000 (13:34 +0000)]
[ELF] Print the .type assembly directive correctly for STT_NOTYPE

The llvm assembly parser and gas both accept "@notype" in the .type
assembly directive, but we were printing it as "@no_type", which isn't
accepted by either assembler.

Differential revision: https://reviews.llvm.org/D43116

llvm-svn: 324731

6 years agoFix some warnings in SymbolFilePDB.cpp
Pavel Labath [Fri, 9 Feb 2018 11:37:01 +0000 (11:37 +0000)]
Fix some warnings in SymbolFilePDB.cpp

llvm-svn: 324730

6 years ago[mips] UnXFAIL gprestore.ll test.
Simon Dardis [Fri, 9 Feb 2018 10:46:16 +0000 (10:46 +0000)]
[mips] UnXFAIL gprestore.ll test.

Repurpose this previously XFAIL'd test to check that jalr uses $25
as per ABI requirements for PIC code.

llvm-svn: 324729

6 years ago[InstCombine] Add constant vector support for X udiv C, where C >= signbit
Simon Pilgrim [Fri, 9 Feb 2018 10:43:59 +0000 (10:43 +0000)]
[InstCombine] Add constant vector support for X udiv C, where C >= signbit

llvm-svn: 324728

6 years ago[TargetSchedule] Fix r324582.
Clement Courbet [Fri, 9 Feb 2018 10:28:46 +0000 (10:28 +0000)]
[TargetSchedule] Fix r324582.

Increment was using the wrong NumUnits (the one from the ProcResGroup
and not the subunit).

llvm-svn: 324727

6 years ago[clangd] Remove threading-related code from ClangdUnit.h
Ilya Biryukov [Fri, 9 Feb 2018 10:17:23 +0000 (10:17 +0000)]
[clangd] Remove threading-related code from ClangdUnit.h

Reviewers: sammccall, hokein, ioeric

Reviewed By: sammccall

Subscribers: klimek, jkorous-apple, cfe-commits

Differential Revision: https://reviews.llvm.org/D43065

llvm-svn: 324725

6 years ago[CodeGen] Optimize AccelTable
Pavel Labath [Fri, 9 Feb 2018 10:06:56 +0000 (10:06 +0000)]
[CodeGen] Optimize AccelTable

Summary:
The class contained arrays of two structures (DataArray and HashData).
These structures were in 1:1 correspondence, and one of them contained
pointers to the other (and *both* contained a "Name" field). By merging
these two structures into one, we can save a bit of space without
negatively impacting much of anything.

Reviewers: JDevlieghere, aprantl

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D43073

llvm-svn: 324724

6 years agollgs-test: Parse and store register info recieved from lldb-server
Pavel Labath [Fri, 9 Feb 2018 09:40:03 +0000 (09:40 +0000)]
llgs-test: Parse and store register info recieved from lldb-server

Summary:
Right now the test client is not parsing register values correctly,
which is manifesting itself in one test failing on 32-bit architectures
(pr36013). This parses the information from the qRegisterInfo packets
and stores it in the client, which will enable fixing the parsing in a
follow up commit.

I am also adding a new templated SendMessage overload, which enables one
to send a message get a parsed response in a single call.

Reviewers: eugene, davide

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D43076

llvm-svn: 324722

6 years agoFif for an issue when Clang permits assignment to vector/extvector elements in a...
Andrew V. Tischenko [Fri, 9 Feb 2018 09:30:42 +0000 (09:30 +0000)]
Fif for an issue when Clang permits assignment to vector/extvector elements in a const method.

llvm-svn: 324721

6 years ago[AArch64] Return true in enableMultipleCopyHints().
Jonas Paulsson [Fri, 9 Feb 2018 09:22:20 +0000 (09:22 +0000)]
[AArch64]  Return true in enableMultipleCopyHints().

Enable multiple COPY hints to eliminate more COPYs during register allocation.

Note that this is something all targets should do, see
https://reviews.llvm.org/D38128.

Review: Martin Storsjö
llvm-svn: 324720

6 years agoRename and move utility function getLatchPredicateForGuard. NFC.
Serguei Katkov [Fri, 9 Feb 2018 07:59:07 +0000 (07:59 +0000)]
Rename and move utility function getLatchPredicateForGuard. NFC.

Rename getLatchPredicateForGuard to more common name
getFlippedStrictnessPredicate and move it to ICmpInst class.

llvm-svn: 324717

6 years ago[WebAssebmly] Remvoe trailing semicolon. NFC.
Sam Clegg [Fri, 9 Feb 2018 07:12:29 +0000 (07:12 +0000)]
[WebAssebmly] Remvoe trailing semicolon. NFC.

llvm-svn: 324716

6 years ago[WebAssembly] Remove redundant check global output index
Sam Clegg [Fri, 9 Feb 2018 07:09:12 +0000 (07:09 +0000)]
[WebAssembly] Remove redundant check global output index

llvm-svn: 324715