platform/upstream/llvm.git
5 years ago[NFC] Unify guards detection
Max Kazantsev [Wed, 29 Aug 2018 11:37:34 +0000 (11:37 +0000)]
[NFC] Unify guards detection

We have multiple places in code where we try to identify whether or not
some instruction is a guard. This patch factors out this logic into a separate
utility function which works uniformly in all places.

Differential Revision: https://reviews.llvm.org/D51152
Reviewed By: fedor.sergeev

llvm-svn: 340921

5 years ago[mips] Add missing instructions
Aleksandar Beserminji [Wed, 29 Aug 2018 11:35:03 +0000 (11:35 +0000)]
[mips] Add missing instructions

Add pll.ps, plu.ps, cvt.s.pu, cvt.s.pl, cvt.ps instructions for FP64.

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

llvm-svn: 340920

5 years ago[DAGCombiner] Add X / X -> 1 & X % X -> 0 folds
Simon Pilgrim [Wed, 29 Aug 2018 11:30:16 +0000 (11:30 +0000)]
[DAGCombiner] Add X / X -> 1 & X % X -> 0 folds

Adds more divrem folds to try and get in sync with InstructionSimplify

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

llvm-svn: 340919

5 years agoIntroduce the abseil-redundant-strcat-calls check.
Aaron Ballman [Wed, 29 Aug 2018 11:29:07 +0000 (11:29 +0000)]
Introduce the abseil-redundant-strcat-calls check.

This flags redundant calls to absl::StrCat where the result is being passed to another call to absl::StrCat or absl::StrAppend. Patch by Hugo Gonzalez and Samuel Benzaquen.

llvm-svn: 340918

5 years ago[DAGCombiner] Add X / X -> 1 & X % X -> 0 folds (test tweaks)
Simon Pilgrim [Wed, 29 Aug 2018 11:23:59 +0000 (11:23 +0000)]
[DAGCombiner] Add X / X -> 1 & X % X -> 0 folds (test tweaks)

Adjust missed test to avoid the X / X -> 1 & X % X -> 0 folds while keeping their original purposes.

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

llvm-svn: 340917

5 years ago[DAGCombiner] Add X / X -> 1 & X % X -> 0 folds (test tweaks)
Simon Pilgrim [Wed, 29 Aug 2018 11:18:14 +0000 (11:18 +0000)]
[DAGCombiner] Add X / X -> 1 & X % X -> 0 folds (test tweaks)

Adjust tests to avoid the X / X -> 1 & X % X -> 0 folds while keeping their original purposes.

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

llvm-svn: 340916

5 years agoIntroduce the abseil-str-cat-append check.
Aaron Ballman [Wed, 29 Aug 2018 11:17:31 +0000 (11:17 +0000)]
Introduce the abseil-str-cat-append check.

This flags uses of absl::StrCat when absl::StrAppend should be used instead. Patch by Hugo Gonzalez and Benjamin Kramer.

llvm-svn: 340915

5 years ago[NFC] Factor out guard utility methods into a separate file
Max Kazantsev [Wed, 29 Aug 2018 10:51:59 +0000 (10:51 +0000)]
[NFC] Factor out guard utility methods into a separate file

This patch creates file GuardUtils which will contain logic for work with guards
that can be shared across different passes.

Differential Revision: https://reviews.llvm.org/D51151
Reviewed By: fedor.sergeev

llvm-svn: 340914

5 years ago[X86][AVX] Prefer VPBLENDW+VPBLENDD to VPBLENDVB for v16i16 blend shuffles
Simon Pilgrim [Wed, 29 Aug 2018 10:51:08 +0000 (10:51 +0000)]
[X86][AVX] Prefer VPBLENDW+VPBLENDD to VPBLENDVB for v16i16 blend shuffles

Noticed while looking at D49562 codegen - we can avoid a large constant mask load and a slow VPBLENDVB select op by using VPBLENDW+VPBLENDD instead.

TODO: As discussed on the patch, we should investigate adding VPBLENDVB handling to target shuffle combining as well, that will allow us to extend this to VPBLENDW+VPBLENDW+VPBLENDD.

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

llvm-svn: 340913

5 years ago[MC] fix a clang-tidy warning, NFC
Krasimir Georgiev [Wed, 29 Aug 2018 10:40:51 +0000 (10:40 +0000)]
[MC] fix a clang-tidy warning, NFC

Summary:
Per clang-tidy:
function 'llvm::MCStreamer::checkCVLocSection' has a definition with different parameter names

.../llvm/lib/MC/MCStreamer.cpp:275:18: the definition seen here

.../llvm/include/llvm/MC/MCStreamer.h:235:8: differing parameters are named here: ('FuncId'), in definition: ('FunctionId')

Reviewers: bkramer

Reviewed By: bkramer

Subscribers: llvm-commits

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

llvm-svn: 340912

5 years ago[ARM] Set __ARM_FEATURE_SIMD32 for +dsp cores
Sam Parker [Wed, 29 Aug 2018 10:39:03 +0000 (10:39 +0000)]
[ARM] Set __ARM_FEATURE_SIMD32 for +dsp cores

ARM_FEATURE_DSP is already set for targets with the +dsp feature. In
the backend, this target feature is also used to represent the
availability of the of the instructions that the ACLE guard through
the __ARM_FEATURE_SIMD32 macro. We don't have any cores that
implement one and not the other, so set this macro for cores later
than V6 or for Cortex-M cores that the target parser, or user, reports
that the 'dsp' instructions are supported.

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

llvm-svn: 340911

5 years agoRemove debug code accidently committed in rL340837. NFCI.
Simon Pilgrim [Wed, 29 Aug 2018 10:10:58 +0000 (10:10 +0000)]
Remove debug code accidently committed in rL340837. NFCI.

llvm-svn: 340908

5 years agoIntroduce new type for inteceptors UINTMAX_T
Kamil Rytarowski [Wed, 29 Aug 2018 09:11:17 +0000 (09:11 +0000)]
Introduce new type for inteceptors UINTMAX_T

Summary:
The UINTMAX_T type will be used in new interceptors.

While there, correct the type of strtoumax(3) from INTMAX_T to UINTMAX_T.

