platform/upstream/llvm.git
4 years ago[OPENMP50]Codegen support for scores in context selectors.
Alexey Bataev [Thu, 3 Oct 2019 20:49:48 +0000 (20:49 +0000)]
[OPENMP50]Codegen support for scores in context selectors.

If the context selector has associated score and several contexts
selectors matches current context, the function with the highest score
must be selected.

llvm-svn: 373661

4 years agogn build: (manually) merge 373651 better
Nico Weber [Thu, 3 Oct 2019 20:41:57 +0000 (20:41 +0000)]
gn build: (manually) merge 373651 better

The reland uses a static library, not an object library.
Doesn't really matter for the gn build, but it's probalby
nice to have the same semantics for the target type.

llvm-svn: 373660

4 years ago[Tests] Add a unordered atomic load combine test
Philip Reames [Thu, 3 Oct 2019 20:28:59 +0000 (20:28 +0000)]
[Tests] Add a unordered atomic load combine test

llvm-svn: 373659

4 years ago[Test] Fix inconsistency in alignment in test case
Philip Reames [Thu, 3 Oct 2019 20:24:18 +0000 (20:24 +0000)]
[Test] Fix inconsistency in alignment in test case

The IR was using a fixed 8 byte alignment, but the MIR portion was using native alignment.  Since the test doesn't appear to be deliberately testing overalignment, just make the IR match the MIR.

llvm-svn: 373658

4 years ago[AArch64][SVE] Move the testcase into CodeGen dir
Jinsong Ji [Thu, 3 Oct 2019 20:21:23 +0000 (20:21 +0000)]
[AArch64][SVE] Move the testcase into CodeGen dir

https://reviews.llvm.org/rL373600 added an AArch64 testcase in top dir
which should be moved to Codegen dir.

llvm-svn: 373657

4 years ago[JSON] Don't wrap json::Array in a value (NFC)
Jonas Devlieghere [Thu, 3 Oct 2019 20:10:56 +0000 (20:10 +0000)]
[JSON] Don't wrap json::Array in a value (NFC)

There's no need to wrap the just-constructed json::Array in a
json::Value, we can just return that and pass ownership to the
raw_ostream.

llvm-svn: 373656

4 years ago[AArch64InstPrinter] prefer bfi to bfc for < armv8.2-a
Nick Desaulniers [Thu, 3 Oct 2019 20:10:02 +0000 (20:10 +0000)]
[AArch64InstPrinter] prefer bfi to bfc for < armv8.2-a

Summary:
Fixes pr/42576.

Link: https://github.com/ClangBuiltLinux/linux/issues/697
Reviewers: t.p.northover

Reviewed By: t.p.northover

Subscribers: kristof.beyls, hiraditya, llvm-commits, srhines

Tags: #llvm

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

llvm-svn: 373655

4 years agoReland "gn build: (manually) merge r373551"
Nico Weber [Thu, 3 Oct 2019 20:07:03 +0000 (20:07 +0000)]
Reland "gn build: (manually) merge r373551"

373551 relanded in 373651.

llvm-svn: 373654

4 years agoAttempt to remove linker workaround on the buildbots: Attempt 2
Eric Fiselier [Thu, 3 Oct 2019 19:38:44 +0000 (19:38 +0000)]
Attempt to remove linker workaround on the buildbots: Attempt 2

The first commit removed the workaround in a old script.
This patch removes it in the file actually used by the bots.

I have no idea if this is still needed, but removing the
workaround seems like the easiest way to test.

I'll revert this change if the bots go red.

llvm-svn: 373653

4 years ago[PowerPC] Adjust the naming and operand order of fnmsub patterns
Jinsong Ji [Thu, 3 Oct 2019 19:36:42 +0000 (19:36 +0000)]
[PowerPC] Adjust the naming and operand order of fnmsub patterns

Summary:
This is follow up patch of https://reviews.llvm.org/D67595.
Adjust naming and the Commutable operands for additional patterns
to make it easier to read.

The testcase update also show that we can save some unecessary fmr as
well.

Reviewers: #powerpc, steven.zhang, hfinkel, nemanjai

Reviewed By: #powerpc, nemanjai

Subscribers: wuzish, hiraditya, kbarton, MaskRay, shchenz, llvm-commits

Tags: #llvm

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

llvm-svn: 373652

4 years ago[gicombiner] Add a CodeExpander to handle C++ fragments with variable expansion
Daniel Sanders [Thu, 3 Oct 2019 19:13:39 +0000 (19:13 +0000)]
[gicombiner] Add a CodeExpander to handle C++ fragments with variable expansion

Summary:
This will handle expansion of C++ fragments in the declarative combiner
including custom predicates, and escapes into C++ to aid the migration
effort.

Fixed the -DLLVM_LINK_LLVM_DYLIB=ON using DISABLE_LLVM_LINK_LLVM_DYLIB when
creating the library. Apparently it automatically links to libLLVM.dylib
and we don't want that from tablegen.

Reviewers: bogner, volkan

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

> llvm-svn: 373551

llvm-svn: 373651

4 years agoAttempt to remove linker workaround on the buildbots.
Eric Fiselier [Thu, 3 Oct 2019 19:13:35 +0000 (19:13 +0000)]
Attempt to remove linker workaround on the buildbots.

I have no idea if this is still needed, but removing the
workaround seems like the easiest way to test.

I'll revert this change if the bots go red.

llvm-svn: 373650

4 years ago[HIP] Use option -nogpulib to disable linking device lib
Yaxun Liu [Thu, 3 Oct 2019 18:59:56 +0000 (18:59 +0000)]
[HIP] Use option -nogpulib to disable linking device lib

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

llvm-svn: 373649

4 years agoCheck for qualified function types after substituting into the operand
Richard Smith [Thu, 3 Oct 2019 18:55:23 +0000 (18:55 +0000)]
Check for qualified function types after substituting into the operand
of 'typeid'.

This is a rare place where it's valid for a function type to be
substituted but not valid for a qualified function type to be
substituted, so needs a special check.

llvm-svn: 373648

