OSDN Git Service

android-x86/external-llvm-project.git
4 years agoX86: Use Register
Matt Arsenault [Sun, 28 Jun 2020 14:49:06 +0000 (10:49 -0400)]
X86: Use Register

4 years ago[ARM][MVE] Tail-predication: clean-up of unused code
Sjoerd Meijer [Mon, 29 Jun 2020 14:40:03 +0000 (15:40 +0100)]
[ARM][MVE] Tail-predication: clean-up of unused code

After the rewrite of this pass (D79175) I missed one thing: the inserted VCTP
intrinsic can be cloned to exit blocks if there are instructions present in it
that perform the same operation, but this wasn't triggering anymore. However,
it turns out that for handling reductions, see D75533, it's actually easier not
not to have the VCTP in exit blocks, so this removes that code.

This was possible because it turned out that some other code that depended on
this, rematerialization of the trip count enabling more dead code removal
later, wasn't doing much anymore due to more aggressive dead code removal that
was added to the low-overhead loops pass.

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

4 years ago[mlir] [VectorOps] Replace zero fma with mult for vector.contract
aartbik [Tue, 30 Jun 2020 16:04:16 +0000 (09:04 -0700)]
[mlir] [VectorOps] Replace zero fma with mult for vector.contract

More efficient implementation of the multiply-reduce pair,
no need to add in a zero vector. Microbenchmarking on AVX2
yields the following difference in vector.contract speedup
(over strict-order scalar reduction).

SPEEDUP     SIMD-fma SIMD-mul
4x4     1.45   2.00
8x8     1.40   1.90
32x32     5.32   5.80

Reviewed By: ftynse

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

4 years ago[lldb/Test] Skip recognizer tests when Python is disabled
Jonas Devlieghere [Tue, 30 Jun 2020 15:57:50 +0000 (08:57 -0700)]
[lldb/Test] Skip recognizer tests when Python is disabled

The `frame recognizer` command only exists when Python scripting is
enabled. Therefore the test should be made conditional on Python.
Without it, the test fails with "'frame recognizer' is not a known
command."

4 years ago[ARM] Allow rounding intrinsics to be tail predicated
Samuel Tebbs [Tue, 30 Jun 2020 15:49:20 +0000 (16:49 +0100)]
[ARM] Allow rounding intrinsics to be tail predicated

This patch stops the trunc, rint, round, floor and ceil intrinsics from blocking tail predication.

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

4 years ago[CodeComplete] Tweak completion for else.
Nathan James [Tue, 30 Jun 2020 15:48:23 +0000 (16:48 +0100)]
[CodeComplete] Tweak completion for else.

If an `if` statement uses braces for its `then` block, suggest braces for the `else` and `else if` completion blocks, Otherwise don't suggest them.

Reviewed By: sammccall

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

4 years ago[clang-tidy] performance-faster-string-find string-view
Nathan James [Tue, 30 Jun 2020 15:45:58 +0000 (16:45 +0100)]
[clang-tidy] performance-faster-string-find string-view

Extend the default string like classes to include `std::basic_string_view`.

Reviewed By: aaron.ballman

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

4 years ago[Alignment][NFC] TargetLowering::allowsMemoryAccessForAlignment
Guillaume Chatelet [Tue, 30 Jun 2020 15:31:24 +0000 (15:31 +0000)]
[Alignment][NFC] TargetLowering::allowsMemoryAccessForAlignment

First patch of a series to adapt TargetLowering::allowsXXX functions

This 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/D81372

4 years ago[clang-tidy] Sanity checks in ClangTidyTest header.
Nathan James [Tue, 30 Jun 2020 15:19:14 +0000 (16:19 +0100)]
[clang-tidy] Sanity checks in ClangTidyTest header.

Motivated by a suspicously failing build, but also good to have anyway in general.

Reviewed By: aaron.ballman

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

4 years ago[libc++abi] Remove empty source file cxa_unexpected.cpp
Louis Dionne [Tue, 30 Jun 2020 15:18:02 +0000 (11:18 -0400)]
[libc++abi] Remove empty source file cxa_unexpected.cpp

4 years ago[lldb/Scripts]
Pavel Labath [Tue, 30 Jun 2020 15:05:08 +0000 (17:05 +0200)]
[lldb/Scripts]

Fix analyze-project-deps.py. "lldb/Plugins" (home of Plugins.def) does
not depend on anything. Make sure this does not crash the script.

4 years agoAdd Metadata to Transformer tooling
Andy Soffer [Tue, 30 Jun 2020 14:35:15 +0000 (14:35 +0000)]
Add Metadata to Transformer tooling

This change adds a Metadata field to ASTEdit, Edit, and AtomicChange so that
edits can have associated metadata and that metadata can be constructed with
Transformer-based RewriteRules. Metadata is ignored when applying edits to
source, but other consumers of AtomicChange can use this metadata to direct how
they want to consume each edit.

Reviewed By: ymandel, gribozavr2

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

4 years ago[NFC] Remove dead code
Guillaume Chatelet [Tue, 30 Jun 2020 14:46:56 +0000 (14:46 +0000)]
[NFC] Remove dead code

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

4 years ago[SystemZ] Simplify knownbits.ll test
Ulrich Weigand [Tue, 30 Jun 2020 14:29:25 +0000 (16:29 +0200)]
[SystemZ] Simplify knownbits.ll test

The knownbits.ll test case is somewhat fragile since:
- it relies on undef inputs; and
- it operates just at the limits of the MaxRecursionDepth

This means that optimization changes may easily cause the test
to spuriously fail.  Rewrite the test so it still validates
the same thing, but in a less fragile manner.

4 years ago[AST][RecoveryExpr] Avoid spurious 'missing typename' diagnostic when the NNS contain...
Haojian Wu [Tue, 30 Jun 2020 14:13:20 +0000 (16:13 +0200)]
[AST][RecoveryExpr] Avoid spurious 'missing typename' diagnostic when the NNS contains errors.

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

4 years ago[runtimes] Rename newformat to just format, now that the old format has been removed
Louis Dionne [Tue, 30 Jun 2020 14:10:30 +0000 (10:10 -0400)]
[runtimes] Rename newformat to just format, now that the old format has been removed

