platform/upstream/llvm.git
7 years ago[WebAssembly] Add support for naming wasm data segments
Sam Clegg [Tue, 19 Sep 2017 23:00:57 +0000 (23:00 +0000)]
[WebAssembly] Add support for naming wasm data segments

Add adds support for naming data segments.  This is useful
useful linkers so that they can merge similar sections.

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

llvm-svn: 313692

7 years agoAllow ORE.emit to take a closure to delay building the remark object
Adam Nemet [Tue, 19 Sep 2017 23:00:55 +0000 (23:00 +0000)]
Allow ORE.emit to take a closure to delay building the remark object

In the lambda we are now returning the remark by value so we need to preserve
its type in the insertion operator.  This requires making the insertion
operator generic.

I've also converted a few cases to use the new API.  It seems to work pretty
well.  See the LoopUnroller for a slightly more interesting case.

llvm-svn: 313691

7 years ago[ForwardOpTree] Allow out-of-quota in examination part of forwardTree.
Michael Kruse [Tue, 19 Sep 2017 22:53:20 +0000 (22:53 +0000)]
[ForwardOpTree] Allow out-of-quota in examination part of forwardTree.

Computing the reaching definition in forwardTree() can take a long time
if the coefficients are large. When the forwarding is
carried-out (doIt==true), forwardTree() must execute entirely or not at
all to get a consistent output, which means we cannot just allow
out-of-quota errors to happen in the middle of the processing.

We introduce the class IslQuotaScope which allows to opt-in code that is
conformant and has been tested with out-of-quota events. In case of
ForwardOpTree, out-of-quota is allowed during the operand tree
examination, but not during the transformation. The same forwardTree()
recursion is used for examination and execution, meaning that the
reaching definition has already been computed in the examination tree
walk and cached for reuse in the transformation tree walk.

This should fix the time-out of grtestutils.ll of the asop buildbot. If
the compilation still takes too long, we can reduce the max-operations
allows for -polly-optree.

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

llvm-svn: 313690

7 years agoRevert "Introduce the llvm-cfi-verify tool."
Vlad Tsyrklevich [Tue, 19 Sep 2017 22:36:32 +0000 (22:36 +0000)]
Revert "Introduce the llvm-cfi-verify tool."

This reverts commit r313688, it caused build failures for
llvm-i686-linux-RA

llvm-svn: 313689

7 years agoIntroduce the llvm-cfi-verify tool.
Vlad Tsyrklevich [Tue, 19 Sep 2017 22:33:09 +0000 (22:33 +0000)]
Introduce the llvm-cfi-verify tool.

Summary: Introduces the llvm-cfi-verify tool to llvm. Includes the design document (docs/CFIVerify.rst). Current implementation of the tool is simply a disassembler that identifies and prints the indirect control flow instructions.

Reviewers: vlad.tsyrklevich

Reviewed By: vlad.tsyrklevich

Patch by Mitch Phillips

Subscribers: llvm-commits, kcc, pcc, mgorny

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

llvm-svn: 313688

7 years agoCodeGen: use range based for loops (NFC)
Saleem Abdulrasool [Tue, 19 Sep 2017 22:10:20 +0000 (22:10 +0000)]
CodeGen: use range based for loops (NFC)

Simplify the RPOT traversal by using a range based for loop for the
iterator dereference.

llvm-svn: 313687

7 years agoRevert "[MIRPrinter] Print empty successor lists when they cannot be guessed"
Quentin Colombet [Tue, 19 Sep 2017 22:03:50 +0000 (22:03 +0000)]
Revert "[MIRPrinter] Print empty successor lists when they cannot be guessed"

This reverts commit r313685.

I thought I had ran ninja check, but apparently I didn't...
Need to update a bunch of mir tests.

llvm-svn: 313686

7 years ago[MIRPrinter] Print empty successor lists when they cannot be guessed
Quentin Colombet [Tue, 19 Sep 2017 21:55:51 +0000 (21:55 +0000)]
[MIRPrinter] Print empty successor lists when they cannot be guessed

Unreachable blocks in the machine instr representation are these
weird empty blocks with no successors.
The MIR printer used to not print empty lists of successors. However,
the MIR parser now treats non-printed list of successors as "please
guess it for me". As a result, the parser tries to guess the list of
successors and given the block is empty, just assumes it falls through
the next block (if any).

For instance, the following test case used to fail the verifier.
The MIR printer would print
          entry
         /      \
    true (def)   false (no list of successors)
        |
  split.true (use)

The MIR parser would understand this:
          entry
         /      \
    true (def)   false
        |        /  <-- invalid edge
  split.true (use)

Because of the invalid edge, we get the "def does not
dominate all uses" error.

The fix consists in printing empty successor lists, so that the parser
knows what to do for unreachable blocks.

rdar://problem/34022159

llvm-svn: 313685

7 years agoFix 32-bit buildbots by removing tests that are dependent on pointer-size comparisons.
Andrew Kaylor [Tue, 19 Sep 2017 21:43:01 +0000 (21:43 +0000)]
Fix 32-bit buildbots by removing tests that are dependent on pointer-size comparisons.

The recently behavior in the code that these tests were meant to be checking will be ammended as soon as a suitable change can be properly reviewed.

llvm-svn: 313684

7 years agoRevert "[Sema] Move some stuff into -Wtautological-unsigned-enum-zero-compare"
Roman Lebedev [Tue, 19 Sep 2017 21:40:41 +0000 (21:40 +0000)]
Revert "[Sema] Move some stuff into -Wtautological-unsigned-enum-zero-compare"

This reverts commit r313677.

Buildbots fail with assertion failure
Failing Tests (7):
    Clang :: Analysis/null-deref-ps.c
    Clang :: CodeGen/enum.c
    Clang :: Sema/compare.c
    Clang :: Sema/outof-range-constant-compare.c
    Clang :: Sema/tautological-unsigned-enum-zero-compare.c
    Clang :: Sema/tautological-unsigned-zero-compare.c
    Clang :: SemaCXX/compare.cpp

llvm-svn: 313683

7 years agoReland "[llvm-objcopy] Add support for nested and overlapping segments"
Jake Ehrlich [Tue, 19 Sep 2017 21:37:35 +0000 (21:37 +0000)]
Reland "[llvm-objcopy] Add support for nested and overlapping segments"

