platform/upstream/llvm.git
4 years ago[CostModel] Avoid traditional ConstantExpr crashy pitfails
Roman Lebedev [Fri, 26 Jun 2020 19:40:30 +0000 (22:40 +0300)]
[CostModel] Avoid traditional ConstantExpr crashy pitfails

I'm not sure if this is a regression from D81448 + D81643,
which moved at least the code cast from elsewhere,
or somehow no one triggered that before.
But now we can reach it with a non-instruction..

It is not straight-forward to write cost-model tests for constantexprs,
`-cost-model -analyze -cost-kind=` does not appear to look at them,
or maybe i'm doing it wrong.

I've encountered that via a SimplifyCFG crash,
so reduced (currently-crashing) test is added.
There are likely other instances.

For now, simply restore previous status quo of
not crashing and returning TTI::TCC_Basic.

4 years ago[libc++] Remove support for building through llvm-config
Louis Dionne [Fri, 26 Jun 2020 19:05:46 +0000 (15:05 -0400)]
[libc++] Remove support for building through llvm-config

We've decided to move away from that by requiring that libc++ is built
as part of the monorepo a while ago. This commit removes code pertaining
to that unsupported use case and produces a clear error when the user
violates that.

In fact, building outside of the monorepo will still work as long as
LLVM_PATH is pointing to the root of the LLVM project, although that
is not officially supported.

4 years agoAMDGPU: Add llvm.amdgcn.sqrt intrinsic
Matt Arsenault [Thu, 25 Jun 2020 01:01:55 +0000 (21:01 -0400)]
AMDGPU: Add llvm.amdgcn.sqrt intrinsic

I spread the GlobalISel test into the regular one, which I've been
avoiding so far.

4 years ago[NFCI] Cleanup range checks in Register/MCRegister
David Tenty [Fri, 26 Jun 2020 18:49:24 +0000 (14:49 -0400)]
[NFCI] Cleanup range checks in Register/MCRegister

Summary:
by removing casts from unsigned to int that which may be implementation
defined according to C++14 (and thus trip up the XL compiler on AIX) by
just using unsigned comparisons/masks and refactor out the range
constants to cleanup things a bit while we are at it.

Reviewers: hubert.reinterpretcast, arsenm

Reviewed By: hubert.reinterpretcast

Subscribers: wdng, llvm-commits

Tags: #llvm

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

4 years ago[flang] Port remaining test_any.sh tests to FileCheck
Richard Barton [Fri, 26 Jun 2020 18:28:43 +0000 (19:28 +0100)]
[flang] Port remaining test_any.sh tests to FileCheck

Port the remaining tests which only require mechanical changes and delete
test_any.sh.

    * Delete old RUN lines
    * Replace:
        EXEC: ${F18} ... | ${FileCheck} ...
      with
        RUN: %f18 .. | FileCheck ...
    * Prepend RUN line with not when it is expected to fail

Also reinstate a de-activated EXEC line and port it in the same way.

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

4 years ago[DAGCombiner] rename variables for readability; NFC
Sanjay Patel [Fri, 26 Jun 2020 18:20:40 +0000 (14:20 -0400)]
[DAGCombiner] rename variables for readability; NFC

PR46406 shows a pattern where we can do better, so try to clean this up
before adding more code.

4 years ago[AArch64] add vector test for merged condition branching; NFC
Sanjay Patel [Thu, 25 Jun 2020 20:28:30 +0000 (16:28 -0400)]
[AArch64] add vector test for merged condition branching; NFC

4 years ago[CMake] Add check-debuginfo-* targets
Fangrui Song [Fri, 26 Jun 2020 18:18:18 +0000 (11:18 -0700)]
[CMake] Add check-debuginfo-* targets

* check-debuginfo-dexter runs lit tests under debuginfo-tests/dexter/
* check-debuginfo-llgdb-tests runs lit tests under debuginfo-tests/llgdb-tests/
* ...

Reviewed By: tbosch

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

4 years ago[mlir] [VectorOps] Add the ability to mark FP reductions with "reassociate" attribute
aartbik [Fri, 26 Jun 2020 18:03:11 +0000 (11:03 -0700)]
[mlir] [VectorOps] Add the ability to mark FP reductions with "reassociate" attribute

Rationale:
In general, passing "fastmath" from MLIR to LLVM backend is not supported, and even just providing such a feature for experimentation is under debate. However, passing fine-grained fastmath related attributes on individual operations is generally accepted. This CL introduces an option to instruct the vector-to-llvm lowering phase to annotate floating-point reductions with the "reassociate" fastmath attribute, which allows the LLVM backend to use SIMD implementations for such constructs. Oher lowering passes can start using this mechanism right away in cases where reassociation is allowed.

Benefit:
For some microbenchmarks on x86-avx2, speedups over 20 were observed for longer vector (due to cleaner, spill-free and SIMD exploiting code).

Usage:
mlir-opt --convert-vector-to-llvm="reassociate-fp-reductions"

Reviewed By: ftynse, mehdi_amini

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

4 years ago[PowerPC] Add support for llvm.ppc.dcbt, llvm.ppc.dcbtst, llvm.ppc.isync intrinsics
Amy Kwan [Fri, 26 Jun 2020 17:22:38 +0000 (12:22 -0500)]
[PowerPC] Add support for llvm.ppc.dcbt, llvm.ppc.dcbtst, llvm.ppc.isync intrinsics

This patch adds LLVM intrinsics for the dcbt (Data Cache Block Touch),
dcbtst (Data Cache Block Touch for Store) and isync (Instruction
Synchronize) instructions.

The intrinsic for dcbt and dcbst in this patch are named llvm.ppc.dcbt.with.hint
and llvm.ppc.dcbtst.with.hint respectively as there already exists an intrinsic
for llvm.ppc.dcbt and llvm.ppc.dcbtst. However, the original variants of the
intrinsics do not accept the TH immediate field, whereas these variants do.

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

4 years ago[flang] Add CHARACTER type lowering helpers and runtime.
Eric Schweitz [Thu, 25 Jun 2020 22:42:50 +0000 (15:42 -0700)]
[flang] Add CHARACTER type lowering helpers and runtime.