Original patch from Yang Zheng.

Reviewers: vitalybuka, kcc, joerg

Reviewed By: vitalybuka

Subscribers: kubamracek, llvm-commits, tomsun.0.7, #sanitizers

Tags: #sanitizers

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

llvm-svn: 340907

5 years agoRevert r340904 "[llvm-mc] - Allow to set custom flags for debug sections."
George Rimar [Wed, 29 Aug 2018 09:04:52 +0000 (09:04 +0000)]
Revert r340904 "[llvm-mc] - Allow to set custom flags for debug sections."

It broke PPC64 BB:
http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/23252

llvm-svn: 340906

5 years ago[benchmark] NFC: Turn benchmark ON on all non-Windows buildbots
Kirill Bobyrev [Wed, 29 Aug 2018 08:59:36 +0000 (08:59 +0000)]
[benchmark] NFC: Turn benchmark ON on all non-Windows buildbots

The problems with benchmark build should be fixed now, but Windows
buildbots still run into errors seemingly because of the bug in
clang-cl. Because of that, benchmark shouldn't be built on Windows at
this point.

llvm-svn: 340905

5 years ago[llvm-mc] - Allow to set custom flags for debug sections.
George Rimar [Wed, 29 Aug 2018 08:42:02 +0000 (08:42 +0000)]
[llvm-mc] - Allow to set custom flags for debug sections.

I am experimenting with a single split dwarf (.dwo sections in .o files).
I want to make linker to ignore .dwo sections in .o, for that I am trying to add
SHF_EXCLUDE flag ("E") for them in my asm sample.

I found that currently, it is impossible to add any flag for debug sections using llvm-mc.

That happens because we have a set of predefined unique sections created early with default flags:
https://github.com/llvm-mirror/llvm/blob/master/lib/MC/MCObjectFileInfo.cpp#L391

This patch allows a user to add any flags he wants.

I had to edit TargetLoweringObjectFileImpl.cpp to set MetaData type for debug sections.
Their kind was Data by default (so they were allocatable) and so after changes introduced by
this patch the SHF_ALLOC flag was applied for them, what does not make sense for debug sections.
One of OrcJITTests tests failed because of that.

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

llvm-svn: 340904

5 years agoAMDGPU: Fix getInstSizeInBytes
Nicolai Haehnle [Wed, 29 Aug 2018 07:46:09 +0000 (07:46 +0000)]
AMDGPU: Fix getInstSizeInBytes

Summary:
Add some optional code to validate getInstSizeInBytes for emitted
instructions. This flushed out some issues which are fixed by this
patch:

- Streamline getInstSizeInBytes
- Properly define the VI readlane/writelane instruction as VOP3
- Fix the inline constant determination. Specifically, this change
  fixes an issue where a 32-bit value of 0xffffffff was recorded
  as unsigned. This is equal to -1 when restricting to a 32-bit
  comparison, and an inline constant can be used.

Reviewers: arsenm, rampitec

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

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

Change-Id: Id87c3b7975839da0de8156a124b0ce98c5fb47f2
llvm-svn: 340903

5 years agoAlways add a .note.GNU-stack section if -r.
Rui Ueyama [Wed, 29 Aug 2018 07:27:09 +0000 (07:27 +0000)]
Always add a .note.GNU-stack section if -r.

With this patch, lld creates a .note.GNU_stack and adds that to an
output file if it is creating a re-linkable object file (i.e. if -r
is given). If we don't do this, and if you use GNU linkers as a final
linker, they create an executable whose stack area is executable,
which is considered pretty bad these days.

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

llvm-svn: 340902

5 years ago[PDB] Resolve a symbol context block info correctly
Aleksandr Urakov [Wed, 29 Aug 2018 07:26:11 +0000 (07:26 +0000)]
[PDB] Resolve a symbol context block info correctly

Summary:
This patch allows to resolve a symbol context block info even if a function
info was not requested. Also it adds the correct resolving of nested blocks
(the previous implementation used function blocks instead of them).

Reviewers: zturner, asmith, labath

Reviewed By: asmith

Subscribers: lldb-commits, stella.stamenova

Tags: #lldb

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

llvm-svn: 340901

5 years agoLoopSink: Don't sink into blocks without an insertion point (PR38462)
Hans Wennborg [Wed, 29 Aug 2018 06:55:27 +0000 (06:55 +0000)]
LoopSink: Don't sink into blocks without an insertion point (PR38462)

In the PR, LoopSink was trying to sink into a catchswitch block, which
doesn't have a valid insertion point.

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

llvm-svn: 340900

5 years ago[SelectionDAG] Remove masked_gather/scatter from TargetSelectionDAG.td.
Craig Topper [Wed, 29 Aug 2018 04:45:33 +0000 (04:45 +0000)]
[SelectionDAG] Remove masked_gather/scatter from TargetSelectionDAG.td.

These aren't used in tree and the number of operands in the type profile is wrong. X86 uses its own ISD opcode and type profile after op legalization.

llvm-svn: 340899

5 years ago[SelectionDAG] Add some comments to ISDOpcodes.h about the operands of MLOAD, MSTORE...
Craig Topper [Wed, 29 Aug 2018 04:45:32 +0000 (04:45 +0000)]
[SelectionDAG] Add some comments to ISDOpcodes.h about the operands of MLOAD, MSTORE, MGATHER, MSCATTER. NFC

llvm-svn: 340898

5 years agoAdd support for various C++14 demanglings.
Zachary Turner [Wed, 29 Aug 2018 04:12:44 +0000 (04:12 +0000)]
Add support for various C++14 demanglings.

Mostly this includes <auto> and <decltype-auto> return values.
Additionally, this fixes a fairly obscure back-referencing bug
that was encountered in one of the C++14 tests, which is that
if you have something like Foo<&bar, &bar> then the `bar`
forms a backreference.

llvm-svn: 340896

5 years ago[MS Demangler] Add output flags to all function calls.
Zachary Turner [Wed, 29 Aug 2018 03:59:17 +0000 (03:59 +0000)]
[MS Demangler] Add output flags to all function calls.

Previously we had a FunctionSigFlags, but it's more flexible
to just have one set of output flags that apply to the entire
process and just pipe the entire set of flags through the
output process.

