platform/upstream/llvm.git
4 years ago[MLIR][Linalg] Fix assertion in dependency analysis
Frederik Gossen [Tue, 22 Sep 2020 10:03:43 +0000 (10:03 +0000)]
[MLIR][Linalg] Fix assertion in dependency analysis

The assertion falsely expected ranked memrefs only.  Now both, ranked and
unranked memrefs are allowed.

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

4 years ago[SCEV] Support unsigned predicates in isKnownPredicateViaNoOverflow
Max Kazantsev [Tue, 22 Sep 2020 10:03:52 +0000 (17:03 +0700)]
[SCEV] Support unsigned predicates in isKnownPredicateViaNoOverflow

SCEV should be able to prove facts like `x <u x+1<nuw>`.

Differential Revision: https://reviews.llvm.org/D88015
Reviewed By: lebedev.ri

4 years agoRevert "Implement a new kind of Pass: dynamic pass pipeline"
Thomas Joerg [Tue, 22 Sep 2020 10:00:29 +0000 (12:00 +0200)]
Revert "Implement a new kind of Pass: dynamic pass pipeline"

This reverts commit 385c3f43fceba227be2e4dce84a59075733541c1.

Test  mlir/test/Pass:dynamic-pipeline-fail-on-parent.mlir.test fails
when run with ASAN:

ERROR: AddressSanitizer: stack-use-after-scope on address ...

Reviewed By: bkramer, pifon2a

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

4 years ago[AMDGPU] More codegen patterns for v2i16/v2f16 build_vector
Jay Foad [Wed, 16 Sep 2020 15:44:31 +0000 (16:44 +0100)]
[AMDGPU] More codegen patterns for v2i16/v2f16 build_vector

It's simpler to do this at codegen time than to do ad-hoc constant
folding of machine instructions in SIFoldOperands.

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

4 years ago[ARM] Improve VPT predicate tracking
Sam Parker [Tue, 22 Sep 2020 08:22:11 +0000 (09:22 +0100)]
[ARM] Improve VPT predicate tracking

The VPTBlock has been modified to track the 'global' state of the
VPR, as well as the state for each block. Each object now just holds
a list of instructions that makeup the block, while static structures
hold the predicate information. This enables global access for
querying how both a VPT block and individual instructions are
predicated. These changes now allow us, again, to handle more
complicated cases where multiple instructions build a predicate
and/or where the same predicate in used in multiple blocks.

It doesn't, however, get us back to before the tracking was 'fixed'
as some extra logic will be required to properly handle VPT
instructions. Currently a VPT could be effectively predicated because
of it's inputs, but the existing logic will not detect that and so
will refuse to perform the transformation. This can be seen in
remat-vctp.ll test where we still don't perform the transform.

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

4 years agoRevert "Reapply Revert "RegAllocFast: Rewrite and improve""
Muhammad Omair Javaid [Tue, 22 Sep 2020 09:20:10 +0000 (14:20 +0500)]
Revert "Reapply Revert "RegAllocFast: Rewrite and improve""

This reverts commit 55f9f87da2c2ad791b9e62cccb1c035e037444fa.

Breaks following buildbots:
http://lab.llvm.org:8011/builders/lldb-arm-ubuntu/builds/4306
http://lab.llvm.org:8011/builders/lldb-aarch64-ubuntu/builds/9154

4 years ago[SyntaxTree][Synthesis] Fix: `deepCopy` -> `deepCopyExpandingMacros`.
Eduardo Caldas [Mon, 21 Sep 2020 17:05:41 +0000 (17:05 +0000)]
[SyntaxTree][Synthesis] Fix: `deepCopy` -> `deepCopyExpandingMacros`.

There can be Macros that are tagged with `modifiable`. Thus verifying
`canModifyAllDescendants` is not sufficient to avoid macros when deep
copying.

We think the `TokenBuffer` could inform us whether a `Token` comes from
a macro. We'll look into that when we can surface this information
easily, for instance in unit tests for `ComputeReplacements`.

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

4 years ago[llvm-readobj/elf] - Stop reporting invalid extended indexes in warnings for unnamed...
Georgii Rymar [Fri, 18 Sep 2020 12:21:54 +0000 (15:21 +0300)]
[llvm-readobj/elf] - Stop reporting invalid extended indexes in warnings for unnamed section symbols.

We have an issue with `getFullSymbolName`: it assumes that the symbol passed is
always in the `.symtab`, what is wrong. We might calculate and report a wrong index currently.
I've added a test case revealing that.

This patch adds the "symbol index" argument to `getFullSymbolName` signature,
what fixes the issue.

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

4 years ago[mlir][Linalg] Uniformize linalg.generic with named ops.
Nicolas Vasilache [Mon, 21 Sep 2020 19:30:42 +0000 (15:30 -0400)]
[mlir][Linalg] Uniformize linalg.generic with named ops.

This revision allows representing a reduction at the level of linalg on tensors for generic ops by uniformizing with the named ops approach.

4 years ago[MLIR] Add subf and rsqrt EDSC intrinsics
Eugene Zhulenev [Mon, 21 Sep 2020 19:28:30 +0000 (15:28 -0400)]
[MLIR] Add subf and rsqrt EDSC intrinsics

[MLIR] Add subf and rsqrt EDSC intrinsics

NOTE: Please merge it when ready.

Reviewed By: nicolasvasilache

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

4 years ago[ARM] Remove MVEDomain from VLDR/STR of P0
Sam Parker [Mon, 21 Sep 2020 10:34:06 +0000 (11:34 +0100)]
[ARM] Remove MVEDomain from VLDR/STR of P0

Remove the domain from the instructions and create a shouldInspect
helper for LowOverheadLoops which queries it or a vpr operand.

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

4 years ago[ARM] VPT validForTailPredication
Sam Parker [Wed, 16 Sep 2020 13:30:47 +0000 (14:30 +0100)]
[ARM] VPT validForTailPredication

Mark all VPT instructions as valid.

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

4 years ago[AArch64] Fix return type of Neon scalar comparison intrinsics
David Spickett [Mon, 21 Sep 2020 08:44:58 +0000 (09:44 +0100)]
[AArch64] Fix return type of Neon scalar comparison intrinsics