In order for these files to build properly, this patch rolls up a number of changes that have been made to various files that have been upstreamed.

Implementations for the interfaces included in Bridge.h and IntrinsicCall.h will be included in a future diff.

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

4 years ago[flang] Port test_any.sh tests to FileCheck: Hand port canondo{08-18} tests
Richard Barton [Fri, 26 Jun 2020 17:50:46 +0000 (18:50 +0100)]
[flang] Port test_any.sh tests to FileCheck: Hand port canondo{08-18} tests

These tests checked for stdout and stderr in the same pipe, which does not
come out in a guaranteed order. test_any.sh's FileCheck accepts CHECK lines in
any order while FileCheck checks must match in order.

Hand port these to pipe stdout to a temp file which is checked with a separate
FileCheck RUN line to test it.

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

4 years ago[flang] Port test_any.sh tests to FileCheck: Hand port getsymbols tests
Richard Barton [Fri, 26 Jun 2020 17:49:21 +0000 (18:49 +0100)]
[flang] Port test_any.sh tests to FileCheck: Hand port getsymbols tests

test_any.sh's FileCheck accepts the CHECK line matches in any order while
FileCheck checks in strict order. Re-order the CHECK lines to source code
order - they come from an ordered datastructure.

Some CHECK lines are sensitive to line number which are fixed up manually.

getsymbols02 had multiple test inputs which had their own EXEC lines.
Consolidate these together in one file.

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

4 years ago[flang] Port test_any.sh tests to FileCheck: Hand port getdefinition* tests
Richard Barton [Fri, 26 Jun 2020 17:47:13 +0000 (18:47 +0100)]
[flang] Port test_any.sh tests to FileCheck: Hand port getdefinition* tests

These tests are sensitive to line numbers in the input and check output.
They also successively write to a temporary file then check that.

Fix the line number issues and replace the temporary file use with successive
calls to FileCheck with different check-prefixes.

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

4 years ago[PGO] Add a functionality to always instrument the func entry BB
Rong Xu [Fri, 26 Jun 2020 17:20:09 +0000 (10:20 -0700)]
[PGO] Add a functionality to always instrument the func entry BB

Add an option to always instrument function entry BB (default off)
Add an option to do atomically updates on the first counter in each
instrumented function.

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

4 years ago[flang] Port test_any.sh tests to FileCheck: Hand port tests which use regexes
Richard Barton [Fri, 5 Jun 2020 18:09:12 +0000 (19:09 +0100)]
[flang] Port test_any.sh tests to FileCheck: Hand port tests which use regexes

The regex syntax used by test_any.sh's FileCheck is sometimes incompatible with
real FileCheck.

Hand port these tests to use FileCheck and it's regex format.

Also remove FIXME from label01 that no longer applies.
Also add second run-line that enables all tests.
Add some new FIXMEs for issues in original tests

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

4 years agoMigrate last batch of tests to gc-live bundle format
Philip Reames [Thu, 25 Jun 2020 23:40:29 +0000 (16:40 -0700)]
Migrate last batch of tests to gc-live bundle format

For context of anyone following along, we've not completed the migration of statepoint to the operand bundle form.  The only remaining piece is to actually version the statepoint intrinsic to remove the old inline operand sets.  That will follow when I have some time; delay is useful here to allow downstream migrations.

4 years agoRevert "[clang driver] Move default module cache from system temporary directory"
Nico Weber [Fri, 26 Jun 2020 17:25:45 +0000 (13:25 -0400)]
Revert "[clang driver] Move default module cache from system temporary directory"

This reverts commit bb26838ceffb5feaa18186f55f7525a08084899e.
Breaks Support.CacheDirectoryNoEnv, Support.CacheDirectoryWithEnv
in SupportTests (part of check-llvm) on macOS.

4 years ago[SourceManager] don't check invalid param of getLocalSLocEntry()
Nick Desaulniers [Fri, 26 Jun 2020 17:22:26 +0000 (10:22 -0700)]
[SourceManager] don't check invalid param of getLocalSLocEntry()

Forked from D80681.

getLocalSLocEntry() has an unused parameter used to satisfy an interface
of libclang (see getInclusions() in
clang/tools/libclang/CIndexInclusionStack.cpp).  It's pointless for
callers to construct/pass/check this inout parameter that can never
signify that a FileID is invalid.

Reviewed By: kadircet

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

4 years ago[NewPM][LoopUnroll] Rename unroll* to loop-unroll*
Arthur Eubanks [Fri, 26 Jun 2020 16:28:32 +0000 (09:28 -0700)]
[NewPM][LoopUnroll] Rename unroll* to loop-unroll*

The legacy pass is called "loop-unroll", but in the new PM it's called "unroll".
Also applied to unroll-and-jam and unroll-full.

Fixes various check-llvm tests when NPM is turned on.

Reviewed By: Whitney, dmgreen

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

4 years ago[PPC][NFC] Add Subtarget and replace all uses of PPCSubTarget with Subtarget.
Kit Barton [Tue, 9 Jun 2020 21:18:02 +0000 (16:18 -0500)]
[PPC][NFC] Add Subtarget and replace all uses of PPCSubTarget with Subtarget.

Summary:
In preparation for GlobalISel, PPCSubTarget needs to be renamed to Subtarget as there places in GlobalISel that assume the presence of the variable Subtarget.
This patch introduces the variable Subtarget, and replaces all existing uses of PPCSubTarget with Subtarget. A subsequent patch will remove the definiton of
PPCSubTarget, once any downstream users have the opportunity to rename any uses they have.

Reviewers: hfinkel, nemanjai, jhibbits, #powerpc, echristo, lkail

Reviewed By: #powerpc, echristo, lkail

Subscribers: echristo, lkail, wuzish, nemanjai, hiraditya, jfb, llvm-commits

Tags: #llvm

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

4 years ago[libTooling] Improve error message from failure in selection Stencil
Yitzhak Mandelbaum [Fri, 26 Jun 2020 16:17:28 +0000 (16:17 +0000)]
[libTooling] Improve error message from failure in selection Stencil