4 years ago[clang-format] Add ability to wrap braces after multi-line control statements
Paul Hoad [Thu, 3 Oct 2019 18:42:31 +0000 (18:42 +0000)]
[clang-format] Add ability to wrap braces after multi-line control statements

Summary:
Change the BraceWrappingFlags' AfterControlStatement from a bool to an enum with three values:

* "Never": This is the default, and does not do any brace wrapping after control statements.
* "MultiLine": This only wraps braces after multi-line control statements (this really only happens when a ColumnLimit is specified).
* "Always": This always wraps braces after control statements.

The first and last options are backwards-compatible with "false" and "true", respectively.

The new "MultiLine" option is useful for when a wrapped control statement's indentation matches the subsequent block's indentation. It makes it easier to see at a glance where the control statement ends and where the block's code begins. For example:

```
if (
  foo
  && bar )
{
  baz();
}
```

vs.

```
if (
  foo
  && bar ) {
  baz();
}
```

Short control statements (1 line) do not wrap the brace to the next line, e.g.

```
if (foo) {
  bar();
} else {
  baz();
}
```

Reviewers: sammccall, owenpan, reuk, MyDeveloperDay, klimek

Reviewed By: MyDeveloperDay

Subscribers: MyDeveloperDay, cfe-commits

Patch By: mitchell-stellar

Tags: #clang-format, #clang, #clang-tools-extra

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

llvm-svn: 373647

4 years ago[NFC] Fix unused variable in release builds
Jordan Rupprecht [Thu, 3 Oct 2019 18:35:44 +0000 (18:35 +0000)]
[NFC] Fix unused variable in release builds

llvm-svn: 373646

4 years ago[X86] Add v32i8 shuffle lowering strategy to recognize two v4i64 vectors truncated...
Craig Topper [Thu, 3 Oct 2019 18:34:42 +0000 (18:34 +0000)]
[X86] Add v32i8 shuffle lowering strategy to recognize two v4i64 vectors truncated to v4i8 and concatenated into the lower 8 bytes with undef/zero upper bytes.

This patch recognizes the shuffle pattern we get from a
v8i64->v8i8 truncate when v8i64 isn't a legal type.

With VLX we can use two VTRUNCs, unpckldq, and a insert_subvector.

Diffrential Revision: https://reviews.llvm.org/D68374

llvm-svn: 373645

4 years ago[Host] Return the user's shell from GetDefaultShell
Jonas Devlieghere [Thu, 3 Oct 2019 18:29:01 +0000 (18:29 +0000)]
[Host] Return the user's shell from GetDefaultShell

LLDB handles shell expansion by running lldb-argdumper under a shell.
Currently, this is always /bin/sh on POSIX. This potentially leads to
different behavior between lldb and the user's current shell. Here's an
example of different expansions between shells:

$ /bin/bash -c 'echo -config={Options:[{key:foo_key,value:foo_value}]}'
-config={Options:[key:foo_key]} -config={Options:[value:foo_value]}

$ /bin/zsh -c 'echo -config={Options:[{key:foo_key,value:foo_value}]}'
zsh:1: no matches found: -config={Options:[key:foo_key]}

$ /bin/sh -c 'echo -config={Options:[{key:foo_key,value:foo_value}]}'
-config={Options:[key:foo_key]} -config={Options:[value:foo_value]}

$ /bin/fish -c 'echo -config={Options:[{key:foo_key,value:foo_value}]}'
-config=Options:[key:foo_key] -config=Options:[value:foo_value]

To reduce surprises, this patch returns the user's current shell. It
first looks at the SHELL environment variable. If that isn't set, it'll
ask for the user's default shell. Only if that fails, we'll fallback to
/bin/sh, which should always be available.

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

llvm-svn: 373644

4 years agoPR43547: substitute into the type of a non-type template parameter if
Richard Smith [Thu, 3 Oct 2019 18:24:40 +0000 (18:24 +0000)]
PR43547: substitute into the type of a non-type template parameter if
it's instantiation-dependent, even if it's not dependent.

There might be a SFINAE check in the parameter type.

llvm-svn: 373643

4 years ago[compiler-rt] More optimization levels in signal_line.cpp test
Vitaly Buka [Thu, 3 Oct 2019 18:18:35 +0000 (18:18 +0000)]
[compiler-rt] More optimization levels in signal_line.cpp test

llvm-svn: 373642

4 years ago[X86] matchShuffleWithSHUFPD - use Zeroable element mask directly. NFCI.
Simon Pilgrim [Thu, 3 Oct 2019 18:13:50 +0000 (18:13 +0000)]
[X86] matchShuffleWithSHUFPD - use Zeroable element mask directly. NFCI.

We can make use of the Zeroable mask to indicate which elements we can safely set to zero instead of creating a target shuffle mask on the fly.

This only leaves one user of createTargetShuffleMask which we can hopefully get rid of in a similar manner.

This is part of the work to fix PR43024 and allow us to use SimplifyDemandedElts to simplify shuffle chains - we need to get to a point where the target shuffle masks isn't adjusted by its source inputs in setTargetShuffleZeroElements but instead we cache them in a parallel Zeroable mask.

llvm-svn: 373641

4 years ago[dsymutil] Don't overload LinkOptions.
Jonas Devlieghere [Thu, 3 Oct 2019 18:02:09 +0000 (18:02 +0000)]
[dsymutil] Don't overload LinkOptions.

This should fix the build bots:

  error: declaration of ‘llvm::dsymutil::LinkOptions
  DsymutilOptions::LinkOptions’ [-fpermissive]

llvm-svn: 373640

4 years agoAMDGPU/GlobalISel: Handle RegBankSelect of G_INSERT_VECTOR_ELT
Matt Arsenault [Thu, 3 Oct 2019 17:59:03 +0000 (17:59 +0000)]
AMDGPU/GlobalISel: Handle RegBankSelect of G_INSERT_VECTOR_ELT

llvm-svn: 373639