This will be useful when we start allowing the user to customize
the outputting behavior.

llvm-svn: 340894

5 years agoNFC. fixing time-passes test failure on Windows.
Fedor Sergeev [Wed, 29 Aug 2018 03:53:30 +0000 (03:53 +0000)]
NFC. fixing time-passes test failure on Windows.

llvm-svn: 340893

5 years ago[GISel]: Add legalization support for Widening UADDO/USUBO
Aditya Nandakumar [Wed, 29 Aug 2018 03:17:08 +0000 (03:17 +0000)]
[GISel]: Add legalization support for Widening UADDO/USUBO

https://reviews.llvm.org/D51384

Added code in LegalizerHelper to widen UADDO/USUBO along with unit
tests.

Reviewed by volkan.

llvm-svn: 340892

5 years ago[X86] Support v2i32 gather/scatter indices with -x86-experimental-vector-widening...
Craig Topper [Wed, 29 Aug 2018 02:12:49 +0000 (02:12 +0000)]
[X86] Support v2i32 gather/scatter indices with -x86-experimental-vector-widening-legalization

Summary: This is split out from D41062 to cover the code in LegalVectorTypes.cpp

Reviewers: RKSimon, spatel, efriedma

Reviewed By: efriedma

Subscribers: sdardis, jvesely, nhaehnle, jrtc27, atanasyan, llvm-commits

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

llvm-svn: 340891

5 years ago[ELF] Change llvm-objdump -D to -d for check lines that only inspect text sections
Fangrui Song [Wed, 29 Aug 2018 02:07:58 +0000 (02:07 +0000)]
[ELF] Change llvm-objdump -D to -d for check lines that only inspect text sections

Reviewers: ruiu, sfertile, syzaara, espindola

Subscribers: emaste, nemanjai, arichardson, kbarton, llvm-commits

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

llvm-svn: 340890

5 years agoStart reserving x18 by default on Android targets.
Peter Collingbourne [Wed, 29 Aug 2018 01:38:47 +0000 (01:38 +0000)]
Start reserving x18 by default on Android targets.

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

llvm-svn: 340889

5 years ago[llvm-mca] Remove unused formal. NFC.
Matt Davis [Wed, 29 Aug 2018 00:41:04 +0000 (00:41 +0000)]
[llvm-mca] Remove unused formal. NFC.

llvm-svn: 340888

5 years ago[llvm-mca] Move the initialization of Pipeline. NFC.
Matt Davis [Wed, 29 Aug 2018 00:34:32 +0000 (00:34 +0000)]
[llvm-mca] Move the initialization of Pipeline. NFC.

Code cleanup to make the pipeline creation routine easier to read.

llvm-svn: 340887

5 years ago[sanitizer] fix a test
Kostya Serebryany [Tue, 28 Aug 2018 23:50:59 +0000 (23:50 +0000)]
[sanitizer] fix a test

llvm-svn: 340886

5 years ago[LLDB] Fix script to work with GNU sed
Shoaib Meenai [Tue, 28 Aug 2018 23:47:22 +0000 (23:47 +0000)]
[LLDB] Fix script to work with GNU sed