This patch improves the error message provided by the stencil that handles
source from a range selector.

Reviewed By: gribozavr2

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

4 years ago[libc++abi] Fix build failure in abort_message.cpp when vasprintf isn't provided
Louis Dionne [Fri, 26 Jun 2020 15:49:44 +0000 (11:49 -0400)]
[libc++abi] Fix build failure in abort_message.cpp when vasprintf isn't provided

4 years agoRevert "Revert "Revert "Modify FPFeatures to use delta not absolute settings"""
Melanie Blower [Fri, 26 Jun 2020 15:45:12 +0000 (08:45 -0700)]
Revert "Revert "Revert "Modify FPFeatures to use delta not absolute settings"""

This reverts commit 9518763d710bfbbf9315fa88972c55898be44a0e.
Memory sanitizer fails in CGFPOptionsRAII::CGFPOptionsRAII dtor

4 years ago[OpenMPOpt][NFC] Change ICV macros for initial value
sstefan1 [Fri, 26 Jun 2020 15:32:06 +0000 (15:32 +0000)]
[OpenMPOpt][NFC] Change ICV macros for initial value

This fixes build breaks when system headers are difining FALSE.

4 years ago[sve][acle] Add reinterpret intrinsics for brain float.
Francesco Petrogalli [Wed, 24 Jun 2020 15:48:10 +0000 (15:48 +0000)]
[sve][acle] Add reinterpret intrinsics for brain float.

Reviewers: kmclaughlin, efriedma, ctetreau, sdesmalen, david-arm

Subscribers: tschuett, hiraditya, rkruppe, psnobl, cfe-commits, llvm-commits

Tags: #clang, #llvm

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

4 years ago[NFC] Eliminate an unneeded -vv used in test development.
Kevin P. Neal [Fri, 26 Jun 2020 15:06:48 +0000 (11:06 -0400)]
[NFC] Eliminate an unneeded -vv used in test development.

4 years ago[mlir][vulkan-runner] Make vulkan runner use GPU device memory
Thomas Raoux [Fri, 26 Jun 2020 14:59:17 +0000 (07:59 -0700)]
[mlir][vulkan-runner] Make vulkan runner use GPU device memory

To be able to have more meaningful performance out of workloadsi going through
the vulkan-runner we need to use buffers from GPU device memory as access to
system memory is significantly slower for GPU with dedicated memory. This adds
code to do a copy through staging buffer as GPU memory cannot always be mapped
on the host.

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

4 years agoRevert "Revert "Modify FPFeatures to use delta not absolute settings""
Melanie Blower [Fri, 26 Jun 2020 14:54:01 +0000 (07:54 -0700)]
Revert "Revert "Modify FPFeatures to use delta not absolute settings""

This reverts commit b55d723ed61052b77e720dcffecac43abe873186.
Reapply Modify FPFeatures to use delta not absolute settings

To solve https://bugs.llvm.org/show_bug.cgi?id=46166 where the
floating point settings in PCH files aren't compatible, rewrite
FPFeatures to use a delta in the settings rather than absolute settings.
With this patch, these floating point options can be benign.

Reviewers: rjmccall

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

4 years ago [llvm-exegesis] Let Counter returns up to 16 entries
Vy Nguyen [Thu, 25 Jun 2020 15:15:16 +0000 (11:15 -0400)]
 [llvm-exegesis] Let Counter returns up to 16 entries

    LBR contains (up to) 16 entries for last x branches and the X86LBRCounter (from D77422) should be able to return all those.
    Currently, it just returns the latest entry, which could lead to mis-leading measurements.
    This patch aslo changes the LatencyBenchmarkRunner to accommodate multi-value readings.

         https://reviews.llvm.org/D81050

4 years agoRevert "Modify FPFeatures to use delta not absolute settings"
Melanie Blower [Fri, 26 Jun 2020 14:48:38 +0000 (07:48 -0700)]
Revert "Modify FPFeatures to use delta not absolute settings"

This reverts commit 3a748cbf86cea3844fada04eeff4cc64b01f67e0.
I'm reverting this commit because I forgot to format the commit message
propertly. Sorry for the thrash.

4 years agoWork around a bug in MSVC in the syntax tree test
Dmitri Gribenko [Fri, 26 Jun 2020 10:09:11 +0000 (12:09 +0200)]
Work around a bug in MSVC in the syntax tree test

Summary:
MSVC does not handle raw string literals with embedded double quotes
correctly. I switched the affected test case to use regular string
literals insetad.

Subscribers: cfe-commits

Tags: #clang

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

4 years agoModify FPFeatures to use delta not absolute settings
Melanie Blower [Mon, 15 Jun 2020 19:43:37 +0000 (12:43 -0700)]
Modify FPFeatures to use delta not absolute settings

4 years ago[MLIR][SPIRVToLLVM] Conversion for bitrverse and bitcount ops
George Mitenkov [Fri, 26 Jun 2020 14:29:05 +0000 (10:29 -0400)]
[MLIR][SPIRVToLLVM] Conversion for bitrverse and bitcount ops

Implemented conversion for `spv.BitReverse` and `spv.BitCount`. Since ODS
generates builders in a different way for LLVM dialect intrinsics, I
added attributes to build method in `DirectConversionPattern` class. The
tests for these ops are in `bitwise-ops-to-llvm.mlir`.

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

4 years ago[libTooling] Rename overloaded `range` range selector.
Yitzhak Mandelbaum [Fri, 26 Jun 2020 14:23:25 +0000 (14:23 +0000)]
[libTooling] Rename overloaded `range` range selector.

Renames the overloaded `RangeSelector` combinator `range` to the more
descriptive `enclose` and `encloseNodes`. The old overloads are left in place
and marked deprected and will be deleted at a future time.

Reviewed By: tdl-g

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

4 years ago[Alignment][NFC] Migrate TTI::isLegalToVectorize{Load,Store}Chain to Align
Guillaume Chatelet [Fri, 26 Jun 2020 14:14:27 +0000 (14:14 +0000)]
[Alignment][NFC] Migrate TTI::isLegalToVectorize{Load,Store}Chain to Align

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

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