4 years agoAMDGPU/GlobalISel: Split 64-bit vector extracts during RegBankSelect
Matt Arsenault [Thu, 3 Oct 2019 17:55:27 +0000 (17:55 +0000)]
AMDGPU/GlobalISel: Split 64-bit vector extracts during RegBankSelect

Register indexing 64-bit elements is possible on the SALU, but not the
VALU. Handle splitting this into two 32-bit indexes. Extend waterfall
loop handling to allow moving a range of instructions.

llvm-svn: 373638

4 years agoAMDGPU/GlobalISel: Allow VGPR to index SGPR register
Matt Arsenault [Thu, 3 Oct 2019 17:50:32 +0000 (17:50 +0000)]
AMDGPU/GlobalISel: Allow VGPR to index SGPR register

We can still do a waterfall loop over the index if using a VGPR to
index an SGPR. The result will still be a VGPR, but we can avoid the
wide copy of the source register to a VGPR.

llvm-svn: 373637

4 years agoAMDGPU/GlobalISel: Add some more tests for G_INSERT legalization
Matt Arsenault [Thu, 3 Oct 2019 17:50:31 +0000 (17:50 +0000)]
AMDGPU/GlobalISel: Add some more tests for G_INSERT legalization

llvm-svn: 373636

4 years agoAMDGPU/GlobalISel: Fix mutationIsSane assert v8s8 and
Matt Arsenault [Thu, 3 Oct 2019 17:50:29 +0000 (17:50 +0000)]
AMDGPU/GlobalISel: Fix mutationIsSane assert v8s8 and

This would try to do FewerElements to v9s8

llvm-svn: 373635

4 years ago[HIP] Enable specifying different default gpu arch for HIP/CUDA.
Michael Liao [Thu, 3 Oct 2019 17:49:20 +0000 (17:49 +0000)]
[HIP] Enable specifying different default gpu arch for HIP/CUDA.

Reviewers: tra, yaxunl

Subscribers: cfe-commits

Tags: #clang

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

llvm-svn: 373634

4 years agoFix build failure with GCC on identifier reusing.
Michael Liao [Thu, 3 Oct 2019 17:47:46 +0000 (17:47 +0000)]
Fix build failure with GCC on identifier reusing.

- GCC is different from clang and other compilers on that.
  https://godbolt.org/z/CeQE1V

llvm-svn: 373633

4 years agocompiler-rt: move all __GLIBC_PREREQ into own header file
Vitaly Buka [Thu, 3 Oct 2019 17:46:07 +0000 (17:46 +0000)]
compiler-rt: move all __GLIBC_PREREQ into own header file

Reviewers: eugenis

Subscribers: dberris, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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

llvm-svn: 373632

4 years ago[libc++] Add a per-target flag to include the generated config_site
Louis Dionne [Thu, 3 Oct 2019 17:20:50 +0000 (17:20 +0000)]
[libc++] Add a per-target flag to include the generated config_site

This allows propagating the include automatically to targets that
depend on one of the libc++ targets such as the benchmarks. Note
that the GoogleBenchmark build itself still needs to manually specify
the -include, since I don't know of any way to have an external project
link against one of the libc++ targets (which would propagate the -include
automatically).

llvm-svn: 373631

4 years agoAMDGPU/SILoadStoreOptimizer: Optimize scanning for mergeable instructions
Tom Stellard [Thu, 3 Oct 2019 17:11:47 +0000 (17:11 +0000)]
AMDGPU/SILoadStoreOptimizer: Optimize scanning for mergeable instructions

Summary:
This adds a pre-pass to this optimization that scans through the basic
block and generates lists of mergeable instructions with one list per unique
address.

In the optimization phase instead of scanning through the basic block for mergeable
instructions, we now iterate over the lists generated by the pre-pass.

The decision to re-optimize a block is now made per list, so if we fail to merge any
instructions with the same address, then we do not attempt to optimize them in
future passes over the block.  This will help to reduce the time this pass
spends re-optimizing instructions.

In one pathological test case, this change reduces the time spent in the
SILoadStoreOptimizer from 0.2s to 0.03s.

This restructuring will also make it possible to implement further solutions in
this pass, because we can now add less expensive checks to the pre-pass and
filter instructions out early which will avoid the need to do the expensive
scanning during the optimization pass. For example, checking for adjacent
offsets is an inexpensive test we can move to the pre-pass.

Reviewers: arsenm, pendingchaos, rampitec, nhaehnle, vpykhtin

Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 373630

4 years ago[ModuloSchedule] removeBranch() *before* creating the trip count condition
James Molloy [Thu, 3 Oct 2019 17:10:32 +0000 (17:10 +0000)]
[ModuloSchedule] removeBranch() *before* creating the trip count condition

The Hexagon code assumes there's no existing terminator when inserting its
trip count condition check.

This causes swp-stages5.ll to break. The generated code looks good to me,
it is likely a permutation. I have disabled the new codegen path to keep
everything green and will investigate along with the other 3-4 tests
that have different codegen.

Fixes expensive-checks build.

llvm-svn: 373629

4 years ago[libunwind] Adjust libunwind_01.pass.cpp test for ARM EHABI
John Brawn [Thu, 3 Oct 2019 17:01:04 +0000 (17:01 +0000)]
[libunwind] Adjust libunwind_01.pass.cpp test for ARM EHABI

ARM EHABI unwinding tables only store the start address of each function, so the
last function is assumed to cover the entire address space after it. The test
picks an address on the stack assuming that it's in no function, but because of
the above it's actually resolved to the last function. Fix this by using address
0 instead.

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

llvm-svn: 373628

4 years agogn build: (manually) merge r373622
Nico Weber [Thu, 3 Oct 2019 16:59:12 +0000 (16:59 +0000)]
gn build: (manually) merge r373622

llvm-svn: 373627

4 years agoDeclBase/DeclCXX/DeclTemplate - silence static analyzer getAs<> null dereference...
Simon Pilgrim [Thu, 3 Oct 2019 16:58:01 +0000 (16:58 +0000)]
DeclBase/DeclCXX/DeclTemplate - silence static analyzer getAs<> null dereference warnings. NFCI.