I didn't initialize a pointer to be nullptr that I needed to.

This change adds support for nested and even overlapping segments. This means
that PT_PHDR, PT_GNU_RELRO, PT_TLS, and PT_DYNAMIC can be supported properly.

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

llvm-svn: 313682

7 years agoRename CieRecord instance variables.
Rui Ueyama [Tue, 19 Sep 2017 21:31:57 +0000 (21:31 +0000)]
Rename CieRecord instance variables.

CieRecord is a struct containing a CIE and FDEs, but oftentimes the
struct itself is named `Cie` which caused some confusion. This patch
renames them `CieRecords` or `Rec`.

llvm-svn: 313681

7 years ago[ARM] Relax 'cpsie'/'cpsid' flag parsing.
Jonathan Roelofs [Tue, 19 Sep 2017 21:23:19 +0000 (21:23 +0000)]
[ARM] Relax 'cpsie'/'cpsid' flag parsing.

The ARM docs suggest in examples that the flags can have either case, and there
are applications in the wild that (libopencm3, for example) that expect to be
able to use the uppercase spelling.

https://reviews.llvm.org/D37953

llvm-svn: 313680

7 years agoRevert "[DebugInfo] Insert DW_OP_deref when spilling indirect DBG_VALUEs"
Reid Kleckner [Tue, 19 Sep 2017 21:18:32 +0000 (21:18 +0000)]
Revert "[DebugInfo] Insert DW_OP_deref when spilling indirect DBG_VALUEs"

This reverts r313640, originally r313400, one more time for essentially
the same issue. My BitVector of spilled location numbers isn't working
because we coalesce identical DBG_VALUE locations as we rewrite them,
invalidating the location numbers used to index the BitVector.

llvm-svn: 313679

7 years agoImport all inlined indirect call targets for SamplePGO.
Dehao Chen [Tue, 19 Sep 2017 21:18:14 +0000 (21:18 +0000)]
Import all inlined indirect call targets for SamplePGO.

Summary: In the ThinLTO compilation, if a function is inlined in the profiling binary, we need to inline it before annotation. If the callee is not available in the primary module, a first step is needed to import that callee function. For the current implementation, if the call is an indirect call, which has been promoted to >1 targets and inlined, SamplePGO will only import one target with the largest sample count. This patch fixed the bug to import all targets instead.

Reviewers: tejohnson, davidxl

Reviewed By: tejohnson

Subscribers: sanjoy, llvm-commits, mehdi_amini

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

llvm-svn: 313678

7 years ago[Sema] Move some stuff into -Wtautological-unsigned-enum-zero-compare
Roman Lebedev [Tue, 19 Sep 2017 21:11:35 +0000 (21:11 +0000)]
[Sema] Move some stuff into -Wtautological-unsigned-enum-zero-compare

Summary:
As requested by Sam McCall:
> Enums (not new I guess). Typical case: if (enum < 0 || enum > MAX)
> The warning strongly suggests that the enum < 0 check has no effect
> (for enums with nonnegative ranges).
> Clang doesn't seem to optimize such checks out though, and they seem
> likely to catch bugs in some cases. Yes, only if there's UB elsewhere,
> but I assume not optimizing out these checks indicates a deliberate
> decision to stay somewhat compatible with a technically-incorrect
> mental model.
> If this is the case, should we move these to a
> -Wtautological-compare-enum subcategory?

Reviewers: rjmccall, rsmith, aaron.ballman, sammccall, bkramer, djasper

Reviewed By: aaron.ballman

Subscribers: jroelofs, cfe-commits

Tags: #clang

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

llvm-svn: 313677

7 years ago[MSP430] Align functions on 2-byte boundary instead of 4.
Vadzim Dambrouski [Tue, 19 Sep 2017 21:05:20 +0000 (21:05 +0000)]
[MSP430] Align functions on 2-byte boundary instead of 4.

Summary:
There is no benefit in having the 4-byte alignment, and removing this
restriction can save a lot of space for some applications.

Reviewers: asl, awygle

Reviewed By: awygle

Subscribers: llvm-commits

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

llvm-svn: 313676

7 years ago[OpenMP] fix seg-faults printing diagnostics with invalid ordered(n) values
Rachel Craik [Tue, 19 Sep 2017 21:04:23 +0000 (21:04 +0000)]
[OpenMP] fix seg-faults printing diagnostics with invalid ordered(n) values

When the value specified for n in ordered(n) is larger than the number of loops a segmentation fault can occur in one of two ways when attempting to print out a diagnostic for an associated depend(sink : vec):
1) The iteration vector vec contains less than n items
2) The iteration vector vec contains a variable that is not a loop control variable
This patch addresses both of these issues.

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

llvm-svn: 313675

7 years ago[TableGen] Generate formatted DAGISelEmitter without relying on formatted_raw_ostream.
Craig Topper [Tue, 19 Sep 2017 21:03:57 +0000 (21:03 +0000)]
[TableGen] Generate formatted DAGISelEmitter without relying on formatted_raw_ostream.

The generated DAG isel file currently makes use of formatted_raw_ostream primarily for generating a hierarchical representation while also skipping over the initial comment that contains the current index.

It was reported in D37957 that this formatting might be slow due to the need to keep track of column numbers by monitoring all the written data for new lines.

This patch attempts to rewrite the emitter to make use of simpler formatting mechanisms to generate a fairly similar output. The main difference is that the number in the index comment is now right justified and padded with spaces inside the comment. Previously we appended the spaces after the comment.

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

llvm-svn: 313674

7 years agollvm-dwarfdump: un-hide more command line options
Adrian Prantl [Tue, 19 Sep 2017 20:58:57 +0000 (20:58 +0000)]
llvm-dwarfdump: un-hide more command line options

llvm-svn: 313673

7 years agoMove test into non-target-specific directory.
Adrian Prantl [Tue, 19 Sep 2017 20:58:56 +0000 (20:58 +0000)]
Move test into non-target-specific directory.

llvm-svn: 313672

7 years ago[SimplifyCFG] fix typos/formatting; NFC
Sanjay Patel [Tue, 19 Sep 2017 20:58:14 +0000 (20:58 +0000)]
[SimplifyCFG] fix typos/formatting; NFC

llvm-svn: 313671