The following should have unsigned return types
but were signed:
vceqd_s64 vceqzd_s64 vcged_s64 vcgezd_s64
vcgtd_s64 vcgtzd_s64 vcled_s64 vclezd_s64
vcltd_s64 vcltzd_s64 vtstd_s64

See https://developer.arm.com/documentation/ihi0073/latest

Reviewed By: efriedma

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

4 years agoReapply: [clang-cl] Always interpret the LIB env var as separated with semicolons
Martin Storsjö [Sun, 20 Sep 2020 20:19:12 +0000 (23:19 +0300)]
Reapply: [clang-cl] Always interpret the LIB env var as separated with semicolons

When cross compiling with clang-cl, clang splits the INCLUDE env
variable around semicolons (clang/lib/Driver/ToolChains/MSVC.cpp,
MSVCToolChain::AddClangSystemIncludeArgs) and lld splits the
LIB variable similarly (lld/COFF/Driver.cpp,
LinkerDriver::addLibSearchPaths). Therefore, the consensus for
cross compilation with clang-cl and lld-link seems to be to use
semicolons, despite path lists normally being separated by colons
on unix and EnvPathSeparator being set to that.

Therefore, handle the LIB variable similarly in Clang, when
handling lib file arguments when driving linking via Clang.

This fixes commands like "clang-cl test.c -Fetest.exe kernel32.lib" in
a cross compilation setting. Normally, most users call (lld-)link
directly, but meson happens to use this command syntax for
has_function() tests.

Reapply: Change Program.h to define procid_t as ::pid_t. When included
in lldb/unittests/Host/NativeProcessProtocolTest.cpp, it is included
after an lldb namespace containing an lldb::pid_t typedef, followed
later by a "using namespace lldb;". Previously, Program.h wasn't
included in this translation unit, but now it ends up included
transitively from Process.h.

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

4 years agoRevert "[CMake] Use find_dependency in LLVMConfig.cmake"
Petr Hosek [Tue, 22 Sep 2020 07:24:15 +0000 (00:24 -0700)]
Revert "[CMake] Use find_dependency in LLVMConfig.cmake"

This reverts commit 247c4fc50720ed48db2464bbe59839eedbe16794 as it
broke the runtime build.

4 years ago[gn build] Port af582c9b0f3
LLVM GN Syncbot [Tue, 22 Sep 2020 06:47:54 +0000 (06:47 +0000)]
[gn build] Port af582c9b0f3

4 years ago[SyntaxTree] Test `findFirstLeaf` and `findLastLeaf`
Eduardo Caldas [Wed, 16 Sep 2020 08:03:03 +0000 (08:03 +0000)]
[SyntaxTree] Test `findFirstLeaf` and `findLastLeaf`

* Introduce `TreeTest.cpp` to unit test `Tree.h`
* Add `generateAllTreesWithShape` to generating test cases
* Add tests for `findFirstLeaf` and `findLastLeaf`
* Fix implementations of `findFirstLeaf` and `findLastLeaf` that had
been broken when empty `Tree` were present.

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

4 years ago[SyntaxTree][Nit] Take `ArrayRef` instead of `std::vector` as argument for `createTree`
Eduardo Caldas [Mon, 21 Sep 2020 14:45:13 +0000 (14:45 +0000)]
[SyntaxTree][Nit] Take `ArrayRef` instead of `std::vector` as argument for `createTree`

I also assured that there are no other functions unnecessarily using std::vector as argument.

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

4 years ago[CMake] Use append for CMAKE_REQUIRED_* variables
Petr Hosek [Tue, 22 Sep 2020 05:31:05 +0000 (22:31 -0700)]
[CMake] Use append for CMAKE_REQUIRED_* variables

This ensures that required includes and libraries such as -lm that
were added earlier aren't overwritten.

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

4 years ago[CMake] Use find_dependency in LLVMConfig.cmake
Petr Hosek [Tue, 22 Sep 2020 05:37:39 +0000 (22:37 -0700)]
[CMake] Use find_dependency in LLVMConfig.cmake

This prefered over find_package as find_dependency forwards the correct
parameters for QUIET and REQUIRED to find_package.

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

4 years ago[clang] Traverse init-captures while indexing
Nathan Ridge [Tue, 8 Sep 2020 00:10:45 +0000 (20:10 -0400)]
[clang] Traverse init-captures while indexing

Fixes https://github.com/clangd/clangd/issues/496

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

4 years ago[clangd] Link libclangdSupport into clangd-index-server
Nathan Ridge [Sun, 20 Sep 2020 01:25:08 +0000 (21:25 -0400)]
[clangd] Link libclangdSupport into clangd-index-server

Fixes https://github.com/clangd/clangd/issues/534

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

4 years ago[AlwaysInliner] Emit optimization remarks
Arthur Eubanks [Tue, 1 Sep 2020 22:55:05 +0000 (15:55 -0700)]
[AlwaysInliner] Emit optimization remarks

To match the normal inliner in preparation for https://reviews.llvm.org/D86988.

Also change a FIXME to an assert.

Reviewed By: davidxl

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

4 years agoReorder linalg.conv indexing_maps loop order
Ahmed S. Taei [Wed, 16 Sep 2020 18:11:17 +0000 (18:11 +0000)]
Reorder linalg.conv indexing_maps loop order

Change the indexing map to iterate over the (b, x0, x1, z0, z1, q, k) instead of (b, x0, x1, k, q, z0, z1) to evaluate the convolution expression:
Y[b, x0, x1, k] = sum(W[z0, z1, q, k] * X[b, x0 + z0, x1 + z1, q], z0, z1, q)

This allows llvm auto vectorize to work and has better locality resulting significant performance improvments

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

4 years ago[WebAssembly][MC] Fix computation of relative symbol offset
Dominic Chen [Wed, 9 Sep 2020 01:17:05 +0000 (21:17 -0400)]
[WebAssembly][MC] Fix computation of relative symbol offset

For relative symbols, add its offset when computing relocation value.
Also, warn on unsupported absolute symbols.

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