The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<> directly and if not assert will fire for us.

llvm-svn: 373626

4 years ago[libc++] Add missing revision number in ABI changelog
Louis Dionne [Thu, 3 Oct 2019 16:50:05 +0000 (16:50 +0000)]
[libc++] Add missing revision number in ABI changelog

llvm-svn: 373625

4 years ago[OPENMP]Fix emission of the declare target variables in device mode.
Alexey Bataev [Thu, 3 Oct 2019 16:46:49 +0000 (16:46 +0000)]
[OPENMP]Fix emission of the declare target variables in device mode.

Declare target variables must be emitted in device mode, target triples
can be empty in this case.

llvm-svn: 373624

4 years ago[dsymutil] Improve consistency by removing redundant namespaces (NFC)
Jonas Devlieghere [Thu, 3 Oct 2019 16:34:44 +0000 (16:34 +0000)]
[dsymutil] Improve consistency by removing redundant namespaces (NFC)

The dsymutil implementation file has a using-directive for the llvm
namespace. This patch just removes redundant namespace qualifiers.

llvm-svn: 373623

4 years ago[dsymutil] Tablegenify option parsing
Jonas Devlieghere [Thu, 3 Oct 2019 16:34:41 +0000 (16:34 +0000)]
[dsymutil] Tablegenify option parsing

This patch reimplements command line option parsing in dsymutil with
Tablegen and libOption. The main motivation for this change is to
prevent clashes with other cl::opt options defined in llvm. Although
it's a bit more heavyweight, it has some nice advantages such as no
global static initializers and better separation between the code and
the option definitions.

I also used this opportunity to improve how dsymutil deals with
incompatible options. Instead of having checks spread across the code,
everything is now grouped together in verifyOptions. The fact that the
options are no longer global means that we need to pass them around a
bit more, but I think it's worth the trade-off.

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

llvm-svn: 373622

4 years ago[BPF] Handle offset reloc endpoint ending in the middle of chain properly
Yonghong Song [Thu, 3 Oct 2019 16:30:29 +0000 (16:30 +0000)]
[BPF] Handle offset reloc endpoint ending in the middle of chain properly

During studying support for bitfield, I found an issue for
an example like the one in test offset-reloc-middle-chain.ll.
  struct t1 { int c; };
  struct s1 { struct t1 b; };
  struct r1 { struct s1 a; };
  #define _(x) __builtin_preserve_access_index(x)
  void test1(void *p1, void *p2, void *p3);
  void test(struct r1 *arg) {
    struct s1 *ps = _(&arg->a);
    struct t1 *pt = _(&arg->a.b);
    int *pi = _(&arg->a.b.c);
    test1(ps, pt, pi);
  }

The IR looks like:
  %0 = llvm.preserve.struct.access(base, ...)
  %1 = llvm.preserve.struct.access(%0, ...)
  %2 = llvm.preserve.struct.access(%1, ...)
  using %0, %1 and %2

In this case, we need to generate three relocatiions
corresponding to chains: (%0), (%0, %1) and (%0, %1, %2).
After collecting all the chains, the current implementation
process each chain (in a map) with code generation sequentially.
For example, after (%0) is processed, the code may look like:
  %0 = base + special_global_variable
  // llvm.preserve.struct.access(base, ...) is delisted
  // from the instruction stream.
  %1 = llvm.preserve.struct.access(%0, ...)
  %2 = llvm.preserve.struct.access(%1, ...)
  using %0, %1 and %2

When processing chain (%0, %1), the current implementation
tries to visit intrinsic llvm.preserve.struct.access(base, ...)
to get some of its properties and this caused segfault.

This patch fixed the issue by remembering all necessary
information (kind, metadata, access_index, base) during
analysis phase, so in code generation phase there is
no need to examine the intrinsic call instructions.
This also simplifies the code.

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

llvm-svn: 373621

4 years ago[OPENMP]Improve diagnostics for not found declare target entries.
Alexey Bataev [Thu, 3 Oct 2019 16:20:34 +0000 (16:20 +0000)]
[OPENMP]Improve diagnostics for not found declare target entries.

We can point to the target region + emit parent functions names/real var
names if they were not found in host module during device codegen.

llvm-svn: 373620

4 years agoRevert "[Alignment][NFC] Allow constexpr Align"
Guillaume Chatelet [Thu, 3 Oct 2019 15:53:50 +0000 (15:53 +0000)]
Revert "[Alignment][NFC] Allow constexpr Align"

This reverts commit b3af236fb5fc6e50fcc1b54d868f0bff557f3fb1.

llvm-svn: 373619

4 years ago[RISCV] Add obsolete aliases of fscsr, frcsr (fssr, frsr)
Edward Jones [Thu, 3 Oct 2019 15:47:28 +0000 (15:47 +0000)]
[RISCV] Add obsolete aliases of fscsr, frcsr (fssr, frsr)

These old aliases were renamed, but are still used by some projects (eg newlib).

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

llvm-svn: 373618

4 years ago[NFC] Added missing changes for rL373614
David Bolvansky [Thu, 3 Oct 2019 15:26:26 +0000 (15:26 +0000)]
[NFC] Added missing changes for rL373614

llvm-svn: 373616

4 years ago[Diagnostics] Bitwise negation of a boolean expr always evaluates to true; warn with...
David Bolvansky [Thu, 3 Oct 2019 15:17:59 +0000 (15:17 +0000)]
[Diagnostics] Bitwise negation of a boolean expr always evaluates to true; warn with -Wbool-operation

Requested here:
http://lists.llvm.org/pipermail/cfe-dev/2019-October/063452.html

llvm-svn: 373614

4 years agoFix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI.
Simon Pilgrim [Thu, 3 Oct 2019 15:10:47 +0000 (15:10 +0000)]
Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI.

llvm-svn: 373613

4 years agoExprConstant - silence static analyzer getAs<> null dereference warnings. NFCI.
Simon Pilgrim [Thu, 3 Oct 2019 15:08:30 +0000 (15:08 +0000)]
ExprConstant - silence static analyzer getAs<> null dereference warnings. NFCI.