7 years ago[AMDGPU] Prevent post-RA scheduler from breaking memory clauses
Stanislav Mekhanoshin [Tue, 19 Sep 2017 20:54:38 +0000 (20:54 +0000)]
[AMDGPU] Prevent post-RA scheduler from breaking memory clauses

The pre-RA scheduler does load/store clustering, but post-RA
scheduler undoes it. Add mutation to prevent it.

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

llvm-svn: 313670

7 years ago[SystemZ] Fix truncstore + bswap codegen bug
Ulrich Weigand [Tue, 19 Sep 2017 20:50:05 +0000 (20:50 +0000)]
[SystemZ] Fix truncstore + bswap codegen bug

SystemZTargetLowering::combineSTORE contains code to transform a
combination of STORE + BSWAP into a STRV type instruction.

This transformation is correct for regular stores, but not for
truncating stores.  The routine neglected to check for that case.

Fixes a miscompilation of llvm-objcopy with clang, which caused
test suite failures in the SystemZ multistage build bot.

llvm-svn: 313669

7 years agoRevert "ExecutionEngine: add R_AARCH64_ABS{16,32}"
Saleem Abdulrasool [Tue, 19 Sep 2017 20:35:25 +0000 (20:35 +0000)]
Revert "ExecutionEngine: add R_AARCH64_ABS{16,32}"

This reverts commit SVN r313654.  Seems that it is triggering an
assertion on Windows specifically.  Revert until I can build on Windows
and look into what is happening there.

llvm-svn: 313668

7 years agoSimplify. NFC.
Rui Ueyama [Tue, 19 Sep 2017 20:28:03 +0000 (20:28 +0000)]
Simplify. NFC.

llvm-svn: 313667

7 years agoTeach clang to tolerate the 'p = nullptr + n' idiom used by glibc
Andrew Kaylor [Tue, 19 Sep 2017 20:26:40 +0000 (20:26 +0000)]
Teach clang to tolerate the 'p = nullptr + n' idiom used by glibc

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

llvm-svn: 313666

7 years agoRevert "[llvm-objcopy] Add support for .dynamic, .dynsym, and .dynstr"
Jake Ehrlich [Tue, 19 Sep 2017 20:00:04 +0000 (20:00 +0000)]
Revert "[llvm-objcopy] Add support for .dynamic, .dynsym, and .dynstr"

This reverts commit r313663. Broken because overlapping-sections was
reverted.

llvm-svn: 313665

7 years agoRevert "[llvm-objcopy] Add support for nested and overlapping segments"
Jake Ehrlich [Tue, 19 Sep 2017 19:52:09 +0000 (19:52 +0000)]
Revert "[llvm-objcopy] Add support for nested and overlapping segments"

This reverts commit r313656. Appears to be broken on Windows.

llvm-svn: 313664

7 years ago[llvm-objcopy] Add support for .dynamic, .dynsym, and .dynstr
Jake Ehrlich [Tue, 19 Sep 2017 19:21:09 +0000 (19:21 +0000)]
[llvm-objcopy] Add support for .dynamic, .dynsym, and .dynstr

This change adds support for sections involved in dynamic loading such
as SHT_DYNAMIC, SHT_DYNSYM, and allocated string tables.

The two added binaries used for tests can be downloaded [[
https://drive.google.com/file/d/0B3gtIAmiMwZXOXE3T0RobFg4ZTg/view?usp=sharing
| here ]] and [[
https://drive.google.com/file/d/0B3gtIAmiMwZXTFJSQUJZMGxNSXc/view?usp=sharing
| here ]]

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

llvm-svn: 313663

7 years agoFix test to not depend on another subdirectories Input directory
David Blaikie [Tue, 19 Sep 2017 19:20:08 +0000 (19:20 +0000)]
Fix test to not depend on another subdirectories Input directory

Inputs should be placed local to the test (or possibly in a common
parent? I think we do that in some places - but the only common parent
between these two directories is 'test' which seems a bit overly broad).

llvm-svn: 313662

7 years ago[llvm-objcopy] Add test to check that architecture specific values are not used on...
Jake Ehrlich [Tue, 19 Sep 2017 19:05:15 +0000 (19:05 +0000)]
[llvm-objcopy] Add test to check that architecture specific values are not used on wrong architecture.

This change adds a test that checks the an error is produced when a hexagon
specific reserved section index is used but e_machine is not EM_HEXAGON.

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

llvm-svn: 313661

7 years agoRecommit r313647 now that GCC seems to accept the offering
Krzysztof Parzyszek [Tue, 19 Sep 2017 18:42:34 +0000 (18:42 +0000)]
Recommit r313647 now that GCC seems to accept the offering

Add some member types to MachineValueTypeSet::const_iterator so that
iterator_traits can work with it.

Improve TableGen performance of -gen-dag-isel (motivated by X86 backend)

The introduction of parameterized register classes in r313271 caused the
matcher generation code in TableGen to run much slower, particularly so
in the unoptimized (debug) build. This patch recovers some of the lost
performance.

Summary of changes:
- Cache the set of legal types in TypeInfer::getLegalTypes. The contents
  of this set do not change.
- Add LLVM_ATTRIBUTE_ALWAYS_INLINE to several small functions. Normally
  this would not be necessary, but in the debug build TableGen is not
  optimized, so this helps a little bit.
- Add an early exit from TypeSetByHwMode::operator== for the case when
  one or both arguments are "simple", i.e. only have one mode. This
  saves some time in GenerateVariants.
- Finally, replace the underlying storage type in TypeSetByHwMode::SetType
  with MachineValueTypeSet based on std::array instead of std::set.
  This significantly reduces the number of memory allocation calls.

I've done a number of experiments with the underlying type of InfoByHwMode.
The type is a map, and for targets that do not use the parameterization,
this map has only one entry. The best (unoptimized) performance, somewhat
surprisingly came from std::map, followed closely by std::unordered_map.
DenseMap was the slowest by a large margin.
Various hand-crafted solutions (emulating enough of the map interface
not to make sweeping changes to the users) did not yield any observable
improvements.

llvm-svn: 313660

7 years agodwarfdump/symbolizer: Avoid loading unneeded CUs from a DWP
David Blaikie [Tue, 19 Sep 2017 18:36:11 +0000 (18:36 +0000)]
dwarfdump/symbolizer: Avoid loading unneeded CUs from a DWP