GNU sed and BSD sed have a different command-line syntax for in-place
editing, and the current form of the script would only work with BSD
sed. The easiest way to get cross-platform behavior is to specify a
backup suffix and then just delete the backup file at the end. (BSD sed
is the default on macOS, but it's possible to acquire GNU coreutils and
have your `sed` be GNU sed even on macOS; I'm aware it's not officially
supported in any capacity, but it's easy enough to support here.)

An alternative would be using `perl -p -i -e` instead of `sed -i`, but I
figured it was best to make the minimal working change.

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

llvm-svn: 340885

5 years agoAdd a RingBuffer class to sanitizer_common
Kostya Serebryany [Tue, 28 Aug 2018 23:32:56 +0000 (23:32 +0000)]
Add a RingBuffer class to sanitizer_common

Summary: a constrained RingBuffer optimized for fast push

Reviewers: eugenis

Reviewed By: eugenis

Subscribers: kubamracek, mgorny, delcypher, #sanitizers, llvm-commits

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

llvm-svn: 340884

5 years ago[codeview] Clean up machinery for deferring .cv_loc emission
Reid Kleckner [Tue, 28 Aug 2018 23:25:59 +0000 (23:25 +0000)]
[codeview] Clean up machinery for deferring .cv_loc emission

Now that we create the label at the point of the directive, we don't
need to set the "current CV location", and then later when we emit the
next instruction, create a label for it and emit it.

DWARF still defers the labels used in .debug_loc until the next
instruction or value, for reasons unknown.

llvm-svn: 340883

5 years ago[QTOOL-37352] Consider isLegalAddressingImm in Constant Hoisting
Zhaoshi Zheng [Tue, 28 Aug 2018 23:00:59 +0000 (23:00 +0000)]
[QTOOL-37352] Consider isLegalAddressingImm in Constant Hoisting

In Thumb1, legal imm range is [0, 255] for ADD/SUB instructions. However, the
legal imm range for LD/ST in (R+Imm) addressing mode is [0, 127]. Imms in
[128, 255] are materialized by mov R, #imm, and LD/STs use them in (R+R)
addressing mode.

This patch checks if a constant is used as offset in (R+Imm), if so, it checks
isLegalAddressingMode passing the constant value as BaseOffset.

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

llvm-svn: 340882

5 years ago[ORC] Add a testcase for r338975.
Lang Hames [Tue, 28 Aug 2018 22:50:59 +0000 (22:50 +0000)]
[ORC] Add a testcase for r338975.

Tests that bad object files generate a predictable error from the JIT APIs.

llvm-svn: 340881

5 years agoAllow IRInterpreter to deal with non-power-of-2 sized types to support some bitfield...
Frederic Riss [Tue, 28 Aug 2018 22:50:01 +0000 (22:50 +0000)]
Allow IRInterpreter to deal with non-power-of-2 sized types to support some bitfield accesses.

Summary:
For some bitfield patterns (like the one added by this commit), Clang will
generate non-regular data types like i24 or i48. This patch follows a
pretty naive approach of just bumping the type size to the next power of 2.
DataExtractor know how to deal with weird sizes. The operations on Scalar
do not know how to deal with those types though, so we have to legalize the
size when creating a Scalar.

Reviewers: jingham, clayborg

Subscribers: lldb-commits

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

llvm-svn: 340880

5 years ago[X86] Add kadd intrinsics to match gcc and icc.
Craig Topper [Tue, 28 Aug 2018 22:32:14 +0000 (22:32 +0000)]
[X86] Add kadd intrinsics to match gcc and icc.

This adds the following intrinsics:
_kadd_mask64
_kadd_mask32
_kadd_mask16
_kadd_mask8

These are missing from the Intel Intrinsics Guide, but are implemented by both gcc and icc.

llvm-svn: 340879

5 years ago[codeview] Emit labels for .cv_loc immediately
Reid Kleckner [Tue, 28 Aug 2018 22:29:12 +0000 (22:29 +0000)]
[codeview] Emit labels for .cv_loc immediately

Previously we followed the DWARF implementation, which waits until the
next instruction or data to emit the label to use in the .debug_loc
section. We might want to consider re-evaluating that design choice as
well, since it means the .loc skips alignment padding, for better or
worse.

This was the most minimal fix I could come up with, but we should be
able to do a lot of cleanups now that we don't need to save a pending CV
location on the CodeViewContext. I plan to do those next, but this
immediately fixes an assertion for some of our users.

llvm-svn: 340878

5 years agoRemove unnecessary entitlement in debugserver for iOS.
Jason Molenda [Tue, 28 Aug 2018 22:28:34 +0000 (22:28 +0000)]
Remove unnecessary entitlement in debugserver for iOS.
<rdar://problem/43631901>

llvm-svn: 340877

5 years ago[lldb] Fix lldb build on musl
Raphael Isemann [Tue, 28 Aug 2018 22:17:28 +0000 (22:17 +0000)]
[lldb] Fix lldb build on musl

Summary: limits.h is needed for getting PATH_MAX definition, this comes to fore
with musl libc where limits.h is not included indirectly via other system headers.

Patch by Khem Raj, thanks!

Reviewers: compnerd

Reviewed By: compnerd

Subscribers: llvm-commits

Tags: #lldb

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

llvm-svn: 340876

5 years ago[X86] Remove GCCBuiltin from kadd intrinsics.
Craig Topper [Tue, 28 Aug 2018 22:05:55 +0000 (22:05 +0000)]
[X86] Remove GCCBuiltin from kadd intrinsics.

We need to custom handle it in clang so we can bit cast to the mask type.

llvm-svn: 340875

5 years ago[ORC] Replace lookupFlags in JITSymbolResolver with getResponsibilitySet.
Lang Hames [Tue, 28 Aug 2018 21:18:05 +0000 (21:18 +0000)]
[ORC] Replace lookupFlags in JITSymbolResolver with getResponsibilitySet.

The new method name/behavior more closely models the way it was being used.
It also fixes an assertion that can occur when using the new ORC Core APIs,
where flags alone don't necessarily provide enough context to decide whether
the caller is responsible for materializing a given symbol (which was always
the reason this API existed).

The default implementation of getResponsibilitySet uses lookupFlags to determine
responsibility as before, so existing JITSymbolResolvers should continue to
work.

llvm-svn: 340874

5 years ago[HIP] Fix output file extension
Yaxun Liu [Tue, 28 Aug 2018 21:09:09 +0000 (21:09 +0000)]
[HIP] Fix output file extension

OffloadBundlingJobAction constructor accepts a list of JobAction as inputs.
The host JobAction is the last one. The file type of OffloadBundlingJobAction
should be determined by the host JobAction (the last one) instead of the first
one.

Since HIP emits LLVM bitcode for device compilation, device JobAction has
different file type as host Job Action. This bug causes incorrect output file
extension for HIP.

This patch fixes it by using the last input JobAction (host JobAction) to determine
file type of OffloadBundlingJobAction.

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

llvm-svn: 340873

5 years ago[NFC][PassTiming] factor out generic PassTimingInfo
Fedor Sergeev [Tue, 28 Aug 2018 21:06:51 +0000 (21:06 +0000)]
[NFC][PassTiming] factor out generic PassTimingInfo

Moving PassTimingInfo from legacy pass manager code into a separate header.
Making it suitable for both legacy and new pass manager.
Adding a test on -time-passes main functionality.

llvm-svn: 340872

5 years ago[SimpleLoopUnswitch] Form dedicated exits after trivial unswitches.
Alina Sbirlea [Tue, 28 Aug 2018 20:41:05 +0000 (20:41 +0000)]
[SimpleLoopUnswitch] Form dedicated exits after trivial unswitches.

Summary:
Form dedicated exits after trivial unswitches.
Fixes PR38737, PR38283.

Reviewers: chandlerc, fedor.sergeev

Subscribers: sanjoy, jlebar, uabelho, llvm-commits

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

llvm-svn: 340871

5 years ago[ORC] Add an addObjectFile method to LLJIT.
Lang Hames [Tue, 28 Aug 2018 20:20:31 +0000 (20:20 +0000)]
[ORC] Add an addObjectFile method to LLJIT.

The addObjectFile method adds the given object file to the JIT session, making
its code available for execution.

Support for the -extra-object flag is added to lli when operating in
-jit-kind=orc-lazy mode to support testing of this feature.

llvm-svn: 340870

5 years ago[X86] Add intrinsics for KADD instructions
Craig Topper [Tue, 28 Aug 2018 19:22:55 +0000 (19:22 +0000)]
[X86] Add intrinsics for KADD instructions

These are intrinsics for supporting kadd builtins in clang. These builtins are already in gcc to implement intrinsics from icc. Though they are missing from the Intel Intrinsics Guide.

This instruction adds two mask registers together as if they were scalar rather than a vXi1. We might be able to get away with a bitcast to scalar and a normal add instruction, but that would require DAG combine smarts in the backend to recoqnize add+bitcast. For now I'd prefer to go with the easiest implementation so we can get these builtins in to clang with good codegen.

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

llvm-svn: 340869

5 years ago[AMDGPU] Fix -Wunused-variable when -DLLVM_ENABLE_ASSERTIONS=off
Fangrui Song [Tue, 28 Aug 2018 19:19:03 +0000 (19:19 +0000)]
[AMDGPU] Fix -Wunused-variable when -DLLVM_ENABLE_ASSERTIONS=off

llvm-svn: 340868

5 years agoRevert "[libFuzzer] Port to Windows"
Matt Morehouse [Tue, 28 Aug 2018 19:07:24 +0000 (19:07 +0000)]
Revert "[libFuzzer] Port to Windows"

This reverts commit r340860 due to failing tests.

llvm-svn: 340867

5 years agoAMDGPU: Don't delete instructions if S_ENDPGM has implicit uses
Matt Arsenault [Tue, 28 Aug 2018 18:55:55 +0000 (18:55 +0000)]
AMDGPU: Don't delete instructions if S_ENDPGM has implicit uses

This can leave behind the uses with the defs removed.
Since this should only really happen in tests, it's not worth the
effort of trying to handle this.

llvm-svn: 340866

5 years ago[GISel]: Add missing opcodes for overflow intrinsics
Aditya Nandakumar [Tue, 28 Aug 2018 18:54:10 +0000 (18:54 +0000)]
[GISel]: Add missing opcodes for overflow intrinsics

https://reviews.llvm.org/D51197

Currently, IRTranslator (and GISel) seems to be arbitrarily picking
which overflow intrinsics get mapped into opcodes which either have a
carry as an input or not.
For intrinsics such as Intrinsic::uadd_with_overflow, translate it to an
opcode (G_UADDO) which doesn't have any carry inputs (similar to LLVM
IR).