The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<> directly and if not assert will fire for us.

llvm-svn: 373612

4 years agoRemove duplicate P->getAs<PointerType>() call. NFCI.
Simon Pilgrim [Thu, 3 Oct 2019 15:08:20 +0000 (15:08 +0000)]
Remove duplicate P->getAs<PointerType>() call. NFCI.

llvm-svn: 373611

4 years ago[yaml2obj] - Add a Size tag support for SHT_LLVM_ADDRSIG sections.
George Rimar [Thu, 3 Oct 2019 15:02:18 +0000 (15:02 +0000)]
[yaml2obj] - Add a Size tag support for SHT_LLVM_ADDRSIG sections.

It allows using "Size" with or without "Content" in YAML descriptions of
SHT_LLVM_ADDRSIG sections.

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

llvm-svn: 373610

4 years agoTest commit.
Sumanth Gundapaneni [Thu, 3 Oct 2019 14:57:49 +0000 (14:57 +0000)]
Test commit.

llvm-svn: 373609

4 years ago[MSP430] add tests for unwanted shift codegen; NFC (PR43542)
Sanjay Patel [Thu, 3 Oct 2019 14:54:03 +0000 (14:54 +0000)]
[MSP430] add tests for unwanted shift codegen; NFC (PR43542)

llvm-svn: 373607

4 years agoRecommit r373598 "[yaml2obj/obj2yaml] - Add support for SHT_LLVM_ADDRSIG sections."
George Rimar [Thu, 3 Oct 2019 14:52:33 +0000 (14:52 +0000)]
Recommit r373598 "[yaml2obj/obj2yaml] - Add support for SHT_LLVM_ADDRSIG sections."

Fix: call `consumeError()` for a case missed.

Original commit message:

SHT_LLVM_ADDRSIG is described here:
https://llvm.org/docs/Extensions.html#sht-llvm-addrsig-section-address-significance-table

This patch teaches tools to dump them and to parse the YAML declarations of such sections.

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

llvm-svn: 373606

4 years ago[UpdateTestChecks] add basic support for parsing msp430 asm
Sanjay Patel [Thu, 3 Oct 2019 14:34:28 +0000 (14:34 +0000)]
[UpdateTestChecks] add basic support for parsing msp430 asm

llvm-svn: 373605

4 years agogn build: Merge r373601
GN Sync Bot [Thu, 3 Oct 2019 14:28:27 +0000 (14:28 +0000)]
gn build: Merge r373601

llvm-svn: 373603

4 years ago[libc++abi] Do not export some implementation-detail functions
Louis Dionne [Thu, 3 Oct 2019 14:24:53 +0000 (14:24 +0000)]
[libc++abi] Do not export some implementation-detail functions

Summary:
Those functions started being mistakenly exported from the libc++abi
shared library after commit r344152 in 2018. Removing these symbols is
technically an ABI break. However, they are not part of the C++ ABI,
they haven't ever been re-exported from libc++, and they are not
declared in any public header, so it's very unlikely that calls to
these functions exist out there. Also, the functions have reserved
names, so any impacted user would have to have tried really hard
being broken by this removal.

Note that avoiding this kind of problem is exactly why we're now
controlling exported symbols explicitly with a textual list.

Also note that applying the hidden visibility attribute is necessary
because the list of exported symbols is only used on Apple platforms
for the time being.

Reviewers: phosek, mclow.lists, EricWF

Subscribers: christof, jkorous, dexonsmith, libcxx-commits

Tags: #libc

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

llvm-svn: 373602

4 years ago[PGO] Refactor Value Profiling into a plugin based oracle and create a well defined...
Bardia Mahjour [Thu, 3 Oct 2019 14:20:50 +0000 (14:20 +0000)]
[PGO] Refactor Value Profiling into a plugin based oracle and create a well defined API for the plugins.

Summary: This PR creates a utility class called ValueProfileCollector that tells PGOInstrumentationGen and PGOInstrumentationUse what to value-profile and where to attach the profile metadata. It then refactors logic scattered in PGOInstrumentation.cpp into two plugins that plug into the ValueProfileCollector.

Authored By: Wael Yehia <wyehia@ca.ibm.com>

Reviewer: davidxl, tejohnson, xur

Reviewed By: davidxl, tejohnson, xur

Subscribers: llvm-commits

Tag: #llvm

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

Patch By Wael Yehia <wyehia@ca.ibm.com>

llvm-svn: 373601

4 years ago[AArch64][SVE] Adding patterns for floating point SVE add instructions.
Ehsan Amiri [Thu, 3 Oct 2019 14:19:55 +0000 (14:19 +0000)]
[AArch64][SVE] Adding patterns for floating point SVE add instructions.

llvm-svn: 373600

4 years agoRevert r373598 "[yaml2obj/obj2yaml] - Add support for SHT_LLVM_ADDRSIG sections."
George Rimar [Thu, 3 Oct 2019 14:04:47 +0000 (14:04 +0000)]
Revert r373598 "[yaml2obj/obj2yaml] - Add support for SHT_LLVM_ADDRSIG sections."

It broke BB:
http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/18655/steps/test/logs/stdio

llvm-svn: 373599

4 years ago[yaml2obj/obj2yaml] - Add support for SHT_LLVM_ADDRSIG sections.
George Rimar [Thu, 3 Oct 2019 13:57:08 +0000 (13:57 +0000)]
[yaml2obj/obj2yaml] - Add support for SHT_LLVM_ADDRSIG sections.

SHT_LLVM_ADDRSIG is described here:
https://llvm.org/docs/Extensions.html#sht-llvm-addrsig-section-address-significance-table

This patch teaches tools to dump them and to parse the YAML declarations of such sections.

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

llvm-svn: 373598

4 years ago[NFC][InstCombine] Some tests for sub-of-negatible pattern
Roman Lebedev [Thu, 3 Oct 2019 13:36:00 +0000 (13:36 +0000)]
[NFC][InstCombine] Some tests for sub-of-negatible pattern

As we have previously estabilished, `sub` is an outcast,
and should be considered non-canonical iff it can be converted to `add`.