4 years ago[libc++] Remove dead code since the removal of the old testing format
Louis Dionne [Tue, 30 Jun 2020 14:03:28 +0000 (10:03 -0400)]
[libc++] Remove dead code since the removal of the old testing format

4 years ago[DWARFYAML][MachO] Remove endianness related tests.
Xing GUO [Tue, 30 Jun 2020 13:14:28 +0000 (21:14 +0800)]
[DWARFYAML][MachO] Remove endianness related tests.

fe08ab542bd6328a7906e38ae473cf655eb6a228 makes build bots unhappy
(http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/33624/steps/ninja%20check%201/logs/FAIL%3A%20LLVM%3A%3ADWARF-debug_info.yaml).

This patch removes failed tests.

4 years ago[ASTMatcher] Fix a performance regression: memorize the child match.
Haojian Wu [Tue, 30 Jun 2020 13:42:03 +0000 (15:42 +0200)]
[ASTMatcher] Fix a performance regression: memorize the child match.

D80025 introduced a performance regression: in some cases, it makes
clang-tidy readability-container-size-empty ~80x slower (running on an internal
huge TU, before that patch 12s vs after 950s).

after this patch, we go back to 12s.

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

4 years ago[lldb/Test] Introduce "assertSuccess"
Pavel Labath [Mon, 29 Jun 2020 11:51:46 +0000 (13:51 +0200)]
[lldb/Test] Introduce "assertSuccess"

Summary:
A lot of our tests do 'self.assertTrue(error.Success()'. The problem
with that is that when this fails, it produces a completely useless
error message (False is not True) and the most important piece of
information -- the actual error message -- is completely hidden.

Sometimes we mitigate that by including the error message in the "msg"
argument, but this has two additional problems:
- as the msg argument is evaluated unconditionally, one needs to be
  careful to not trigger an exception when the operation was actually
  successful.
- it requires more typing, which means we often don't do it

assertSuccess solves these problems by taking the entire SBError object
as an argument. If the operation was unsuccessful, it can format a
reasonable error message itself. The function still accepts a "msg"
argument, which can include any additional context, but this context now
does not need to include the error message.

To demonstrate usage, I replace a number of existing assertTrue
assertions with the new function. As this process is not easily
automatable, I have just manually updated a representative sample. In
some cases, I did not update the code to use assertSuccess, but I went
for even higher-level assertion apis (runCmd, expect_expr), as these are
even shorter, and can produce even better failure messages.

Reviewers: teemperor, JDevlieghere

Subscribers: arphaman, lldb-commits

Tags: #lldb

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

4 years ago[X86][SSE] LowerVectorAllZero - add support for masked OR-reductions
Simon Pilgrim [Tue, 30 Jun 2020 13:09:23 +0000 (14:09 +0100)]
[X86][SSE] LowerVectorAllZero - add support for masked OR-reductions

If we're masking the result of an OR-reduction before comparing against zero, we can fold this into the PTEST() / MOVMSK(CMPEQ()) codegen by pre-masking the source value.

This works particularly well on PTEST which performs the AND as part of its operation, but the MOVMSK variant also benefits for non-V2I64 cases.

Fixes PR44781

4 years agoMake it possible for client code to consume CLANG_LINK_CLANG_DYLIB
serge-sans-paille [Tue, 30 Jun 2020 12:11:28 +0000 (14:11 +0200)]
Make it possible for client code to consume CLANG_LINK_CLANG_DYLIB

If a client code wants to consume clang libraries, it needs to know
CLANG_LINK_CLANG_DYLIB value in order to decide whether to use the DYLIB or
individual components.

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

4 years ago[Alignment][NFC] Migrate SelectionDAGTargetInfo::EmitTargetCodeForMemcpy to Align
Guillaume Chatelet [Tue, 30 Jun 2020 13:12:31 +0000 (13:12 +0000)]
[Alignment][NFC] Migrate SelectionDAGTargetInfo::EmitTargetCodeForMemcpy to Align

This 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/D82849

4 years ago[clangd] Suppress GCC -Woverloaded-virtual by renaming ThreadsafeFS extension point
Sam McCall [Mon, 29 Jun 2020 17:52:09 +0000 (19:52 +0200)]
[clangd] Suppress GCC -Woverloaded-virtual by renaming ThreadsafeFS extension point

Summary:
By making all overloads non-virtual and delegating to a differently-named
private method, we avoid any (harmless) name-hiding in the subclasses.

Reviewers: kadircet

Subscribers: kristof.beyls, ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits, Quuxplusone, dblaikie

Tags: #clang

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

4 years ago[Alignment][NFC] Migrate SelectionDAGTargetInfo::EmitTargetCodeForMemmove to Align
Guillaume Chatelet [Tue, 30 Jun 2020 12:46:59 +0000 (12:46 +0000)]
[Alignment][NFC] Migrate SelectionDAGTargetInfo::EmitTargetCodeForMemmove to Align

This 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/D82850

4 years ago[Alignment][NFC] Migrate SelectionDAGTargetInfo::EmitTargetCodeForMemset to Align
Guillaume Chatelet [Tue, 30 Jun 2020 12:46:05 +0000 (12:46 +0000)]
[Alignment][NFC] Migrate SelectionDAGTargetInfo::EmitTargetCodeForMemset to Align

This 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/D82851

4 years ago[NFC][ARM] Tail predication reduction tests
Sam Parker [Tue, 30 Jun 2020 12:26:59 +0000 (13:26 +0100)]
[NFC][ARM] Tail predication reduction tests

4 years ago[PM] Fix new PM to perform SpeculativeExecution as in old PM
dfukalov [Mon, 29 Jun 2020 00:43:26 +0000 (03:43 +0300)]
[PM] Fix new PM to perform SpeculativeExecution as in old PM

Summary:
Old PM runs SpeculativeExecutionPass for targets that have divergent branches.
It uses `createSpeculativeExecutionIfHasBranchDivergencePass` that creates
the pass with `OnlyIfDivergentTarget=true`, whereas new PM just created the
pass with default `OnlyIfDivergentTarget=fase` so it unexpectedly runs and
causes buildbot test fails.