This patch adds 4 missing opcodes for completeness - G_UADDO, G_USUBO,
G_SSUBE and G_SADDE.

llvm-svn: 340865

5 years ago[WebAssembly][NFC] Document stackifier tablegen backend
Thomas Lively [Tue, 28 Aug 2018 18:49:47 +0000 (18:49 +0000)]
[WebAssembly][NFC] Document stackifier tablegen backend

Summary:
Add comments to help readers avoid having to read tablegen backends to
understand the code. Also remove unecessary breaks from the output.

Reviewers: dschuff, aheejin

Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits

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

llvm-svn: 340864

5 years ago[llvm-mca] use llvm::any_of instead of std::any_of. NFC
Andrea Di Biagio [Tue, 28 Aug 2018 18:49:04 +0000 (18:49 +0000)]
[llvm-mca] use llvm::any_of instead of std::any_of. NFC

llvm-svn: 340863

5 years agoAMDGPU: Force shrinking of add/sub even if the carry is used
Matt Arsenault [Tue, 28 Aug 2018 18:44:16 +0000 (18:44 +0000)]
AMDGPU: Force shrinking of add/sub even if the carry is used

The original motivating example uses a 64-bit add, so the carry
is used. Insert a copy from VCC. This may allow shrinking of
the used carry instruction. At worst, we are replacing a
mov to materialize the constant with a copy of vcc.

llvm-svn: 340862

5 years ago[WebAssembly][NFC] Fix formatting from rL340781
Thomas Lively [Tue, 28 Aug 2018 18:34:33 +0000 (18:34 +0000)]
[WebAssembly][NFC] Fix formatting from rL340781

Reviewers: aheejin

Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits

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

llvm-svn: 340861

5 years ago[libFuzzer] Port to Windows
Matt Morehouse [Tue, 28 Aug 2018 18:34:32 +0000 (18:34 +0000)]
[libFuzzer] Port to Windows

Summary:
Port libFuzzer to windows-msvc.
This patch allows libFuzzer targets to be built and run on Windows, using -fsanitize=fuzzer and/or fsanitize=fuzzer-no-link. It allows these forms of coverage instrumentation to work on Windows as well.
It does not fix all issues, such as those with -fsanitize-coverage=stack-depth, which is not usable on Windows as of this patch.
It also does not fix any libFuzzer integration tests. Nearly all of them fail to compile, fixing them will come in a later patch, so libFuzzer tests are disabled on Windows until them.

Patch By: metzman

Reviewers: morehouse, rnk

Reviewed By: morehouse, rnk

Subscribers: morehouse, kcc, eraman

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

llvm-svn: 340860

5 years agoAMDGPU: Shrink insts to fold immediates
Matt Arsenault [Tue, 28 Aug 2018 18:34:24 +0000 (18:34 +0000)]
AMDGPU: Shrink insts to fold immediates

This needs to be done in the SSA fold operands
pass to be effective, so there is a bit of overlap
with SIShrinkInstructions but I don't think this
is practically avoidable.

llvm-svn: 340859

5 years ago[WebAssembly][NFC] Fix up SIMD bitwise tests
Thomas Lively [Tue, 28 Aug 2018 18:33:31 +0000 (18:33 +0000)]
[WebAssembly][NFC] Fix up SIMD bitwise tests

Summary:
The updated tests were previously infallible because the SIMD bitwise
operations do not contain vector types in their names.

Reviewers: aheejin, dschuff

Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits

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

llvm-svn: 340858

5 years ago[WebAssembly] v128.not
Thomas Lively [Tue, 28 Aug 2018 18:31:15 +0000 (18:31 +0000)]
[WebAssembly] v128.not

Implementation and tests.

llvm-svn: 340857

5 years agoSafeStack: Fix thread liveness check on *BSD
Vlad Tsyrklevich [Tue, 28 Aug 2018 18:30:03 +0000 (18:30 +0000)]
SafeStack: Fix thread liveness check on *BSD

Summary:
The Linux/BSD system call interfaces report errors differently, use the
internal_iserror() function to correctly check errors on either.

Reviewers: eugenis

Reviewed By: eugenis

Subscribers: delcypher, llvm-commits, #sanitizers, krytarowski, kcc, devnexen

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

llvm-svn: 340856

5 years agoAMDGPU: Move canShrink into TII
Matt Arsenault [Tue, 28 Aug 2018 18:22:34 +0000 (18:22 +0000)]
AMDGPU: Move canShrink into TII

llvm-svn: 340855

