2 years ago[lldb/Test] Fix missing yaml2obj in Xcode standalone build.
Jonas Devlieghere [Sat, 11 Jul 2020 04:14:06 +0000 (21:14 -0700)]
[lldb/Test] Fix missing yaml2obj in Xcode standalone build.

Rather than trying to find the yaml2obj from dotest we should pass it in
like we do for dsymutil and FileCheck.

2 years ago[HIP] Fix rocm detection
Yaxun (Sam) Liu [Wed, 1 Jul 2020 04:00:04 +0000 (00:00 -0400)]
[HIP] Fix rocm detection

Do not detect device library by default in rocm detector.
Only detect device library in Rocm and HIP toolchain.

Separate detection of HIP runtime and Rocm device library.

Detect rocm path by version file in host toolchains.

Also added detecting rocm version and printing rocm
installation path and version with -v.

Fixed include path and device library detection for
ROCm 3.5.

Added --hip-version option. Renamed --hip-device-lib-path
to --rocm-device-lib-path.

Fixed default value for -fhip-new-launch-api.

Added default -std option for HIP.

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

2 years ago[X86][MMX] Optimize MMX shift intrinsics.
Wang, Pengfei [Fri, 10 Jul 2020 06:12:24 +0000 (14:12 +0800)]
[X86][MMX] Optimize MMX shift intrinsics.

Reviewed By: craig.topper

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

2 years ago[PowerPC][MachinePipeliner] Enable pipeliner if hasInstrSchedModel
Jinsong Ji [Sat, 11 Jul 2020 02:23:40 +0000 (02:23 +0000)]
[PowerPC][MachinePipeliner] Enable pipeliner if hasInstrSchedModel

P9 is the only one with InstrSchedModel, but we may have more in the
future, we should not hardcoded it to P9, check hasInstrSchedModel

Reviewed By: hfinkel

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

2 years ago[RISCV][test] Add a test for (mul (add x, c1), c2) -> (add (mul x, c2), c1*c2) transf...
Ben Shi [Sat, 11 Jul 2020 01:32:57 +0000 (18:32 -0700)]
[RISCV][test] Add a test for (mul (add x, c1), c2) -> (add (mul x, c2), c1*c2) transformation

Reviewed By: lenary, MaskRay

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

2 years agoSummary: [clang] Provide a way for WhileStmt to report the location of its LParen...
Vy Nguyen [Fri, 10 Jul 2020 03:19:06 +0000 (23:19 -0400)]
Summary: [clang] Provide a way for WhileStmt to report the location of its LParen and RParen.

Summary: This helps avoiding hacks downstream.

Reviewers: shafik

Subscribers: martong, cfe-commits

Tags: #clang

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

2 years ago[WebAssembly] Prefer v128.const for constant splats
Thomas Lively [Sat, 11 Jul 2020 01:27:52 +0000 (18:27 -0700)]
[WebAssembly] Prefer v128.const for constant splats

In BUILD_VECTOR lowering, we used to generally prefer using splats
over v128.const instructions because v128.const has a very large
encoding. However, in d5b7a4e2e8 we switched to preferring consts
because they are expected to be more efficient in engines. This patch
updates the ISel patterns to match this current preference.

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

2 years ago[openmp] Fix warning in generated OMP.cpp
Valentin Clement [Sat, 11 Jul 2020 00:57:00 +0000 (20:57 -0400)]
[openmp] Fix warning in generated OMP.cpp

2 years agoCreate TestReducer pass
Mauricio Sifontes [Sat, 11 Jul 2020 00:46:55 +0000 (00:46 +0000)]
Create TestReducer pass

- Create a pass that generates bugs based on trivially defined behavior for the purpose of testing the MLIR Reduce Tool.
- Implement the functionality inside the pass to crash mlir-opt in the presence of an operation with the name "crashOp".
- Register the pass as a test pass in the mlir-opt tool.

Reviewed by: jpienaar

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

2 years agoFix build error
Akira Hatanaka [Sat, 11 Jul 2020 00:40:30 +0000 (17:40 -0700)]
Fix build error

2 years ago Reland "[OpenMPOpt] ICV Tracking"
sstefan1 [Fri, 10 Jul 2020 23:06:46 +0000 (01:06 +0200)]
 Reland "[OpenMPOpt] ICV Tracking"

This reverts commit 1d542f0ca83fa1411d6501a8d088450d83abd5b8.

`recollectUses()` is added to prevent looking at dead uses after
Attributor run.

This is the first and most basic ICV Tracking implementation. For this
first version, we only support deduplication within the same BB.

Reviewers: jdoerfert, JonChesterfield, hamax97, jhuber6, uenoku,
baziotis, lebedev.ri

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

2 years ago[CodeGen] Store the return value of the target function call to the
Akira Hatanaka [Sat, 11 Jul 2020 00:24:12 +0000 (17:24 -0700)]
[CodeGen] Store the return value of the target function call to the
thunk's return value slot directly when the return type is an aggregate
instead of doing so via a temporary