4 years agoAMDGPU/GlobalISel: Fix legacy clover kernel argument ABI
Matt Arsenault [Fri, 26 Jun 2020 13:02:46 +0000 (09:02 -0400)]
AMDGPU/GlobalISel: Fix legacy clover kernel argument ABI

This had an extra attempt to align the pointer, which only did
anything with a base kernel argument offset which only clover used to
use.

4 years agoAMDGPU/GlobalISel: Add baseline checks for legacy clover kernel ABI
Matt Arsenault [Fri, 26 Jun 2020 13:22:03 +0000 (09:22 -0400)]
AMDGPU/GlobalISel: Add baseline checks for legacy clover kernel ABI

I'm not sure we actually need to support this now, since I think
clover always explicitly uses amdgcn-mesa-mesa3d now, not the
ill-defined amdgcn-- behavior.

4 years agoAMDGPU/GlobalISel: Uncomment some fixed tests
Matt Arsenault [Fri, 26 Jun 2020 13:30:10 +0000 (09:30 -0400)]
AMDGPU/GlobalISel: Uncomment some fixed tests

4 years ago[mlir][spirv] Add RewriteInserts pass.
Denis Khalikov [Fri, 26 Jun 2020 13:49:09 +0000 (09:49 -0400)]
[mlir][spirv] Add RewriteInserts pass.

Add a pass to rewrite sequential chains of `spirv::CompositeInsert`
operations into `spirv::CompositeConstruct` operations.

Reviewed By: antiagainst

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

4 years ago[CodeComplete] Add code completion for using alias.
Kadir Cetinkaya [Fri, 26 Jun 2020 13:38:15 +0000 (15:38 +0200)]
[CodeComplete] Add code completion for using alias.

Add code completion for using alias.

Patch By @lh123 !

Reviewers: kadircet

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

4 years ago[AArch64][SVE] Remove asserts from AArch64ISelLowering for bfloat16 types
Kerry McLaughlin [Fri, 26 Jun 2020 12:55:46 +0000 (13:55 +0100)]
[AArch64][SVE] Remove asserts from AArch64ISelLowering for bfloat16 types

Remove the asserts in performLDNT1Combine & performST[NT]1Combine
to ensure we get a failure where the type is a bfloat16 and
hasBF16() is false, regardless of whether asserts are enabled.

4 years agoFix pass return status for loop extractor
serge-sans-paille [Fri, 26 Jun 2020 13:23:05 +0000 (15:23 +0200)]
Fix pass return status for loop extractor

As loop extractor has a dependency on another pass (namely BreakCriticalEdges)
that may update the IR, use the getAnalysis version introduced in
55fe7b79bb7fab49af3720840224c0720bdb03c6 to carry that change.

Add an assert in getAnalysisID to make sure no other changed status is missed -
according to validation this was the only one.

Related to https://reviews.llvm.org/D80916

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

4 years agoRevert rGf0bab7875e78e01c149d12302dcc4b6d4c43e25c - "Triple.h - reduce Twine.h includ...
Simon Pilgrim [Fri, 26 Jun 2020 13:46:20 +0000 (14:46 +0100)]
Revert rGf0bab7875e78e01c149d12302dcc4b6d4c43e25c - "Triple.h - reduce Twine.h include to forward declarations. NFC."

This causes ICEs on the clang-ppc64be buildbots and I've limited ability to triage the problem.

4 years ago[MLIR][SPIRV] Add support for OpCopyMemory.
ergawy [Fri, 26 Jun 2020 13:37:30 +0000 (09:37 -0400)]
[MLIR][SPIRV] Add support for OpCopyMemory.

This patch add support for 'spv.CopyMemory'. The following changes are
introduced:
- 'CopyMemory' op is added to SPIRVOps.td.
- Custom parse and print methods are introduced.
- A few Roundtripping tests are added.

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

4 years ago[mlir] fix off-by-one error in collapseParallelLoops
Tobias Gysi [Fri, 26 Jun 2020 11:46:37 +0000 (13:46 +0200)]
[mlir] fix off-by-one error in collapseParallelLoops

Summary: The patch fixes an off by one error in the method collapseParallelLoops. It ensures the same normalized bound is used for the computation of the division and the remainder.

Reviewers: herhut

Reviewed By: herhut

Subscribers: mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, stephenneuendorffer, Joonsoo, grosul1, Kayjukh, jurahul, msifontes

Tags: #mlir

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

4 years ago[mlir] Avoid creating local OpBuilders in Standard-to-LLVM conversion
Alex Zinenko [Fri, 26 Jun 2020 12:47:38 +0000 (14:47 +0200)]
[mlir] Avoid creating local OpBuilders in Standard-to-LLVM conversion

Conversions of allocation-related operations in Standard-to-LLVM need
declarations of "malloc" and "free" (or equivalents). They use locally created
OpBuilders pointed at the module level to declare these functions if necessary.
This is poorly compatible with the pattern infrastructure that is unaware of
new operations being created. Update the insertion point of the main rewriter
instead.

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

4 years ago[mlir] support returning unranked memrefs
Alex Zinenko [Fri, 26 Jun 2020 12:34:00 +0000 (14:34 +0200)]
[mlir] support returning unranked memrefs

Initially, unranked memref descriptors in the LLVM dialect were designed only
to be passed into functions. An assertion was guarding against returning
unranked memrefs from functions in the standard-to-LLVM conversion. This is
insufficient for functions that wish to return an unranked memref such that the
caller does not know the rank in advance, and hence cannot allocate the
descriptor and pass it in as an argument.

Introduce a calling convention for returning unranked memref descriptors as
follows. An unranked memref descriptor always points to a ranked memref
descriptor stored on stack of the current function. When an unranked memref
descriptor is returned from a function, the ranked memref descriptor it points
to is copied to dynamically allocated memory, the ownership of which is
transferred to the caller. The caller is responsible for deallocating the
dynamically allocated memory and for copying the pointed-to ranked memref
descriptor onto its stack.