5 years agoDefine variables in test case rather than using values from functions
Akira Hatanaka [Tue, 28 Aug 2018 18:18:01 +0000 (18:18 +0000)]
Define variables in test case rather than using values from functions
emitted ealier.

llvm-svn: 340854

5 years ago[DAGCombine] Rework MERGE_VALUES to inline in single pass. NFCI.
Nirav Dave [Tue, 28 Aug 2018 18:13:26 +0000 (18:13 +0000)]
[DAGCombine] Rework MERGE_VALUES to inline in single pass. NFCI.

Avoid hyperlinear cost of inlining MERGE_VALUE node by constructing
temporary vector and doing a single replacement.

llvm-svn: 340853

5 years ago[DAG] Avoid recomputing Divergence checks. NFCI.
Nirav Dave [Tue, 28 Aug 2018 18:13:00 +0000 (18:13 +0000)]
[DAG] Avoid recomputing Divergence checks. NFCI.

When making multiple updates to the same SDNode, recompute node
divergence only once after all changes have been made.

llvm-svn: 340852

5 years ago[DAG] Fix updateDivergence calculation
Nirav Dave [Tue, 28 Aug 2018 18:12:35 +0000 (18:12 +0000)]
[DAG] Fix updateDivergence calculation

Check correct SDNode when deciding if we should update the divergence
property.

llvm-svn: 340851

5 years agoAMDGPU: Remove nan tests in class if src is nnan
Matt Arsenault [Tue, 28 Aug 2018 18:10:02 +0000 (18:10 +0000)]
AMDGPU: Remove nan tests in class if src is nnan

llvm-svn: 340850

5 years ago[ubsan] Enable -fsanitize=vptr on Apple devices and simulators
Vedant Kumar [Tue, 28 Aug 2018 18:01:42 +0000 (18:01 +0000)]
[ubsan] Enable -fsanitize=vptr on Apple devices and simulators

It seems like an oversight that this check was not always enabled for
on-device or device simulator targets.

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

llvm-svn: 340849

5 years ago[WebAssembly] Use getCalleeOpNo utility function (NFC)
Heejin Ahn [Tue, 28 Aug 2018 17:49:39 +0000 (17:49 +0000)]
[WebAssembly] Use getCalleeOpNo utility function (NFC)

Reviewers: tlively

Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits

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

llvm-svn: 340848

5 years ago[XRay][docs] Chrome Trace Viewer Instructions
Dean Michael Berris [Tue, 28 Aug 2018 17:36:30 +0000 (17:36 +0000)]
[XRay][docs] Chrome Trace Viewer Instructions

This patch adds an example on how to generate a Chrome Trace Viewer
loadable trace from an XRay trace.

llvm-svn: 340847

5 years ago[InstCombine] fix baseline assertions
Sanjay Patel [Tue, 28 Aug 2018 17:23:20 +0000 (17:23 +0000)]
[InstCombine] fix baseline assertions

rL340842 contained the wrong version of the check lines.

llvm-svn: 340846

5 years ago[Driver] Delete last reference of lld -flavor old-gnu
Fangrui Song [Tue, 28 Aug 2018 17:20:28 +0000 (17:20 +0000)]
[Driver] Delete last reference of lld -flavor old-gnu

This is dead code because lld -flavor old-gnu was removed in 2016 by rLLD262158.

llvm-svn: 340845

5 years ago[X86] Mark the FUCOMI instructions as requiring CMOV to be enabled. NFCI
Craig Topper [Tue, 28 Aug 2018 17:17:13 +0000 (17:17 +0000)]
[X86] Mark the FUCOMI instructions as requiring CMOV to be enabled. NFCI

These instructions were added on the PentiumPro along with CMOV.

This was already comprehended by the lowering process which should emit an alternate sequence using FCOM and FNSTW. This just makes it an explicit error if that doesn't work for some reason.

llvm-svn: 340844

5 years ago[XRay][docs] Update instructions
Dean Michael Berris [Tue, 28 Aug 2018 16:46:27 +0000 (16:46 +0000)]
[XRay][docs] Update instructions

Add `xray_mode=xray-basic` to the list of options in the "further
exploration" section of the doc.

llvm-svn: 340843

5 years ago[InstCombine] add tests for select narrowing (PR38691); NFC
Sanjay Patel [Tue, 28 Aug 2018 16:45:00 +0000 (16:45 +0000)]
[InstCombine] add tests for select narrowing (PR38691); NFC

llvm-svn: 340842

5 years agoRespect platform sysroot when loading core files
Pavel Labath [Tue, 28 Aug 2018 16:32:46 +0000 (16:32 +0000)]
Respect platform sysroot when loading core files

Patch by Eugene Birukov <eugenebi@microsoft.com>
Differential Revision: https://reviews.llvm.org/D49685

llvm-svn: 340841

5 years ago[lit, shtest-timeout] Always use an internal shell for the shtest-timeout to diagnose...
Stella Stamenova [Tue, 28 Aug 2018 16:24:55 +0000 (16:24 +0000)]
[lit, shtest-timeout] Always use an internal shell for the shtest-timeout to diagnose buildbot failures

Summary:
Right now this test is failing on the builtbots on Windows but we have a very similar setup where the test passes. The test is meant to test that specifying a timeout works correctly by running an infnite loop and having it timeout - on the buildbot, the infinite loop doesn't actually execute. This change runs all of the tests in the set using an internal shell rather than an external shell. I expect this will make the test pass which means that either the way the external shell is invoked or the external shell setup on the buildbots is not correct. Regardless of whether the test passes with this change, we'll need to undo this change and have a real fix.

@gkistanova was able to get logs from the buildbot to rule out a number of theories as to why this test is failing, but they didn't have enough information to confirm exactly what the issue is. The purpose of this change is to narrow it down, but if someone has a local repro and can aid in debugging, that would make it much speedier (and less prone to making the bots fail).

Reviewers: gkistanova, asmith, zturner, modocache, rnk, delcypher

Reviewed By: rnk

Subscribers: delcypher, llvm-commits, gkistanova

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

llvm-svn: 340840

5 years ago[debuginfo] generate debug info with asm+.file
Brian Cain [Tue, 28 Aug 2018 16:23:39 +0000 (16:23 +0000)]
[debuginfo] generate debug info with asm+.file