It can be converted to `add` if it's second operand can be negated.
So far we mostly only do that for constants and negation itself,
but we should be more through.

llvm-svn: 373597

4 years ago[llvm-locstats] Copy the script only when needed; NFC
Djordje Todorovic [Thu, 3 Oct 2019 13:18:14 +0000 (13:18 +0000)]
[llvm-locstats] Copy the script only when needed; NFC

llvm-svn: 373596

4 years ago[Alignment][NFC] Remove StoreInst::setAlignment(unsigned)
Guillaume Chatelet [Thu, 3 Oct 2019 13:17:21 +0000 (13:17 +0000)]
[Alignment][NFC] Remove StoreInst::setAlignment(unsigned)

Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet, bollu, jdoerfert

Subscribers: hiraditya, asbirlea, cfe-commits, llvm-commits

Tags: #clang, #llvm

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

llvm-svn: 373595

4 years ago[llvm-readobj] - Stop using a precompiled binary in all.test
George Rimar [Thu, 3 Oct 2019 13:13:23 +0000 (13:13 +0000)]
[llvm-readobj] - Stop using a precompiled binary in all.test

Having a precompiled binary here is excessive.
I also added a few missing tags.

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

llvm-svn: 373594

4 years ago[libTooling] Add various Stencil combinators for expressions.
Yitzhak Mandelbaum [Thu, 3 Oct 2019 13:01:00 +0000 (13:01 +0000)]
[libTooling] Add various Stencil combinators for expressions.

Summary:
This revision adds three new Stencil combinators:
* `expression`, which idiomatically constructs the source for an expression,
  including wrapping the expression's source in parentheses if needed.
* `deref`, which constructs an idiomatic dereferencing expression.
* `addressOf`, which constructs an idiomatic address-taking expression.

Reviewers: gribozavr

Subscribers: cfe-commits

Tags: #clang

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

llvm-svn: 373593

4 years ago[Alignment][Clang][NFC] Add CharUnits::getAsAlign
Guillaume Chatelet [Thu, 3 Oct 2019 13:00:29 +0000 (13:00 +0000)]
[Alignment][Clang][NFC] Add CharUnits::getAsAlign

Summary:
This is a prerequisite to removing `llvm::GlobalObject::setAlignment(unsigned)`.
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet

Subscribers: jholewinski, cfe-commits

Tags: #clang

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

llvm-svn: 373592

4 years ago[mips] Push `fixup_Mips_LO16` fixup for `jialc` and `jic` instructions
Simon Atanasyan [Thu, 3 Oct 2019 12:08:26 +0000 (12:08 +0000)]
[mips] Push `fixup_Mips_LO16` fixup for `jialc` and `jic` instructions

llvm-svn: 373591

4 years ago[llvm-readobj][mips] Remove non-standard --misp-xxx flags
Simon Atanasyan [Thu, 3 Oct 2019 12:08:11 +0000 (12:08 +0000)]
[llvm-readobj][mips] Remove non-standard --misp-xxx flags

llvm-readobj "non-standard" flags `--mips-plt-got`, `--mips-abi-flags`,
`--mips-reginfo`, and `--mips-options` are superseded by the `--arch-specific`
flag and can be removed now.

llvm-svn: 373590

4 years ago[mips] Use llvm-readobj `-A` flag in test cases. NFC
Simon Atanasyan [Thu, 3 Oct 2019 12:08:04 +0000 (12:08 +0000)]
[mips] Use llvm-readobj `-A` flag in test cases. NFC

llvm-svn: 373589

4 years ago[llvm-readobj][mips] Display MIPS specific info under --arch-specific flag
Simon Atanasyan [Thu, 3 Oct 2019 12:07:07 +0000 (12:07 +0000)]
[llvm-readobj][mips] Display MIPS specific info under --arch-specific flag

Old options `--mips-plt-got`, `--mips-abi-flags`, '--mips-reginfo`,
and `--mips-options` wiil be deleted in a separate patch.

llvm-svn: 373588

4 years ago[llvm-readobj][mips] Do not show an error if GOT is missed
Simon Atanasyan [Thu, 3 Oct 2019 12:06:56 +0000 (12:06 +0000)]
[llvm-readobj][mips] Do not show an error if GOT is missed

It is not an error if a file does not contain GOT.

llvm-svn: 373587

4 years agogn build: Revert 373554 "gn build: (manually) merge r373551"
Nico Weber [Thu, 3 Oct 2019 11:57:39 +0000 (11:57 +0000)]
gn build: Revert 373554 "gn build: (manually) merge r373551"

r373551 was reverted in r373581.

llvm-svn: 373586

4 years ago[AArch64] Static (de)allocation of SVE stack objects.
Sander de Smalen [Thu, 3 Oct 2019 11:33:50 +0000 (11:33 +0000)]
[AArch64] Static (de)allocation of SVE stack objects.

Adds support to AArch64FrameLowering to allocate fixed-stack SVE objects.

The focus of this patch is purely to allow the stack frame to
allocate/deallocate space for scalable SVE objects. More dynamic
allocation (at compile-time, i.e. determining placement of SVE objects
on the stack), or resolving frame-index references that include
scalable-sized offsets, are left for subsequent patches.

SVE objects are allocated in the stack frame as a separate region below
the callee-save area, and above the alignment gap. This is done so that
the SVE objects can be accessed directly from the FP at (runtime)
VL-based offsets to benefit from using the VL-scaled addressing modes.

The layout looks as follows:

     +-------------+
     | stack arg   |
     +-------------+
     | Callee Saves|
     |   X29, X30  |       (if available)
     |-------------| <- FP (if available)
     |     :       |
     |  SVE area   |
     |     :       |
     +-------------+
     |/////////////| alignment gap.
     |     :       |
     | Stack objs  |
     |     :       |
     +-------------+ <- SP after call and frame-setup

SVE and non-SVE stack objects are distinguished using different
StackIDs. The offsets for objects with TargetStackID::SVEVector should be
interpreted as purely scalable offsets within their respective SVE region.