4 years ago[LoopUnswitch] Trivial simplification: remove trivial dead condition after unswitch
Serguei Katkov [Mon, 21 Sep 2020 09:49:52 +0000 (16:49 +0700)]
[LoopUnswitch] Trivial simplification: remove trivial dead condition after unswitch

Non trivial loop unswitch can keep the dead condition instruction.
CL adds trivial dead code elimination for unused condition.

Reviewers: asbirlea, aqjune, fhahn, DaniilSuchkov, reames
Reviewed By: asbirlea
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D88014

4 years ago[mlir] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off build after D85869
Fangrui Song [Tue, 22 Sep 2020 01:34:49 +0000 (18:34 -0700)]
[mlir] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off build after D85869

4 years agoImplement a new kind of Pass: dynamic pass pipeline
Mehdi Amini [Tue, 22 Sep 2020 00:51:27 +0000 (00:51 +0000)]
Implement a new kind of Pass: dynamic pass pipeline

Instead of performing a transformation, such pass yields a new pass pipeline
to run on the currently visited operation.
This feature can be used for example to implement a sub-pipeline that
would run only on an operation with specific attributes. Another example
would be to compute a cost model and dynamic schedule a pipeline based
on the result of this analysis.

Discussion: https://llvm.discourse.group/t/rfc-dynamic-pass-pipeline/1637

Reviewed By: silvas

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

4 years ago[lldb] Delete two unneeded <regex>
Fangrui Song [Tue, 22 Sep 2020 01:11:03 +0000 (18:11 -0700)]
[lldb] Delete two unneeded <regex>

4 years ago[UnifyLoopExits] Pin tests with -unify-loop-exits to legacy PM
Arthur Eubanks [Mon, 21 Sep 2020 23:52:07 +0000 (16:52 -0700)]
[UnifyLoopExits] Pin tests with -unify-loop-exits to legacy PM

The pass is not used in tree, so no reason to port it.

Reviewed By: asbirlea

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

4 years ago[Delinearization][NewPM] Port delinearization to NPM
Arthur Eubanks [Wed, 16 Sep 2020 04:10:22 +0000 (21:10 -0700)]
[Delinearization][NewPM] Port delinearization to NPM

Also make tests in Analysis/Delinearization work under NPM.

Reviewed By: asbirlea

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

4 years ago[NewPM] Pin -lazy-branch-prob and -lazy-block-freq tests to legacy PM
Arthur Eubanks [Thu, 17 Sep 2020 20:51:01 +0000 (13:51 -0700)]
[NewPM] Pin -lazy-branch-prob and -lazy-block-freq tests to legacy PM

NPM passes just use the normal versions of these analyses instead.
Also pin any tests with -analyze to legacy PM.

Reviewed By: asbirlea

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

4 years agoInclude sstream after D85705
Fangrui Song [Tue, 22 Sep 2020 00:41:59 +0000 (17:41 -0700)]
Include sstream after D85705

4 years ago[libc++] Fix copy/paste error that broke a test
Louis Dionne [Tue, 22 Sep 2020 00:28:14 +0000 (20:28 -0400)]
[libc++] Fix copy/paste error that broke a test

4 years agoFix reporting the lack of global variables in "target var".
Jim Ingham [Tue, 22 Sep 2020 00:26:39 +0000 (17:26 -0700)]
Fix reporting the lack of global variables in "target var".

There was a little thinko which meant when stopped in a frame with
debug information but whose CU didn't have any global variables we
report:

no debug info for frame <N>

This patch fixes that error message to say the intended:

no global variables in current compile unit

<rdar://problem/69086361>

4 years agoRevert D71539 "Recommit "[SCEV] Look through single value PHIs.""
Fangrui Song [Tue, 22 Sep 2020 00:18:26 +0000 (17:18 -0700)]
Revert D71539 "Recommit "[SCEV] Look through single value PHIs.""

This reverts commit 11dccf8d3aa5d55210f8b886fb21926c7a8353ca.

A bootstrapped clang crashes (due to ArrayRef::front called on an empty
ArrayRef) when compiling some files.  Very strangely, this only reproduces with
modules.

```
13 0x0000564d3349e968 llvm::ArrayRef<llvm::BasicBlock*>::front() const /proc/self/cwd/llvm/include/llvm/ADT/ArrayRef.h:160:7
14 0x0000564d3349e896 llvm::LoopBase<llvm::BasicBlock, llvm::Loop>::getHeader() const /proc/self/cwd/llvm/include/llvm/Analysis/LoopInfo.h:104:50
15 0x0000564d3349fd9d llvm::LoopBase<llvm::BasicBlock, llvm::Loop>::getLoopLatch() const /proc/self/cwd/llvm/include/llvm/Analysis/LoopInfoImpl.h:210:11
16 0x0000564d33593c8a llvm::ScalarEvolution::computeBackedgeTakenCount(llvm::Loop const*, bool) /proc/self/cwd/llvm/lib/Analysis/ScalarEvolution.cpp:6933:15
17 0x0000564d33592ebc llvm::ScalarEvolution::getBackedgeTakenInfo(llvm::Loop const*) /proc/self/cwd/llvm/lib/Analysis/ScalarEvolution.cpp:0:30
18 0x0000564d33593a54 llvm::ScalarEvolution::getBackedgeTakenCount(llvm::Loop const*, llvm::ScalarEvolution::ExitCountKind) /proc/self/cwd/llvm/lib/Analysis/ScalarEvolution.cpp:6487:36
19 0x0000564d32be2402 llvm::ScalarEvolution::getConstantMaxBackedgeTakenCount(llvm::Loop const*) /proc/self/cwd/llvm/include/llvm/Analysis/ScalarEvolution.h:768:5
20 0x0000564d33590807 llvm::ScalarEvolution::getRangeRef(llvm::SCEV const*, llvm::ScalarEvolution::RangeSignHint) /proc/self/cwd/llvm/lib/Analysis/ScalarEvolution.cpp:5495:19
21 0x0000564d320abab7 llvm::ScalarEvolution::getSignedRange(llvm::SCEV const*) /proc/self/cwd/llvm/include/llvm/Analysis/ScalarEvolution.h:840:12
22 0x0000564d335a03aa llvm::ScalarEvolution::isKnownPredicateViaConstantRanges(llvm::CmpInst::Predicate, llvm::SCEV const*, llvm::SCEV const*) /proc/self/cwd/llvm/lib/Analysis/ScalarEvolution.cpp:9239:60
23 0x0000564d33586a80 llvm::ScalarEvolution::isKnownViaNonRecursiveReasoning(llvm::CmpInst::Predicate, llvm::SCEV const*, llvm::SCEV const*) /proc/self/cwd/llvm/lib/Analysis/ScalarEvolution.cpp:10284:60
```