Provide default lowerings for std.return, std.call and std.indirect_call that
maintain the conversion defined above.

This convention is additionally exercised by a runtime test to guard against
memory errors.

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

4 years ago[lldb] Re-add X-Fail for Windows to TestDollarInVariable
Raphael Isemann [Fri, 26 Jun 2020 13:24:04 +0000 (15:24 +0200)]
[lldb] Re-add X-Fail for Windows to TestDollarInVariable

This got removed by accident in 048d11de43be087fd2fa0c5e35f20486f6094c29 when
the test was rewritten as a non-inline test.

4 years agoAdd explicit Twine.h include to try and fix ICE on clang-ppc64be-linux
Simon Pilgrim [Fri, 26 Jun 2020 13:13:30 +0000 (14:13 +0100)]
Add explicit Twine.h include to try and fix ICE on clang-ppc64be-linux

4 years ago[mlir-tblgen] Use fully qualified names in generated code files
Jean-Michel Gorius [Fri, 26 Jun 2020 11:20:44 +0000 (13:20 +0200)]
[mlir-tblgen] Use fully qualified names in generated code files

Using fully qualified names wherever possible avoids ambiguous class and function names. This is a follow-up to D82371.

Reviewed By: rriddle

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

4 years ago[MLIR][Affine-loop-fusion] Fix a bug in affine-loop-fusion pass when there are non...
Tung D. Le [Wed, 24 Jun 2020 16:56:05 +0000 (22:26 +0530)]
[MLIR][Affine-loop-fusion] Fix a bug in affine-loop-fusion pass when there are non-affine operations

When there is a mix of affine load/store and non-affine operations (e.g. std.load, std.store),
affine-loop-fusion ignores the present of non-affine ops, thus changing the program semantics.

E.g. we have a program of three affine loops operating on the same memref in which one of them uses std.load and std.store, as follows.
```
affine.for
  affine.store %1
affine.for
  std.load %1
  std.store %1
affine.for
  affine.load %1
  affine.store %1
```
affine-loop-fusion will produce the following result which changed the program semantics:
```
affine.for
  std.load %1
  std.store %1
affine.for
  affine.store %1
  affine.load %1
  affine.store %1
```

This patch is to fix the above problem by checking non-affine users of the memref that are between the source and destination nodes of interest.

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

4 years agoFix implicit include dependencies on SmallVector.h.
Simon Tatham [Fri, 26 Jun 2020 12:47:33 +0000 (13:47 +0100)]
Fix implicit include dependencies on SmallVector.h.

Both `AArch64TargetParser.h` and `ARMTargetParser.h` refer to
`SmallVectorImpl` without directly including the header that defines
it, which works fine until nothing else happens to include it anyway.

4 years ago[AArch64][SVE] Only support sizeless bfloat types if supported by subtarget
Cullen Rhodes [Wed, 24 Jun 2020 16:56:37 +0000 (16:56 +0000)]
[AArch64][SVE] Only support sizeless bfloat types if supported by subtarget

Reviewers: sdesmalen, efriedma, kmclaughlin, fpetrogalli

Reviewed By: sdesmalen, fpetrogalli

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

4 years ago[MSP430] Update register names
Anatoly Trosinenko [Fri, 26 Jun 2020 12:32:01 +0000 (15:32 +0300)]
[MSP430] Update register names

When writing a unit test on replacing standard epilogue sequences with `BR __mspabi_func_epilog_<N>`, by manually asm-clobbering `rN` - `r10` for N = 4..10, everything worked well except for seeming inability to clobber r4.

The problem was that MSP430 code generator of LLVM used an obsolete name FP for that register. Things were worse because when `llc` read an unknown register name, it silently ignored it.

That is, I cannot use `fp` register name from the C code because Clang does not accept it (exactly like GCC). But the accepted name `r4` is not recognised by `llc` (it can be used in listings passed to `llvm-mc` and even `fp` is replace to `r4` by `llvm-mc`). So I can specify any of `fp` or `r4` for the string literal of `asm(...)` but nothing in the clobber list.

This patch replaces `MSP430::FP` with `MSP430::R4` in the backend code (even [MSP430 EABI](http://www.ti.com/lit/an/slaa534/slaa534.pdf) doesn't mention FP as a register name). The R0 - R3 registers, on the other hand, are left as is in the backend code (after all, they have some special meaning on the ISA level). It is just ensured clang is renaming them as expected by the downstream tools. There is probably not much sense in **marking them clobbered** but rename them //just in case// for use at potentially different contexts.

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

4 years ago[builtins] Improve compatibility with 16 bit targets
Anatoly Trosinenko [Fri, 26 Jun 2020 12:31:04 +0000 (15:31 +0300)]
[builtins] Improve compatibility with 16 bit targets

Some parts of existing codebase assume the default `int` type to be (at least) 32 bit wide. On 16 bit targets such as MSP430 this may cause Undefined Behavior or results being defined but incorrect.

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

4 years agoFix implicit Twine.h include dependency.
Simon Pilgrim [Fri, 26 Jun 2020 12:23:53 +0000 (13:23 +0100)]
Fix implicit Twine.h include dependency.

4 years agoImprove LegacyPassManager API to correctly report modified status
serge-sans-paille [Fri, 26 Jun 2020 11:07:31 +0000 (13:07 +0200)]
Improve LegacyPassManager API to correctly report modified status

When calling on-the-fly passes from the legacy pass manager, the modification
status is not reported, which is a problem in case we depend on an acutal
transformation pass, and not only analyse.

Update the Legacy PM API to optionally report the changed status, assert if a
change is detected but this change is lost.

Related to https://reviews.llvm.org/D80916

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

4 years agoTriple.h - reduce Twine.h include to forward declarations. NFC.
Simon Pilgrim [Fri, 26 Jun 2020 11:59:08 +0000 (12:59 +0100)]
Triple.h - reduce Twine.h include to forward declarations. NFC.

Move include down to a number of other files that had an implicit dependency on the Twine class.

4 years ago[clang driver] Move default module cache from system temporary directory
David Zarzycki [Tue, 23 Jun 2020 09:43:51 +0000 (05:43 -0400)]
[clang driver] Move default module cache from system temporary directory

1) Shared writable directories like /tmp are a security problem.
2) Systems provide dedicated cache directories these days anyway.
3) This also refines LLVM's cache_directory() on Darwin platforms to use
   the Darwin per-user cache directory.