Reviewers: thegameg, rovka, t.p.northover, efriedma, rengolin, greened

Reviewed By: efriedma

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

llvm-svn: 373585

4 years agoSilence static analyzer getAs<RecordType> null dereference warnings. NFCI.
Simon Pilgrim [Thu, 3 Oct 2019 11:22:48 +0000 (11:22 +0000)]
Silence static analyzer getAs<RecordType> null dereference warnings. NFCI.

The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<RecordType> directly and if not assert will fire for us.

llvm-svn: 373584

4 years agoFix uninitialized variable warning. NFCI
Simon Pilgrim [Thu, 3 Oct 2019 11:22:00 +0000 (11:22 +0000)]
Fix uninitialized variable warning. NFCI

llvm-svn: 373583

4 years agoFix uninitialized variable warning. NFCI
Simon Pilgrim [Thu, 3 Oct 2019 11:21:46 +0000 (11:21 +0000)]
Fix uninitialized variable warning. NFCI

llvm-svn: 373582

4 years agoRevert 373551 (CodeExpander.cpp CMake issue)
Kristina Brooks [Thu, 3 Oct 2019 11:04:48 +0000 (11:04 +0000)]
Revert 373551 (CodeExpander.cpp CMake issue)

Fix buildbots and revert the CodeExpander commit.

(See http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20190930/699857.html )

llvm-svn: 373581

4 years ago[Alignment][NFC] Allow constexpr Align
Guillaume Chatelet [Thu, 3 Oct 2019 10:53:10 +0000 (10:53 +0000)]
[Alignment][NFC] Allow constexpr Align

Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 373580

4 years agoRevert 373555: libLLVM+modules failure with CMake 3.10.2
Kristina Brooks [Thu, 3 Oct 2019 10:48:37 +0000 (10:48 +0000)]
Revert 373555: libLLVM+modules failure with CMake 3.10.2

This reverts rL373555. I've sent an email out regarding the issue.

Commit on GitHub:
https://github.com/llvm/llvm-project/commit/45f682f47129c05414d4c5ae7be851772273978f

llvm-svn: 373579

4 years ago[clang][NFC] Fix misspellings in ExternalASTMerger.h
Raphael Isemann [Thu, 3 Oct 2019 09:55:13 +0000 (09:55 +0000)]
[clang][NFC] Fix misspellings in ExternalASTMerger.h

llvm-svn: 373577

4 years agoUpdate the FAQ: remove stuff related to the previous license +
Sylvestre Ledru [Thu, 3 Oct 2019 09:43:54 +0000 (09:43 +0000)]
Update the FAQ: remove stuff related to the previous license +
update info about the portability of LLVM.

llvm-svn: 373576

4 years ago"Fix" TestFileHandle.py on non-darwin platforms
Pavel Labath [Thu, 3 Oct 2019 08:44:33 +0000 (08:44 +0000)]
"Fix" TestFileHandle.py on non-darwin platforms

This test exposed a very long standing issue that the python file
objects returned by the FILE* typemap were unusable on non-darwin
platforms. The reason they work on darwin is that they rely on a
non-standard extension to fetch the "mode" of a FILE* object. On other
platforms, this code was #ifdefed out, and so we were returning an empty
mode.

As there's no portable way to get this information, I just change the
non-darwin path to return "r+", which should permit both reading and
writing operations on the object. If the underlying file descriptor
turns out to be incompatible with this mode, the operating system should
return EBADF (or equivalent), instead of the "file not open for XXX"
error from python.

llvm-svn: 373573

4 years agoFix a use-after-free in GDBRemoteCommunicationServerLLGS
Pavel Labath [Thu, 3 Oct 2019 07:59:26 +0000 (07:59 +0000)]
Fix a use-after-free in GDBRemoteCommunicationServerLLGS

Although it's called "GetString", StreamString::GetString actually
returns a StringRef. Creating a json object with a StringRef does not
make a copy, which means the StringRef will be dangling as soon as the
underlying stream is destroyed. Add a .str() to force the json object to
hold a copy of the string.

This fixes nearly every test on linux.

llvm-svn: 373572

4 years ago[llvm-exegesis][NFC] Rename ExegesisTarget::decrementLoopCounterAndLoop()
Clement Courbet [Thu, 3 Oct 2019 07:56:56 +0000 (07:56 +0000)]
[llvm-exegesis][NFC] Rename ExegesisTarget::decrementLoopCounterAndLoop()

Summary: To decrementLoopCounterAndJump, and explicitely take the jump target.

Reviewers: gchatelet

Subscribers: tschuett, llvm-commits

Tags: #llvm

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

llvm-svn: 373571

4 years agoFix libc++ pretty printer test for Python 3 after D67238 (take 2)
Fangrui Song [Thu, 3 Oct 2019 06:19:50 +0000 (06:19 +0000)]
Fix libc++ pretty printer test for Python 3 after D67238 (take 2)

In both Python 2 and Python 3, gdb.Value.string returns a 'str'. We just
need to delete a `encode("utf-8")` which would return a 'bytes' in
Python 3.

llvm-svn: 373570

4 years ago[X86] Add test case for v8i64->v8i8 truncate with avx512 and prefer-vector-width...
Craig Topper [Thu, 3 Oct 2019 06:18:45 +0000 (06:18 +0000)]
[X86] Add test case for v8i64->v8i8 truncate with avx512 and prefer-vector-width/min-legal-vector-width=256. NFC

With vpmovqb, we should be able to do better here until we get
AVX512VBMI on Cannonlake/Icelake.

llvm-svn: 373569

4 years agoAMDGPU/GlobalISel: Don't re-get subtarget
Matt Arsenault [Thu, 3 Oct 2019 05:46:10 +0000 (05:46 +0000)]
AMDGPU/GlobalISel: Don't re-get subtarget

It's already available in the class.

llvm-svn: 373568

4 years agoAMDGPU/GlobalISel: Expand G_BITCAST legality
Matt Arsenault [Thu, 3 Oct 2019 05:46:08 +0000 (05:46 +0000)]
AMDGPU/GlobalISel: Expand G_BITCAST legality