This fixes PR45997 (https://bugs.llvm.org/show_bug.cgi?id=45997), which
is caused by a bug that has existed since we started passing and
returning C++ structs with ObjC strong pointer members (see
https://reviews.llvm.org/D44908) or structs annotated with trivial_abi


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

2 years ago[InstSimplify] add tests for maxnum (PR46627); NFC
Sanjay Patel [Fri, 10 Jul 2020 22:56:26 +0000 (18:56 -0400)]
[InstSimplify] add tests for maxnum (PR46627); NFC

2 years agoFix nesting of #ifdef
Adrian Prantl [Sat, 11 Jul 2020 00:09:39 +0000 (17:09 -0700)]
Fix nesting of #ifdef

This fixes a compile error when building for an arm64 host.

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

2 years ago[openmp] Remove OMPConstants.cpp and replace it by OMP.cpp generated by tablegen
Valentin Clement [Sat, 11 Jul 2020 00:11:11 +0000 (20:11 -0400)]
[openmp] Remove OMPConstants.cpp and replace it by OMP.cpp generated by tablegen

Diff D83176 moved the last piece of code from OMPConstants.cpp and now this file was only
useful to include the tablegen generated file. This patch replace OMPConstants.cpp with OMP.cpp
generated by tablegen.

Reviewers: sstefan1, jdoerfert, jdenny

Reviewed By: sstefan1

Subscribers: mgorny, yaxunl, hiraditya, guansong, llvm-commits

Tags: #llvm

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

2 years ago[OpenMP][NFC] Remove unused and untested code from the device runtime
Johannes Doerfert [Tue, 7 Jul 2020 21:44:33 +0000 (16:44 -0500)]
[OpenMP][NFC] Remove unused and untested code from the device runtime

We carried a lot of unused and untested code in the device runtime.
Among other reasons, we are planning major rewrites for which reduced
size is going to help a lot.

The number of code lines reduced by 14%!

Language                     files          blank        comment           code
CUDA                            13            489            841           2454
C/C++ Header                    14            322            493           1377
C                               12            117            124            559
CMake                            4             64             64            262
C++                              1              6              6             39
SUM:                            44            998           1528           4691

Language                     files          blank        comment           code
CUDA                            13            366            733           1879
C/C++ Header                    14            317            484           1293
C                               12            117            124            559
CMake                            4             64             64            262
C++                              1              6              6             39
SUM:                            44            870           1411           4032

Reviewers: hfinkel, jhuber6, fghanim, JonChesterfield, grokos, AndreyChurbanov, ye-luo, tianshilei1992, ggeorgakoudis, Hahnfeld, ABataev, hbae, ronlieb, gregrodgers

Subscribers: jvesely, yaxunl, bollu, guansong, jfb, sstefan1, aaron.ballman, openmp-commits, cfe-commits

Tags: #clang, #openmp

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

2 years ago[COFF] Add cg_profile directive and .llvm.call-graph-profile section
Zequan Wu [Fri, 26 Jun 2020 03:35:03 +0000 (20:35 -0700)]
[COFF] Add cg_profile directive and .llvm.call-graph-profile section

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

2 years agoRevert "[lldb-vscode] Fix TestVSCode_module"
Walter Erquinigo [Sat, 11 Jul 2020 00:05:23 +0000 (17:05 -0700)]
Revert "[lldb-vscode] Fix TestVSCode_module"
This reverts commit 881af6eb0030986876d3b80668193e5c3c04a87c.

Revert "[lldb-vscode] Add Compile Unit List to Modules View"
This reverts commit 03ef61033ff5e1e40518f14f642e4ad8d686974c.

Revert "[lldb-vscode] Add Support for Module Event"
This reverts commit f7f80159753ba725f7e32529fcc369bc358efbb3.

The debian buildbot has reported issues with the modules test.

Reverting it for now.

2 years ago[BPI] Compile time improvement when erasing blocks (NFC)
Teresa Johnson [Fri, 10 Jul 2020 22:25:27 +0000 (15:25 -0700)]
[BPI] Compile time improvement when erasing blocks (NFC)

eraseBlock is trying to erase all probability info for the given BB.
This info is stored in a DenseMap organized like so:
   using Edge = std::pair<const BasicBlock *, unsigned>;
   DenseMap<Edge, BranchProbability> Probs;
where the unsigned in the Edge key is the successor id.

It was walking through every single map entry, checking if the BB in the
key's pair matched the given BB. Much more efficient is to do what
another method (getEdgeProbability) was already doing, which is to walk
the successors of the BB, and simply do a map lookup on the key formed
from each <BB, successor id> pair.

Doing this dropped the overall compile time for a file containing a
very large function by around 32%.

Reviewers: davidxl, xur

Subscribers: llvm-commits, hiraditya

Tags: #llvm

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

2 years ago[OpenMP] Use __OPENMP_NVPTX__ instead of _OPENMP in wrapper headers
Johannes Doerfert [Fri, 10 Jul 2020 22:11:29 +0000 (17:11 -0500)]
[OpenMP] Use __OPENMP_NVPTX__ instead of _OPENMP in wrapper headers

Due to recent changes we cannot use OpenMP in CUDA files anymore
(PR45533) as the math handling of CUDA is different when _OPENMP is
defined. We actually want this different behavior only if we are
offloading with OpenMP to NVIDIA, thus generating NVPTX. With this patch
we do not interfere with the CUDA math handling except if we are in
NVPTX offloading mode, as indicated by the presence of __OPENMP_NVPTX__.

Reviewed By: tra

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

2 years ago[lldb-vscode] Fix TestVSCode_module
Walter Erquinigo [Fri, 10 Jul 2020 23:32:22 +0000 (16:32 -0700)]
[lldb-vscode] Fix TestVSCode_module

For some reason this works on the original author's machine, but not on my. So I'm using a safer approach of using an unstripped dynamic library to place breakpoints on. The author was placing a breakpoint on the main symbol of a stripped library and for some reason it worked on their machine, but it shouldn't have...

Offender diff: D82477

2 years ago[lldb-vscode] Add Compile Unit List to Modules View
Yifan Shen [Fri, 10 Jul 2020 21:07:30 +0000 (14:07 -0700)]
[lldb-vscode] Add Compile Unit List to Modules View

Summary: User can expand and check compile unit list for the modules that have debug info.

Reviewers: wallace, clayborg

Reviewed By: clayborg

Subscribers: aprantl, lldb-commits

Tags: #lldb

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

2 years ago[lldb-vscode] Add Support for Module Event
Yifan Shen [Fri, 10 Jul 2020 21:07:18 +0000 (14:07 -0700)]
[lldb-vscode] Add Support for Module Event

Whenever a module is created, removed or changed, lldb-vscode is now sending an event that can be interpreted by the IDE so that modules can be rendered in the IDE, like the tree view in this screenshot


Reviewers: wallace, clayborg, kusmour, aadsm

Reviewed By: clayborg

Subscribers: cfe-commits, labath, lldb-commits

Tags: #lldb, #clang

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

2 years ago[Sanitizers] Change protoent test to check for IPv6 instead of RDP
Gui Andrade [Fri, 10 Jul 2020 23:49:40 +0000 (23:49 +0000)]
[Sanitizers] Change protoent test to check for IPv6 instead of RDP

Looks like RDP isn't present on some of LLVM's buildbot machines

2 years agoRevert "Re-land [CodeView] Add full repro to LF_BUILDINFO record"
Alexandre Ganea [Fri, 10 Jul 2020 23:45:01 +0000 (19:45 -0400)]
Revert "Re-land [CodeView] Add full repro to LF_BUILDINFO record"

This reverts commit add59ecb34e3003311b7e2318b16a0ef10c76d79 and 41d2813a5faea1c18b7d329109e0287c5cd9ffea.

2 years ago[libc] [Obvious] Remove unneeded header in strchr.
cgyurgyik [Fri, 10 Jul 2020 23:12:03 +0000 (19:12 -0400)]
[libc] [Obvious] Remove unneeded header in strchr.

Reviewers: sivachandra

Reviewed By: sivachandra

Subscribers: mgorny, tschuett, ecnelises, libc-commits

Tags: #libc-project

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

2 years agoRemove unnecessary/erroneous "static" from function templates in headers
David Blaikie [Thu, 9 Jul 2020 22:33:09 +0000 (15:33 -0700)]
Remove unnecessary/erroneous "static" from function templates in headers

This risks ODR violations in inline functions that call these functions
(if they remain static) & otherwise just causes some object size
increase, potentially, by these functions not being deduplicated by the

2 years ago[PDB] Attempt fix for debug-info-codeview-buildinfo.c test
Alexandre Ganea [Fri, 10 Jul 2020 22:52:19 +0000 (18:52 -0400)]
[PDB] Attempt fix for debug-info-codeview-buildinfo.c test

This is a bit a shot in the dark, as it doesn't occur on my Windows 10 machines, nor on x64 Linux Ubuntu 18.04.
This patch tries to fix the following kind of error:
- http://lab.llvm.org:8011/builders/clang-ppc64le-linux/builds/31511/steps/cmake%20stage%201/logs/stdio
- http://lab.llvm.org:8011/builders/clang-ppc64le-linux-lnt/builds/25150/steps/ninja%20check%201/logs/FAIL%3A%20Clang%3A%3Adebug-info-codeview-buildinfo.c
- http://lab.llvm.org:8011/builders/fuchsia-x86_64-linux/builds/7947/steps/check/logs/stdio

2 years ago[docs] LLVM Security Group and Process
JF Bastien [Fri, 15 Nov 2019 18:54:39 +0000 (10:54 -0800)]
[docs] LLVM Security Group and Process

See the corresponding RFC on llvm-dev for a discussion of this proposal.

Subscribers: jkorous, dexonsmith, arphaman, ributzka, llvm-commits

Tags: #llvm

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

2 years agoTemporarily revert "[NFC] Separate bitcode reading for FUNC_CODE_INST_CMPXCHG(_OLD)"
Eric Christopher [Fri, 10 Jul 2020 22:10:52 +0000 (15:10 -0700)]
Temporarily revert "[NFC] Separate bitcode reading for FUNC_CODE_INST_CMPXCHG(_OLD)"
as it wasn't NFC and is causing issues with thinlto bitcode reading.

I've followed up offline with reproduction instructions and testcases.

This reverts commit 30582457b47004dec8a78144abc919a13ccbd08c.

2 years agoAMDGPU: Remove .value_type from kernel metadata
Matt Arsenault [Mon, 29 Jun 2020 21:02:10 +0000 (17:02 -0400)]
AMDGPU: Remove .value_type from kernel metadata

This doesn't appear used for anything, and is emitted incorrectly
based on the description. This also depends on the IR type, and
pointee element type.

2 years ago[X86] Add isel patterns for matching broadcast vpternlog if the ternlog and the broad...
Craig Topper [Fri, 10 Jul 2020 22:15:01 +0000 (15:15 -0700)]
[X86] Add isel patterns for matching broadcast vpternlog if the ternlog and the broadcast have different types.

2 years ago[mlir][linalg] Improve aliasing approximation for hoisting transfer read/write
Thomas Raoux [Fri, 10 Jul 2020 21:55:04 +0000 (14:55 -0700)]
[mlir][linalg] Improve aliasing approximation for hoisting transfer read/write

Improve the logic deciding if it is safe to hoist vector transfer read/write
out of the loop. Change the logic to prevent hoisting operations if there are
any unknown access to the memref in the loop no matter where the operation is.
For other transfer read/write in the loop check if we can prove that they
access disjoint memory and ignore them in this case.

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

2 years ago[Polly] Fix prevectorization of fused loops.
Michael Kruse [Fri, 10 Jul 2020 21:11:19 +0000 (16:11 -0500)]
[Polly] Fix prevectorization of fused loops.

The schedule of a fused loop has one isl_space per statement, such that
a conversion to a isl_map fails. However, the prevectorization is
interested in the schedule space only: Converting to the non-union
representation only after extracting the schedule range fixes the problem.

This fixes llvm.org/PR46578

2 years ago[Polly] Fix -polly-opt-isl -analyze
Michael Kruse [Fri, 10 Jul 2020 21:05:42 +0000 (16:05 -0500)]
[Polly] Fix -polly-opt-isl -analyze

The member LastSchedule was never set, such that printScop would always
print "n/a" instead of the last schedule.

To ensure that the isl_ctx lives as least as long as the stored
schedule, also store a shared_ptr.

Also set the schedule tree output style to ISL_YAML_STYLE_BLOCK to avoid
printing everything on a single line.

`opt -polly-opt-isl -analyze` will be used in the next commit.

2 years ago[clang-shlib] Don't link with static clang libraries
Tom Stellard [Fri, 10 Jul 2020 15:44:28 +0000 (08:44 -0700)]
[clang-shlib] Don't link with static clang libraries

If we are building static libraries we don't need to link them into
clang-shlib, since clang-shlib already has all the individual object
files linked in.

Reviewers: smeenai

Reviewed By: smeenai

Subscribers: mgorny, cfe-commits, llvm-commits

Tags: #clang

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

2 years ago[FileCheck] Fix up -dump-input* docs
Joel E. Denny [Fri, 10 Jul 2020 21:13:25 +0000 (17:13 -0400)]
[FileCheck] Fix up -dump-input* docs

In FileCheck.rst, add `-dump-input-context` and `-dump-input-filter`,
and fix some `-dump-input` documentation.

In `FileCheck -help`, `cl::value_desc("kind")` is being ignored for
`-dump-input-filter`, so just drop it.

Extend `-dump-input=help` to mention FILECHECK_OPTS.

2 years ago[mlir][Vector] Add folding for vector.transfer ops
Nicolas Vasilache [Fri, 10 Jul 2020 20:47:51 +0000 (16:47 -0400)]
[mlir][Vector]  Add folding for vector.transfer ops

This revision folds vector.transfer operations by updating the `masked` bool array attribute when more unmasked dimensions can be discovered.

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

2 years ago[analyzer] Silence a warning.
Artem Dergachev [Fri, 10 Jul 2020 18:56:06 +0000 (11:56 -0700)]
[analyzer] Silence a warning.

An old clang warns that the const object has no default constructor so it may
remain uninitialized forever. That's a false alarm because all fields
have a default initializer. Apply the suggested fixit anyway.

2 years ago[mlir] [VectorOps] Merge OUTER/AXPY vector.contract lowering into single case
aartbik [Fri, 10 Jul 2020 20:11:52 +0000 (13:11 -0700)]
[mlir] [VectorOps] Merge OUTER/AXPY vector.contract lowering into single case

We temporarily had separate OUTER lowering (for matmat flavors) and
AXPY lowering (for matvec flavors). With the new generalized
"vector.outerproduct" semantics, these cases can be merged into
a single lowering method. This refactoring will simplify future
decisions on cost models and lowering heuristics.

Reviewed By: nicolasvasilache

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

2 years agoChange behavior with zero-sized static array extents
Aaron Ballman [Fri, 10 Jul 2020 19:54:57 +0000 (15:54 -0400)]
Change behavior with zero-sized static array extents

Currently, Clang previously diagnosed this code by default:
  void f(int a[static 0]);
saying that "static has no effect on zero-length arrays", which was

However, static array extents require that the caller of the function
pass a nonnull pointer to an array of *at least* that number of
elements, but it can pass more (see C17 Given that we allow
zero-sized arrays as a GNU extension and that it's valid to pass more
elements than specified by the static array extent, we now support
zero-sized static array extents with the usual semantics because it can
be useful in cases like:

  void my_bzero(char p[static 0], int n);
  my_bzero(&c+1, 0); //ok
  my_bzero(t+k,n-k); //ok, pattern from actual code

2 years agoReland [NFC] Derive from PassInfoMixin for no-op/printing passes
Arthur Eubanks [Thu, 9 Jul 2020 23:49:48 +0000 (16:49 -0700)]
Reland [NFC] Derive from PassInfoMixin for no-op/printing passes

PassInfoMixin should be used for all NPM passes, rater than a custom

This caused ambiguous references in LegacyPassManager.cpp, so had to
remove "using namespace llvm::legacy" and move some things around.

Reviewed By: ychen, asbirlea

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

2 years ago[ldb/Reproducers] Add YamlRecorder and MultiProvider
Jonas Devlieghere [Fri, 10 Jul 2020 19:45:38 +0000 (12:45 -0700)]
[ldb/Reproducers] Add YamlRecorder and MultiProvider

This patch does several things that are all closely related:

 - It introduces a new YamlRecorder as a counterpart to the existing
   DataRecorder. As the name suggests the former serializes data as yaml
   while the latter uses raw texts or bytes.

 - It introduces a new MultiProvider base class which can be backed by
   either a DataRecorder or a YamlRecorder.

 - It reimplements the CommandProvider in terms of the new

Finally, it adds unit testing coverage for the MultiProvider, a naive
YamlProvider built on top of the new YamlRecorder and the existing

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

2 years ago[AST][ObjC] Fix crash when printing invalid objc categories
David Goldman [Thu, 9 Jul 2020 21:32:05 +0000 (17:32 -0400)]
[AST][ObjC] Fix crash when printing invalid objc categories

If no valid interface definition was found previously we would crash.

With this change instead we just print `<<error-type>>` in place
of the NULL interface. In the future this could be improved by
saving the invalid interface's name and using that.

Reviewers: sammccall, gribozavr

Subscribers: cfe-commits

Tags: #clang

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

2 years ago[mlir] [VectorOps] Allow AXPY to be expressed as special case of OUTERPRODUCT
aartbik [Fri, 10 Jul 2020 19:23:03 +0000 (12:23 -0700)]
[mlir] [VectorOps] Allow AXPY to be expressed as special case of OUTERPRODUCT

This specialization allows sharing more code where an AXPY follows naturally
in cases where an OUTERPRODUCT on a scalar would be generated.

Reviewed By: nicolasvasilache

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

2 years agoAArch64: Fix unused variables
Matt Arsenault [Fri, 10 Jul 2020 18:27:24 +0000 (14:27 -0400)]
AArch64: Fix unused variables

2 years ago[lldb] on s390x fix override issue
Konrad Kleine [Fri, 10 Jul 2020 18:47:00 +0000 (14:47 -0400)]
[lldb] on s390x fix override issue

This fixes an override issue by marking a function as const so that the
signature maps to the signature of the function in the base class.

This is the original error:

In file included from /root/llvm/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.cpp:11:
/root/llvm/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.h:79:10: error: 'size_t lldb_private::process_linux::NativeRegisterContextLinux_s390x::GetGPRSize()' marked 'override', but does not override
   79 |   size_t GetGPRSize() override { return sizeof(m_regs); }
      |          ^~~~~~~~~~

Subscribers: lldb-commits

Tags: #lldb

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

2 years ago[Sema] Emit a -Wformat warning for printf("%s", (void*)p)
Erik Pilkington [Fri, 10 Jul 2020 17:22:11 +0000 (13:22 -0400)]
[Sema] Emit a -Wformat warning for printf("%s", (void*)p)

Its dangerous to assume that the opaque pointer points to a null-terminated
string, and this has an easy fix (casting to char*).


2 years ago[PredicateInfo] Add test for multiple branches on same condition (NFC)
Nikita Popov [Fri, 10 Jul 2020 18:58:09 +0000 (20:58 +0200)]
[PredicateInfo] Add test for multiple branches on same condition (NFC)

This illustrates a case where RenamedOp does not correspond to the
value used in the condition, which it ideally should.

2 years ago[NFC] Separate Peeling Properties into its own struct (re-land after minor fix)
Sidharth Baveja [Fri, 10 Jul 2020 18:38:08 +0000 (18:38 +0000)]
[NFC] Separate Peeling Properties into its own struct (re-land after minor fix)

This patch separates the peeling specific parameters from the UnrollingPreferences,
and creates a new struct called PeelingPreferences. Functions which used the
UnrollingPreferences struct for peeling have been updated to use the PeelingPreferences struct.

Author: sidbav (Sidharth Baveja)

Reviewers: Whitney (Whitney Tsang), Meinersbur (Michael Kruse), skatkov (Serguei Katkov), ashlykov (Arkady Shlykov), bogner (Justin Bogner), hfinkel (Hal Finkel), anhtuyen (Anh Tuyen Tran), nikic (Nikita Popov)

Reviewed By: Meinersbur (Michael Kruse)

Subscribers: fhahn (Florian Hahn), hiraditya (Aditya Kumar), llvm-commits, LLVM


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

2 years ago[libc] Add strchr implementation. Fixes bug in memchr.
cgyurgyik [Fri, 10 Jul 2020 18:28:20 +0000 (14:28 -0400)]
[libc] Add strchr implementation. Fixes bug in memchr.

Summary: [libc] Adds strchr implementation with unit tests. Fixes signed character bug in memchr.

Reviewers: sivachandra, PaulkaToast

Reviewed By: sivachandra

Subscribers: mgorny, tschuett, ecnelises, libc-commits

Tags: #libc-project

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

2 years ago[PowerPC] Enable default support of quad precision operations
Lei Huang [Wed, 8 Jul 2020 22:07:34 +0000 (17:07 -0500)]
[PowerPC] Enable default support of quad precision operations

Summary: Remove option guarding support of quad precision operations.

Reviewers: nemanjai, #powerpc, steven.zhang

Reviewed By: nemanjai, #powerpc, steven.zhang

Subscribers: qiucf, wuzish, nemanjai, hiraditya, kbarton, shchenz, llvm-commits

Tags: #llvm

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

2 years agoRevert "[NFC] Derive from PassInfoMixin for no-op/printing passes"
Davide Italiano [Fri, 10 Jul 2020 18:16:33 +0000 (11:16 -0700)]
Revert "[NFC] Derive from PassInfoMixin for no-op/printing passes"

This reverts commit 8039d2c3bf14585ef37dc9343bf393ecad9aead9 as
it breaks the modules build on macOS.

2 years agoThis is a refinement on 96601ec28b7efe5abf3479a1aa91bcedb235bbbd. The intent of that...
Jim Ingham [Fri, 10 Jul 2020 18:10:56 +0000 (11:10 -0700)]
This is a refinement on 96601ec28b7efe5abf3479a1aa91bcedb235bbbd. The intent of that change was to do the same work for the computation of the locations of the children of ValueObjectVariable as was done for the root ValueObjectVariable. This original patch did that by moving the computation from ValueObjectVariable to ValueObject. That fixed the problem but caused a handful of swift-lldb testsuite failures and a crash or two.

The problem is that synthetic value objects can sometimes represent objects in target memory, and other times they might be made up wholly in lldb memory, with pointers from one synthetic object to another, and so the ValueObjectVariable computation was not appropriate.

This patch delegates the computation to the root of the ValueObject in question. That solves the problem for ValueObjectVariable while not messing up the computation for ValueObjectConstResult or ValueObjectSynthetic.

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

2 years ago[OpenCL] Fixed typo for ctor stub name in UsersManual
Anastasia Stulova [Fri, 10 Jul 2020 18:04:49 +0000 (19:04 +0100)]
[OpenCL] Fixed typo for ctor stub name in UsersManual

2 years agoRe-land [CodeView] Add full repro to LF_BUILDINFO record
Alexandre Ganea [Fri, 10 Jul 2020 16:47:58 +0000 (12:47 -0400)]
Re-land [CodeView] Add full repro to LF_BUILDINFO record

This patch adds some missing information to the LF_BUILDINFO which allows for rebuilding an .OBJ without any external dependency but the .OBJ itself (other than the compiler executable).

Some tools need this information to reproduce a build without any knowledge of the build system. The LF_BUILDINFO therefore stores a full path to the compiler, the PWD (which is the CWD at program startup), a relative or absolute path to the TU, and the full CC1 command line. The command line needs to be freestanding (not depend on any environment variable). In the same way, MSVC doesn't store the provided command-line, but an expanded version (somehow their equivalent of CC1) which is also freestanding.

For more information see PR36198 and D43002.

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

2 years ago[IR] Disable select ? C : undef -> C fold in ConstantFoldSelectInstruction unless...
Craig Topper [Fri, 10 Jul 2020 17:41:46 +0000 (10:41 -0700)]
[IR] Disable select ? C : undef -> C fold in ConstantFoldSelectInstruction unless we know C isn't poison.

This matches the recent change to InstSimplify from D83440.

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

2 years ago[ARM] Add Cortex-A78 and Cortex-X1 Support for Clang and LLVM
Luke Geeson [Wed, 1 Jul 2020 11:50:36 +0000 (12:50 +0100)]
[ARM] Add Cortex-A78 and Cortex-X1 Support for Clang and LLVM

This patch upstreams support for the Arm-v8 Cortex-A78 and Cortex-X1
processors for AArch64 and ARM.

In detail:
- Adding cortex-a78 and cortex-x1 as cpu options for aarch64 and arm targets in clang
- Adding Cortex-A78 and Cortex-X1 CPU names and ProcessorModels in llvm

details of the CPU can be found here:


The following people contributed to this patch:
- Luke Geeson
- Mikhail Maltsev

Reviewers: t.p.northover, dmgreen

Reviewed By: dmgreen

Subscribers: dmgreen, kristof.beyls, hiraditya, danielkiss, cfe-commits,
llvm-commits, miyuki

Tags: #clang, #llvm

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

2 years ago[CGProfile] Fix layering, IPO depends in Instrumentation.
Benjamin Kramer [Fri, 10 Jul 2020 17:13:47 +0000 (19:13 +0200)]
[CGProfile] Fix layering, IPO depends in Instrumentation.

2 years agoRevert "[compiler-rt] [test] Use the parent process env as base env in tests"
Sergej Jaskiewicz [Fri, 10 Jul 2020 17:01:50 +0000 (20:01 +0300)]
Revert "[compiler-rt] [test] Use the parent process env as base env in tests"

This reverts commit 5ab446cfe5503fd4431a94db4d741cf3b5fdcd15.

That commit caused memory sanitizer test failures on PowerPC buildbots

2 years agoRemove clang options that were added back when merging the TableGen files
Daniel Grumberg [Fri, 10 Jul 2020 16:54:44 +0000 (17:54 +0100)]
Remove clang options that were added back when merging the TableGen files

2 years agorepair standalone clang builds
Saleem Abdulrasool [Fri, 10 Jul 2020 16:33:54 +0000 (09:33 -0700)]
repair standalone clang builds

Add missing C++ language standard setup for clang standalone build.

Patch by Michele Scandale!

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

2 years agoUse FileRange::text instead of Lexer::getSpelling
Eduardo Caldas [Fri, 10 Jul 2020 09:23:09 +0000 (09:23 +0000)]
Use FileRange::text instead of Lexer::getSpelling

* as we are using them only for integer and floating literals they have
the same behavior
* FileRange::text is simpler to call and is within the context of
syntax trees

2 years agoAdd kinded UDL for raw literal operator and numeric literal operator template
Eduardo Caldas [Thu, 9 Jul 2020 15:49:15 +0000 (15:49 +0000)]
Add kinded UDL for raw literal operator and  numeric literal operator template

2 years agoFix crash on `user defined literals`
Eduardo Caldas [Mon, 15 Jun 2020 17:08:39 +0000 (17:08 +0000)]
Fix crash on `user defined literals`

Given an UserDefinedLiteral `1.2_w`:
Problem: Lexer generates one Token for the literal, but ClangAST
references two source locations
Fix: Ignore the operator and interpret it as the underlying literal.
e.g.: `1.2_w` token generates syntax node IntegerLiteral(1.2_w)

Subscribers: cfe-commits

Tags: #clang

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

2 years ago [NFC][PowerPC] Add a new MIR file to test mi-peephole pass
Kang Zhang [Fri, 10 Jul 2020 16:08:07 +0000 (16:08 +0000)]
 [NFC][PowerPC] Add a new MIR file to test mi-peephole pass

2 years ago[Lexer] Fix missing coverage line after #endif
Zequan Wu [Thu, 9 Jul 2020 21:56:06 +0000 (14:56 -0700)]
[Lexer] Fix missing coverage line after #endif

Summary: bug reported here: https://bugs.llvm.org/show_bug.cgi?id=46660

Reviewers: vsk, efriedma, arphaman

Reviewed By: vsk

Subscribers: dexonsmith, cfe-commits

Tags: #clang

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

2 years ago[LPM] Port CGProfilePass from NPM to LPM
Zequan Wu [Wed, 8 Jul 2020 19:30:28 +0000 (12:30 -0700)]
[LPM] Port CGProfilePass from NPM to LPM

Reviewers: hans, chandlerc!, asbirlea, nikic

Reviewed By: hans, nikic

Subscribers: steven_wu, dexonsmith, nikic, echristo, void, zhizhouy, cfe-commits, aeubanks, MaskRay, jvesely, nhaehnle, hiraditya, kerbowa, llvm-commits

Tags: #llvm, #clang

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

2 years agoRevert "[OpenMPOpt] ICV Tracking"
Roman Lebedev [Fri, 10 Jul 2020 15:54:48 +0000 (18:54 +0300)]
Revert "[OpenMPOpt] ICV Tracking"

There appears to be some kind of memory corruption/use-after-free/etc
going on here. In particular, in `OpenMPOpt::deleteParallelRegions()`,
in `DeleteCallCB()`, `CI` is garbage.

WIll post reproducer in the original review.

This reverts commit 6c4a5e9257bac022ffe60e466686ba7fc96ffd1a.

2 years agoDelete CC1Options.td, since it should have happened in D82574
Daniel Grumberg [Fri, 10 Jul 2020 15:11:54 +0000 (16:11 +0100)]
Delete CC1Options.td, since it should have happened in D82574

2 years ago[ARM] Pass -verify-machineinstr to test and XFAIL until fixed.
Florian Hahn [Fri, 10 Jul 2020 15:43:35 +0000 (16:43 +0100)]
[ARM] Pass -verify-machineinstr to test and XFAIL until fixed.

Some bots run with -verify-machineinstr enabled. Add it to the new test
and XFAIL it until fixed.

2 years ago[Attributor][NFC] Update tests after recent changes
Johannes Doerfert [Fri, 10 Jul 2020 15:37:31 +0000 (10:37 -0500)]
[Attributor][NFC] Update tests after recent changes

Attributor tests are mostly updated using the auto upgrade scripts but
sometimes we forget. If we do it manually or continue using old check
lines that still match we see unrelated changes down the line. This is
just a cleanup.

2 years ago[DomTreeUpdater] Use const auto * when iterating over pointers (NFC).
Florian Hahn [Fri, 10 Jul 2020 15:39:15 +0000 (16:39 +0100)]
[DomTreeUpdater] Use const auto * when iterating over pointers (NFC).

This silences the warning below:

llvm-project/llvm/lib/Analysis/DomTreeUpdater.cpp:510:20: warning: loop variable 'BB' is always a copy because the range of type 'const SmallPtrSet<llvm::BasicBlock *, 8>' does not return a reference [-Wrange-loop-analysis]
  for (const auto &BB : DeletedBBs) {
llvm-project/llvm/lib/Analysis/DomTreeUpdater.cpp:510:8: note: use non-reference type 'llvm::BasicBlock *'
  for (const auto &BB : DeletedBBs) {
1 warning generated.

2 years ago[ARM] Add test with tcreturn and debug value.
Florian Hahn [Fri, 10 Jul 2020 15:08:25 +0000 (16:08 +0100)]
[ARM] Add test with tcreturn and debug value.

In the attached test case, a non-terminator instruction (DBG_VALUE) is
inserted after a terminator, producing an invalid MBB.

2 years ago[AArch64][x86] add tests for rotated store merge; NFC
Sanjay Patel [Fri, 10 Jul 2020 00:03:49 +0000 (20:03 -0400)]
[AArch64][x86] add tests for rotated store merge; NFC

2 years ago[DAGCombiner] move/rename variables for readability; NFC
Sanjay Patel [Thu, 9 Jul 2020 21:49:14 +0000 (17:49 -0400)]
[DAGCombiner] move/rename variables for readability; NFC

2 years ago[mlir][Vector] Add ExtractOp folding when fed by a TransposeOp
Nicolas Vasilache [Fri, 10 Jul 2020 13:49:22 +0000 (09:49 -0400)]
[mlir][Vector] Add ExtractOp folding when fed by a TransposeOp

TransposeOp are often followed by ExtractOp.
In certain cases however, it is unnecessary (and even detrimental) to lower a TransposeOp to either a flat transpose (llvm.matrix intrinsics) or to unrolled scalar insert / extract chains.

Providing foldings of ExtractOp mitigates some of the unnecessary complexity.

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

2 years ago[FileCheck] Implement -dump-input-filter
Joel E. Denny [Fri, 10 Jul 2020 11:50:42 +0000 (07:50 -0400)]
[FileCheck] Implement -dump-input-filter

This makes the input dump filtering implemented by D82203 more
configurable.  D82203 enables filtering out everything but the initial
input lines of error diagnostics (plus some context).  This patch
enables including any line with any kind of annotation.

Reviewed By: mehdi_amini

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

2 years ago[FileCheck] In input dump, elide only if ellipsis is shorter
Joel E. Denny [Fri, 10 Jul 2020 11:50:31 +0000 (07:50 -0400)]
[FileCheck] In input dump, elide only if ellipsis is shorter

For example, given `-dump-input-context=3 -vv`, the following now
shows more leading context for the error than requested because a
leading ellipsis would occupy the same number of lines as it would

         1: foo6
         2: foo5
         3: foo4
         4: foo3
         5: foo2
         6: foo1
         7: hello world
check:1     ^~~~~
check:2           X~~~~ error: no match found
         8: foo1
check:2     ~~~~
         9: foo2
check:2     ~~~~
        10: foo3
check:2     ~~~~

Reviewed By: mehdi_amini

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

2 years ago[FileCheck] Implement -dump-input-context
Joel E. Denny [Fri, 10 Jul 2020 11:50:00 +0000 (07:50 -0400)]
[FileCheck] Implement -dump-input-context

This patch is motivated by discussions at each of:

* <https://reviews.llvm.org/D81422>
* <http://lists.llvm.org/pipermail/llvm-dev/2020-June/142369.html>

When input is dumped as specified by `-dump-input=fail`, this patch
filters the dump to show only input lines that are the starting lines
of error diagnostics plus the number of contextual lines specified
`-dump-input-context` (defaults to 5).

When `-dump-input=always`, there might be not be any errors, so all
input lines are printed, as without this patch.

Here's some sample output with `-dump-input-context=3 -vv`:

          13: foo
          14: foo
          15: hello world
check:1       ^~~~~~~~~~~
          16: foo
check:2'0     X~~ error: no match found
          17: foo
check:2'0     ~~~
          18: foo
check:2'0     ~~~
          19: foo
check:2'0     ~~~
          27: foo
check:2'0     ~~~
          28: foo
check:2'0     ~~~
          29: foo
check:2'0     ~~~
          30: goodbye word
check:2'0     ~~~~~~~~~~~~
check:2'1     ?            possible intended match
          31: foo
check:2'0     ~~~
          32: foo
check:2'0     ~~~
          33: foo
check:2'0     ~~~

Reviewed By: mehdi_amini, arsenm, jhenderson, rsmith, SjoerdMeijer, Meinersbur, lattner

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

2 years ago[PDB] Fix out-of-bounds acces when sorting GSI buckets
Alexandre Ganea [Fri, 10 Jul 2020 14:38:29 +0000 (10:38 -0400)]
[PDB] Fix out-of-bounds acces when sorting GSI buckets

When building in Debug on Windows-MSVC after b7402edce315, a lot of tests were failing because we were dereferencing an element past the end of HashRecords. This happened towards the end of the table, in unused slots.

2 years ago[clangd] Update semanticTokens support to reflect latest LSP draft
Sam McCall [Fri, 10 Jul 2020 14:08:14 +0000 (16:08 +0200)]
[clangd] Update semanticTokens support to reflect latest LSP draft

Summary: Mostly a few methods and message names have been renamed.

Reviewers: hokein

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

Tags: #clang

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

2 years agoReland "[InstCombine] Lower infinite combine loop detection thresholds""
Roman Lebedev [Fri, 10 Jul 2020 13:55:44 +0000 (16:55 +0300)]
Reland "[InstCombine] Lower infinite combine loop detection thresholds""

This relands commit cd7f8051ac7b6f08734102446482c1e5d951bfcc that was
reverted since lower threshold have successfully found an issue.
Now that the issue is fixed, let's wait until the next one is reported.

This reverts commit caa423eef0d128f35ac11ddbce34964caafb61c1.

2 years ago[InstCombine] After merging store into successor, queue prev. store to be visited...
Roman Lebedev [Fri, 10 Jul 2020 13:40:15 +0000 (16:40 +0300)]
[InstCombine] After merging store into successor, queue prev. store to be visited (PR46661)

We can happen to have a situation with many stores eligible for transform,
but due to our visitation order (top to bottom), when we have processed
the first eligible instruction, we would not try to reprocess the previous
instructions that are now also eligible.

So after we've successfully merged a store that was second-to-last instruction
into successor, if the now-second-to-last instruction is also a such store
that is eligible, add it to worklist to be revisited.

Fixes https://bugs.llvm.org/show_bug.cgi?id=46661

2 years ago[NFCI][InstCombine] PR46661: multiple stores eligible for merging into successor...
Roman Lebedev [Fri, 10 Jul 2020 13:30:23 +0000 (16:30 +0300)]
[NFCI][InstCombine] PR46661: multiple stores eligible for merging into successor - worklist issue

The testcase should pass with a single instcombine iteration.

2 years ago[FPEnv][Clang][Driver] Disable constrained floating point on targets lacking support."
Kevin P. Neal [Fri, 10 Jul 2020 14:31:41 +0000 (10:31 -0400)]
[FPEnv][Clang][Driver] Disable constrained floating point on targets lacking support."

Use the new -fexperimental-strict-floating-point flag in more cases to
fix the arm and aarch64 bots.

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

2 years ago[mlir][Linalg] Generalize Vectorization of Linalg contractions
Nicolas Vasilache [Fri, 10 Jul 2020 14:21:45 +0000 (10:21 -0400)]
[mlir][Linalg] Generalize Vectorization of Linalg contractions

This revision adds support for vectorizing named and generic contraction ops to vector.contract. Cases in which the memref is 0-D are special cased to emit std.load/std.store instead of vector.transfer. Relevant tests are added.

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

2 years ago[clangd] Fix hover crash on InitListExpr.
Haojian Wu [Fri, 10 Jul 2020 14:18:10 +0000 (16:18 +0200)]
[clangd] Fix hover crash on InitListExpr.

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

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

2 years ago[mlir][Vector] Fold chains of ExtractOp
Nicolas Vasilache [Fri, 10 Jul 2020 13:31:02 +0000 (09:31 -0400)]
[mlir][Vector] Fold chains of ExtractOp

This revision adds folding to ExtractOp by simply concatenating the position attributes.

2 years agoNormalize default value for -triple correctly
Daniel Grumberg [Fri, 10 Jul 2020 12:57:59 +0000 (13:57 +0100)]
Normalize default value for -triple correctly

2 years agoReland "[FPEnv][Clang][Driver] Disable constrained floating point on targets lacking...
Kevin P. Neal [Fri, 10 Jul 2020 12:46:09 +0000 (08:46 -0400)]
Reland "[FPEnv][Clang][Driver] Disable constrained floating point on targets lacking support."

We currently have strict floating point/constrained floating point enabled
for all targets. Constrained SDAG nodes get converted to the regular ones
before reaching the target layer. In theory this should be fine.

However, the changes are exposed to users through multiple clang options
already in use in the field, and the changes are _completely_ _untested_
on almost all of our targets. Bugs have already been found, like

This patch disables constrained floating point options in clang everywhere
except X86 and SystemZ. A warning will be printed when this happens.

Use the new -fexperimental-strict-floating-point flag to force allowing
strict floating point on hosts that aren't already marked as supporting
it (X86 and SystemZ).

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

2 years agoRevert "[BasicAA] Enable -basic-aa-recphi by default"
David Green [Fri, 10 Jul 2020 12:16:17 +0000 (13:16 +0100)]
Revert "[BasicAA] Enable -basic-aa-recphi by default"

This reverts commit af839a96187e3538d63ad57571e4bdf01e2b15c5.

Some issues appear to be being caused by this. Reverting whilst we

2 years ago[clangd] Config: If.PathExclude
Sam McCall [Thu, 9 Jul 2020 21:33:46 +0000 (23:33 +0200)]
[clangd] Config: If.PathExclude

Reviewers: hokein

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

Tags: #clang

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

2 years ago[PowerPC] Implement R_PPC64_REL24_NOTOC calls, callee also has no TOC
Victor Huang [Fri, 10 Jul 2020 11:47:47 +0000 (06:47 -0500)]
[PowerPC] Implement R_PPC64_REL24_NOTOC calls, callee also has no TOC

The PC Relative code allows for calls that are marked with the relocation
R_PPC64_REL24_NOTOC. This indicates that the caller does not have a valid TOC
pointer in R2 and does not require R2 to be restored after the call.

This patch is added to support local calls to callees tha also do not have a TOC.

Reviewed By: sfertile, MaskRay, stefanp

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

2 years ago[ABI] Handle C++20 [[no_unique_address]] attribute
Ulrich Weigand [Fri, 10 Jul 2020 11:52:47 +0000 (13:52 +0200)]
[ABI] Handle C++20 [[no_unique_address]] attribute

Many platform ABIs have special support for passing aggregates that
either just contain a single member of floatint-point type, or else
a homogeneous set of members of the same floating-point type.

When making this determination, any extra "empty" members of the
aggregate type will typically be ignored.  However, in C++ (at least
in all prior versions), no data member would actually count as empty,
even if it's type is an empty record -- it would still be considered
to take up at least one byte of space, and therefore make those ABI
special cases not apply.

This is now changing in C++20, which introduced the [[no_unique_address]]
attribute.  Members of empty record type, if they also carry this
attribute, now do *not* take up any space in the type, and therefore
the ABI special cases for single-element or homogeneous aggregates
should apply.

The C++ Itanium ABI has been updated accordingly, and GCC 10 has
added support for this new case.  This patch now adds support to
LLVM.  This is cross-platform; it affects all platforms that use
the single-element or homogeneous aggregate ABI special case and
implement this using any of the following common subroutines
in lib/CodeGen/TargetInfo.cpp:

2 years agoDomTreeUpdater::dump() - use const auto& iterator in for-range-loop.
Simon Pilgrim [Fri, 10 Jul 2020 11:47:02 +0000 (12:47 +0100)]
DomTreeUpdater::dump() - use const auto& iterator in for-range-loop.

Avoids unnecessary copies and silences clang tidy warning.

2 years ago[clang-tidy] Use Options priority in enum options where it was missing
Nathan James [Fri, 10 Jul 2020 11:27:08 +0000 (12:27 +0100)]
[clang-tidy] Use Options priority in enum options where it was missing

2 years agoStackSafetyAnalysis.cpp - pass ConstantRange arg as const reference.
Simon Pilgrim [Fri, 10 Jul 2020 11:07:37 +0000 (12:07 +0100)]
StackSafetyAnalysis.cpp - pass ConstantRange arg as const reference.

Avoids unnecessary copies and silences clang tidy warning - we do this in most places, there are just a few that were missed.

2 years ago[X86][SSE] Use shouldUseHorizontalOp helper to determine whether to use (F)HADD....
Simon Pilgrim [Fri, 10 Jul 2020 10:20:46 +0000 (11:20 +0100)]
[X86][SSE] Use shouldUseHorizontalOp helper to determine whether to use (F)HADD. NFCI.

2 years ago[NFC] Change isFPPredicate comparison to ignore lower bound
dstuttar [Wed, 8 Jul 2020 10:02:47 +0000 (11:02 +0100)]
[NFC] Change isFPPredicate comparison to ignore lower bound

Since changing the Predicate to be an unsigned enum, the lower bound check for
isFPPredicate no longer needs to check the lower bound, since
it will always evaluate to true.

Also fixed a similar issue in SIISelLowering.cpp by removing the need for
comparing to FIRST and LAST predicates

Added an assert to the isFPPredicate comparison to flag if the
FIRST_FCMP_PREDICATE is ever changed to anything other than 0, in which case the
logic will break.

Without this change warnings are generated in VS.

Change-Id: I358f0daf28c0628c7bda8ad4cab4e1757b761bab

Subscribers: arsenm, jvesely, nhaehnle, hiraditya, kerbowa, llvm-commits

Tags: #llvm

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