Reviewers: chandlerc, arsenm

Reviewed By: arsenm

Subscribers: wdng, hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[lldb] Fix TestModuleGetXcodeSDK test after DWARFYAML change
Raphael Isemann [Tue, 30 Jun 2020 12:05:10 +0000 (14:05 +0200)]
[lldb] Fix TestModuleGetXcodeSDK test after DWARFYAML change

D82622 / fe08ab542bd6328a7906e38ae473cf655eb6a228 changes the YAML format
so this test was failing as the test yaml wasn't updated.

4 years ago[X86] Add tests for cmp-zero + and/trunc + or-reduction patterns
Simon Pilgrim [Tue, 30 Jun 2020 11:37:55 +0000 (12:37 +0100)]
[X86] Add tests for cmp-zero + and/trunc + or-reduction patterns

Expanding off the original PR44781 test case, show the failure to fold cmp-all-zero patterns when a demanded bits limiting and/trunc is in the way.

4 years ago[lldb] Tab completion for `frame recognizer delete`
Gongyu Deng [Tue, 30 Jun 2020 11:14:46 +0000 (13:14 +0200)]
[lldb] Tab completion for `frame recognizer delete`

Summary: Provided tab completion for command `frame recognizer delete`.

Reviewers: teemperor, JDevlieghere

Reviewed By: teemperor, JDevlieghere

Tags: #lldb

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

4 years ago[AST] Fix handling of some edge cases in fixed-point division.
Bevin Hansson [Tue, 30 Jun 2020 11:35:29 +0000 (13:35 +0200)]
[AST] Fix handling of some edge cases in fixed-point division.

Division by zero was not being handled, and division of
-EPSILON / MAX did not perform rounding correctly.

4 years ago[lldb] Tab completion for `frame select`
Gongyu Deng [Tue, 30 Jun 2020 11:02:18 +0000 (13:02 +0200)]
[lldb] Tab completion for `frame select`

Summary: Provided the tab completion for command `frame select`.

Reviewers: teemperor, JDevlieghere

Reviewed By: teemperor

Tags: #lldb

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

4 years ago[lldb][NFC] Remove ImportInProgress lock in ClangASTSource
Raphael Isemann [Tue, 30 Jun 2020 10:06:04 +0000 (12:06 +0200)]
[lldb][NFC] Remove ImportInProgress lock in ClangASTSource

Summary:

The ClangASTSource has a lock that globally disables all lookups into the
external AST source when we explicitly "guarded" copy a type. It's not used for
anything else, so importing declarations or importing types that are
dependencies of a declaration actually won't activate that lock. The lookups it
is supposed to prevent also don't actually happen in our test suite. The check
in `ClangExpressionDeclMap::FindExternalVisibleDecls` is never executed and the
check in the `ClangASTSource::FindExternalVisibleDeclsByName` is only ever
reached by the `Import-std-module` tests (which explicitly do a lookup into the
expression context on purpose).

This lock was added in 6abfabff6158076eccdf6fcac5a12894039de2c9 as a replacement
for a list of types we already looked up which appeared to be an optimisation
strategy. I assume back then this lock had a purpose but these days the
ASTImporter and LLDB seem to be smart enough to avoid whatever lookups this
tried to prevent.

I would say we remove it from LLDB. The main reason is that it blocks D81561
(which explicitly does a specific lookup to resolve placeholder types produced
by `-flimit-debug-info`) but it's semantics are also very confusing. The naming
implies it's a flag to indicate when we import something at the moment which is
practically never true as described above. Also the fact that it makes our
ExternalASTSource alternate between doing lookups into the debug info and
pretending it doesn't know any external decls could really break our lookup in
some weird way if Clang decides to cache a fake empty lookup result that was
generated while the lock was active.

Reviewers: labath, shafik, JDevlieghere, aprantl

Reviewed By: labath, JDevlieghere, aprantl

Subscribers: aprantl, abidh

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

4 years ago[SystemZ] Add NoMerge MIFlag
Ilya Leoshkevich [Tue, 30 Jun 2020 10:44:30 +0000 (12:44 +0200)]
[SystemZ] Add NoMerge MIFlag

