platform/upstream/llvm.git
2 years ago[NFC][Metadata] Refactor allocation, initalization and deletion of MDNodes.
Wolfgang Pieb [Fri, 29 Apr 2022 21:39:40 +0000 (14:39 -0700)]
[NFC][Metadata] Refactor allocation, initalization and deletion of MDNodes.

This patch is refactoring the allocation, initialization and deletion
of MDNodes. It is intended as a preparatory patch for the upcoming
addition of dynamic resizability of MDNodes. It is fundamentally NFC,
but removes the necessity for suppressing the memory sanitizer for
MDNode's operator delete.

Reviewers: dexonsmith

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

2 years ago[llvm-ar][mri] Ensure CREATE commands overwrite the output file
Ben Dunbobbin [Fri, 13 May 2022 22:37:16 +0000 (23:37 +0100)]
[llvm-ar][mri] Ensure CREATE commands overwrite the output file

The CREATE/CREATETHIN commands should overwrite the output file:
https://sourceware.org/binutils/docs/binutils/ar-scripts.html.

This fixes a regression for MRI scripts introduced in:
https://reviews.llvm.org/D123142 which put logic into
performWriteOperation. performWriteOperation is called for all MRI
commands that write an archive out (one's with a SAVE command).
performWriteOperation is unaware of MRI semantics and loads an
existing archive if present. If an existing archive is loaded, llvm-ar
checks the properties of the existing archive for decisions about the
output archive (for example making the output archive thin if the
existing one was). https://reviews.llvm.org/D123142 adds the following
logic...

if (OldArchive) {
  if (Thin && !OldArchive->isThin())
    fail("cannot convert a regular archive to a thin one");
  if (OldArchive->isThin())
    Thin = true;
}

... which errors for a script with CREATETHIN in effect if there is an
existing regular archive, and causes CREATE to output a thin archive
if there is an existing thin archive.

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

2 years ago[LLVM][Casting.h] Add ForwardToPointerCast trait
bzcheeseman [Fri, 13 May 2022 22:41:22 +0000 (18:41 -0400)]
[LLVM][Casting.h] Add ForwardToPointerCast trait

Addresses use cases in Clang/MLIR that need pointer-to-pointer, reference-to-reference, and value-to-value casts from/to the same types. This should reduce boilerplate by allowing the user to simply specify the pointer cast and forward the reference cast directly to the pointer cast.

This cast trait DOES NOT implement `castFailed` and `doCastIfPossible` because in the general case doing so could result in a nullptr dereference. Users can use `NullableValueCastFailed` and `DefaultDoCastIfPossible` as desired for those cases where `nullptr` is acceptable.

Reviewed By: rriddle

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

2 years ago[LLVM][Casting.h] Remove CastInfo pointer partial specialization.
bzcheeseman [Fri, 13 May 2022 19:57:03 +0000 (15:57 -0400)]
[LLVM][Casting.h] Remove CastInfo pointer partial specialization.

Since cast_convert_val now has pointer specializations, we don't need the pointer partial specialization for CastInfo. We want to trim these down when possible to avoid future ambiguous partial specialization errors.

Reviewed By: rriddle

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

2 years ago[ParseResult] Fix warning in flang build, incorporate feedback from River.
Chris Lattner [Fri, 13 May 2022 22:29:21 +0000 (23:29 +0100)]
[ParseResult] Fix warning in flang build, incorporate feedback from River.

The warning caused build errors on a couple flang testers that are
building with -Werror.  The diagnostic change makes the generated
error correct.

This is a followup to https://reviews.llvm.org/D125549

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

2 years ago[RISCV] Use the new chain when converting a fixed RVV load
Roger Ferrer Ibanez [Fri, 13 May 2022 15:45:05 +0000 (15:45 +0000)]
[RISCV] Use the new chain when converting a fixed RVV load

When building the final merged node, we were using the original chain
rather than the output chain of the new operation. After some collapsing
of the chain this could cause the loads be incorrectly scheduled respect
to later stores.

This was uncovered by SingleSource/Regression/C/gcc-c-torture/execute/pr36038.c
of the llvm testsuite.

https://reviews.llvm.org/D125560

2 years ago[RISCV][NFC] Test showing wrong scheduling of expansion of memmove for fixed RVV
Roger Ferrer Ibanez [Fri, 13 May 2022 15:46:40 +0000 (15:46 +0000)]
[RISCV][NFC] Test showing wrong scheduling of expansion of memmove for fixed RVV

After a memmove is expanded, we load the higher addresses after we have
stored onto the lower ones, as if we could do a forward copy.

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

2 years ago[GlobalOpt] Enable optimization of constructors with different priorities
Alexander Shaposhnikov [Fri, 13 May 2022 20:44:49 +0000 (20:44 +0000)]
[GlobalOpt] Enable optimization of constructors with different priorities

Adjust `optimizeGlobalCtorsList` to handle the case of different priorities.
This addresses the issue https://github.com/llvm/llvm-project/issues/55083.

Test plan: ninja check-all

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

2 years ago[Cuda] Add the features using the last argument
Joseph Huber [Fri, 13 May 2022 22:04:29 +0000 (18:04 -0400)]
[Cuda] Add the features using the last argument

Summary:
We should use the last argument so this flag can be overridden properly.

2 years ago[SLP]Do not vectorize non-profitable alternate nodes.
Alexey Bataev [Wed, 16 Mar 2022 20:18:54 +0000 (13:18 -0700)]
[SLP]Do not vectorize non-profitable alternate nodes.

If alternate node has only 2 instructions and the tree is already big
enough, better to skip the vectorization of such nodes, they are not
very profitable (the resulting code cotains 3 instructions instead of
original 2 scalars). SLP can try to vectorize the buildvector sequence
in the next attempt, if it is profitable.

Metric: SLP.NumVectorInstructions

Program                                                                                       SLP.NumVectorInstructions
                                                                               results                   results0 diff
     test-suite :: MultiSource/Benchmarks/DOE-ProxyApps-C/miniAMR/miniAMR.test    72.00                     73.00   1.4%
test-suite :: MultiSource/Benchmarks/Prolangs-C/TimberWolfMC/timberwolfmc.test  1186.00                   1198.00   1.0%
     test-suite :: MultiSource/Benchmarks/DOE-ProxyApps-C++/miniFE/miniFE.test   241.00                    242.00   0.4%
                  test-suite :: MultiSource/Applications/JM/lencod/lencod.test  2131.00                   2139.00   0.4%
 test-suite :: External/SPEC/CINT2017rate/523.xalancbmk_r/523.xalancbmk_r.test  6377.00                   6384.00   0.1%
test-suite :: External/SPEC/CINT2017speed/623.xalancbmk_s/623.xalancbmk_s.test  6377.00                   6384.00   0.1%
        test-suite :: External/SPEC/CFP2017rate/510.parest_r/510.parest_r.test 12650.00                  12658.00   0.1%
      test-suite :: External/SPEC/CFP2017rate/526.blender_r/526.blender_r.test 26169.00                  26147.00  -0.1%
          test-suite :: MultiSource/Benchmarks/Trimaran/enc-3des/enc-3des.test    99.00                     86.00 -13.1%

Gains:
526.blender_r - more vectorized trees.
enc-3des - same.

Others:
510.parest_r - no changes.
miniFE - same
623.xalancbmk_s - some (non-profitable) parts of the trees are not
    vectorized.
523.xalancbmk_r - same
lencod - same
timberwolfmc - same
miniAMR - same

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

2 years ago[llvm-ml] Add support for extern proc
Alan Zhao [Fri, 13 May 2022 20:09:11 +0000 (16:09 -0400)]
[llvm-ml] Add support for extern proc

EXTERN PROC isn't really well documented in MSVC, so after poking around
it seems as if it's just a regular extern symbol.

Interestingly enough, under MSVC the following is allowed:

extern foo:proc

mov eax, foo

MSVC will output:

mov eax, 0

while llvm-ml will currently output:

mov eax, dword ptr [foo]

(since foo is an extern)

Arguably, llvm-ml's output makes more sense, even though it's
inconsistent with MSVC ml. However, since moving an extern proc symbol
to a register doesn't really make sense in the first place, we'll treat
it as undefined behavior for now.

Reviewed By: epastor

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

2 years ago[GlobalIsel] Fix fallback if stack protector isn't supported.
Eli Friedman [Fri, 13 May 2022 20:36:16 +0000 (13:36 -0700)]
[GlobalIsel] Fix fallback if stack protector isn't supported.

When GlobalISel fails, we need to report the error, and we need to set
the FailedISel property.  We skipped those steps if stack protector
insertion failed, which led to a very strange miscompile.

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

2 years ago[Clang] Fix DriverKit tests on Linux
Egor Zhdan [Fri, 13 May 2022 21:05:28 +0000 (22:05 +0100)]
[Clang] Fix DriverKit tests on Linux

Some new DriverKit tests were added in https://reviews.llvm.org/D121911, and unfortunately they fail on Linux build bots.

2 years ago[SLP]Do not look for buildvector sequence, if the index is reused.
Alexey Bataev [Fri, 13 May 2022 19:08:08 +0000 (12:08 -0700)]
[SLP]Do not look for buildvector sequence, if the index is reused.

If the insert indes was used already or is not constant, we should stop
looking for unique buildvector sequence, it mustbe splitted to
2 different buildvectors.

2 years ago[Libomptarget] Build the static library without CUDA installed
Joseph Huber [Fri, 13 May 2022 20:29:39 +0000 (16:29 -0400)]
[Libomptarget] Build the static library without CUDA installed

Summary:
This patch allows users to compile the static library without CUDA
installed on the system. This requires the new flag `--cuda-feature` to
indicate that we need `+ptx61` in order to compile the runtime.

2 years ago[CUDA] Add a flag to manually specify the target feature to use with CUDA
Joseph Huber [Fri, 13 May 2022 20:16:15 +0000 (16:16 -0400)]
[CUDA] Add a flag to manually specify the target feature to use with CUDA

Summary:
Normally we parse through the CUDA installation to disover the needed
features. However, we may want to build libraries on targets that do not
currently have CUDA installed but still need to know which features to
make use of when creating the PTX or bitcode. This flag is a simple way
to specify this so we can compile certain codes withotu a valid CUDA
installation.

Ideally this could be done via an -Xarch or simimlar flag but currently
they cannot handle this. We would need to support using an -Xarch flag
that takes multiple arguments that then pass them to the -Xclang
functionality.

2 years ago[BOLT][CMAKE] Fix DYLIB build
Amir Ayupov [Fri, 13 May 2022 20:14:45 +0000 (13:14 -0700)]
[BOLT][CMAKE] Fix DYLIB build

Move BOLT libraries out of `LLVM_LINK_COMPONENTS` to `target_link_libraries`.
Addresses issue #55432.

Reviewed By: rafauler

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

2 years ago[TableGen] Add a new json textmate description for syntax highlighting
River Riddle [Wed, 11 May 2022 22:49:24 +0000 (15:49 -0700)]
[TableGen] Add a new json textmate description for syntax highlighting

There isn't really a good pre-existing syntax highlighter for tablegen, so this
commit adds a textmate version that covers nearly everything in the current
spec.

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

2 years ago[BOLT][TEST] Fix testing on macos
Amir Ayupov [Fri, 13 May 2022 14:12:40 +0000 (07:12 -0700)]
[BOLT][TEST] Fix testing on macos

- Fix common (arch-independent) tests to explicitly target -linux triple.
- Override the triple inside arch-specific tests.
- Add cflags to common tests.
- Update individual tests.
- Expand pipe stderr `|&` shorthand.

Reviewed By: rafauler

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

2 years ago[Clang] Add DriverKit support
Egor Zhdan [Wed, 16 Mar 2022 19:31:04 +0000 (19:31 +0000)]
[Clang] Add DriverKit support

This is the second patch that upstreams the support for Apple's DriverKit.

The first patch: https://reviews.llvm.org/D118046.

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

2 years ago[lldb] Parallelize fetching symbol files in crashlog.py
Jonas Devlieghere [Fri, 13 May 2022 19:15:05 +0000 (12:15 -0700)]
[lldb] Parallelize fetching symbol files in crashlog.py

When using dsymForUUID, the majority of time symbolication a crashlog
with crashlog.py is spent waiting for it to complete. Currently, we're
calling dsymForUUID sequentially when iterating over the modules. We can
drastically cut down this time by calling dsymForUUID in parallel. This
patch uses Python's ThreadPoolExecutor (introduced in Python 3.2) to
parallelize this IO-bound operation.

The performance improvement is hard to benchmark, because even with an
empty local cache, consecutive calls to dsymForUUID for the same UUID
complete faster. With warm caches, I'm seeing a ~30% performance
improvement (~90s -> ~60s). I suspect the gains will be much bigger for
a cold cache.

dsymForUUID supports batching up multiple UUIDs. I considered going that
route, but that would require more intrusive changes. It would require
hoisting the logic out of locate_module_and_debug_symbols which we
explicitly document [1] as a feature of Symbolication.py to locate
symbol files.

[1] https://lldb.llvm.org/use/symbolication.html

Differential reviison: https://reviews.llvm.org/D125107

2 years ago[GlobalISel] Combine G_SHL, G_ASHR, G_SHL of undef shifts to undef.
Amara Emerson [Thu, 5 May 2022 20:55:49 +0000 (13:55 -0700)]
[GlobalISel] Combine G_SHL, G_ASHR, G_SHL of undef shifts to undef.

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

2 years ago[BOLT][NFC] Use refs for loop variables to avoid copies
Amir Ayupov [Fri, 13 May 2022 19:14:17 +0000 (20:14 +0100)]
[BOLT][NFC] Use refs for loop variables to avoid copies

Addresses warnings when built with Apple Clang.

Reviewed By: yota9

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

2 years ago[BOLT][NFC] Suppress unused variable warnings
Amir Ayupov [Fri, 13 May 2022 18:56:45 +0000 (19:56 +0100)]
[BOLT][NFC] Suppress unused variable warnings

Address warnings in Release build without assertions.
Tip @tschuett for reporting the issue #55404.

Reviewed By: rafauler

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

2 years ago[ELF][test] Add an input section description test with "()" in the filename
Fangrui Song [Fri, 13 May 2022 19:02:14 +0000 (12:02 -0700)]
[ELF][test] Add an input section description test with "()" in the filename

2 years ago[ELF][test] Clean up linkerscript/{filename-spec.s,group.s}
Fangrui Song [Fri, 13 May 2022 18:53:03 +0000 (11:53 -0700)]
[ELF][test] Clean up linkerscript/{filename-spec.s,group.s}

2 years ago[BOLT][CMAKE] Add missing clauses to bolt/runtime/CMakeLists.txt
Amir Ayupov [Thu, 12 May 2022 17:29:41 +0000 (18:29 +0100)]
[BOLT][CMAKE] Add missing clauses to bolt/runtime/CMakeLists.txt

Fix build with Apple Clang.
Tip @tschuett for reporting the issue #55404.

Reviewed By: rafauler

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

2 years ago[runtimes] Fix how we trigger CI
Louis Dionne [Fri, 13 May 2022 18:43:43 +0000 (14:43 -0400)]
[runtimes] Fix how we trigger CI

For example, we used to trigger CI even for commits that touched a file
whose path contained 'cmake', even if it's not the root cmake directory.
Fix that.

2 years ago[OpenMP] Use the new OpenMP device static library when doing LTO
Joseph Huber [Tue, 10 May 2022 19:00:53 +0000 (15:00 -0400)]
[OpenMP] Use the new OpenMP device static library when doing LTO

The previous patches allowed us to create a static library containing
all the device code. This patch uses that library to perform the device
runtime linking late when performing LTO. This in addition to
simplifying the libraries, allows us to transparently handle the runtime
library as-needed without needing Clang to manually pass the necessary
library in the linker wrapper job.

Depends on D125315

Reviewed By: jdoerfert

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

2 years ago[Libomptarget] Build the device runtime as a static library
Joseph Huber [Tue, 10 May 2022 12:49:08 +0000 (08:49 -0400)]
[Libomptarget] Build the device runtime as a static library

This patch adds the necessary CMake configuration to build a static
library version of the device runtime, `libomptarget.devicertl.a`.
Various improvements in how we handle static libraries and generating
offloading code should allow us to treat the device library as a regular
project without needing to invoke the clang front-end directly. Here we
generate a job for each offloading architecture supported. Each
offloading architecture will be embedded into the static library and
used as-needed by the host.

This library will primarily be used to replace the bitcode library when
performing LTO. Currently, we need to manually pass in the bitcode
library which requires foreknowledge of the offloading architecture.
This approach lets us handle that in the linker wrapper instead.
Furthermore this should improve our interface to the device runtime. We
can now build it fully under a release build and have all the expected
entry points, as well as supporting debug builds.

Depends on D125265 D125256 D125260 D125314 D125563

Reviewed By: tianshilei1992

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

2 years ago[Libomptarget] Remove global include directory from libomptarget
Joseph Huber [Fri, 13 May 2022 17:07:46 +0000 (13:07 -0400)]
[Libomptarget] Remove global include directory from libomptarget

We used to globally include the libomptarget include directory for all
projects. This caused some conflicts with the other files named
"Debug.h". This patch changes the cmake to include these files via the
target include instead.

Reviewed By: tianshilei1992

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

2 years ago[OpenMP] Don't set device runtime debugging flags if using '-nogpulib'
Joseph Huber [Tue, 10 May 2022 13:45:39 +0000 (09:45 -0400)]
[OpenMP] Don't set device runtime debugging flags if using '-nogpulib'

We use globals to configure debugging at compile-time for the device
runtime. Because these are only used by the OpenMP runtime we shouldn't
define them if we aren't using the device runtime. When a user passes in
'-nogpulib' this indicates that we are not using the device runtime, so
we should check for the precense of this flag and not emit these globals
if used.

Reviewed By: jdoerfert

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

2 years ago[OpenMP] Don't include the device wrappers if -nostdinc is used
Joseph Huber [Mon, 9 May 2022 19:48:58 +0000 (15:48 -0400)]
[OpenMP] Don't include the device wrappers if -nostdinc is used

OpenMP uses several wrapper hearders to provide the definitions of
needed symbols contained in the host. However, some users may use the
`-nostdinc` option to override these definitions themselves. The OpenMP
wrapper headers are stored in the same location as the clang install. If
the user passes `-nostdinc` then this include directory is never looked
at by default which means that including these wrappers will always
fail. These headers should instead be included manually if they are
needed with a `-nostdinc` build.

Reviewed By: tra

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

2 years ago[OpenMP] Add `__CUDA_ARCH__` definition when offloading with OpenMP
Joseph Huber [Mon, 9 May 2022 19:10:04 +0000 (15:10 -0400)]
[OpenMP] Add `__CUDA_ARCH__` definition when offloading with OpenMP

Currently we define the `__CUDA_ARCH__` macro only in CUDA mode. This
patch allows us to use this macro in OpenMP-offloading mode when
targeting NVPTX.

Reviewed By: tra, tianshilei1992

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

2 years ago[Libomptarget] Address existing warnings in the device runtime library
Joseph Huber [Tue, 10 May 2022 21:33:41 +0000 (17:33 -0400)]
[Libomptarget] Address existing warnings in the device runtime library

This patche attemps to address the current warnings in the OpenMP
offloading device runtime. Previously we did not see these because we
compiled the runtime without the standard warning flags enabled.
However, these warnings are used when we now build the static library
version of this runtime. This became extremely noisy when coupled with
the fact the we compile each file roughly 32 times when all the
architectures are considered. So it would be ideal to not have all these
warnings show up when building.

Most of these errors were simply implicit switch-case fallthroughs,
which can be addressed using C++17's fallthrough attribute. Additionally
there was a volatile variable that was being casted away. This is most
likely safe to remove because we cast it away before its even used and
didn't seem to affect anything in testing.

Depends on D125260

Reviewed By: jdoerfert

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

2 years ago[Libomptarget] Allow the device runtime to be compiled for the host
Joseph Huber [Mon, 9 May 2022 18:22:59 +0000 (14:22 -0400)]
[Libomptarget] Allow the device runtime to be compiled for the host

Currently the OpenMP offloading device runtime is only expected to be
compiled for the specific architecture it's targeting. This is
problematic if we want to make compiling the device runtime more general
via the standar `clang` driver rather than invoking the clang front-end
directly. This patch addresses this by primarily changing the declare
type to `nohost` so the host will not contain any of this code.
Additionally we forward declare the functions that are defined via
variants, otherwise these would cause problems on the host.

Reviewed By: jdoerfert, tianshilei1992

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

2 years ago[runtimes][NFC] Remove dead code for Standalone builds
Louis Dionne [Fri, 13 May 2022 16:15:15 +0000 (12:15 -0400)]
[runtimes][NFC] Remove dead code for Standalone builds

Standalone builds have been deprecated and then removed for a while now.
Trying to use standalone builds leads to a fatal CMake error, so this
code is all dead. Remove it to clean things up.

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

2 years agoFix implicit double -> float truncation warnings. NFCI.
Simon Pilgrim [Fri, 13 May 2022 18:06:51 +0000 (19:06 +0100)]
Fix implicit double -> float truncation warnings. NFCI.

2 years ago[ELF] Disallow input section description without a filename
Fangrui Song [Fri, 13 May 2022 18:06:01 +0000 (11:06 -0700)]
[ELF] Disallow input section description without a filename

GNU ld does not allow `.foo : { (*foo) }`, but we may recognize it as three
input section descriptions: file "(" with any section name, file "*foo" with
any section name, file ")" with any section name. Disallow the error-prone usage.

Reviewed By: peter.smith

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

2 years agoRevert "[RISCV] Enable subregister liveness tracking for RVV."
Craig Topper [Fri, 13 May 2022 17:57:35 +0000 (10:57 -0700)]
Revert "[RISCV] Enable subregister liveness tracking for RVV."

This reverts most of ed242b54c9c2aa84a47f66af5b8497d93646b68d

I'm seeing failures in our intrinsic testing on qemu that seem
related to this. Reverting while I investigate.

I've left the command line option in place for directed testing.
It defaults to off.

2 years ago[CMake] Disable libedit in Fuchsia toolchain
Petr Hosek [Fri, 13 May 2022 17:45:08 +0000 (10:45 -0700)]
[CMake] Disable libedit in Fuchsia toolchain

We don't need libedit in our toolchain build.

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

2 years agoDAGCombiner.cpp - break if-else chains that always return (style)
Simon Pilgrim [Fri, 13 May 2022 17:31:15 +0000 (18:31 +0100)]
DAGCombiner.cpp - break if-else chains that always return (style)

2 years ago[libunwind] Remove -Wsign-conversion warning
Louis Dionne [Fri, 13 May 2022 17:24:57 +0000 (13:24 -0400)]
[libunwind] Remove -Wsign-conversion warning

2 years ago[RISCV] Address post-commit feedback from af5e09b
Philip Reames [Fri, 13 May 2022 16:51:23 +0000 (09:51 -0700)]
[RISCV] Address post-commit feedback from af5e09b

2 years ago[RISCV] Precommit tests showing missed vlenb optimizations
Philip Reames [Fri, 13 May 2022 16:29:35 +0000 (09:29 -0700)]
[RISCV] Precommit tests showing missed vlenb optimizations

2 years ago[libc++abi][NFCI] Refactor demangling_terminate_handler to reduce nesting
Louis Dionne [Tue, 10 May 2022 14:35:49 +0000 (10:35 -0400)]
[libc++abi][NFCI] Refactor demangling_terminate_handler to reduce nesting

This keeps the same logic, but uses early return to avoid multiple layers
of nested ifs and make the code simpler to follow.

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

2 years ago[CSSPGO][CSProfileConverter] Remove call target samples when including callee samples...
Hongtao Yu [Mon, 9 May 2022 20:23:59 +0000 (13:23 -0700)]
[CSSPGO][CSProfileConverter] Remove call target samples when including callee samples into caller.

When a flat CS profile is converted to a nested profile, the call target samples for inlined callee contexts are left over in the callsite target map. This could cause indirect call promotion to function improperly. One issue is that the inlined callsites are treated with double amount of samples. The other is the inlined callsites are reconsidered for subsequent PGO ICP.

I'm fixing this by excluding call targets from the callsite for inlined targets. While fixing this I found that callsite target sum and the number of body samples for that callsite could be mismatched. {D122609} has an explanation and a fix for that on llvm-profgen side. For now I'm tolerating it in this change.

Reviewed By: wenlei

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

2 years ago[RISCV] Add llvm.read.register support for vlenb
Philip Reames [Fri, 13 May 2022 16:01:19 +0000 (09:01 -0700)]
[RISCV] Add llvm.read.register support for vlenb

This patch adds minimal support for lowering an read.register intrinsic with vlenb as the argument. Note that vlenb is an implementation constant, so it is never allocatable.

This was split off a patch to eventually replace PseudoReadVLENB with a COPY MI because doing so revealed a couple of optimization opportunities which really seemed to warrant individual patches and tests. To write those patches, I need a way to write the tests involving vlenb, and read.register seemed like the right testing hook.

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

2 years ago[ParseResult] Mark this as LLVM_NODISCARD (like LogicalResult) and fix issues.
Chris Lattner [Fri, 13 May 2022 14:38:50 +0000 (15:38 +0100)]
[ParseResult] Mark this as LLVM_NODISCARD (like LogicalResult) and fix issues.

There are a lot of cases where we accidentally ignored the result of some
parsing hook.  Mark ParseResult as LLVM_NODISCARD just like ParseResult is.
This exposed some stuff to clean up, so do.

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

2 years ago[OpenMP] Fix declare simd use on in-class member template function
Mike Rice [Thu, 12 May 2022 16:33:53 +0000 (09:33 -0700)]
[OpenMP] Fix declare simd use on in-class member template function

Return the Decl when parsing the template member declaration so the
'omp declare simd' pragma can be applied to it. Previously a nullptr
was returned causing an error applying the pragma.

Fixes #52700.

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

2 years ago[InstSimplify] Add additional implied condition tests (NFC)
Nikita Popov [Fri, 13 May 2022 15:19:19 +0000 (17:19 +0200)]
[InstSimplify] Add additional implied condition tests (NFC)

2 years agoRevert "[clang-tidy] modernize-deprecated-headers check should respect extern "C...
Balazs Benics [Fri, 13 May 2022 15:06:55 +0000 (17:06 +0200)]
Revert "[clang-tidy] modernize-deprecated-headers check should respect extern "C" blocks"

This reverts commit 7e3ea55da88a9d7feaa22f29d51f89fd0152a189.

Looks like this breaks tests: http://45.33.8.238/linux/76033/step_8.txt

2 years ago[analyzer] Introduce clang_analyzer_dumpSvalType introspection function
Balazs Benics [Fri, 13 May 2022 10:34:45 +0000 (12:34 +0200)]
[analyzer] Introduce clang_analyzer_dumpSvalType introspection function

In some rare cases the type of an SVal might be interesting.
This introspection function exposes this information in tests.

Reviewed By: martong

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

2 years ago[analyzer][NFC] Tighten some of the SValBuilder return types
Balazs Benics [Fri, 13 May 2022 15:04:34 +0000 (17:04 +0200)]
[analyzer][NFC] Tighten some of the SValBuilder return types

This is purely a cosmetic change.

Reviewed By: martong

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

2 years ago[SDAG] freeze operand when expanging urem
Sanjay Patel [Fri, 13 May 2022 14:30:58 +0000 (10:30 -0400)]
[SDAG] freeze operand when expanging urem

This is a potential miscompile as discussed in issue #55291.

The related IR transform was patched with:
d428f09b2c9d49f6a32

2 years ago[x86] add test to show potential miscompile with undef value; NFC
Sanjay Patel [Fri, 13 May 2022 14:28:22 +0000 (10:28 -0400)]
[x86] add test to show potential miscompile with undef value; NFC

This is based on:
c2a5a87500d92c

2 years ago[clang-tidy] modernize-deprecated-headers check should respect extern "C" blocks
Balazs Benics [Fri, 13 May 2022 14:54:13 +0000 (16:54 +0200)]
[clang-tidy] modernize-deprecated-headers check should respect extern "C" blocks

The check should not report includes wrapped by `extern "C" { ... }` blocks,
such as:

```lang=C++
#ifdef __cplusplus
extern "C" {
#endif

#include "assert.h"

#ifdef __cplusplus
}
#endif
```

This pattern comes up sometimes in header files designed to be consumed
by both C and C++ source files.
The check now reports false reports when the header file is consumed by
a C++ translation unit.

In this change, I'm not emitting the reports immediately from the
`PPCallback`, rather aggregating them for further processing.
After all preprocessing is done, the matcher will be called on the
`TranslationUnitDecl`, ensuring that the check callback is called only
once.

Within that callback, I'm recursively visiting each decls, looking for
`LinkageSpecDecls` which represent the `extern "C"` specifier.
After this, I'm dropping all the reports coming from inside of it.
After the visitation is done, I'm emitting the reports I'm left with.

For performance reasons, I'm sorting the `IncludeMarkers` by their
corresponding locations.
This makes the scan `O(log(N)` when looking up the `IncludeMarkers`
affected by the given `extern "C"` block. For this, I'm using
`lower_bound()` and `upper_bound()`.

Reviewed By: whisperity

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

2 years ago[flang] Warn for the limit on name length
PeixinQiao [Fri, 13 May 2022 14:43:12 +0000 (22:43 +0800)]
[flang] Warn for the limit on name length

As fortran 2018 C601, the maximum length of a name is 63 characters.

Reviewed By: klausler

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

2 years ago[LoopVectorize] Regenerate test checks (NFC)
Nikita Popov [Fri, 13 May 2022 14:41:27 +0000 (16:41 +0200)]
[LoopVectorize] Regenerate test checks (NFC)

2 years ago[AIX] support write operation of big archive.
zhijian [Fri, 13 May 2022 14:40:15 +0000 (10:40 -0400)]
[AIX] support write operation of big archive.

SUMMARY

1. Enable supporting the write operation of big archive.
2. the first commit come from https://reviews.llvm.org/D104367
3. refactor the first commit and implement writing symbol table.
4. fixed the bugs and add more test cases in the second commit.

Reviewers: James Henderson
Differential Revision: https://reviews.llvm.org/D123949

2 years ago[X86] LowerStore - use is64BitVector() wrapper. NFCI.
Simon Pilgrim [Fri, 13 May 2022 14:29:51 +0000 (15:29 +0100)]
[X86] LowerStore - use is64BitVector() wrapper. NFCI.

2 years agoUpdate my office hours
Kristof Beyls [Fri, 13 May 2022 14:28:06 +0000 (16:28 +0200)]
Update my office hours

2 years agoTry to disambiguate between overloads on Mac
Aaron Puchert [Fri, 13 May 2022 14:26:31 +0000 (16:26 +0200)]
Try to disambiguate between overloads on Mac

Presumably Mac has a different understanding of how long `long` is.
Should fix a build error introduced by D125429 that's not visible on
other architectures.

2 years ago[APInt] Fix documentation of *OrSelf methods
Jay Foad [Fri, 13 May 2022 13:17:23 +0000 (14:17 +0100)]
[APInt] Fix documentation of *OrSelf methods

Document that truncOrSelf, zextOrSelf and sextOrSelf only enforce
an upper or lower bound on the bitwidth of the result.

2 years agoRemove a stale FIXME comment; NFC
Aaron Ballman [Fri, 13 May 2022 14:23:23 +0000 (10:23 -0400)]
Remove a stale FIXME comment; NFC

2 years ago[ValueTracking] recognize sub X, (X % Y) as not overflowing
Sanjay Patel [Fri, 13 May 2022 13:15:22 +0000 (09:15 -0400)]
[ValueTracking] recognize sub X, (X % Y) as not overflowing

I fixed some poison-safety violations on related patterns in InstCombine
and noticed that we missed adding nsw/nuw on them, so this adds clauses
to the underlying analysis for that.

We need the undef input restriction to make this safe according to Alive2:
https://alive2.llvm.org/ce/z/48g9K8

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

2 years ago[InstCombine] add tests for sub with rem operand; NFC
Sanjay Patel [Thu, 12 May 2022 20:08:51 +0000 (16:08 -0400)]
[InstCombine] add tests for sub with rem operand; NFC

2 years agoRevert "In MSVC compatibility mode, friend function declarations behave as function...
Nico Weber [Fri, 13 May 2022 13:48:01 +0000 (09:48 -0400)]
Revert "In MSVC compatibility mode, friend function declarations behave as function declarations"

This reverts commit ad47114ad8500c78046161d492ac13a8e3e610eb.
See discussion on https://reviews.llvm.org/D124613.

2 years ago[MSVC] Add support for pragma function
Stephen Long [Fri, 13 May 2022 13:39:19 +0000 (06:39 -0700)]
[MSVC] Add support for pragma function

MSVC pragma function tells the compiler to generate calls to functions in the pragma function list, instead of using the builtin. Needs https://reviews.llvm.org/D124701

https://docs.microsoft.com/en-us/cpp/preprocessor/function-c-cpp?view=msvc-170

Reviewed By: aaron.ballman

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

2 years ago[SystemZ] Patchset for expanding memcpy/memset using at most two stores.
Jonas Paulsson [Tue, 8 Mar 2022 20:51:43 +0000 (15:51 -0500)]
[SystemZ] Patchset for expanding memcpy/memset using at most two stores.

* Set MaxStoresPerMemcpy and MaxStoresPerMemset to 2.

* Optimize stores of replicated values in SystemZ::combineSTORE(). This
  handles the now expanded memory operations and as well some other
  pre-existing cases.

* Reject a big displacement in isLegalAddressingMode() for a vector type.

* Return true from shouldConsiderGEPOffsetSplit().

Reviewed By: Ulrich Weigand

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

2 years ago[ControlHeightReduction] Simplify addToMergedCondition() (NFC)
Nikita Popov [Fri, 13 May 2022 13:29:20 +0000 (15:29 +0200)]
[ControlHeightReduction] Simplify addToMergedCondition() (NFC)

2 years agoSuggest typo corrections for preprocessor directives
Ken Matsui [Fri, 13 May 2022 13:09:32 +0000 (09:09 -0400)]
Suggest typo corrections for preprocessor directives

When a preprocessor directive is unknown outside of a skipped
conditional block, we give an error diagnostic because we don't know
how to proceed with preprocessing. But when the directive is in a
skipped conditional block, we would not diagnose it on the theory that
the directive may be known to an implementation other than Clang.

Now, for unknown directives inside a skipped conditional block, we
diagnose the unknown directive as a warning if it is sufficiently
similar to a directive specific to preprocessor conditional blocks. For
example, we'll warn about `#esle` and suggest `#else` but we won't warn
about `#progma` because it's not a directive specific to preprocessor
conditional blocks.

Fixes #51598

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

2 years ago[LoopVectorize] Add overflow checks when tail-folding with scalable vectors
David Sherwood [Fri, 6 May 2022 14:14:06 +0000 (15:14 +0100)]
[LoopVectorize] Add overflow checks when tail-folding with scalable vectors

In InnerLoopVectorizer::getOrCreateVectorTripCount there is an
assert that the known minimum value for the VF is a power of 2
when tail-folding is enabled. However, for scalable vectors the
value of vscale may not be a power of 2, which means we have
to worry about the possibility of overflow. I have solved this
problem by adding preheader checks that prevent us from entering
the vector body if the canonical IV would overflow, i.e.

  if ((IntMax - TripCount) < (VF * UF)) ... skip vector loop ...

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

2 years ago[InstSimplify] Fold and/or using implied conditions
Nikita Popov [Fri, 13 May 2022 08:38:33 +0000 (10:38 +0200)]
[InstSimplify] Fold and/or using implied conditions

This adds two conjugated folds:

 * A | B -> B if A implies B (https://alive2.llvm.org/ce/z/R6GU4j)
 * A & B -> A if A implies B (https://alive2.llvm.org/ce/z/EGMqyy)

If A and B are icmps themselves, we will usually fold this through
other logic already (though the tests show a couple additional cases
we previously missed). However, isImpliedCond() also supports A
being of the form X & Y, which allows us to handle cases like
(X & Y) | B where X implies B. This addresses the regression from
D125398.

Something that notably doesn't work yet is the (X | Y) & B case.
This is due to an asymmetry in the isImpliedCondition()
implementation that will have to be addressed separately.

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

2 years ago[SLP][X86] Add common CHECK prefix to sub-128-bit vector tests
Simon Pilgrim [Fri, 13 May 2022 13:07:27 +0000 (14:07 +0100)]
[SLP][X86] Add common CHECK prefix to sub-128-bit vector tests

2 years agofix typos to cycle bots
Nico Weber [Fri, 13 May 2022 12:56:54 +0000 (08:56 -0400)]
fix typos to cycle bots

2 years ago[libc++] Overhaul how we select the ABI library
Louis Dionne [Tue, 1 Mar 2022 13:42:13 +0000 (08:42 -0500)]
[libc++] Overhaul how we select the ABI library

This patch overhauls how we pick up the ABI library. Instead of setting
ad-hoc flags, it creates interface targets that can be linked against by
the rest of the build, which is easier to follow and extend to support
new ABI libraries.

This is intended to be a NFC change, however there are some additional
simplifications and improvements we can make in the future that would
require a slight behavior change.

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

2 years agoSilence some false positive -Wstrict-prototype warnings
Aaron Ballman [Fri, 13 May 2022 12:25:40 +0000 (08:25 -0400)]
Silence some false positive -Wstrict-prototype warnings

Before issuing the warning about use of a strict prototype, check if
the declarator is required to have a prototype through some other means
determined at parse time.

This silences false positives in OpenCL code (where the functions are
forced to have a prototype) and block literal expressions.

2 years ago[IRBuilder] Add IsInBounds parameter to CreateGEP()
Nikita Popov [Fri, 13 May 2022 10:48:52 +0000 (12:48 +0200)]
[IRBuilder] Add IsInBounds parameter to CreateGEP()

We commonly want to create either an inbounds or non-inbounds GEP
based on a boolean value, e.g. when preserving inbounds from
existing GEPs. Directly accept such a boolean in the API, rather
than requiring a ternary between CreateGEP and CreateInBoundsGEP.

This change is not entirely NFC, because we now preserve an
inbounds flag in a constant expression edge-case in InstCombine.

2 years ago[ConstraintElimination] Simplify ssub(A,B) if B s>=b && B s>=0.
Florian Hahn [Fri, 13 May 2022 12:19:41 +0000 (13:19 +0100)]
[ConstraintElimination] Simplify ssub(A,B) if B s>=b && B s>=0.

A first patch to use the reasoning in ConstraintElimination to simplify
sub with overflow to a regular sub, if the operation is guaranteed to
not overflow.

Reviewed By: spatel

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

2 years agoComment parsing: Treat properties as zero-argument inline commands
Aaron Puchert [Fri, 13 May 2022 11:47:22 +0000 (13:47 +0200)]
Comment parsing: Treat properties as zero-argument inline commands

That is more accurate, and using a separate class in TableGen seems
appropriate since these are not parts of the text but properties of the
declaration itself.

Reviewed By: gribozavr2

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

2 years agoComment parsing: Allow inline commands to have 0 or more than 1 argument
Aaron Puchert [Fri, 13 May 2022 11:37:30 +0000 (13:37 +0200)]
Comment parsing: Allow inline commands to have 0 or more than 1 argument

That's required to support `\n`, but can also be used for other commands.
We already had the infrastructure in place to parse a varying number of
arguments, we simply needed to generalize it so that it would work not
only for block commands.

This should fix #55319.

Reviewed By: gribozavr2

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

2 years agoComment parsing: Specify argument numbers for some block commands
Aaron Puchert [Fri, 13 May 2022 11:36:05 +0000 (13:36 +0200)]
Comment parsing: Specify argument numbers for some block commands

The command traits have a member NumArgs for which all the parsing
infrastructure is in place, but no command was setting it to a value
other than 0. By doing so we get warnings when passing an empty
paragraph to \retval (the first argument is the return value, then comes
the description). We also take \xrefitem along for the ride, although as
the documentation states it's unlikely to be used directly.

Reviewed By: gribozavr2

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

2 years ago[demangler] Avoid special-subst code duplication
Nathan Sidwell [Mon, 28 Mar 2022 19:55:45 +0000 (12:55 -0700)]
[demangler] Avoid special-subst code duplication

We need to expand special substitutions in four different ways.  This
refactors to only have one conversion from enum to string, and derive
the other 3 needs off that.

The SpecialSubstitution node is derived from the
ExpandedSpecialSubstitution.  While this may seem unintuitive, it
works out quite well, as SpecialSubstitution can then use the former's
getBaseName and remove an unneeded 'basic_' prefix, for those
substitutions that are instantiations (to known typedef).  Similarly
all those instantiations use the same set of template arguments (with
'basic_string', getting an additional 'allocator' arg).

Expansion tests were added in D123134, and remain unchanged.

Reviewed By: MaskRay, dblaikie

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

2 years ago[mlir] Fix declaration of nano time function in benchmark infra
Denys Shabalin [Mon, 9 May 2022 10:46:36 +0000 (12:46 +0200)]
[mlir] Fix declaration of nano time function in benchmark infra

In d4555698f89af373f43dcb4aa1587231496bcd31, the name of nano precision timer function has changed from `nano_time` to `nanoTime`, but benchmarks were not updated to reflect that. This change addresses the discrepancy.

Reviewed By: ftynse

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

2 years ago[X86] Add tests for vector widening with freeze(undef)
Simon Pilgrim [Fri, 13 May 2022 11:08:02 +0000 (12:08 +0100)]
[X86] Add tests for vector widening with freeze(undef)

As noted on D103874, the 'no-op' vector widening intrinsics currently depend on undef shuffle mask indices, moving to poison we need to adjust this to reference a 'undefined' second vector operand, which will be a freeze(undef).

2 years ago[ASTMatchers][clang-tidy][NFC] Hoist `forEachTemplateArgument` matcher into the core...
Whisperity [Wed, 11 May 2022 13:33:27 +0000 (15:33 +0200)]
[ASTMatchers][clang-tidy][NFC] Hoist `forEachTemplateArgument` matcher into the core library

Fixes the `FIXME:` related to adding `forEachTemplateArgument` to the
core AST Matchers library.

Reviewed By: aaron.ballman

Differential Revision: http://reviews.llvm.org/D125383

2 years ago[MLIR] Fix areIdsUnique in AffineStructures
Groverkss [Fri, 13 May 2022 10:44:27 +0000 (16:14 +0530)]
[MLIR] Fix areIdsUnique in AffineStructures

This patch fixes a bug in areIdsUnique where it ignores the [start, end] range.

No test case is added since there are no use cases through IR from where it
can be tested, and it is hard to create a unittest since we do not currently
have Values in unittests.

Reviewed By: arjunp

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

2 years ago[InstCombine] Fix unused variable warning (NFC)
Nikita Popov [Fri, 13 May 2022 10:42:53 +0000 (12:42 +0200)]
[InstCombine] Fix unused variable warning (NFC)

2 years ago[IRBuilder] Remove redundant createGEP() overloads (NFC)
Nikita Popov [Fri, 13 May 2022 10:42:03 +0000 (12:42 +0200)]
[IRBuilder] Remove redundant createGEP() overloads (NFC)

ArrayRef<Value *> also accepts a single Value *, there's no need
to create separate overloads for this.

2 years agoAdd cmake dependency for TensorToLinalg
Tres Popp [Fri, 13 May 2022 10:33:06 +0000 (12:33 +0200)]
Add cmake dependency for TensorToLinalg

2 years ago[ArgPromotion] Add tests for already seen offsets (NFC)
Pavel Samolysov [Fri, 13 May 2022 09:57:16 +0000 (12:57 +0300)]
[ArgPromotion] Add tests for already seen offsets (NFC)

If a load with the same offset has already been seen but the load had
a lower alignment, the pass has to check whether the pointer is
dereferenceable and is sufficiently aligned (so, the new alignment must
be taken into account).

2 years ago[mlir] Add TensorToLinalgPass
Tres Popp [Wed, 11 May 2022 12:10:12 +0000 (14:10 +0200)]
[mlir] Add TensorToLinalgPass

This pass is to handle computationally complex operations like
tensor.pad which are not simply lowered to the exact same operation in
the memref dialect.

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

2 years ago[InstSimplify] Add tests for and/or with implied conditions (NFC)
Nikita Popov [Fri, 13 May 2022 10:07:57 +0000 (12:07 +0200)]
[InstSimplify] Add tests for and/or with implied conditions (NFC)

2 years ago[gn build] Port 3a24df992cf8
LLVM GN Syncbot [Fri, 13 May 2022 09:48:26 +0000 (09:48 +0000)]
[gn build] Port 3a24df992cf8

2 years ago[ARM] Pass for Cortex-A57 and Cortex-A72 Fused AES Erratum
Archibald Elliott [Fri, 13 May 2022 09:40:43 +0000 (10:40 +0100)]
[ARM] Pass for Cortex-A57 and Cortex-A72 Fused AES Erratum

This adds a late Machine Pass to work around a Cortex CPU Erratum
affecting Cortex-A57 and Cortex-A72:
- Cortex-A57 Erratum 1742098
- Cortex-A72 Erratum 1655431

The pass inserts instructions to make the inputs to the fused AES
instruction pairs no longer trigger the erratum. Here the pass errs on
the side of caution, inserting the instructions wherever we cannot prove
that the inputs came from a safe instruction.

The pass is used:
- for Cortex-A57 and Cortex-A72,
- for "generic" cores (which are used when using `-march=`),
- when the user specifies `-mfix-cortex-a57-aes-1742098` or
  `mfix-cortex-a72-aes-1655431` in the command-line arguments to clang.

Reviewed By: dmgreen, simon_tatham

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

2 years ago[mlir] use dynamic sections in MLIR Doxygen
Alex Zinenko [Fri, 13 May 2022 09:41:23 +0000 (11:41 +0200)]
[mlir] use dynamic sections in MLIR Doxygen

Due to an apparent bug in the Doxygen version <1.8.16 used to generate
documentation for MLIR, parts of the navigation (specifically, the lists
of inherited methods for classes) are unusable due to dynsections.js
missing from the output generated by Doxygen. Setting this flag makes
Doxygen always produce the file.

2 years ago[NFC][ARM] Tests for Cortex-A57 and Cortex-A72 Fused AES Erratum
Archibald Elliott [Fri, 13 May 2022 09:38:19 +0000 (10:38 +0100)]
[NFC][ARM] Tests for Cortex-A57 and Cortex-A72 Fused AES Erratum

These are the tests for the pass added in
https://reviews.llvm.org/D119720

Reviewed By: dmgreen

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

2 years ago[mlir][sparse][NFC] Use RewriterBase/OpBuilder when possible
Matthias Springer [Fri, 13 May 2022 09:32:14 +0000 (11:32 +0200)]
[mlir][sparse][NFC] Use RewriterBase/OpBuilder when possible

Most functions do not need a PatternRewriter or ConversionPatternRewriter.

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

2 years ago[mlir][bufferize][NFC] Make getContiguousMemRefType a static function
Matthias Springer [Fri, 13 May 2022 09:26:40 +0000 (11:26 +0200)]
[mlir][bufferize][NFC] Make getContiguousMemRefType a static function

No need to expose this as public API anymore.

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