Summary:
For assembly input files, generate debug info even when the .file
directive is present, provided it does not include a file-number
argument.  Fixes PR38695.

Reviewers: probinson, sidneym

Subscribers: aprantl, hiraditya, JDevlieghere, llvm-commits

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

llvm-svn: 340839

5 years agoParse compile commands lazily in InterpolatingCompilationDatabase
Ilya Biryukov [Tue, 28 Aug 2018 16:15:56 +0000 (16:15 +0000)]
Parse compile commands lazily in InterpolatingCompilationDatabase

Summary:
This greatly reduces the time to read 'compile_commands.json'.
For Chromium on my machine it's now 0.7 seconds vs 30 seconds before the
change.

Reviewers: sammccall, jfb

Reviewed By: sammccall

Subscribers: mgrang, jfb, cfe-commits

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

llvm-svn: 340838

5 years ago[TableGen] CodeGenDAGPatterns::GenerateVariants - basic caching of matching predicates
Simon Pilgrim [Tue, 28 Aug 2018 15:42:08 +0000 (15:42 +0000)]
[TableGen] CodeGenDAGPatterns::GenerateVariants - basic caching of matching predicates

CodeGenDAGPatterns::GenerateVariants is a costly function in many tblgen commands (33.87% of the total runtime of x86 -gen-dag-isel), and due to the O(N^2) nature of the function, there are a high number of repeated comparisons of the pattern's vector<Predicate>.

This initial patch at least avoids repeating these comparisons for every Variant in a pattern. I began investigating caching all the matches before entering the loop but hit issues with how best to store the data and how to update the cache as patterns were added.

Saves around 15secs in debug builds of x86 -gen-dag-isel.

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

llvm-svn: 340837

5 years ago[benchmark] Stop building benchmarks by default
Kirill Bobyrev [Tue, 28 Aug 2018 15:36:50 +0000 (15:36 +0000)]
[benchmark] Stop building benchmarks by default

Although the benchmark regex-related build issue seems to be
fixed, it appears that benchmark library triggers some stage 2 clang-cl
bugs:

http://lab.llvm.org:8011/builders/clang-x86-windows-msvc2015/builds/13495/steps/build%20stage%202/logs/stdio

The only sensible option now is to prevent benchmark library from
building in the default configuration.

llvm-svn: 340836

5 years agoUse a RAII guard to control access to DisassemblerLLVMC.
Raphael Isemann [Tue, 28 Aug 2018 15:31:01 +0000 (15:31 +0000)]
Use a RAII guard to control access to DisassemblerLLVMC.

Summary:
This patch replaces the manual lock/unlock calls for gaining exclusive access to the disassembler with
a RAII-powered access scope. This should prevent that we somehow skip over these trailing Unlock calls
(e.g. with early returns).

We also have a second `GetDisasmToUse` method now that takes an already constructed access scope to
prevent deadlocks when we call this from other methods.

Reviewers: #lldb, davide, vsk

Reviewed By: #lldb, davide, vsk

Subscribers: davide, vsk, lldb-commits

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

llvm-svn: 340835

5 years ago[Inliner] Attribute callsites with inline remarks
David Bolvansky [Tue, 28 Aug 2018 15:27:25 +0000 (15:27 +0000)]
[Inliner] Attribute callsites with inline remarks

Summary:
Sometimes reading an output *.ll file it is not easy to understand why some callsites are not inlined. We can read output of inline remarks (option --pass-remarks-missed=inline) and try correlating its messages with the callsites.

An easier way proposed by this patch is to add to every callsite processed by Inliner an attribute with the latest message that describes the cause of not inlining this callsite. The attribute is called //inline-remark//. By default this feature is off. It can be switched on by the option //-inline-remark-attribute//.

For example in the provided test the result method //@test1// has two callsites //@bar// and inline remarks report different inlining missed reasons:
  remark: <unknown>:0:0: bar not inlined into test1 because too costly to inline (cost=-5, threshold=-6)
  remark: <unknown>:0:0: bar not inlined into test1 because it should never be inlined (cost=never): recursive

It is not clear which remark correspond to which callsite. With the inline remark attribute enabled we get the reasons attached to their callsites:
  define void @test1() {
    call void @bar(i1 true) #0
    call void @bar(i1 false) #2
    ret void
  }
  attributes #0 = { "inline-remark"="(cost=-5, threshold=-6)" }
  ..
  attributes #2 = { "inline-remark"="(cost=never): recursive" }

Patch by: yrouban (Yevgeny Rouban)

Reviewers: xbolva00, tejohnson, apilipenko

Reviewed By: xbolva00, tejohnson

Subscribers: eraman, llvm-commits

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

llvm-svn: 340834

5 years ago[X86] Fix copy paste mistake in vector-idiv-v2i32.ll. Add missing test case.
Craig Topper [Tue, 28 Aug 2018 15:24:12 +0000 (15:24 +0000)]
[X86] Fix copy paste mistake in vector-idiv-v2i32.ll. Add missing test case.

Some of the test cases contained the same load twice instead of a different load.

llvm-svn: 340833

5 years ago[PPC64] Fix DQ-form instruction handling and emit error for misalignment.
Sean Fertile [Tue, 28 Aug 2018 15:16:01 +0000 (15:16 +0000)]
[PPC64] Fix DQ-form instruction handling and emit error for misalignment.

Relanding r340564, original commit message:

Fixes the handling of *_DS relocations used on DQ-form instructions where we
were overwriting some of the extended opcode bits. Also adds an alignment check
so that the user will receive a diagnostic error if the value we are writing
is not properly aligned.

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

llvm-svn: 340832

5 years ago[AMDGPU] Add support for a16 modifiear for gfx9
Ryan Taylor [Tue, 28 Aug 2018 15:07:30 +0000 (15:07 +0000)]
[AMDGPU] Add support for a16 modifiear for gfx9

Summary:
Adding support for a16 for gfx9. A16 bit replaces r128 bit for gfx9.

Change-Id: Ie8b881e4e6d2f023fb5e0150420893513e5f4841

Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, jfb, llvm-commits

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