Reviewers: compnerd, aprantl, jakehehrlich, espindola, respindola, ilya-biryukov, pcc, sammccall

Reviewed By: compnerd, sammccall

Subscribers: hiraditya, llvm-commits, cfe-commits

Tags: #clang, #llvm

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

4 years ago[AST] Fix certain consteval assignment and comma operator issues with fixed-point...
Bevin Hansson [Wed, 22 Jan 2020 13:53:11 +0000 (14:53 +0100)]
[AST] Fix certain consteval assignment and comma operator issues with fixed-point types.

Summary:
Assignment and comma operators for fixed-point types were being constevaled as other
binary operators, but they need special treatment.

Reviewers: rjmccall, leonardchan, bjope

Subscribers: cfe-commits

Tags: #clang

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

4 years ago[AST] Improve overflow diagnostics for fixed-point constant evaluation.
Bevin Hansson [Wed, 22 Jan 2020 12:20:12 +0000 (13:20 +0100)]
[AST] Improve overflow diagnostics for fixed-point constant evaluation.

Summary:
Diagnostics for overflow were not being produced for fixed-point
evaluation. This patch refactors a bit of the evaluator and adds
a proper diagnostic for these cases.

Reviewers: rjmccall, leonardchan, bjope

Subscribers: cfe-commits

Tags: #clang

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

4 years ago[AST] Add fixed-point division constant evaluation.
Bevin Hansson [Wed, 22 Jan 2020 09:10:54 +0000 (10:10 +0100)]
[AST] Add fixed-point division constant evaluation.

Reviewers: rjmccall, leonardchan, bjope

Subscribers: cfe-commits

Tags: #clang

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

4 years ago[AST] Add fixed-point multiplication constant evaluation.
Bevin Hansson [Tue, 21 Jan 2020 13:17:30 +0000 (14:17 +0100)]
[AST] Add fixed-point multiplication constant evaluation.

Reviewers: rjmccall, leonardchan, bjope

Subscribers: cfe-commits

Tags: #clang

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

4 years ago[AST] Add fixed-point subtraction constant evaluation.
Bevin Hansson [Fri, 10 Jan 2020 12:54:58 +0000 (13:54 +0100)]
[AST] Add fixed-point subtraction constant evaluation.

Reviewers: rjmccall, leonardchan

Subscribers: cfe-commits

Tags: #clang

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

4 years agoTargetSubtargetInfo.h - remove unnecessary forward declarations. NFC.
Simon Pilgrim [Fri, 26 Jun 2020 10:46:52 +0000 (11:46 +0100)]
TargetSubtargetInfo.h - remove unnecessary forward declarations. NFC.

We have to include MCSubtargetInfo.h

4 years agoMemorySSAUpdater.h - remove unnecessary WeakVH forward declaration. NFC.
Simon Pilgrim [Fri, 26 Jun 2020 10:32:57 +0000 (11:32 +0100)]
MemorySSAUpdater.h - remove unnecessary WeakVH forward declaration. NFC.

We have to include ValueHandle.h

4 years ago[DWARFYAML][debug_info] Teach yaml2obj emit correct DWARF64 unit header.
Xing GUO [Fri, 26 Jun 2020 11:24:25 +0000 (19:24 +0800)]
[DWARFYAML][debug_info] Teach yaml2obj emit correct DWARF64 unit header.

This patch helps teach yaml2obj emit correct DWARF64 unit header of the .debug_info section.

Reviewed By: jhenderson

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

4 years ago[Alignment][NFC] Migrate TTI::getGatherScatterOpCost to Align
Guillaume Chatelet [Fri, 26 Jun 2020 11:08:27 +0000 (11:08 +0000)]
[Alignment][NFC] Migrate TTI::getGatherScatterOpCost to Align

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

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

4 years ago[Alignment][NFC] Migrate TTI::getInterleavedMemoryOpCost to Align
Guillaume Chatelet [Fri, 26 Jun 2020 11:00:53 +0000 (11:00 +0000)]
[Alignment][NFC] Migrate TTI::getInterleavedMemoryOpCost to Align

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

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

4 years ago[lldb][NFC] Make TestDollarInVariable a non-inline test
Raphael Isemann [Fri, 26 Jun 2020 10:55:42 +0000 (12:55 +0200)]
[lldb][NFC] Make TestDollarInVariable a non-inline test

4 years ago[AMDGPU] Use std::pair to return two values. NFC.
Jay Foad [Fri, 26 Jun 2020 10:29:10 +0000 (11:29 +0100)]
[AMDGPU] Use std::pair to return two values. NFC.

4 years ago[AArch64][SVE2] Guard while intrinsics on scalar bfloat feature macro
Cullen Rhodes [Thu, 25 Jun 2020 16:01:00 +0000 (16:01 +0000)]
[AArch64][SVE2] Guard while intrinsics on scalar bfloat feature macro

Summary:
`svwhilerw_bf16` and `svwhilewr_bf16` intrinsics use the scalar
`bfloat16_t`
type which is predicated on `__ARM_FEATURE_BF16_SCALAR_ARITHMETIC`. This
patch changes the feature guard from `__ARM_FEATURE_SVE_BF16` to the
scalar bfloat feature macro.

The verify tests for `+bf16` are also removed in this patch. The purpose
of these checks was to match the SVE2 ACLE tests that look for an
implicit declaration warning if the feature isn't set. They worked when
the intrinsics were guarded on `__ARM_FEATURE_SVE_BF16` as the
`bfloat16_t`
was guarded on a different macro, but with both the type and intrinsic
guarded on the same macro an earlier error is triggered in the ACLE
regarding the type and we don't get a warning as we do for SVE2.

Reviewers: sdesmalen, fpetrogalli, kmclaughlin, rengolin, efriedma