When symbolizing large binaries, parsing every CU in a DWP file is a
significant performance penalty. Instead, use the index to only load the
CUs that are needed.

llvm-svn: 313659

7 years agoHandle profile mismatch correctly for SamplePGO.
Dehao Chen [Tue, 19 Sep 2017 18:26:54 +0000 (18:26 +0000)]
Handle profile mismatch correctly for SamplePGO.

Summary: Fix the bug when promoted call return type mismatches with the promoted function, we should not try to inline it. Otherwise it may lead to compiler crash.

Reviewers: davidxl, tejohnson, eraman

Reviewed By: tejohnson

Subscribers: llvm-commits, sanjoy

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

llvm-svn: 313658

7 years agoRe-land "Fix Bug 30978 by emitting cv file checksums."
Reid Kleckner [Tue, 19 Sep 2017 18:14:45 +0000 (18:14 +0000)]
Re-land "Fix Bug 30978 by emitting cv file checksums."

This reverts r313431 and brings back r313374 with a fix to write
checksums as binary data and not ASCII hex strings.

llvm-svn: 313657

7 years ago[llvm-objcopy] Add support for nested and overlapping segments
Jake Ehrlich [Tue, 19 Sep 2017 18:14:03 +0000 (18:14 +0000)]
[llvm-objcopy] Add support for nested and overlapping segments

This change adds support for nested and even overlapping segments. This means
that PT_PHDR, PT_GNU_RELRO, PT_TLS, and PT_DYNAMIC can be supported properly.

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

llvm-svn: 313656

7 years agoRe-land r313210 - Fix for bug 34532 - A few rough corners related to post-mortem...
Adrian McCarthy [Tue, 19 Sep 2017 18:07:33 +0000 (18:07 +0000)]
Re-land r313210 - Fix for bug 34532 - A few rough corners related to post-mortem debugging (core/minidump)

The main change is to avoid setting the process state as running when
debugging core/minidumps (details in the bug).  Also included a few small,
related fixes around how the errors propagate in this case.

Fixed the FreeBSD/Windows break: the intention was to keep
Process::WillResume() and Process::DoResume() "in-sync", but this had the
unfortunate consequence of breaking Process sub-classes which don't override
WillResume().

The safer approach is to keep Process::WillResume() untouched and only
override it in the minidump and core implementations.

patch by lemo

Bug: https://bugs.llvm.org/show_bug.cgi?id=34532

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

llvm-svn: 313655

7 years agoExecutionEngine: add R_AARCH64_ABS{16,32}
Saleem Abdulrasool [Tue, 19 Sep 2017 18:00:50 +0000 (18:00 +0000)]
ExecutionEngine: add R_AARCH64_ABS{16,32}

Add support for the R_AARCH64_ABS{16,32} relocations in the execution
engine.  This is primarily used for DWARF debug information relocations
and needed by the LLVM JIT to support JITing for lldb.

Patch by Alex Langford!

llvm-svn: 313654

7 years agoFix ClangDiagnosticHandler::is*RemarkEnabled members
Adam Nemet [Tue, 19 Sep 2017 17:59:40 +0000 (17:59 +0000)]
Fix ClangDiagnosticHandler::is*RemarkEnabled members

Apparently these weren't really working. I added test coverage and fixed the
typo in the name and the parameter.

llvm-svn: 313653

7 years agoSet ANDROID when any android abi is used, not just androideabi
Francis Ricci [Tue, 19 Sep 2017 17:56:27 +0000 (17:56 +0000)]
Set ANDROID when any android abi is used, not just androideabi

Reviewers: compnerd, beanz

Subscribers: srhines, mgorny, llvm-commits

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

Change-Id: Idab521f187aba18977818d91503763e0e9d3aa0e
llvm-svn: 313652

7 years agoRevert "Improve TableGen performance of -gen-dag-isel (motivated by X86 backend)"
Krzysztof Parzyszek [Tue, 19 Sep 2017 17:55:07 +0000 (17:55 +0000)]
Revert "Improve TableGen performance of -gen-dag-isel (motivated by X86 backend)"

It breaks a lot of bots due to missing "__iterator_category".

llvm-svn: 313651

7 years agoEnsure that armhf builtins library is created when using an hf abi
Francis Ricci [Tue, 19 Sep 2017 17:54:11 +0000 (17:54 +0000)]
Ensure that armhf builtins library is created when using an hf abi

Reviewers: beanz, compnerd

Reviewed By: compnerd

Subscribers: aemerson, mgorny, kristof.beyls, llvm-commits

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

llvm-svn: 313650

7 years agoMove "(void)variable" closer to the assertion that uses it, NFC
Krzysztof Parzyszek [Tue, 19 Sep 2017 17:47:53 +0000 (17:47 +0000)]
Move "(void)variable" closer to the assertion that uses it, NFC

llvm-svn: 313649

7 years ago[cmake] Add SOURCE_DIR argument to llvm_check_source_file_list
Shoaib Meenai [Tue, 19 Sep 2017 17:44:42 +0000 (17:44 +0000)]
[cmake] Add SOURCE_DIR argument to llvm_check_source_file_list

The motivation is to be able to check sources outside the current
directory. See D31363 for example usage.

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

llvm-svn: 313648

7 years agoImprove TableGen performance of -gen-dag-isel (motivated by X86 backend)
Krzysztof Parzyszek [Tue, 19 Sep 2017 17:32:35 +0000 (17:32 +0000)]
Improve TableGen performance of -gen-dag-isel (motivated by X86 backend)

The introduction of parameterized register classes in r313271 caused the
matcher generation code in TableGen to run much slower, particularly so
in the unoptimized (debug) build. This patch recovers some of the lost
performance.

Summary of changes:
- Cache the set of legal types in TypeInfer::getLegalTypes. The contents
  of this set do not change.
- Add LLVM_ATTRIBUTE_ALWAYS_INLINE to several small functions. Normally
  this would not be necessary, but in the debug build TableGen is not
  optimized, so this helps a little bit.
- Add an early exit from TypeSetByHwMode::operator== for the case when
  one or both arguments are "simple", i.e. only have one mode. This
  saves some time in GenerateVariants.
- Finally, replace the underlying storage type in TypeSetByHwMode::SetType
  with MachineValueTypeSet based on std::array instead of std::set.
  This significantly reduces the number of memory allocation calls.