Summary:
This fixes ASan and MSan tests on SystemZ after
commit 6a822e20ce70 ("[ASan][MSan] Remove EmptyAsm and set the CallInst
to nomerge to avoid from merging.").

Based on commit 80e107ccd088 ("Add NoMerge MIFlag to avoid MIR branch
folding").

Reviewers: uweigand, jonpa

Reviewed By: uweigand

Subscribers: hiraditya, llvm-commits, Andreas-Krebbel

Tags: #llvm

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

4 years ago[llvm][Z3][NFC] Improve mkBitvector performance
Balazs Benics [Tue, 30 Jun 2020 10:26:50 +0000 (12:26 +0200)]
[llvm][Z3][NFC] Improve mkBitvector performance

We convert `APSInt`s to Z3 Bitvectors in an inefficient way for most cases.
We should not serialize to std::string just to pass an int64 integer.

For the vast majority of cases, we use at most 64-bit width integers (at least
in the Clang Static Analyzer). We should simply call the `Z3_mk_unsigned_int64`
and `Z3_mk_int64` instead of the `Z3_mk_numeral` as stated in the Z3 docs.
Which says:
> It (`Z3_mk_unsigned_int64`, etc.) is slightly faster than `Z3_mk_numeral` since
> it is not necessary to parse a string.

If the `APSInt` is wider than 64 bits, we will use the `Z3_mk_numeral` with a
`SmallString` instead of a heap-allocated `std::string`.

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

4 years ago[clangd] Remove redundant `findRefs` calls. NFC.
lh123 [Sun, 28 Jun 2020 12:32:26 +0000 (20:32 +0800)]
[clangd] Remove redundant `findRefs` calls. NFC.

Summary:
Remove redundant `findRefs` calls.

Reviewers: sammccall, kadircet

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

Tags: #clang

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

4 years ago[mlir] Extended BufferPlacement to support nested region control flow.
Marcel Koester [Tue, 30 Jun 2020 09:58:45 +0000 (11:58 +0200)]
[mlir] Extended BufferPlacement to support nested region control flow.

Summary: The current BufferPlacement implementation does not support
nested region control flow. This CL adds support for nested regions via
the RegionBranchOpInterface and the detection of branch-like
(ReturnLike) terminators inside nested regions.

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

4 years ago[AST][RecoveryExpr] Add error-bit to NestNameSpecifierDependence and TemplateNameDepe...
Haojian Wu [Thu, 25 Jun 2020 08:13:48 +0000 (10:13 +0200)]
[AST][RecoveryExpr] Add error-bit to NestNameSpecifierDependence and TemplateNameDependence.

Summary:
We might lose the error-bit if the error-bit goes through the code path
"error type/expr" -> "error template argument" -> "nested name specifier" ->
... -> "template Specialization type"

Template name also needs this, as a template can be nested into
an error specifier, e.g. templateName apply in
`TC<decltype(<recovery-expr>(Foo, int()))>::template apply`

Reviewers: sammccall

Subscribers: cfe-commits

Tags: #clang

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

4 years ago[Alignment][NFC] Migrate AtomicExpandPass to Align
Guillaume Chatelet [Tue, 30 Jun 2020 09:54:45 +0000 (09:54 +0000)]
[Alignment][NFC] Migrate AtomicExpandPass to Align

This is a followup on D78403.
I'm unsure about `getAtomicOpAlign` overloads that take `AtomicRMWInst` and `AtomicCmpXchgInst`, shouldn't `getAlign` provide the correct answer already?

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

4 years ago[lldb] Modernize TestOperatorOverload.py asserts
Raphael Isemann [Mon, 29 Jun 2020 13:48:32 +0000 (15:48 +0200)]
[lldb] Modernize TestOperatorOverload.py asserts

4 years ago[IR] NoFree IntrinsicProperty.
sstefan1 [Tue, 30 Jun 2020 09:04:54 +0000 (11:04 +0200)]
[IR] NoFree IntrinsicProperty.

Summary:
Separate introduction of IntrNoFree property as suggested in D70365

Reviewers: arsenm, nhaehnle

Tags: #llvm

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

4 years ago[yaml2obj] - Support reading a content as an array of bytes using the new 'ContentArr...
Georgii Rymar [Tue, 23 Jun 2020 08:16:19 +0000 (11:16 +0300)]
[yaml2obj] - Support reading a content as an array of bytes using the new 'ContentArray' key.

It implements the way to describe a section content using a multi line description. E.g:

```
- Name:         .foo
  Type:         SHT_PROGBITS
  ContentArray: [ 0x11, 0x22, 0x33, 0x44,                                ## .long 11223344
                  0x55, 0x66,                                            ## .short 5566.
                  0x77,                                                  ## .byte 0x77
                  0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF, 0x00 ] ## .quad 0x8899aabbccddeeff
```

It was briefly discussed in D75123 thread previously.

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

4 years ago[yaml2obj] - Add a way to set default values for macros used in a YAML.
Georgii Rymar [Wed, 24 Jun 2020 12:18:53 +0000 (15:18 +0300)]
[yaml2obj] - Add a way to set default values for macros used in a YAML.

Currently we have to override all macros that are declared. But in many
cases it is convenient to use default values and to override only
a particular one or two.

This provides a way to set a default value for any macro:

```
Symbols:
  - Name: [[FOO=foo]]
```

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

4 years agoAMDGPU/GlobalISel: Select icmp intrinsic
Petar Avramovic [Tue, 30 Jun 2020 08:57:41 +0000 (10:57 +0200)]
AMDGPU/GlobalISel: Select icmp intrinsic

Select into corresponding V_CMP instruction based on CmpInst predicate,
stored as immediate, in last operand.

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

4 years ago[GlobalISel][InlineAsm] Add support for matching input constraints
Petar Avramovic [Tue, 30 Jun 2020 08:49:05 +0000 (10:49 +0200)]
[GlobalISel][InlineAsm] Add support for matching input constraints

Find def operand that corresponds to matching constraint and
tie input to that operand.

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

4 years ago[mlir] Fix case in MLIRGPUtoVulkanTransforms
Marius Brehler [Tue, 30 Jun 2020 08:46:32 +0000 (01:46 -0700)]
[mlir] Fix case in MLIRGPUtoVulkanTransforms

This changes the casing of MLIRGPUtoVulkanTransforms to be consistent
with other transform libraries.

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

4 years agoRevert "Fix missing build dependency on omp_gen."
Simon Tatham [Tue, 30 Jun 2020 08:28:41 +0000 (09:28 +0100)]
Revert "Fix missing build dependency on omp_gen."

This reverts commit ed4328c607306a2aa6df4833a0dce4482edbc94c.

My change apparently caused a buildbot to fail with the error

  CMake Error at /b/sanitizer-x86_64-linux-autoconf/build/tsan_release_build/lib/cmake/llvm/AddLLVM.cmake:869 (add_dependencies):
  The dependency target "omp_gen" of target "ScudoBenchmarks.x86_64" does not
  exist.

I don't at all understand why, because as far as I can see, the target
`omp_gen` is only added to `LLVM_COMMON_DEPENDS` after having been
created, so there //should// be no way it can end up on anything's
dependency list if it doesn't exist! But apparently it happened anyway.

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

4 years ago[MLIR][Shape] Fix lowering of `shape.get_extent`
Frederik Gossen [Tue, 30 Jun 2020 08:33:49 +0000 (08:33 +0000)]
[MLIR][Shape] Fix lowering of `shape.get_extent`

The declarative conversion patterns caused crashes in the asan configuration.
The non-declarative implementation circumvents this.

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

4 years ago[DWARFYAML][debug_info] Replace 'InitialLength' with 'Format' and 'Length'.
Xing GUO [Tue, 30 Jun 2020 07:07:45 +0000 (15:07 +0800)]
[DWARFYAML][debug_info] Replace 'InitialLength' with 'Format' and 'Length'.

'InitialLength' is replaced with 'Format' (DWARF32 by default) and 'Length' in this patch.
Besides, test cases for DWARFv4 and DWARFv5, DWARF32 and DWARF64 is
added.

Reviewed By: jhenderson

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

4 years ago[clang-tidy][docs] Fix malformed link in ReleaseNotes
Nathan James [Tue, 30 Jun 2020 08:17:48 +0000 (09:17 +0100)]
[clang-tidy][docs] Fix malformed link in ReleaseNotes

4 years ago[Alignment][NFC] TargetLowering::allowsMemoryAccess
Guillaume Chatelet [Tue, 30 Jun 2020 08:16:59 +0000 (08:16 +0000)]
[Alignment][NFC] TargetLowering::allowsMemoryAccess

Second patch of a series to adapt TargetLowering::allowsXXX functions

This 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/D82785

4 years ago[Alignment][NFC] Migrate PPC, X86 and XCore backends to Align
Guillaume Chatelet [Tue, 30 Jun 2020 08:08:45 +0000 (08:08 +0000)]
[Alignment][NFC] Migrate PPC, X86 and XCore backends to Align

This 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/D82779

4 years ago[builtins] Change si_int to int in some helper declarations
Anatoly Trosinenko [Tue, 30 Jun 2020 08:06:52 +0000 (11:06 +0300)]
[builtins] Change si_int to int in some helper declarations

This patch changes types of some integer function arguments or return values from `si_int` to the default `int` type to make it more compatible with `libgcc`.

The compiler-rt/lib/builtins/README.txt has a link to the [libgcc specification](http://gcc.gnu.org/onlinedocs/gccint/Libgcc.html#Libgcc). This specification has an explicit note on `int`, `float` and other such types being just illustrations in some cases while the actual types are expressed with machine modes.

Such usage of always-32-bit-wide integer type may lead to issues on 16-bit platforms such as MSP430. Provided [libgcc2.h](https://gcc.gnu.org/git/?p=gcc.git;a=blob_plain;f=libgcc/libgcc2.h;hb=HEAD) can be used as a reference for all targets supported by the libgcc, this patch fixes some existing differences in helper declarations.

This patch is expected to not change behavior at all for targets with 32-bit `int` type.

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

4 years ago[MSP430] Declare comparison LibCalls as returning i16 instead of i32
Anatoly Trosinenko [Tue, 30 Jun 2020 08:04:17 +0000 (11:04 +0300)]
[MSP430] Declare comparison LibCalls as returning i16 instead of i32

For TI's distribution of msp430-gcc
```
msp430-elf-gcc -S -o- -Os -x c - <<< "int f(float a, float b) { return a != b; }"
```
does not mention `R13` at all. `__libgcc_cmp_return__` machine mode is 2 byte on MSP430, as well.

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

4 years ago[Alignment][NFC] Migrate AArch64, ARM, Hexagon, MSP and NVPTX backends to Align
Guillaume Chatelet [Tue, 30 Jun 2020 07:49:21 +0000 (07:49 +0000)]
[Alignment][NFC] Migrate AArch64, ARM, Hexagon, MSP and NVPTX backends to Align

This 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/D82749

4 years agoFix missing build dependency on omp_gen.
Simon Tatham [Tue, 30 Jun 2020 07:51:51 +0000 (08:51 +0100)]
Fix missing build dependency on omp_gen.

Summary:
`include/llvm/Frontend/OpenMP/CMakeLists.txt` creates a new target
called `omp_gen`, which is automatically added to
`LLVM_COMMON_DEPENDS` by the `add_public_tablegen_target` macro. But
it only gets added to the version of `LLVM_COMMON_DEPENDS` in the
scope of that subsidiary CMakeLists file, and it doesn't propagate all
the way back up to the permanent version of that variable which is
actually used to set dependencies.

The visible effect is that the output build scripts contain a missing
dependency. For example, if I run cmake in Ninja output mode, and then
run

  ninja -t commands tools/clang/examples/PrintFunctionNames/CMakeFiles/PrintFunctionNames.dir/PrintFunctionNames.cpp.o

to list all the commands that are prerequisites of building that
object file, then the list does not include the llvm-tblgen command
that builds `include/llvm/Frontend/OpenMP/OMP.h.inc`, even though that
generated include file is needed (by a chain of includes starting from
`clang/AST/AST.h`), and that object file can't be compiled without it.
This missing dependency can cause intermittent build failures,
depending on the order that Ninja (or whatever) happens to schedule
its commands.

I've fixed it by adding a `set` command in two levels of
`CMakeLists.txt` to propagate the modified version of
`LLVM_COMMON_DEPENDS` back up through the parent scopes so that
`omp_gen` does end up on the version seen by the main
`llvm/CMakeLists.txt`.

Reviewers: clementval, thakis, chandlerc, jdoerfert

Reviewed By: clementval

Subscribers: jdenny, mgorny, sstefan1, llvm-commits

Tags: #llvm

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

4 years ago[X86] Remove an isel pattern than can never match. Remove bitcasts of loads from...
Craig Topper [Tue, 30 Jun 2020 07:17:52 +0000 (00:17 -0700)]
[X86] Remove an isel pattern than can never match. Remove bitcasts of loads from a few others.

4 years ago[CodeGen] Fix warning in getNode for EXTRACT_SUBVECTOR
David Sherwood [Mon, 29 Jun 2020 07:13:50 +0000 (08:13 +0100)]
[CodeGen] Fix warning in getNode for EXTRACT_SUBVECTOR

Fix a warning in getNode() when extracting a subvector from a
concat vector. We can simply replace the call to getVectorNumElements
with getVectorMinNumElements as this follows the defined behaviour
for EXTRACT_SUBVECTOR.

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

4 years ago[SystemZ] Improve handling of ZERO_EXTEND_VECTOR_INREG.
Jonas Paulsson [Thu, 26 Mar 2020 11:22:14 +0000 (12:22 +0100)]
[SystemZ] Improve handling of ZERO_EXTEND_VECTOR_INREG.

Instead of doing multiple unpacks when zero extending vectors (e.g. v2i16 ->
v2i64), benchmarks have shown that it is better to do a VPERM (vector
permute) since that is only one sequential instruction on the critical path.

This patch achieves this by

1. Expand ZERO_EXTEND_VECTOR_INREG into a vector shuffle with a zero vector
   instead of (multiple) unpacks.

2. Improve SystemZ::GeneralShuffle to perform a single unpack as the last
   operation if Bytes matches it.

Review: Ulrich Weigand
Differential Revision: https://reviews.llvm.org/D78486

4 years ago[llvm-objcopy][MachO] Fix segment size alignment
Alexander Shaposhnikov [Tue, 30 Jun 2020 06:09:38 +0000 (23:09 -0700)]
[llvm-objcopy][MachO] Fix segment size alignment

This diff addresses the old TODO in MachOObjcopy.cpp and
correctly sets the page size used for alignment of segments.
In particular, now llvm-objcopy's output is consistent
with the input (the alignment of vmsize doesn't change).

Test plan:

1. make check-all
2. verify that a binary copied via llvm-objcopy now correctly works on iOS.

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

4 years ago[SVE][CodeGen] Fix bug in DAGCombiner::reduceBuildVecToShuffle
David Sherwood [Thu, 25 Jun 2020 13:46:16 +0000 (14:46 +0100)]
[SVE][CodeGen] Fix bug in DAGCombiner::reduceBuildVecToShuffle

When trying to reduce a BUILD_VECTOR to a SHUFFLE_VECTOR it's
important that we carefully check the vector types that led to
that BUILD_VECTOR. In the test I have attached to this commit
there is a case where the results of two SVE faddv instructions
are being stored to consecutive memory locations. With my fix,
as part of merging those stores we discover that each BUILD_VECTOR
element came from an extract of a SVE vector element and
therefore bail out.

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

4 years agoAdd front/back accessors to indexed_accessor_range.
River Riddle [Tue, 30 Jun 2020 05:37:05 +0000 (22:37 -0700)]
Add front/back accessors to indexed_accessor_range.

These map to the similar accessors on ArrayRef and other random access containers.

This fixes a compilation error on MLIR ODS for variadic operands/results, which relied on the availability of front in certain situations.

4 years ago[SimplifyCFG] Fix inconsistency in block size assessment for threading
Max Kazantsev [Tue, 30 Jun 2020 05:38:15 +0000 (12:38 +0700)]
[SimplifyCFG] Fix inconsistency in block size assessment for threading

Sometimes SimplifyCFG may decide to perform jump threading. In order
to do it, it follows the following algorithm:

1. Checks if the block is small enough for threading;
2. If yes, inserts a PR Phi relying that the next iteration will remove it
   by performing jump threading;
3. The next iteration checks the block again and performs the threading.

This logic has a corner case: inserting the PR Phi increases block's size
by 1. If the block size at first check was max possible, one more Phi will
exceed this size, and we will neither perform threading nor remove the
created Phi node. As result, we will end up with worse IR than before.

This patch fixes this situation by excluding Phis from block size computation.
Excluding Phis from size computation for threading also makes sense by
itself because in case of threadign all those Phis will be removed.

Differential Revision: https://reviews.llvm.org/D81835
Reviewed By: asbirlea, nikic

4 years agoAdd missing #include
David Blaikie [Tue, 30 Jun 2020 05:07:36 +0000 (22:07 -0700)]
Add missing #include

A forward declaration was insufficient here - since Regex needs to be
complete for the implicit dtor to be compiled correctly. (that, or the
dtor would have to be made explicit and out of line)

4 years ago[clang] attempt to fix a linux test failure for the darwin-ld-platform-version-macos...
Alex Lorenz [Tue, 30 Jun 2020 03:11:55 +0000 (20:11 -0700)]
[clang] attempt to fix a linux test failure for the darwin-ld-platform-version-macos.c test

Clang should use explicit -target to ensure that the Darwin driver is used.
Also drop arm64e test-case for now.

4 years ago[OpenMP] fix clang warning about printf format in CUDA plugin
Ye Luo [Tue, 30 Jun 2020 02:32:43 +0000 (22:32 -0400)]
[OpenMP] fix clang warning about printf format in CUDA plugin

Summary: Warnings are printed by clang when building LIBOMPTARGET_ENABLE_DEBUG=ON due incorrect format string.

Reviewers: tianshilei1992, jdoerfert

Reviewed By: tianshilei1992

Subscribers: yaxunl, guansong, sstefan1, openmp-commits

Tags: #openmp

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

4 years ago[darwin][driver] pass the minimum supported OS version to the linker
Alex Lorenz [Tue, 30 Jun 2020 01:39:26 +0000 (18:39 -0700)]
[darwin][driver] pass the minimum supported OS version to the linker
if it's newer than the target version

This change ensures that the arm64-apple-macOS slice is linked for
macOS 11 even if the deployment target is earlier than macOS 11.

4 years ago[c++20] Fix handling of operator rewrites naming consteval operator<=>.
Richard Smith [Tue, 30 Jun 2020 02:02:47 +0000 (19:02 -0700)]
[c++20] Fix handling of operator rewrites naming consteval operator<=>.

4 years agoMove Sema::PragmaStack<ValueType>::Act into Sema.h so it can be instantiated as needed
David Blaikie [Tue, 30 Jun 2020 01:02:12 +0000 (18:02 -0700)]
Move Sema::PragmaStack<ValueType>::Act into Sema.h so it can be instantiated as needed

Found by linker failures in ThinLTO where the definition wasn't
available when it needed to be. (eg: ThinLTO may've eliminated the one
caller in the same TU and dropped the definition - breaking accidental
implicit depenednce on that definition from elsewhere)

4 years ago[MLIR][SPIRVToLLVM] Added Bitcast conversion pattern
George Mitenkov [Tue, 30 Jun 2020 00:32:40 +0000 (20:32 -0400)]
[MLIR][SPIRVToLLVM] Added Bitcast conversion pattern

Added conversion pattern and tests for `spv.Bitcast` op.  This one has
a direct mapping in LLVM dialect so `DirectConversionPattern` was used.

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

4 years ago[ods] Update Operator to record Arg->[Attr|Operand]Index mapping
Jacques Pienaar [Mon, 29 Jun 2020 23:40:52 +0000 (16:40 -0700)]
[ods] Update Operator to record Arg->[Attr|Operand]Index mapping

Also fixed bug in type inferface generator to address bug where operands and
attributes are interleaved.

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

4 years ago[X86] Prefer AND over PSHUFB for v64i8 when possible
Craig Topper [Mon, 29 Jun 2020 23:26:53 +0000 (16:26 -0700)]
[X86] Prefer AND over PSHUFB for v64i8 when possible

If the shuffle is a blend and one input is a 0 vector, we should prefer AND over PSHUFB since its available on more execution ports.

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

4 years ago[MLIR][SPIRVToLLVM] Convert bitwise and logical not
George Mitenkov [Mon, 29 Jun 2020 23:16:36 +0000 (19:16 -0400)]
[MLIR][SPIRVToLLVM] Convert bitwise and logical not

This patch introduces new conversion patterns for bit and logical
negation op: `spv.Not` and `spv.LogicalNot`. They are implemented
by applying xor on the operand and mask with all bits set.

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

4 years ago[FileCheck] Permit multiple -v or -vv
Joel E. Denny [Mon, 29 Jun 2020 22:35:22 +0000 (18:35 -0400)]
[FileCheck] Permit multiple -v or -vv

`FILECHECK_OPTS` was implemented so that a test runner, such as CI,
can specify FileCheck debugging options, such as `-v` and `-vv`.
However, if a test suite has a FileCheck call that already specifies
`-v` or `-vv`, then that call will fail if `FILECHECK_OPTS` also
specifies it.

For `-vv`, this problem already exists:

`clang/test/CodeGen/aarch64-v8.2a-fp16-intrinsics-constrained.c`

It's not yet clear if the `-vv` in that test was intentional, but this
usage shouldn't fail anyway.  It's already true that FileCheck permits
`-vv` and `-v` together even though `-vv` implies `-v`.

Compare D70784, which fixed the same problem for `-dump-input`.

Reviewed By: jhenderson, thopre

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

4 years ago[FileCheck][NFC] Clean up RUN style in verbose.txt test
Joel E. Denny [Mon, 29 Jun 2020 22:35:11 +0000 (18:35 -0400)]
[FileCheck][NFC] Clean up RUN style in verbose.txt test

Reviewed By: jhenderson, thopre

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

4 years agoClang Driver: refactor support for writing response files to be
James Y Knight [Mon, 29 Jun 2020 22:27:02 +0000 (18:27 -0400)]
Clang Driver: refactor support for writing response files to be
specified at Command creation, rather than as part of the Tool.

This resolves the hack I just added to allow Darwin toolchain to vary
its level of support based on `-mlinker-version=`.

The change preserves the _current_ settings for response-file support.
Some tools look likely to be declaring that they don't support
response files in error, however I kept them as-is in order for this
change to be a simple refactoring.

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

4 years agoClang Driver: Use Apple ld64's new @response-file support.
James Y Knight [Mon, 29 Jun 2020 22:26:53 +0000 (18:26 -0400)]
Clang Driver: Use Apple ld64's new @response-file support.

In XCode 12, ld64 got support for @files, in addition to the old
-filelist mechanism. Response files allow passing all command-line
arguments to the linker via a file, rather than just filenames, and is
therefore preferred.

Because of the way response-file support is currently implemented as
part of the Tool class in Clang, this change requires an ugly backdoor
function to access Args. A follow-up commit fixes this, but I've
ordered this change first, for easier backportability.

I've added no tests here, because unfortunately, there don't appear to
be _any_ response-file emission automated tests, and I don't see an
obvious way to add them. I've tested that this change works as
expected locally.

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

4 years ago[SVE] Remove calls to VectorType::getNumElements from Instrumentation
Christopher Tetreault [Mon, 29 Jun 2020 21:46:25 +0000 (14:46 -0700)]
[SVE] Remove calls to VectorType::getNumElements from Instrumentation

Reviewers: efriedma, pcc, gchatelet, kmclaughlin, sdesmalen

Reviewed By: sdesmalen

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

Tags: #llvm

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

4 years ago[CMake][compiler-rt] Only set lld as available when it was built
Petr Hosek [Thu, 11 Jun 2020 03:00:53 +0000 (20:00 -0700)]
[CMake][compiler-rt] Only set lld as available when it was built

The `-fuse-ld=lld` check might succeed because there's a system lld,
but that lld may be out-of-date which would cause any tests that
attempt to use for LTO fail. This was observed on some of the bots.

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

4 years ago[MLIR] Add variadic isa<> for Type, Value, and Attribute
Rahul Joshi [Mon, 29 Jun 2020 14:31:48 +0000 (07:31 -0700)]
[MLIR] Add variadic isa<> for Type, Value, and Attribute

- Also adopt variadic llvm::isa<> in more places.
- Fixes https://bugs.llvm.org/show_bug.cgi?id=46445

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

4 years ago[CMake] Fix incorrect handling of get_target_property failure
Christopher Tetreault [Mon, 29 Jun 2020 21:21:39 +0000 (14:21 -0700)]
[CMake] Fix incorrect handling of get_target_property failure

Summary:
add_unittest was checking that the result of get_target_property was not
"NOTFOUND", but despite what the documentation says, get_target_property
returns <the var>-NOTFOUND on failure.

Reviewers: efriedma, thakis, serge-sans-paille, chandlerc

Reviewed By: serge-sans-paille

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

4 years agoFix a few cases that were incorrectly parsed as unary-expressions
Richard Smith [Mon, 29 Jun 2020 21:12:14 +0000 (14:12 -0700)]
Fix a few cases that were incorrectly parsed as unary-expressions
instead of postfix-expressions, and improve error recovery for postfix
operators after unary-expressions.

This covers nullptr, __null, and some calls to type traits with special
parsing rules. We would previously not parse a postfix-expression suffix
for these expressions, so would reject expressions such as
__is_trivial(int)["foo"].

For the case where a postfix-expression suffix is *not* permitted after
a unary-expression (for example, after a new-expression or sizeof
expression), produce a diagnostic if one appears there anyway. That's
always ill-formed, but previously produced very bad diagnostics.

4 years ago[mlir] add unsigned comparison builders to Affine EDSC
Adam D Straw [Mon, 29 Jun 2020 17:35:11 +0000 (19:35 +0200)]
[mlir] add unsigned comparison builders to Affine EDSC

Current Affine comparison builders, which use operator overload, default to signed comparison.  This creates the possibility of misuse of these builders and potential correctness issues when dealing with unsigned integers.  This change makes the distinction between signed and unsigned comparison builders and forces the caller to make a choice between the two.

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

4 years ago[flang] Add coarray lowering hooks.
Eric Schweitz [Mon, 29 Jun 2020 17:28:12 +0000 (10:28 -0700)]
[flang] Add coarray lowering hooks.

Differential review: https://reviews.llvm.org/D82790

4 years ago[PowerPC] Fix FeatureISA3_1 def in PPC.td to imply FeatureISA3_0.
Lei Huang [Mon, 29 Jun 2020 21:13:02 +0000 (16:13 -0500)]
[PowerPC] Fix FeatureISA3_1 def in PPC.td to imply FeatureISA3_0.

4 years ago[X86] Add common prefixes to merge more hadd/sub tests checks
Simon Pilgrim [Sun, 28 Jun 2020 22:26:48 +0000 (23:26 +0100)]
[X86] Add common prefixes to merge more hadd/sub tests checks

4 years ago[clangd] config() -> Config::current to avoid confict with NS
Sam McCall [Mon, 29 Jun 2020 21:05:07 +0000 (23:05 +0200)]
[clangd] config() -> Config::current to avoid confict with NS

4 years agoSimplify conditionals in DNBArchMachARM64::EnableHardwareSingleStep
Jason Molenda [Mon, 29 Jun 2020 21:04:44 +0000 (14:04 -0700)]
Simplify conditionals in DNBArchMachARM64::EnableHardwareSingleStep

4 years ago[mlir] [VectorOps] Extend vector reduction integration test with reassoc=true cases.
aartbik [Mon, 29 Jun 2020 20:28:12 +0000 (13:28 -0700)]
[mlir] [VectorOps] Extend vector reduction integration test with reassoc=true cases.

Reviewed By: reidtatge

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

4 years ago[ADT] Use more explicit from to initialize member. Appease MSVC?
Sam McCall [Mon, 29 Jun 2020 20:22:12 +0000 (22:22 +0200)]
[ADT] Use more explicit from to initialize member. Appease MSVC?

Or at least get a clearer error message:
http://lab.llvm.org:8011/builders/mlir-windows/builds/3958/steps/build-unified-tree/logs/stdio

4 years ago[clang][RelativeVTablesABI] Update CodeGenCXX/RelativeVTablesABI/dynamic-cast.cpp
Leonard Chan [Mon, 29 Jun 2020 20:06:42 +0000 (13:06 -0700)]
[clang][RelativeVTablesABI] Update CodeGenCXX/RelativeVTablesABI/dynamic-cast.cpp

After c7bcd431d9c4bfeb631a3599f1d628603e6351d6, this test started failing when
running with the new pass manager. One of the CHECKs in this file checks how the
vtable is loaded for a void cast, which involves taking 2 bitcasts from the pointer
to the original object. The order of these bitcasts changes under the new PM.
The order doesn't matter, so this relaxes the CHECKs.

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

4 years agoReland "[clang][SourceManager] cache Macro Expansions""
Nick Desaulniers [Mon, 29 Jun 2020 19:42:37 +0000 (12:42 -0700)]
Reland "[clang][SourceManager] cache Macro Expansions""

This reverts commit 33d63f02ce408d181e13089ee5a667fb2e1cdc78.

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

4 years agoRevert "[clang][SourceManager] cache Macro Expansions"
Nick Desaulniers [Mon, 29 Jun 2020 19:41:56 +0000 (12:41 -0700)]
Revert "[clang][SourceManager] cache Macro Expansions"

This reverts commit dffc1420451f674731cb36799c8ae084104ff0b5.

Missed a hunk (D82690).

4 years agoReland [clangd] Config: config struct propagated through Context
Sam McCall [Mon, 29 Jun 2020 19:46:40 +0000 (21:46 +0200)]
Reland [clangd] Config: config struct propagated through Context

This reverts commit a3684dfc45c3a7bbdf72750d8a527e07e776b608.

4 years agoRevert "[clangd] Config: config struct propagated through Context"
Sam McCall [Mon, 29 Jun 2020 19:41:57 +0000 (21:41 +0200)]
Revert "[clangd] Config: config struct propagated through Context"

This reverts commit 9963d93b0731e21dd1c9c1cebf8baaecf2010330.

Fails on mac/win:
http://45.33.8.238/win/18704/step_9.txt
http://45.33.8.238/mac/16341/step_9.txt

4 years agoReland [ADT] Support const-qualified unique_functions
Sam McCall [Mon, 29 Jun 2020 19:00:46 +0000 (21:00 +0200)]
Reland [ADT] Support const-qualified unique_functions

This reverts commit 09b6dffb8ed19d624fddc7a57ce886f8be3c45b2.

Now compiles with GCC!

4 years ago[ProcessGDBRemote] Get rid of an unused function.
Davide Italiano [Mon, 29 Jun 2020 19:38:27 +0000 (12:38 -0700)]
[ProcessGDBRemote] Get rid of an unused function.

The define was wrong. I could've fixed it, but given this is
unused I decided to drop the function altogether.

4 years ago[flang] Defer stmt function body analysis until specification part complete
peter klausler [Mon, 29 Jun 2020 17:45:02 +0000 (10:45 -0700)]
[flang] Defer stmt function body analysis until specification part complete

Expression analysis was being invoked on the bodies of statement functions
as they were being encountered during name resolution.  This led to failures
on some FCVS tests in cases where those expressions contained implicitly
typed objects.  Defer the analysis of statemet function bodies to the end
of the specification part, at which time the symbols of the enclosing scope
will have been typed.

Reviewed By: tskeith

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

4 years ago[llvm][NFC] Use llvm_canonicalize_cmake_booleans for LLVM_HAVE_TF_AOT
Mircea Trofin [Mon, 29 Jun 2020 15:44:38 +0000 (08:44 -0700)]
[llvm][NFC] Use llvm_canonicalize_cmake_booleans for LLVM_HAVE_TF_AOT

Reviewers: thakis

Subscribers: mgorny, llvm-commits

Tags: #llvm

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