Reviewed By: sdesmalen, fpetrogalli

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

4 years ago[Alignment][NFC] Migrate TTI::getMaskedMemoryOpCost to Align
Guillaume Chatelet [Fri, 26 Jun 2020 10:14:16 +0000 (10:14 +0000)]
[Alignment][NFC] Migrate TTI::getMaskedMemoryOpCost to Align

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

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

4 years ago[AArch64][SVE] Add bfloat16 support to store intrinsics
Kerry McLaughlin [Fri, 26 Jun 2020 09:47:18 +0000 (10:47 +0100)]
[AArch64][SVE] Add bfloat16 support to store intrinsics

Summary:
Bfloat16 support added for the following intrinsics:
 - ST1
 - STNT1

Reviewers: sdesmalen, c-rhodes, fpetrogalli, efriedma, stuij, david-arm

Reviewed By: fpetrogalli

Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, danielkiss, cfe-commits, llvm-commits

Tags: #clang, #llvm

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

4 years agoLoopVectorize.h - reduce AliasAnalysis.h include to forward declaration. NFC.
Simon Pilgrim [Fri, 26 Jun 2020 09:48:40 +0000 (10:48 +0100)]
LoopVectorize.h - reduce AliasAnalysis.h include to forward declaration. NFC.

Replace legacy AliasAnalysis typedef with AAResults where necessary.

4 years ago[lldb/Unwind] Use eh_frame plan directly when it doesn't need to be augmented
Pavel Labath [Tue, 23 Jun 2020 13:40:36 +0000 (15:40 +0200)]
[lldb/Unwind] Use eh_frame plan directly when it doesn't need to be augmented