I've done a number of experiments with the underlying type of InfoByHwMode.
The type is a map, and for targets that do not use the parameterization,
this map has only one entry. The best (unoptimized) performance, somewhat
surprisingly came from std::map, followed closely by std::unordered_map.
DenseMap was the slowest by a large margin.
Various hand-crafted solutions (emulating enough of the map interface
not to make sweeping changes to the users) did not yield any observable
improvements.

llvm-svn: 313647

7 years agoTweak orphan section placement.
Rafael Espindola [Tue, 19 Sep 2017 17:29:58 +0000 (17:29 +0000)]
Tweak orphan section placement.

Given a linker script that ends in

.some_sec { ...} ;
__stack_start = .;
. = . + 0x2000;
__stack_end = .;

lld would put orphan sections like .comment before __stack_end,
corrupting the intended meaning.

The reason we don't normally move orphans past assignments to . is to
avoid breaking

rx_sec : { *(rx_sec) }
. = ALIGN(0x1000);
/* The RW PT_LOAD starts here*/

but in this case, there is nothing after and it seems safer to put the
orphan section last. This seems to match bfd's behavior and is
convenient for writing linker scripts that care about the layout of
SHF_ALLOC sections, but not of any non SHF_ALLOC sections.

llvm-svn: 313646

7 years ago[mips][compiler-rt] UnXFAIL test.
Simon Dardis [Tue, 19 Sep 2017 17:26:02 +0000 (17:26 +0000)]
[mips][compiler-rt] UnXFAIL test.

lsan and asan were reporting leaks caused by a glibc configuration issue.

llvm-svn: 313645

7 years ago[X86] Convert X86ISD::SELECT to ISD::VSELECT just before instruction selection to...
Craig Topper [Tue, 19 Sep 2017 17:19:45 +0000 (17:19 +0000)]
[X86] Convert X86ISD::SELECT to ISD::VSELECT just before instruction selection to avoid duplicate patterns

Similar to what we do for X86ISD::SHRUNKBLEND just turn X86ISD::SELECT into ISD::VSELECT. This allows us to remove the duplicated TRUNC patterns.

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

llvm-svn: 313644

7 years agoResubmit "Fix llvm-lit script generation in libcxx."
Zachary Turner [Tue, 19 Sep 2017 17:19:10 +0000 (17:19 +0000)]
Resubmit "Fix llvm-lit script generation in libcxx."

After speaking with the libcxx owners, they agreed that this is
a bug in the bot that needs to be fixed by the bot owners, and
the CMake changes are correct.

llvm-svn: 313643

7 years agoFix build of TaskPoolTest with xcodebuild
Francis Ricci [Tue, 19 Sep 2017 17:13:39 +0000 (17:13 +0000)]
Fix build of TaskPoolTest with xcodebuild

llvm-svn: 313642

7 years ago[sanitizer] Don't define common ReportDeadlySignal on Fuchsia
Petr Hosek [Tue, 19 Sep 2017 17:00:22 +0000 (17:00 +0000)]
[sanitizer] Don't define common ReportDeadlySignal on Fuchsia

This causes a linker error because of duplicate symbol since
ReportDeadlySignal is defined both in sanitizer_common_libcdep and
sanitizer_fuchsia.

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

llvm-svn: 313641

7 years agoRe-land r313400 "[DebugInfo] Insert DW_OP_deref when spilling indirect DBG_VALUEs"
Reid Kleckner [Tue, 19 Sep 2017 16:32:15 +0000 (16:32 +0000)]
Re-land r313400 "[DebugInfo] Insert DW_OP_deref when spilling indirect DBG_VALUEs"

I forgot to zero out the BitVector when reusing it between UserValues.

Later uses of the same location number for a different UserValue would
falsely indicate that they were spilled. Usually this would lead to
incorrect debug info, but in some cases they would indicate something
nonsensical like a memory location based on a vector register (Q8 on
ARM).

llvm-svn: 313640

7 years ago[PowerPC Peephole] Constants into a join add, use ADDI over LI/ADD.
Tony Jiang [Tue, 19 Sep 2017 16:14:37 +0000 (16:14 +0000)]
[PowerPC Peephole] Constants into a join add, use ADDI over LI/ADD.

Two blocks prior to the join each perform an li and the the join block has an
add using the initialized register. Optimize each predecessor block to instead
use addi and delete the li's and add.

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

llvm-svn: 313639

7 years ago[AArch64] Extend tests of loads and stores of register pairs
Evandro Menezes [Tue, 19 Sep 2017 15:46:35 +0000 (15:46 +0000)]
[AArch64] Extend tests of loads and stores of register pairs

Include instances of FP register pairs.

llvm-svn: 313638

7 years agoUse ThreadLauncher to launch TaskPool threads
Francis Ricci [Tue, 19 Sep 2017 15:38:30 +0000 (15:38 +0000)]
Use ThreadLauncher to launch TaskPool threads

Summary:
This allows for the stack size to be configured, which isn't
possible with std::thread. Prevents overflowing the stack when
performing complex operations in the task pool on darwin,
where the default pthread stack size is only 512kb.

This also moves TaskPool from Utility to Host.

Reviewers: labath, tberghammer, clayborg

Subscribers: lldb-commits

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

llvm-svn: 313637

7 years ago[Power9] Add missing Power9 instructions.
Tony Jiang [Tue, 19 Sep 2017 15:22:36 +0000 (15:22 +0000)]
[Power9] Add missing Power9 instructions.

The following 8 instructions are implemented in this patch.
addpcis(subpcis, lnia), darn, maddhd, maddhdu, maddld, setb

llvm-svn: 313636

7 years agodwarfdump: Delay parsing abbreviations until they're needed
David Blaikie [Tue, 19 Sep 2017 15:13:55 +0000 (15:13 +0000)]
dwarfdump: Delay parsing abbreviations until they're needed

This speeds up dumping specific DIEs by not parsing abbreviations for
units that are not used.

(this is also handy to have in eventually to speed up llvm-symbolizer
for .dwp files, where parsing most of the DWP file can be avoided by
using the index)

llvm-svn: 313635

7 years agoRevert r313600 due to bot failures on Green Dragon.
Mike Edwards [Tue, 19 Sep 2017 14:51:37 +0000 (14:51 +0000)]
Revert r313600 due to bot failures on Green Dragon.