4 years ago[libc++] Fix failures when running the test suite without RTTI
Louis Dionne [Wed, 15 Jul 2020 15:26:20 +0000 (11:26 -0400)]
[libc++] Fix failures when running the test suite without RTTI

4 years agoNFC: Add whitespace-changing revisions to .git-blame-ignore-revs
Louis Dionne [Mon, 21 Sep 2020 20:31:38 +0000 (16:31 -0400)]
NFC: Add whitespace-changing revisions to .git-blame-ignore-revs

4 years agoAdd a "Trace" plug-in to LLDB to add process trace support in stages.
Walter Erquinigo [Tue, 18 Aug 2020 00:21:52 +0000 (17:21 -0700)]
Add a "Trace" plug-in to LLDB to add process trace support in stages.

This is the first in a series of patches that will adds a new processor trace plug-in to LLDB.

The idea for this first patch to to add the plug-in interface with simple commands for the trace files that can "load" and "dump" the trace information. We can test the functionality and ensure people are happy with the way things are done and how things are organized before moving on to adding more functionality.

Processor trace information can be view in a few different ways:
- post mortem where a trace is saved off that can be viewed later in the debugger
- gathered while a process is running and allow the user to step back in time (with no variables, memory or registers) to see how each thread arrived at where it is currently stopped.

This patch attempts to start with the first solution of loading a trace file after the fact. The idea is that we will use a JSON file to load the trace information. JSON allows us to specify information about the trace like:
- plug-in name in LLDB
- path to trace file
- shared library load information so we can re-create a target and symbolicate the information in the trace
- any other info that the trace plug-in will need to be able to successfully parse the trace information
  - cpu type
  - version info
  - ???

A new "trace" command was added at the top level of the LLDB commmands:
- "trace load"
- "trace dump"

I did this because if we load trace information we don't need to have a process and we might end up creating a new target for the trace information that will become active. If anyone has any input on where this would be better suited, please let me know. Walter Erquinigo will end up filling in the Intel PT specific plug-in so that it works and is tested once we can agree that the direction of this patch is the correct one, so please feel free to chime in with ideas on comments!

Reviewed By: clayborg

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

4 years ago[docs] Update ExtendingLLVM.rst
antonio-cortes-perez [Mon, 21 Sep 2020 23:48:52 +0000 (16:48 -0700)]
[docs] Update ExtendingLLVM.rst

Updated file paths and function signatures in section
"Adding a new type".

Reviewed By: dblaikie

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

4 years ago[EarlyCSE] Handle masked loads and stores
Krzysztof Parzyszek [Tue, 1 Sep 2020 22:31:12 +0000 (17:31 -0500)]
[EarlyCSE] Handle masked loads and stores

Extend the handling of memory intrinsics to also include non-
target-specific intrinsics, in particular masked loads and stores.

Invent "isHandledNonTargetIntrinsic" to distinguish between intrin-
sics that should be handled natively from intrinsics that can be
passed to TTI.

Add code that handles masked loads and stores and update the
testcase to reflect the results.

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

4 years ago[NewPM] Support -disable-simplify-libcall/-disable-builtin in NPM opt
Arthur Eubanks [Fri, 18 Sep 2020 19:27:28 +0000 (12:27 -0700)]
[NewPM] Support -disable-simplify-libcall/-disable-builtin in NPM opt

Reviewed By: asbirlea

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

4 years ago[MLIR][Affine][VectorOps] Utility to vectorize loop nest using strategy
Diego Caballero [Mon, 21 Sep 2020 22:30:02 +0000 (15:30 -0700)]
[MLIR][Affine][VectorOps] Utility to vectorize loop nest using strategy

This patch adds a utility based on SuperVectorizer to vectorize an
affine loop nest using a given vectorization strategy. This strategy allows
targeting specific loops for vectorization instead of relying of the
SuperVectorizer analysis to choose the right loops to vectorize.

Reviewed By: nicolasvasilache

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

4 years ago[SimplifyCFG] Override options in default constructor
Arthur Eubanks [Tue, 15 Sep 2020 20:03:05 +0000 (13:03 -0700)]
[SimplifyCFG] Override options in default constructor

SimplifyCFG's options should always be overridden by command line flags,
but they mistakenly weren't in the default constructor.

Reviewed By: ychen

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

4 years ago[RISCV] Do not mandate scheduling for CSR instructions
Evandro Menezes [Wed, 5 Aug 2020 21:51:05 +0000 (16:51 -0500)]
[RISCV] Do not mandate scheduling for CSR instructions

Scheduling information is of little value when they may disrupt the
pipeline.  This patch allows omitting the scheduling information for CSR
instructions while still setting `SchedMachineModel::CompleteModel`.  For
specific cases, any scheduling information added will be used by the
scheduler.

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

4 years ago[llvm] Fix comment typos. NFC.
Kazu Hirata [Mon, 21 Sep 2020 23:23:49 +0000 (16:23 -0700)]
[llvm] Fix comment typos.  NFC.

4 years ago[lldb/test] Clean up version checking.
Jordan Rupprecht [Mon, 21 Sep 2020 23:19:28 +0000 (16:19 -0700)]
[lldb/test] Clean up version checking.

A few fixes while trying to figure out why tests are being skipped for arsenm:

- We check `$compiler -v`, but `-v` is `--verbose`, not `--version`. Use the long flag name.
- We check all lines matching `version ...`, but we should exit early for the first version string we see (which should be the main one). I'm not sure if this is the issue, but perhaps this is causing some users to skip some tests if another "version ..." is showing up later.
- Having `\.` in a python string is triggering pylint warnings, because it should be escaped as a regex string, e.g. `r'\.' However, `.` in a character class does not need to be escaped, as it matches only a literal `.` in that context.

Reviewed By: JDevlieghere

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

4 years agoFix comment typos. NFC.
Kazu Hirata [Mon, 21 Sep 2020 23:12:55 +0000 (16:12 -0700)]
Fix comment typos. NFC.

4 years ago[AArch64][GlobalISel] Merge selection of vector-vector G_ASHR/G_LSHR and support...
Amara Emerson [Mon, 21 Sep 2020 22:28:04 +0000 (15:28 -0700)]
[AArch64][GlobalISel] Merge selection of vector-vector G_ASHR/G_LSHR and support more cases.

The vector-immediate cases are handled elsewhere in an earlier commit.

4 years ago[AArch64][GlobalISel] Add a post-legalize combine for lowering vector-immediate G_ASH...
Amara Emerson [Mon, 21 Sep 2020 22:03:29 +0000 (15:03 -0700)]
[AArch64][GlobalISel] Add a post-legalize combine for lowering vector-immediate G_ASHR/G_LSHR.

In order to select the immediate forms using the imported patterns, we need to
lower them into new G_VASHR/G_VLSHR target generic ops. Add a combine to do this
matching build_vector of constant operands.

With this, we get selection for free.

4 years ago[mlir] Add tutorial index.md pages
Jacques Pienaar [Mon, 21 Sep 2020 22:50:48 +0000 (15:50 -0700)]
[mlir] Add tutorial index.md pages

Sets the content for the section entry pages Hugo side.

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

4 years ago[AArch64][GlobalISel] Make <4 x s16> G_ASHR and G_LSHR legal.
Amara Emerson [Mon, 21 Sep 2020 18:17:53 +0000 (11:17 -0700)]
[AArch64][GlobalISel] Make <4 x s16> G_ASHR and G_LSHR legal.

Selection support for these is coming up.

4 years agoDon't build a StringLiteral expression with reference type when
Richard Smith [Mon, 21 Sep 2020 21:52:06 +0000 (14:52 -0700)]
Don't build a StringLiteral expression with reference type when
performing list-initialization of a char array reference from a braced
string literal of a smaller size.

4 years ago[NFC][regalloc] Use reverse iterator ranges for improved readability
Mircea Trofin [Mon, 21 Sep 2020 21:27:23 +0000 (14:27 -0700)]
[NFC][regalloc] Use reverse iterator ranges for improved readability

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

4 years ago[ASTImporter] Modifying ImportDeclContext(...) to ensure that we also handle the...
shafik [Mon, 21 Sep 2020 21:55:33 +0000 (14:55 -0700)]
[ASTImporter] Modifying ImportDeclContext(...) to ensure that we also handle the case when the FieldDecl is an ArrayType whose ElementType is a RecordDecl

When we fixed ImportDeclContext(...) in D71378 to make sure we complete each
FieldDecl of a RecordDecl when we are importing the definition we missed the
case where a FeildDecl was an ArrayType whose ElementType is a record.

This fix was motivated by a codegen crash during LLDB expression parsing. Since
we were not importing the definition we were crashing during layout which
required all the records be defined.

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

4 years agoRevert "[clang-cl] Always interpret the LIB env var as separated with semicolons"
Martin Storsjö [Mon, 21 Sep 2020 21:10:07 +0000 (00:10 +0300)]
Revert "[clang-cl] Always interpret the LIB env var as separated with semicolons"

This reverts commit 4d85444b317a00a3e15da63cdb693d272c99a0cc.

This commit broke building lldb's NativeProcessProtocolTest.cpp,
with errors like these:

In file included from include/llvm/Support/Process.h:32:0,
                 from tools/lldb/unittests/Host/NativeProcessProtocolTest.cpp:12:
include/llvm/Support/Program.h:39:11: error: reference to ‘pid_t’ is ambiguous
   typedef pid_t procid_t;

/usr/include/sched.h:38:17: note: candidates are: typedef __pid_t pid_t
 typedef __pid_t pid_t;

tools/lldb/include/lldb/lldb-types.h:85:18: note: typedef uint64_t lldb::pid_t
 typedef uint64_t pid_t;

4 years ago[EarlyCSE] Small refactoring changes, NFC
Krzysztof Parzyszek [Tue, 1 Sep 2020 22:31:12 +0000 (17:31 -0500)]
[EarlyCSE] Small refactoring changes, NFC

1. Store intrinsic ID in ParseMemoryInst instead of a boolean flag
   "IsTargetMemInst". This will make it easier to add support for
   target-independent intrinsics.
2. Extract the complex multiline conditions from EarlyCSE::processNode
   into a new function "getMatchingValue".

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

4 years ago[PowerPC] Remove unnecessary patterns and types
Baptiste Saleil [Mon, 21 Sep 2020 21:03:34 +0000 (16:03 -0500)]
[PowerPC] Remove unnecessary patterns and types

These patterns and type uses were added by mistake by commit
1372e23c7d4b25fd23689842246e66f70c949b46

4 years ago[Hexagon] Make HexagonVLCR compatibile with New PM
Pengxuan Zheng [Mon, 21 Sep 2020 20:43:42 +0000 (13:43 -0700)]
[Hexagon] Make HexagonVLCR compatibile with New PM

The patch modifies HexagonVectorLoopCarriedReuse pass to make it compatible with both Legacy Pass Manager through HexagonVectorLoopCarriedReuseLegacyPass and with New Pass Manager through HexagonVectorLoopCarriedReusePass.

Reviewed By: pzheng

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

4 years ago[CodeGen] [WinException] Only produce handler data at the end of the function if...
Martin Storsjö [Thu, 10 Sep 2020 10:33:00 +0000 (13:33 +0300)]
[CodeGen] [WinException] Only produce handler data at the end of the function if needed

If we are going to write handler data (that is written as variable
length data following after the unwind info in .xdata), we need to
emit the handler data immediately, but for cases where no such
info is going to be written, skip emitting it right away. (Unwind
info for all remaining functions that hasn't gotten it emitted
directly is emitted at the end.)

This does slightly change the ordering of sections (triggering a
bunch of updates to DebugInfo/COFF tests), but the change should be
benign.

This also matches GCC's assembly output, which doesn't output
.seh_handlerdata unless it actually is needed.

For ARM64, the unwind info can be packed into the runtime function
entry itself (leaving no data in the .xdata section at all), but
that can only be done if there's no follow-on data in the .xdata
section. If emission of the unwind info is triggered via
EmitWinEHHandlerData (or the .seh_handlerdata directive), which
implicitly switches to the .xdata section, there's a chance of the
caller wanting to pass further data there, so the packed format
can't be used in that case.

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

4 years ago[clang-cl] Always interpret the LIB env var as separated with semicolons
Martin Storsjö [Sun, 20 Sep 2020 20:19:12 +0000 (23:19 +0300)]
[clang-cl] Always interpret the LIB env var as separated with semicolons

When cross compiling with clang-cl, clang splits the INCLUDE env
variable around semicolons (clang/lib/Driver/ToolChains/MSVC.cpp,
MSVCToolChain::AddClangSystemIncludeArgs) and lld splits the
LIB variable similarly (lld/COFF/Driver.cpp,
LinkerDriver::addLibSearchPaths). Therefore, the consensus for
cross compilation with clang-cl and lld-link seems to be to use
semicolons, despite path lists normally being separated by colons
on unix and EnvPathSeparator being set to that.

Therefore, handle the LIB variable similarly in Clang, when
handling lib file arguments when driving linking via Clang.

This fixes commands like "clang-cl test.c -Fetest.exe kernel32.lib" in
a cross compilation setting. Normally, most users call (lld-)link
directly, but meson happens to use this command syntax for
has_function() tests.

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

4 years ago[clang] [MinGW] Add an implicit .exe suffix even when crosscompiling
Martin Storsjö [Tue, 15 Sep 2020 09:35:07 +0000 (12:35 +0300)]
[clang] [MinGW] Add an implicit .exe suffix even when crosscompiling

GCC 8 changed behaviour wrt this, and made it consistent for cross
compilation cases. While it's a change, it's a more sensible behaviour
going forward.

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

4 years ago[Analyzer] GNU named variadic macros in Plister
Chris Hamilton [Mon, 21 Sep 2020 20:37:39 +0000 (15:37 -0500)]
[Analyzer] GNU named variadic macros in Plister

Added support for GNU named variadic macros in
macro expansion for plist generation.

Fix for https://bugs.llvm.org/show_bug.cgi?id=44493

Reviewed By: Szelethus

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

4 years ago[SLP] use std::distance/find to reduce code; NFC
Sanjay Patel [Mon, 21 Sep 2020 20:04:31 +0000 (16:04 -0400)]
[SLP] use std::distance/find to reduce code; NFC

We were already using this code pattern right after
the loop, so this makes it consistent.

4 years agoAMDGPU: Don't add frame register to frame pseudos
Matt Arsenault [Fri, 18 Sep 2020 20:04:36 +0000 (16:04 -0400)]
AMDGPU: Don't add frame register to frame pseudos

We no longer treat the frame register like a function argument, so the
problem this avoided is no longer relevant.

4 years ago[mlir] Add missing space in debug message
Stephen Neuendorffer [Mon, 21 Sep 2020 19:53:58 +0000 (12:53 -0700)]
[mlir] Add missing space in debug message

4 years agoReapply Revert "RegAllocFast: Rewrite and improve"
Matt Arsenault [Mon, 21 Sep 2020 12:45:06 +0000 (08:45 -0400)]
Reapply Revert "RegAllocFast: Rewrite and improve"

This reverts commit dbd53a1f0c939a55e7719c39d08179468f9ad3dc.

Needed lldb test updates

4 years ago[Coverage] Add empty line regions to SkippedRegions
Zequan Wu [Wed, 2 Sep 2020 21:50:32 +0000 (14:50 -0700)]
[Coverage] Add empty line regions to SkippedRegions

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

4 years ago[InstCombine] use unary shuffle creator to reduce code duplication; NFC
Sanjay Patel [Mon, 21 Sep 2020 19:33:08 +0000 (15:33 -0400)]
[InstCombine] use unary shuffle creator to reduce code duplication; NFC

4 years ago[LoopVectorize] use unary shuffle creator to reduce code duplication; NFC
Sanjay Patel [Mon, 21 Sep 2020 18:01:52 +0000 (14:01 -0400)]
[LoopVectorize] use unary shuffle creator to reduce code duplication; NFC

4 years ago[libc++] Verify base substitutions earlier in the testing format
Louis Dionne [Mon, 21 Sep 2020 19:27:40 +0000 (15:27 -0400)]
[libc++] Verify base substitutions earlier in the testing format

This allows diagnosing missing substitution issues even when doing
availability feature detection in the DSL.

4 years ago[DIE] Remove DeadInstEliminationPass
Arthur Eubanks [Fri, 18 Sep 2020 19:55:00 +0000 (12:55 -0700)]
[DIE] Remove DeadInstEliminationPass

This pass is like DeadCodeEliminationPass, but only does one pass
through a function instead of iterating on users of eliminated
instructions.

DeadCodeEliminationPass should be used in all cases.

Reviewed By: asbirlea

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

4 years ago[NFC][SCEV] Cleanup lowering of @llvm.uadd.sat, (-1 - V) is just ~V
Roman Lebedev [Mon, 21 Sep 2020 19:09:59 +0000 (22:09 +0300)]
[NFC][SCEV] Cleanup lowering of @llvm.uadd.sat, (-1 - V) is just ~V

4 years ago[ELF][test] Delete large temporary files and make some temporary files smaller with...
Fangrui Song [Mon, 21 Sep 2020 19:08:41 +0000 (12:08 -0700)]
[ELF][test] Delete large temporary files and make some temporary files smaller with two text segments

Large files are cumbersome on some filesystems and can more easily trigger ENOSPC.

Some tests use two text sections with output section addresses to test branch ranges.
Use two text segments to prevent LLD from filling the gap and unnecessarily increasing the output size.

With this change, there is no test/ELF temporary file larger than 100MiB.

Reviewed By: psmith

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

4 years ago[AMDGPU] Fixed typo in intrinsic comment. NFC.
Stanislav Mekhanoshin [Mon, 21 Sep 2020 18:52:28 +0000 (11:52 -0700)]
[AMDGPU] Fixed typo in intrinsic comment. NFC.

4 years ago[MS] On x86_32, pass overaligned, non-copyable arguments indirectly
Reid Kleckner [Fri, 18 Sep 2020 18:22:15 +0000 (11:22 -0700)]
[MS] On x86_32, pass overaligned, non-copyable arguments indirectly

This updates the C++ ABI argument classification code to use the logic
from D72114, fixing an ABI incompatibility with MSVC.

Part of PR44395.

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

4 years ago[AMDGPU] Adding mutex to guard lld::elf::link interface use
jerryyin [Mon, 21 Sep 2020 18:22:56 +0000 (11:22 -0700)]
[AMDGPU] Adding mutex to guard lld::elf::link interface use

check-mlir target run tests simultaneously with multiple threads. This caused multiple threads to invoke the `lld::elf::link()` interface at the same time. Since the interface does not have a thread-safe implementation, add a metex to prevent multi-threaded access.

I discovered this by looking the the failure stack trace. lld/ELF/symbolTable.cpp, SymbolTable::insert() hit into an assert with related to Epoch Trackers. The root cause is to due to there is no protection around the symMap (update) which is implemented in non-thread safe data structure: denseMap.

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

4 years ago[ObjCARC] Initialize return value
Arthur Eubanks [Mon, 21 Sep 2020 18:02:37 +0000 (11:02 -0700)]
[ObjCARC] Initialize return value

Mistakenly removed initialization of `Changed` in https://reviews.llvm.org/D87806.

4 years ago[AIX][Clang][Driver] Add handling of shared option
David Tenty [Fri, 28 Aug 2020 18:38:59 +0000 (14:38 -0400)]
[AIX][Clang][Driver] Add handling of shared option

Reviewed By: jasonliu

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

4 years ago[SLP] use unary shuffle creator to reduce code duplication; NFC
Sanjay Patel [Mon, 21 Sep 2020 17:45:56 +0000 (13:45 -0400)]
[SLP] use unary shuffle creator to reduce code duplication; NFC

4 years ago[IRBuilder][VectorCombine] make and use a convenience function for unary shuffle...
Sanjay Patel [Mon, 21 Sep 2020 17:27:40 +0000 (13:27 -0400)]
[IRBuilder][VectorCombine] make and use a convenience function for unary shuffle; NFC

This reduces code duplication for common construct.
Follow-ups can use this in SLP, LoopVectorizer, and other passes.

4 years ago[OpenMP] Protect unrecogonized CUDA error code
Ye Luo [Mon, 21 Sep 2020 17:42:54 +0000 (13:42 -0400)]
[OpenMP] Protect unrecogonized CUDA error code

If an error code can not be recognized by cuGetErrorString, errStr remains null and causes crashing at DP() printing.
Protect this case.

Reviewed By: jhuber6, tianshilei1992

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

4 years ago[SCEV] Recognize @llvm.uadd.sat as `%y + umin(%x, (-1 - %y))`
Roman Lebedev [Mon, 21 Sep 2020 16:42:55 +0000 (19:42 +0300)]
[SCEV] Recognize @llvm.uadd.sat as `%y + umin(%x, (-1 - %y))`

----------------------------------------
define i32 @src(i32 %x, i32 %y) {
%0:
  %r = uadd_sat i32 %x, %y
  ret i32 %r
}
=>
define i32 @tgt(i32 %x, i32 %y) {
%0:
  %t0 = sub nsw nuw i32 4294967295, %y
  %t1 = umin i32 %x, %t0
  %r = add nuw i32 %t1, %y
  ret i32 %r
}
Transformation seems to be correct!

The alternative, naive, lowering could be the following,
although i don't think it's better,
thought it will likely be needed for sadd/ssub/*shl:

----------------------------------------
define i32 @src(i32 %x, i32 %y) {
%0:
  %r = uadd_sat i32 %x, %y
  ret i32 %r
}
=>
define i32 @tgt(i32 %x, i32 %y) {
%0:
  %t0 = zext i32 %x to i33
  %t1 = zext i32 %y to i33
  %t2 = add nuw i33 %t0, %t1
  %t3 = zext i32 4294967295 to i33
  %t4 = umin i33 %t2, %t3
  %r = trunc i33 %t4 to i32
  ret i32 %r
}
Transformation seems to be correct!

4 years ago[SCEV] Recognize @llvm.usub.sat as `%x - (umin %x, %y)`
Roman Lebedev [Mon, 21 Sep 2020 15:05:47 +0000 (18:05 +0300)]
[SCEV] Recognize @llvm.usub.sat as `%x - (umin %x, %y)`

----------------------------------------
define i32 @src(i32 %x, i32 %y) {
%0:
  %r = usub_sat i32 %x, %y
  ret i32 %r
}
=>
define i32 @tgt(i32 %x, i32 %y) {
%0:
  %t0 = umin i32 %x, %y
  %r = sub nuw i32 %x, %t0
  ret i32 %r
}
Transformation seems to be correct!

4 years ago[NFC][SCEV] Add tests for @llvm.*.sat intrinsics
Roman Lebedev [Mon, 21 Sep 2020 14:58:31 +0000 (17:58 +0300)]
[NFC][SCEV] Add tests for @llvm.*.sat intrinsics

4 years ago[SCEV] Recognize @llvm.abs as smax(x, -x)
Roman Lebedev [Mon, 21 Sep 2020 14:16:08 +0000 (17:16 +0300)]
[SCEV] Recognize @llvm.abs as smax(x, -x)

As per alive2 (ignoring undef):

----------------------------------------
define i32 @src(i32 %x, i1 %y) {
%0:
  %r = abs i32 %x, 0
  ret i32 %r
}
=>
define i32 @tgt(i32 %x, i1 %y) {
%0:
  %neg_x = mul i32 %x, 4294967295
  %r = smax i32 %x, %neg_x
  ret i32 %r
}
Transformation seems to be correct!

----------------------------------------
define i32 @src(i32 %x, i1 %y) {
%0:
  %r = abs i32 %x, 1
  ret i32 %r
}
=>
define i32 @tgt(i32 %x, i1 %y) {
%0:
  %neg_x = mul nsw i32 %x, 4294967295
  %r = smax i32 %x, %neg_x
  ret i32 %r
}
Transformation seems to be correct!

4 years ago[NFC][SCEV] Add tests for @llvm.abs intrinsic
Roman Lebedev [Mon, 21 Sep 2020 14:01:11 +0000 (17:01 +0300)]
[NFC][SCEV] Add tests for @llvm.abs intrinsic

4 years ago[SLP] Use for-range loops across ValueLists. NFCI.
Simon Pilgrim [Mon, 21 Sep 2020 17:24:08 +0000 (18:24 +0100)]
[SLP] Use for-range loops across ValueLists. NFCI.

Also rename some existing loops that used a 'j' iterator to consistently use 'V'.

4 years ago[cmake] Centralize LLVM_ENABLE_WARNINGS option
Dave Lee [Mon, 21 Sep 2020 17:22:51 +0000 (10:22 -0700)]
[cmake] Centralize LLVM_ENABLE_WARNINGS option

Configure default value of `LLVM_ENABLE_WARNINGS` in `HandleLLVMOptions.cmake`.

`LLVM_ENABLE_WARNINGS` is documented as ON by default, but `HandleLLVMOptions` assumes the default has been set somewhere else. If it has not been explicitly set, then `HandleLLVMOptions` implicitly uses OFF as a default.

This removes the various `option()` declarations in favor of a single declaration in `HandleLLVMOptions`. This will prevent the unwanted use of `-w` that is mentioned in a couple of the comments.

Reviewed By: DavidTruby, #libunwind, JDevlieghere, compnerd

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

4 years ago[lldb/Commands] Fix outdated `breakpoint command add` help string
Dave Lee [Wed, 16 Sep 2020 23:40:48 +0000 (16:40 -0700)]
[lldb/Commands] Fix outdated `breakpoint command add` help string

Update the some examples in the help string for `breakpoint command add`.

Python breakpoint commands have different output than what's shown in the help string.

Notes:
  * Removed an example containing an inner function, as it seems more about a Python technique than about `command script add`
  * Updated `print x` to `print(x)` to be python 2/3 agnostic

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

4 years agoThe wrong placement of add pass with optimizations led to -funique-internal-linkage...
Sriraman Tallam [Mon, 21 Sep 2020 16:53:09 +0000 (09:53 -0700)]
The wrong placement of add pass with optimizations led to -funique-internal-linkage-names being disabled.

Fixed the placement of the MPM.addpass for UniqueInternalLinkageNames to make
it work correctly with -O2 and new pass manager. Updated the tests to
explicitly check O0 and O2.

Previously, the addPass was placed before BackendUtil.cpp#L1373 which is wrong
as MPM gets assigned at this point and any additions to the pass vector before
this is wrong. This change just moves it after MPM is assigned and places it at
a point where O0 and O0+ can share it.

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

4 years ago[SLP] simplify interface for gather(); NFC
Sanjay Patel [Mon, 21 Sep 2020 16:54:07 +0000 (12:54 -0400)]
[SLP] simplify interface for gather(); NFC

The implementation of gather() should be reduced too,
but this change by itself makes things a little clearer:
we don't try to gather to a different type or
number-of-values than whatever is passed in as the value
list itself.

4 years agoImplicitNullChecks.cpp - use auto const& iterators in for-range loops to avoid copies...
Simon Pilgrim [Mon, 21 Sep 2020 16:38:23 +0000 (17:38 +0100)]
ImplicitNullChecks.cpp - use auto const& iterators in for-range loops to avoid copies. NFCI.

4 years ago[SCEV] Add additional max BTC tests with loop guards.
Florian Hahn [Mon, 21 Sep 2020 16:35:46 +0000 (17:35 +0100)]
[SCEV] Add additional max BTC tests with loop guards.

4 years ago[ObjCARC][NewPM] Port objc-arc-contract to NPM
Arthur Eubanks [Wed, 2 Sep 2020 23:22:24 +0000 (16:22 -0700)]
[ObjCARC][NewPM] Port objc-arc-contract to NPM

Similar to https://reviews.llvm.org/D86178.

This is a module pass instead of a function pass since
ARCRuntimeEntryPoints can lazily add function declarations.

Reviewed By: ahatanak

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

4 years ago[ARM][CMSE] Issue an error if passing arguments through memory across
Momchil Velikov [Mon, 21 Sep 2020 12:22:11 +0000 (13:22 +0100)]
[ARM][CMSE] Issue an error if passing arguments through memory across
security boundary

It was never supported and that part was accidentally omitted when
upstreaming D76518.

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

Change-Id: If6ba9506eb0431c87a1d42a38aa60e47ce263039

4 years agoTargetPassConfig.cpp - use auto const& iterator in for-range loop to avoid copies...
Simon Pilgrim [Mon, 21 Sep 2020 16:16:57 +0000 (17:16 +0100)]
TargetPassConfig.cpp - use auto const& iterator in for-range loop to avoid copies. NFCI.

4 years agoSLPVectorizer.cpp - fix include ordering. NFCI.
Simon Pilgrim [Mon, 21 Sep 2020 16:08:59 +0000 (17:08 +0100)]
SLPVectorizer.cpp - fix include ordering. NFCI.

4 years ago[Sema] Split special builtin type lookups into a separate function
Raul Tambre [Sun, 20 Sep 2020 08:14:20 +0000 (11:14 +0300)]
[Sema] Split special builtin type lookups into a separate function

In case further such cases appear in the future we've got a generic function to add them to.
Additionally changed the ObjC special case to check the language and the identifier builtin ID instead of the name.

Addresses the cleanup suggestion from D87917.

Reviewed By: rjmccall

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

4 years ago[clang] Fix a misleading variable name. NFC.
Igor Kudrin [Mon, 21 Sep 2020 15:59:34 +0000 (22:59 +0700)]
[clang] Fix a misleading variable name. NFC.

The variable is true when frame pointers should be omitted in leaf
functions, not kept.

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