llvm-svn: 373567

4 years ago[X86] Add DAG combine to turn (bitcast (vbroadcast_load)) into just a vbroadcast_load...
Craig Topper [Thu, 3 Oct 2019 05:30:02 +0000 (05:30 +0000)]
[X86] Add DAG combine to turn (bitcast (vbroadcast_load)) into just a vbroadcast_load if the scalar size is the same.

This improves broadcast load folding of i64 elements on 32-bit
targets where i64 isn't legal.

Previously we had to represent these as vXf64 vbroadcast_loads and
a bitcast to vXi64. But we didn't have any isel patterns
looking for that.

This also allows us to remove or simplify some isel patterns that
were looking for bitcasted vbroadcast_loads.

llvm-svn: 373566

4 years agoFix driver tests when `LLVM_ENABLE_PER_TARGET_RUNTIME_DIR` is `ON`
Serge Pavlov [Thu, 3 Oct 2019 04:52:46 +0000 (04:52 +0000)]
Fix driver tests when `LLVM_ENABLE_PER_TARGET_RUNTIME_DIR` is `ON`

Some Driver tests relied on the default resource direcory having per-os per-arch
subdirectory layout, and when clang is built with `-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON`,
those test fail, because clang by default assumes per-target subdirectories.

Explicitly set `-resource-dir` flag to point to a tree with per-os per-arch layout.

See also: D45604, D62469

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

Patch by Sergej Jaskiewicz <jaskiewiczs@icloud.com>.

llvm-svn: 373565

4 years agofactor out an abstract base class for File
Lawrence D'Anna [Thu, 3 Oct 2019 04:31:46 +0000 (04:31 +0000)]
factor out an abstract base class for File

Summary:
This patch factors out File as an abstract base
class and moves most of its actual functionality into
a subclass called NativeFile.   In the next patch,
I'm going to be adding subclasses of File that
don't necessarily have any connection to actual OS files,
so they will not inherit from NativeFile.

This patch was split out as a prerequisite for
https://reviews.llvm.org/D68188

Reviewers: JDevlieghere, jasonmolenda, labath

Reviewed By: labath

Subscribers: lldb-commits

Tags: #lldb

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

llvm-svn: 373564

4 years agoSBDebugger::SetInputFile, SetOutputFile, etc.
Lawrence D'Anna [Thu, 3 Oct 2019 04:04:48 +0000 (04:04 +0000)]
SBDebugger::SetInputFile, SetOutputFile, etc.

Summary:
Add new methods to SBDebugger to set IO files as SBFiles instead of
as FILE* streams.

In future commits, the FILE* methods will be deprecated and these
will become the primary way to set the debugger I/O streams.

Reviewers: JDevlieghere, jasonmolenda, labath

Reviewed By: labath

Subscribers: lldb-commits

Tags: #lldb

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

llvm-svn: 373563

4 years agonew api class: SBFile
Lawrence D'Anna [Thu, 3 Oct 2019 04:01:07 +0000 (04:01 +0000)]
new api class: SBFile

Summary:
SBFile is a scripting API wrapper for lldb_private::File

This is the first step in a project to enable arbitrary python
io.IOBase file objects -- including those that override the read()
and write() methods -- to be used as the main debugger IOStreams.

Currently this is impossible because python file objects must first
be converted into FILE* streams by SWIG in order to be passed into
the debugger.

full prototype: https://github.com/smoofra/llvm-project/tree/files

Reviewers: JDevlieghere, jasonmolenda, zturner, jingham, labath

Reviewed By: labath

Subscribers: labath, mgorny, lldb-commits

Tags: #lldb

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

llvm-svn: 373562

4 years ago[HIP] Support -emit-llvm for device compilation
Yaxun Liu [Thu, 3 Oct 2019 03:27:43 +0000 (03:27 +0000)]
[HIP] Support -emit-llvm for device compilation

Sometimes it is useful to compile HIP device code to LLVM BC. It is not convenient to use clang -cc1 since
there are lots of options needed.

This patch allows clang driver to compile HIP device code to LLVM BC with -emit-llvm -c.

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

llvm-svn: 373561

4 years ago[X86] Add broadcast load folding patterns to NoVLX VPMULLQ/VPMAXSQ/VPMAXUQ/VPMINSQ...
Craig Topper [Thu, 3 Oct 2019 03:16:27 +0000 (03:16 +0000)]
[X86] Add broadcast load folding patterns to NoVLX VPMULLQ/VPMAXSQ/VPMAXUQ/VPMINSQ/VPMINUQ patterns.

More fixes for PR36191.

llvm-svn: 373560

4 years ago[X86] Remove a couple redundant isel patterns that look to have been copy/pasted...
Craig Topper [Thu, 3 Oct 2019 03:16:21 +0000 (03:16 +0000)]
[X86] Remove a couple redundant isel patterns that look to have been copy/pasted from right above them. NFC

llvm-svn: 373559

4 years agogn build: Merge r373556
GN Sync Bot [Thu, 3 Oct 2019 02:43:27 +0000 (02:43 +0000)]
gn build: Merge r373556

llvm-svn: 373558

4 years agoRevert 373538 and follow-ups 373549 and 373552.
Nico Weber [Thu, 3 Oct 2019 02:38:43 +0000 (02:38 +0000)]
Revert 373538 and follow-ups 373549 and 373552.

They break tests on (at least) macOS.

llvm-svn: 373556

4 years ago[gicombiner] Make rL373551 compatible with older cmakes
Daniel Sanders [Thu, 3 Oct 2019 01:49:04 +0000 (01:49 +0000)]
[gicombiner] Make rL373551 compatible with older cmakes

Newer cmakes appear to be more flexible w.r.t object libraries. Convert to
a static library so that it works with older cmakes too

llvm-svn: 373555

4 years agogn build: (manually) merge r373551
Nico Weber [Thu, 3 Oct 2019 01:32:51 +0000 (01:32 +0000)]
gn build: (manually) merge r373551

llvm-svn: 373554