http://green.lab.llvm.org/green/job/clang-stage1-configure-RA_check/35585/

llvm-svn: 313634

7 years ago[globalisel] Add a G_BSWAP instruction and support bswap using it.
Daniel Sanders [Tue, 19 Sep 2017 14:25:15 +0000 (14:25 +0000)]
[globalisel] Add a G_BSWAP instruction and support bswap using it.

llvm-svn: 313633

7 years ago[X86][SSE] Add 'redundant pand' test case from PR34620
Simon Pilgrim [Tue, 19 Sep 2017 14:02:16 +0000 (14:02 +0000)]
[X86][SSE] Add 'redundant pand' test case from PR34620

llvm-svn: 313632

7 years ago[x86] regenerate checks; NFC
Sanjay Patel [Tue, 19 Sep 2017 13:43:09 +0000 (13:43 +0000)]
[x86] regenerate checks; NFC

llvm-svn: 313631

7 years ago[SLP] Reduce test, NFC.
Alexey Bataev [Tue, 19 Sep 2017 13:38:56 +0000 (13:38 +0000)]
[SLP] Reduce test, NFC.

llvm-svn: 313630

7 years ago[globalisel] Add support for intrinsic_void
Daniel Sanders [Tue, 19 Sep 2017 13:23:01 +0000 (13:23 +0000)]
[globalisel] Add support for intrinsic_void

llvm-svn: 313629

7 years ago[Sema] Disallow assigning record lvalues with nested const-qualified fields.
Bjorn Pettersson [Tue, 19 Sep 2017 13:10:30 +0000 (13:10 +0000)]
[Sema] Disallow assigning record lvalues with nested const-qualified fields.

Summary:
According to C99 6.3.2.1p1, structs and unions with nested
const-qualified fields (that is, const-qualified fields
declared at some recursive level of the aggregate) are not
modifiable lvalues. However, Clang permits assignments of
these lvalues.

With this patch, we both prohibit the assignment of records
with const-qualified fields and emit a best-effort diagnostic.
This fixes https://bugs.llvm.org/show_bug.cgi?id=31796 .

Committing on behalf of bevinh (Bevin Hansson).

Reviewers: rtrieu, rsmith, bjope

Reviewed By: bjope

Subscribers: Ka-Ka, rogfer01, bjope, fhahn, cfe-commits

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

llvm-svn: 313628

7 years ago[globalisel] Add support for intrinsic_w_chain.
Daniel Sanders [Tue, 19 Sep 2017 12:56:36 +0000 (12:56 +0000)]
[globalisel] Add support for intrinsic_w_chain.

This maps directly to G_INTRINSIC_W_SIDE_EFFECTS.

llvm-svn: 313627

7 years ago[Nios2] Subtarget, basic infrastructure for frame, instructions and registers
Nikolai Bozhenov [Tue, 19 Sep 2017 11:54:29 +0000 (11:54 +0000)]
[Nios2] Subtarget, basic infrastructure for frame, instructions and registers

This is the second minimal patch keeping Nios2 target buildable.
I'm adding subtarget here and other stuff for frame lowering, instruction,
register information methods. I do not add any test cases, as still there
are missing parts like DAG selector and assembly printing. I plan to include
them into the next patch.

Patch by Andrei Grischenko <andrei.l.grischenko@intel.com>

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

llvm-svn: 313626

7 years ago[x86] Lowering Mask Set1 intrinsics to LLVM IR
Jina Nahias [Tue, 19 Sep 2017 11:03:06 +0000 (11:03 +0000)]
[x86] Lowering Mask Set1 intrinsics to LLVM IR