Summary:
This fixes a bug in the logic for choosing the unwind plan. Based on the
comment in UnwindAssembly-x86, the intention was that a plan which
describes the function epilogue correctly does not need to be augmented
(and it should be used directly). However, the way this was implemented
(by returning false) meant that the higher level code
(FuncUnwinders::GetEHFrameAugmentedUnwindPlan) interpreted this as a
failure to produce _any_ plan and proceeded with other fallback options.
The fallback usually chosed for "asynchronous" plans was the
"instruction emulation" plan, which tended to fall over on certain
functions with multiple epilogues (that's a separate bug).

This patch simply changes the function to return true, which signals the
caller that the unmodified plan is ready to be used.

The attached test case demonstrates the case where we would previously
fall back to the instruction emulation plan, and unwind incorrectly --
the test asserts that the "augmented" eh_frame plan is used, and that
the unwind is correct.

Reviewers: jasonmolenda, jankratochvil

Subscribers: davide, echristo, lldb-commits

Tags: #lldb

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

4 years ago[lldb] Rewrite Scalar::Promote
Pavel Labath [Fri, 26 Jun 2020 09:32:22 +0000 (11:32 +0200)]
[lldb] Rewrite Scalar::Promote

This function was implementing c-like promotion rules by switching on
the both types. C promotion rules are complicated, but they are not
*that* complicated -- they basically boil down to:
- wider types trump narrower ones
- unsigned trump signed
- floating point trumps integral

With a couple of helper functions, we can rewrite the function in terms
of these rules and greatly reduce the size and complexity of this
function.

4 years ago[AArch64][SVE] Predicate bfloat16 load patterns with HasBF16
Kerry McLaughlin [Fri, 26 Jun 2020 08:48:53 +0000 (09:48 +0100)]
[AArch64][SVE] Predicate bfloat16 load patterns with HasBF16

Reviewers: sdesmalen, c-rhodes, efriedma, fpetrogalli

Reviewed By: fpetrogalli

Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, danielkiss, llvm-commits

Tags: #llvm

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

4 years ago[AArch64][SVE] Guard perm and select bfloat16 intrinsic patterns
Cullen Rhodes [Wed, 24 Jun 2020 16:00:41 +0000 (16:00 +0000)]
[AArch64][SVE] Guard perm and select bfloat16 intrinsic patterns

Summary:
Permutation and selection bfloat16 intrinsic patterns should be guarded
on the feature flag `+bf16`. Missed in D82182 and D80850.

Reviewers: sdesmalen, fpetrogalli, kmclaughlin, efriedma

Reviewed By: fpetrogalli

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

4 years ago[ARM] VCVTT fpround instruction selection
David Green [Fri, 26 Jun 2020 08:01:56 +0000 (09:01 +0100)]
[ARM] VCVTT fpround instruction selection

Similar to the recent patch for fpext, this adds vcvtb and vcvtt with
insert into vector instruction selection patterns for fptruncs. This
helps clear up a lot of register shuffling that we would otherwise do.

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

4 years agoConstants.h - remove unnecessary forward declarations. NFC.
Simon Pilgrim [Fri, 26 Jun 2020 08:57:41 +0000 (09:57 +0100)]
Constants.h - remove unnecessary forward declarations. NFC.

We have to include DerivedTypes.h

4 years agoMemoryLocation.h - reduce Instruction.h include to forward declaration. NFC.
Simon Pilgrim [Thu, 25 Jun 2020 17:32:47 +0000 (18:32 +0100)]
MemoryLocation.h - reduce Instruction.h include to forward declaration. NFC.

4 years agoLiveRangeEdit.h - reduce AliasAnalysis.h include to forward declaration. NFC.
Simon Pilgrim [Thu, 25 Jun 2020 17:12:55 +0000 (18:12 +0100)]
LiveRangeEdit.h - reduce AliasAnalysis.h include to forward declaration. NFC.

Move include to LiveRangeEdit.cpp and replace legacy AliasAnalysis typedef with AAResults where necessary.

4 years agoFix some clang-tidy namespace closing comments warnings. NFC.
Simon Pilgrim [Thu, 25 Jun 2020 16:48:29 +0000 (17:48 +0100)]
Fix some clang-tidy namespace closing comments warnings. NFC.

4 years agoVNCoercion.cpp - remove unused includes. NFC.
Simon Pilgrim [Thu, 25 Jun 2020 16:46:23 +0000 (17:46 +0100)]
VNCoercion.cpp - remove unused includes. NFC.

4 years agoAggressiveInstCombineInternal.h - reduce unnecessary includes to forward declarations...
Simon Pilgrim [Thu, 25 Jun 2020 16:28:41 +0000 (17:28 +0100)]
AggressiveInstCombineInternal.h - reduce unnecessary includes to forward declarations. NFC.

4 years ago[CodeComplete] Tweak code completion for `typename`.
Kadir Cetinkaya [Fri, 26 Jun 2020 08:31:13 +0000 (10:31 +0200)]
[CodeComplete] Tweak code completion for `typename`.

Summary:
Currently, clangd always completes `typename` as `typename qualifier::name`, I think the current behavior is not useful when the code completion is triggered in `template <>`. So I tweak it to `typename identifier`.

Patch by @lh123 !

Reviewers: sammccall, kadircet

Reviewed By: kadircet

Subscribers: ilya-biryukov, usaxena95, cfe-commits

Tags: #clang

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

4 years agoPrevent unused error when assertions are disabled.
Tres Popp [Fri, 26 Jun 2020 08:12:04 +0000 (10:12 +0200)]
Prevent unused error when assertions are disabled.

4 years ago[ARM] VCVTT instruction selection
David Green [Fri, 26 Jun 2020 07:02:26 +0000 (08:02 +0100)]
[ARM] VCVTT instruction selection

We current extract and convert from a top lane of a f16 vector using a
VMOVX;VCVTB pair. We can simplify that to use a single VCVTT. The
pattern is mostly copied from a vector extract pattern, but produces a
VCVTTHS f32 directly.

This had to move some code around so that ARMInstrVFP had access to the
required pattern frags that were previously part of ARMInstrNEON.

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

4 years ago[mlir] parallel loop canonicalization
Tobias Gysi [Fri, 26 Jun 2020 07:47:01 +0000 (09:47 +0200)]
[mlir] parallel loop canonicalization

Summary:
The patch introduces a canonicalization pattern for parallel loops. The pattern removes single-iteration loop dimensions if the loop bounds and steps are constants.

Reviewers: herhut, ftynse

Reviewed By: herhut

Subscribers: mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, stephenneuendorffer, Joonsoo, grosul1, Kayjukh, jurahul, msifontes

Tags: #mlir

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

4 years agoRemove "rm -f" workaround in acle_sve_adda.c
David Sherwood [Fri, 26 Jun 2020 07:13:27 +0000 (08:13 +0100)]
Remove "rm -f" workaround in acle_sve_adda.c

4 years ago[X86] Make XSAVEC/XSAVEOPT/XSAVES properly depend on XSAVE in both the frontend and...
Craig Topper [Fri, 26 Jun 2020 07:14:58 +0000 (00:14 -0700)]
[X86] Make XSAVEC/XSAVEOPT/XSAVES properly depend on XSAVE in both the frontend and the backend.

These features implicitly enabled XSAVE in the frontend, but not
the backend. Disabling XSAVE in the frontend disabled XSAVEOPT, but
not the other 2. Nothing happened in the backend.

4 years ago[SVE] Fix scalable vector bug in DataLayout::getIntPtrType
David Sherwood [Mon, 22 Jun 2020 13:09:34 +0000 (14:09 +0100)]
[SVE] Fix scalable vector bug in DataLayout::getIntPtrType

Fixed an issue in DataLayout::getIntPtrType where we were assuming
the input type was always a fixed vector type, which isn't true.

Added a test that exposed the problem to:

  Transforms/InstCombine/vector_gep1.ll

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

4 years ago[SelectionDAG] Lower @llvm.get.active.lane.mask to setcc
Sjoerd Meijer [Fri, 26 Jun 2020 06:46:38 +0000 (07:46 +0100)]
[SelectionDAG] Lower @llvm.get.active.lane.mask to setcc

This lowers intrinsic @llvm.get.active.lane.mask to a setcc node, i.e. an icmp
ule, and creates vectors for its 2 arguments on which the comparison is
performed.

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

4 years ago[ARM] Don't revert get.active.lane.mask in ARM Tail-Predication pass
Sjoerd Meijer [Mon, 22 Jun 2020 10:39:31 +0000 (11:39 +0100)]
[ARM] Don't revert get.active.lane.mask in ARM Tail-Predication pass

Don't revert intrinsic get.active.lane.mask here, this is moved to isel
legalization in D82292.

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

4 years ago[X86] Add CMPXCHG16B feature to amdfam10 in the frontend.
Craig Topper [Fri, 26 Jun 2020 05:55:36 +0000 (22:55 -0700)]
[X86] Add CMPXCHG16B feature to amdfam10 in the frontend.

We already have this feature on it in the backend.

4 years ago[libc] Add the remaining long double flavors of nearest integer functions.
Siva Chandra Reddy [Thu, 25 Jun 2020 19:09:02 +0000 (12:09 -0700)]
[libc] Add the remaining long double flavors of nearest integer functions.

Specifically: ceill, floorl and roundl have been added.

Reviewers: asteinhauser

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

4 years ago[libc++] Fix the runtimes build after making __config_site mandatory
Louis Dionne [Fri, 26 Jun 2020 05:23:43 +0000 (01:23 -0400)]
[libc++] Fix the runtimes build after making __config_site mandatory

The runtimes build includes libcxx/include/CMakeLists.txt directly instead
of going through the top-level CMake file. This not-very-hygienic inclusion
caused some variables like LIBCXX_BINARY_DIR not to be defined properly,
and the config_site generation logic to fail after landing 53623d4aa710.

This patch works around this issue by defining the missing variables.
However, the proper fix for this would be for the runtimes build to
always go through libc++'s top-level CMakeLists.txt. Doing otherwise
is unsupported.

4 years ago[DebugInfo] Fix emitting offsets to CUs with -dwarf-sections-as-references=Enable.
Igor Kudrin [Mon, 22 Jun 2020 16:22:18 +0000 (23:22 +0700)]
[DebugInfo] Fix emitting offsets to CUs with -dwarf-sections-as-references=Enable.

The size of the field depends on the DWARF format, not the address size
of the target.

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