llvm-svn: 340831

5 years ago[llvm-mca] Initialize each element in vector TimelineView::UsedBuffers to a default...
Andrea Di Biagio [Tue, 28 Aug 2018 15:07:11 +0000 (15:07 +0000)]
[llvm-mca] Initialize each element in vector TimelineView::UsedBuffers to a default invalid buffer descriptor. NFCI

Also change the default buffer size for UsedBuffer entries to -1 (i.e. "unknown
size"). No functional change intended.

llvm-svn: 340830

5 years ago[clangd] Switch to Dex by default for the static index
Kirill Bobyrev [Tue, 28 Aug 2018 14:55:05 +0000 (14:55 +0000)]
[clangd] Switch to Dex by default for the static index

Dex is now mature enough to be used as the default static index. This
patch performs the switch but introduces a hidden flag to allow users
fallback to Mem in case something happens.

Reviewed by: ioeric

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

llvm-svn: 340828

5 years ago[benchmark] Fix buildbots failing to identify regex support
Kirill Bobyrev [Tue, 28 Aug 2018 14:51:09 +0000 (14:51 +0000)]
[benchmark] Fix buildbots failing to identify regex support

This is cleanup after newly introduced google/benchmark library
(rL340809). Many buildbots fail to identify regex engine support, so
this should presumably fix the issue.

llvm-svn: 340827

5 years agoClarify comment in the string-offsets-table-order.ll test
Pavel Labath [Tue, 28 Aug 2018 14:46:29 +0000 (14:46 +0000)]
Clarify comment in the string-offsets-table-order.ll test

llvm-svn: 340826

5 years ago[llvm-mca][TimelineView] Force the same number of executions for every entry in the...
Andrea Di Biagio [Tue, 28 Aug 2018 14:27:01 +0000 (14:27 +0000)]
[llvm-mca][TimelineView] Force the same number of executions for every entry in the 'wait-times' table.

This patch also uses colors to highlight problematic wait-time entries.
A problematic entry is an entry with an high wait time that tends to match (or
exceed) the size of the scheduler's buffer.

Color RED is used if an instruction had to wait an average number of cycles
which is bigger than (or equal to) the size of the underlying scheduler's
buffer.
Color YELLOW is used if the time (in cycles) spend waiting for the
operands or pipeline resources is bigger than half the size of the underlying
scheduler's buffer.
Color MAGENTA is used if an instruction does not consume buffer resources
according to the scheduling model.

llvm-svn: 340825

5 years ago[ADT] ImmutableList no longer requires elements to be copy constructible
Kristof Umann [Tue, 28 Aug 2018 14:17:51 +0000 (14:17 +0000)]
[ADT] ImmutableList no longer requires elements to be copy constructible

ImmutableList used to require elements to have a copy constructor for no
good reason, this patch aims to fix this.
It also required but did not enforce its elements to be trivially
destructible, so a new static_assert is added to guard against misuse.

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

llvm-svn: 340824

5 years agoUse addressof instead of operator& in make_shared. Fixes PR38729. As a drive-by,...
Marshall Clow [Tue, 28 Aug 2018 13:29:30 +0000 (13:29 +0000)]
Use addressof instead of operator& in make_shared. Fixes PR38729. As a drive-by, make the same change in raw_storage_iterator (twice).

llvm-svn: 340823

5 years ago[clangd] Use buffered llvm::errs() in the clangd binary.
Eric Liu [Tue, 28 Aug 2018 13:15:50 +0000 (13:15 +0000)]
[clangd] Use buffered llvm::errs() in the clangd binary.

Summary: Unbuffered stream can cause significant (non-deterministic) latency for the logger.

Reviewers: sammccall

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

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

llvm-svn: 340822

5 years ago[llvm-mca] Pass an instruction reference when notifying event listeners about reserve...
Andrea Di Biagio [Tue, 28 Aug 2018 13:14:42 +0000 (13:14 +0000)]
[llvm-mca] Pass an instruction reference when notifying event listeners about reserved/released buffer resources. NFC

llvm-svn: 340821

5 years ago[CloneFunction] Constant fold terminators before checking single predecessor
Mikael Holmen [Tue, 28 Aug 2018 12:40:11 +0000 (12:40 +0000)]
[CloneFunction] Constant fold terminators before checking single predecessor

Summary:
This fixes PR31105.

There is code trying to delete dead code that does so by e.g. checking if
the single predecessor of a block is the block itself.

That check fails on a block like this
 bb:
   br i1 undef, label %bb, label %bb
since that has two (identical) predecessors.

However, after the check for dead blocks there is a call to
ConstantFoldTerminator on the basic block, and that call simplifies the
block to
 bb:
   br label %bb

Therefore we now do the call to ConstantFoldTerminator before the check if
the block is dead, so it can realize that it really is.

The original behavior lead to the block not being removed, but it was
simplified as above, and then we did a call to
    Dest->replaceAllUsesWith(&*I);
with old and new being equal, and an assertion triggered.

Reviewers: chandlerc, fhahn

Reviewed By: fhahn

Subscribers: eraman, llvm-commits

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

llvm-svn: 340820

5 years ago[TableGen] Use std::move where possible in InstructionMemo constructor. NFCI.
Simon Pilgrim [Tue, 28 Aug 2018 11:10:27 +0000 (11:10 +0000)]
[TableGen] Use std::move where possible in InstructionMemo constructor. NFCI.

Requested in post-commit review for rL339670

llvm-svn: 340819

5 years ago[GVNHoist] Prune out useless CHI insertions
Alexandros Lamprineas [Tue, 28 Aug 2018 11:07:54 +0000 (11:07 +0000)]
[GVNHoist] Prune out useless CHI insertions

Fix for the out-of-memory error when compiling SemaChecking.cpp
with GVNHoist and ubsan enabled. I've used a cache for inserted
CHIs to avoid excessive memory usage.

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

llvm-svn: 340818

5 years ago[NFC] Apply another commit to comply with old CMake
Kirill Bobyrev [Tue, 28 Aug 2018 11:05:09 +0000 (11:05 +0000)]
[NFC] Apply another commit to comply with old CMake

llvm-svn: 340817