This patch, together with a matching clang patch (https://reviews.llvm.org/D37668), implements the lowering of X86 mask set1 intrinsics to IR.

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

llvm-svn: 313625

7 years agoLowering Mask Set1 intrinsics to LLVM IR
Jina Nahias [Tue, 19 Sep 2017 11:00:27 +0000 (11:00 +0000)]
Lowering Mask Set1 intrinsics to LLVM IR

This patch, together with a matching llvm patch (https://reviews.llvm.org/D37669), implements the lowering of X86 mask set1 intrinsics to IR.

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

llvm-svn: 313624

7 years ago[GPUJIT] Improved temporary file handling.
Philipp Schaad [Tue, 19 Sep 2017 10:41:29 +0000 (10:41 +0000)]
[GPUJIT] Improved temporary file handling.

Summary: Imporved the way the GPUJIT handles temporary files for Intel's Beignet.

Reviewers: bollu, grosser

Reviewed By: grosser

Subscribers: philip.pfaffe, pollydev

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

llvm-svn: 313623

7 years agoFix formatting of lambda introducers with initializers.
Manuel Klimek [Tue, 19 Sep 2017 09:59:30 +0000 (09:59 +0000)]
Fix formatting of lambda introducers with initializers.

Most of the work was already done when we introduced a look-behind based
lambda introducer detection.

This patch finishes the transition by completely relying on the simple
lambda introducer detection and simply recursing into normal
brace-parsing code to parse until the end of the introducer.

This fixes initializers in lambdas, including nested lambdas.

Before:
  auto a = [b = [c = 42]{}]{};
  auto b = [c = &i + 23]{};

After:
  auto a = [b = [c = 42] {}] {};
  auto b = [c = &i + 23] {};

llvm-svn: 313622

7 years ago[ELF] - Do not merge sections from SHT_GROUP when -relocatable
George Rimar [Tue, 19 Sep 2017 09:40:31 +0000 (09:40 +0000)]
[ELF] - Do not merge sections from SHT_GROUP when -relocatable

This is PR34506.

Imagine we have 2 sections the same name but different COMDAT groups:

.section        .foo,"axG",@progbits,bar,comdat
.section        .foo,"axG",@progbits,zed,comdat
When linking relocatable we do not merge SHT_GROUP sections. But still would merge
both input sections .foo into single output section .foo.
As a result we will have 2 different SHT_GROUPs containing the same section, what
is wrong.

Patch fixes the issue, preventing merging SHF_GROUP sections with any others.

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

llvm-svn: 313621

7 years ago[ELF] - Don't crash when --emit-relocs is used with --gc-sections
George Rimar [Tue, 19 Sep 2017 09:28:03 +0000 (09:28 +0000)]
[ELF] - Don't crash when --emit-relocs is used with --gc-sections

We crashed when --emit-relocs was used
and relocated section was collected by GC.

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

llvm-svn: 313620

7 years ago[ELF] - Introduce std::vector<InputFile *> global arrays.
George Rimar [Tue, 19 Sep 2017 09:20:54 +0000 (09:20 +0000)]
[ELF] - Introduce std::vector<InputFile *> global arrays.

This patch removes lot of static Instances arrays from different input file
classes and introduces global arrays for access instead. Similar to arrays we
have for InputSections/OutputSectionCommands.

It allows to iterate over input files in a non-templated code.

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

llvm-svn: 313619

7 years ago[ARM] Use ADDCARRY / SUBCARRY
Roger Ferrer Ibanez [Tue, 19 Sep 2017 09:05:39 +0000 (09:05 +0000)]
[ARM] Use ADDCARRY / SUBCARRY

This is a preparatory step for D34515.

This change:
 - makes nodes ISD::ADDCARRY and ISD::SUBCARRY legal for i32
 - lowering is done by first converting the boolean value into the carry flag
   using (_, C) ← (ARMISD::ADDC R, -1) and converted back to an integer value
   using (R, _) ← (ARMISD::ADDE 0, 0, C). An ARMISD::ADDE between the two
   operations does the actual addition.
 - for subtraction, given that ISD::SUBCARRY second result is actually a
   borrow, we need to invert the value of the second operand and result before
   and after using ARMISD::SUBE. We need to invert the carry result of
   ARMISD::SUBE to preserve the semantics.
 - given that the generic combiner may lower ISD::ADDCARRY and
   ISD::SUBCARRYinto ISD::UADDO and ISD::USUBO we need to update their lowering
   as well otherwise i64 operations now would require branches. This implies
   updating the corresponding test for unsigned.
 - add new combiner to remove the redundant conversions from/to carry flags
   to/from boolean values (ARMISD::ADDC (ARMISD::ADDE 0, 0, C), -1) → C
 - fixes PR34045
 - fixes PR34564

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

llvm-svn: 313618

7 years agoTest commit.
Andrei Elovikov [Tue, 19 Sep 2017 07:56:20 +0000 (07:56 +0000)]
Test commit.

llvm-svn: 313617

7 years agoAMDGPU: Run internalize symbols at -O0
Matt Arsenault [Tue, 19 Sep 2017 07:40:11 +0000 (07:40 +0000)]
AMDGPU: Run internalize symbols at -O0

The relocations used for externally visible functions
aren't supported, so the direct call emitted ends
up hitting a linker error.

llvm-svn: 313616

7 years ago[ubsan-minimal] Test exported symbol set against RTUBsan
Vedant Kumar [Tue, 19 Sep 2017 06:46:36 +0000 (06:46 +0000)]
[ubsan-minimal] Test exported symbol set against RTUBsan

Check that the symbol sets exported by the minimal runtime and the full
runtime match (making exceptions for special cases as needed).

This test uses some possibly non-standard nm options, and needs to
inspect the symbols in runtime dylibs. I haven't found a portable way to
do this, so it's limited to x86-64/Darwin for now.

llvm-svn: 313615

7 years ago[ubsan-minimal] Make the interface more compatible with RTUBSan
Vedant Kumar [Tue, 19 Sep 2017 06:46:36 +0000 (06:46 +0000)]
[ubsan-minimal] Make the interface more compatible with RTUBSan

This eliminates a few inconsistencies between the symbol sets exported
by RTUBSan and RTUBSan_minimal:

  * Handlers for nonnull_return were missing from the minimal RT, and
    are now added in.

  * The minimal runtime exported recoverable handlers for
    builtin_unreachable and missing_return. These are not supposed to
    exist, and are now removed.

llvm-svn: 313614

7 years ago[X86][Skylake] Adding the scheduling information for the SkylakeClient target
Gadi Haber [Tue, 19 Sep 2017 06:19:27 +0000 (06:19 +0000)]
[X86][Skylake] Adding the scheduling information for the SkylakeClient target

This patch adds the instruction scheduling information for the SkylakeClient (SKL) architecture target by adding the file X86SchedSkylakeClient.td located under the X86 Target.
We used the scheduling information retrieved from the Skylake architects in order to create the file.
The scheduling information includes latency, number of micro-Ops and used ports by each SKL instruction.
The patch continues the scheduling replacement and insertion effort started with the SNB target in r307529 and r310792 and for HSW in r311879.

Please expect some performance fluctuations due to code alignment effects.

Reviewers: craig.topper, zvi, chandlerc, igorb, aymanmus, RKSimon, delena
Differential Revision: https://reviews.llvm.org/D37294

llvm-svn: 313613

7 years ago[X86] Remove some unnecessary patterns for truncate with X86ISD::SELECT and undef...
Craig Topper [Tue, 19 Sep 2017 05:30:24 +0000 (05:30 +0000)]
[X86] Remove some unnecessary patterns for truncate with X86ISD::SELECT and undef preserved source.

We canonicalize undef preserved sources to zero during intrinsic lowering.

llvm-svn: 313612

7 years ago[LLVM] [RegionInfo] Introduce getExitingBlocks to get all predecessors of Exit in...
Hongbin Zheng [Tue, 19 Sep 2017 04:59:27 +0000 (04:59 +0000)]
[LLVM] [RegionInfo] Introduce getExitingBlocks to get all predecessors of Exit in the current region.

This function will return true if all predecessors of Exit are in the current region, false otherwise.

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

llvm-svn: 313611

7 years ago[X86] Add VPERMPD/VPERMQ and VPERMPS/VPERMD to the execution domain fixing table.
Craig Topper [Tue, 19 Sep 2017 04:39:55 +0000 (04:39 +0000)]
[X86] Add VPERMPD/VPERMQ and VPERMPS/VPERMD to the execution domain fixing table.

llvm-svn: 313610

7 years agodocs: Fix formatting in HowToReleaseLLVM
Tom Stellard [Tue, 19 Sep 2017 03:27:26 +0000 (03:27 +0000)]
docs: Fix formatting in HowToReleaseLLVM

This is a follow up to r313608.

llvm-svn: 313609

7 years agodocs: Add instructions for how to submit a merge request
Tom Stellard [Tue, 19 Sep 2017 03:23:03 +0000 (03:23 +0000)]
docs: Add instructions for how to submit a merge request

Reviewers: hansw, hans

Reviewed By: hans

Subscribers: hans, llvm-commits

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

llvm-svn: 313608

7 years agoRevert "Fix llvm-lit script generation in libcxx."
Zachary Turner [Tue, 19 Sep 2017 03:11:35 +0000 (03:11 +0000)]
Revert "Fix llvm-lit script generation in libcxx."

This reverts commit 4ad71811d45268d81b60f27e3b8b2bcbc23bd7b9.

There is a bot that is checking out libcxx and lit with nothing
else and then running lit.py against the test tree.  Since there's
no LLVM source tree, there's no LLVM CMake.  CMake actually
reports this as a warning saying unsupported libcxx configuration,
but I guess someone is depending on it anyway.

llvm-svn: 313607

7 years agoFix llvm-lit script generation in libcxx.
Zachary Turner [Tue, 19 Sep 2017 02:46:28 +0000 (02:46 +0000)]
Fix llvm-lit script generation in libcxx.

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

llvm-svn: 313606

7 years agoAllow public Triple deduction from ObjectFiles.
Vlad Tsyrklevich [Tue, 19 Sep 2017 02:22:48 +0000 (02:22 +0000)]
Allow public Triple deduction from ObjectFiles.

Move logic that allows for Triple deduction from an ObjectFile object
out of llvm-objdump.cpp into a public factory, found in the ObjectFile
class.

This should allow other tools in the future to use this logic without
reimplementation.

Patch by Mitch Phillips

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

llvm-svn: 313605

7 years ago[llvm-cov] Make report metrics agree with line exec counts, fixes PR34615
Vedant Kumar [Tue, 19 Sep 2017 02:00:12 +0000 (02:00 +0000)]
[llvm-cov] Make report metrics agree with line exec counts, fixes PR34615

Use the same logic as the line-oriented coverage view to determine the
number of covered lines in a function.

Fixes llvm.org/PR34615.

llvm-svn: 313604

7 years ago[Coverage] Remove deferred region for trailing return, fixes PR34611
Vedant Kumar [Tue, 19 Sep 2017 00:29:46 +0000 (00:29 +0000)]
[Coverage] Remove deferred region for trailing return, fixes PR34611

As a special case, throw away deferred regions for trailing returns.
This allows the closing curly brace to have a count, and is less
distracting.

llvm-svn: 313603

7 years ago[profile] Update Linux-only tests after r313597
Vedant Kumar [Tue, 19 Sep 2017 00:15:18 +0000 (00:15 +0000)]
[profile] Update Linux-only tests after r313597

Addresses bot failure:
http://lab.llvm.org:8011/builders/clang-ppc64le-linux/builds/9803

llvm-svn: 313602

7 years agoSet svn:ignore property on *.pyc.
Zachary Turner [Tue, 19 Sep 2017 00:13:42 +0000 (00:13 +0000)]
Set svn:ignore property on *.pyc.

I think this is what is causing the build to constantly encounter tree conflicts.

llvm-svn: 313601

7 years agoDrop -O1 case from nrvo-string.cpp
Hans Wennborg [Mon, 18 Sep 2017 23:54:43 +0000 (23:54 +0000)]
Drop -O1 case from nrvo-string.cpp

It relied on r313400 which was reverted in r313589.

llvm-svn: 313600

7 years ago[profile] Update InstrProfData.inc
Vedant Kumar [Mon, 18 Sep 2017 23:37:32 +0000 (23:37 +0000)]
[profile] Update InstrProfData.inc

llvm-svn: 313599

7 years ago[Coverage] Use a new API to label gap areas
Vedant Kumar [Mon, 18 Sep 2017 23:37:30 +0000 (23:37 +0000)]
[Coverage] Use a new API to label gap areas

This will make it possible for llvm-cov to pick better line execution
counts, and is part of the fix for llvm.org/PR34612.

llvm-svn: 313598

7 years ago[Coverage] Use gap regions to select better line exec counts
Vedant Kumar [Mon, 18 Sep 2017 23:37:28 +0000 (23:37 +0000)]
[Coverage] Use gap regions to select better line exec counts

After clang started emitting deferred regions (r312818), llvm-cov has
had a hard time picking reasonable line execuction counts. There have
been one or two generic improvements in this area (e.g r310012), but
line counts can still report coverage for whitespace instead of code
(llvm.org/PR34612).

To fix the problem:

 * Introduce a new region kind so that frontends can explicitly label
   gap areas.

   This is done by changing the encoding of the columnEnd field of
   MappingRegion. This doesn't substantially increase binary size, and
   makes it easy to maintain backwards-compatibility.

 * Don't set the line count to a count from a gap area, unless the count
   comes from a wrapped segment.

 * Don't highlight gap areas as uncovered.

Fixes llvm.org/PR34612.

llvm-svn: 313597

7 years ago[llvm-cov] Repair a test. NFC.
Vedant Kumar [Mon, 18 Sep 2017 23:37:27 +0000 (23:37 +0000)]
[llvm-cov] Repair a test. NFC.

The checks with the MARKER prefix were not being run over the right
input, because stderr was not redirected properly.

llvm-svn: 313596

7 years ago[llvm-cov] Simplify code to find the first uncovered segment. NFC.
Vedant Kumar [Mon, 18 Sep 2017 23:37:27 +0000 (23:37 +0000)]
[llvm-cov] Simplify code to find the first uncovered segment. NFC.

Now that that segment builder is guaranteed to produce segments in
sorted order, we don't need a linear scan to get the right result.

llvm-svn: 313595

7 years ago[lit] Use realpath when adding to the config map.
Zachary Turner [Mon, 18 Sep 2017 23:36:35 +0000 (23:36 +0000)]
[lit] Use realpath when adding to the config map.

Since the path a user specifies to the llvm-lit script might be
different than the source tree they built from (since they could
be behind different symlinks), we need to use realpath to make
sure that path comparisons work as expected.

Even better would be to use a custom dictionary comparison with
actual file equivalence comparison semantics, but this is the
least friction to unbreak things for now.

llvm-svn: 313594

7 years agobpf: add inline-asm support
Yonghong Song [Mon, 18 Sep 2017 23:29:36 +0000 (23:29 +0000)]
bpf: add inline-asm support

Signed-off-by: Yonghong Song <yhs@fb.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
llvm-svn: 313593