platform/upstream/llvm.git
18 months ago[SLP][NFC] Test showing a cost estimation issue caused by f82eb7e066f322a231627383fc8...
Vasileios Porpodas [Wed, 19 Apr 2023 00:47:18 +0000 (17:47 -0700)]
[SLP][NFC] Test showing a cost estimation issue caused by f82eb7e066f322a231627383fc80522d98ce6181

The buildvector cost for the case shown in the test should be 0 but it is -1, causing the code to get vectorized, whenit shouldn't.

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

18 months ago[libc++] Remove symbols for a std::allocator_arg & friends from the dylib
Louis Dionne [Mon, 6 Mar 2023 21:14:06 +0000 (16:14 -0500)]
[libc++] Remove symbols for a std::allocator_arg & friends from the dylib

This patch removes the symbols defined in the library for std::allocator_arg,
std::defer_lock, std::try_to_lock, std::adopt_lock, and std::piecewise_construct.
Those were defined in the library because we provided them in C++03 as an
extension, and in C++03 it was impossible to define them as `constexpr`
variables, like in the spec.

This is technically an ABI break since we are removing symbols from the
library. However, in practice, only programs compiled in C++03 mode who
take the address of those objects (or pass them as a reference) will have
an undefined ref to those symbols. In practice, this is expected to be
rare. First, those are C++11 features that we happen to provide in C++03,
and only the C++03 definition can potentially lead to code referencing
the dylib definition. So any code that is using these objects but compiling
in C++11 mode (as they should) is not at risk. Second, all uses of these
types in the library is done by passing those types by value to a function
that can get inlined. Since they are empty types, the compiler won't
generate an undefined reference if passed by value, since there's nothing
to pass anyway.

Long story short, the risk for code actually containing an undefined
reference to one of these types is rather small (but non-zero). I also
couldn't find any app on the App Store that referenced these symbols,
which supports my impression that this won't be an issue in practice.

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

18 months ago[lldb][NFCI] Stop creating additional temporary string in Log::VAPrintf
Alex Langford [Tue, 18 Apr 2023 23:46:12 +0000 (16:46 -0700)]
[lldb][NFCI] Stop creating additional temporary string in Log::VAPrintf

Instead of creating a std::string from the `SmallString`,
let's just use a std::string from the start. I initially tried to make
`SmallString` work but getting it right proved complicated because
`LogHandler::Emit` will take its `StringRef` parameter and touch the raw
`const char *` from it directly, which isn't guaranteed to be
null-terminated with a `SmallString`.

I changed `WriteMessage` to take a `StringRef` instead of a
`const std::string &` for flexibility.

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

18 months ago[MemProf] Fix bot failure about missing return value along all paths
Teresa Johnson [Wed, 19 Apr 2023 21:05:26 +0000 (14:05 -0700)]
[MemProf] Fix bot failure about missing return value along all paths

Fixes warning treated as error from
https://lab.llvm.org/buildbot/#/builders/13/builds/34440:
  'llvm::LibCallSimplifier::optimizeNew': not all control paths return a value
after a35206d78280e0ebcf48cd21bc5fff5c3b9c73fa.

Change assert in default case to a return nullptr, so we have a
reasonable fallback if invoked on a different library function, and no
longer get the above warning.

18 months ago[DebugInfo] printCompactDWARFExpr: don't assert on stack size
Scott Linder [Wed, 8 Feb 2023 20:01:42 +0000 (20:01 +0000)]
[DebugInfo] printCompactDWARFExpr: don't assert on stack size

Gracefully handle non-1 stack sizes in printCompactDWARFExpr rather than
assert. Add support for DW_OP_nop and test the zero-sized stack case.

This is intended to be nearly NFC.

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

18 months ago[HeterogeneousDWARF] Update encodings in AMDGPUDwarfExtensionsForHeterogeneousDebuggi...
Scott Linder [Thu, 23 Feb 2023 19:53:47 +0000 (19:53 +0000)]
[HeterogeneousDWARF] Update encodings in AMDGPUDwarfExtensionsForHeterogeneousDebugging.rst

Repurpose the DW_OP_LLVM_aspace_implicit_pointer encoding (0xe9) as the
encoding for a new operation DW_OP_LLVM_user which prefixes all other
new operations.

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

18 months ago[MemProf] Optionally pass hot/cold hints to operator new
Teresa Johnson [Wed, 19 Apr 2023 15:21:52 +0000 (08:21 -0700)]
[MemProf] Optionally pass hot/cold hints to operator new

Optionally (off by default) replace operator new() calls marked with a
hot or cold memprof attribute with an operator new() call that takes a
hot_cold_t parameter.

Currently this is supported by the open source version of tcmalloc, see:
https://github.com/google/tcmalloc/blob/master/tcmalloc/new_extension.h

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

18 months ago[libc] Fix `nvptx_options` variable not being reset in CMake
Joseph Huber [Wed, 19 Apr 2023 20:27:33 +0000 (15:27 -0500)]
[libc] Fix `nvptx_options` variable not being reset in CMake

Summary:
This variable was not being reset, which caused the options to be
compounded when building multiple architectures. This was very
problematic as the architectures are not compatible.

18 months ago[libc++abi] Make the error message for recursive initialization of function-local...
Louis Dionne [Tue, 18 Apr 2023 12:46:49 +0000 (12:46 +0000)]
[libc++abi] Make the error message for recursive initialization of function-local statics more explicit

The new message is a bit verbose, but it makes it clearer that this isn't
a problem in libc++abi, but instead a problem in the user's code. Otherwise,
we get bugs sent down to libc++abi because people see this message in their
crash logs.

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

18 months ago[Driver] Make -fsanitize=kcfi,function incompatible
Fangrui Song [Wed, 19 Apr 2023 20:15:33 +0000 (13:15 -0700)]
[Driver] Make -fsanitize=kcfi,function incompatible

A -fsanitize=kcfi instrumented function has a special instruction/data
before the function entry at a fixed offset.
A -fsanitize=function instrumented function has special instruction/data
after the function entry at a fixed offset (may change to *before* in D148665).

The two instrumentations are not intended to be used together and will become
incompatible after D148665.

Reviewed By: samitolvanen

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

18 months ago[Driver] -fsanitize=kcfi doesn't need RequiresPIE
Fangrui Song [Wed, 19 Apr 2023 20:10:46 +0000 (13:10 -0700)]
[Driver] -fsanitize=kcfi doesn't need RequiresPIE

As mentioned on D148671: this is unneeded. This commit is a no-op for most Linux
builds since CLANG_DEFAULT_PIE_ON_LINUX defaults to 1.

18 months ago[libunwind] [SEH] Add debug logging in __libunwind_seh_personality
Martin Storsjö [Tue, 18 Apr 2023 12:04:57 +0000 (15:04 +0300)]
[libunwind] [SEH] Add debug logging in __libunwind_seh_personality

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

18 months ago[compiler-rt] [test] [ubsan] Mark failing tests as unsupported for mingw configs
Martin Storsjö [Wed, 12 Apr 2023 09:12:28 +0000 (09:12 +0000)]
[compiler-rt] [test] [ubsan] Mark failing tests as unsupported for mingw configs

All of these are already unsupported for MSVC style configs. For
some cases, simplify the regex to match any windows triple, while
for others, mention windows-msvc and windows-gnu specifically,
if they are separate cases that happen to fail for different reasons.

-fsanitize=function is unsupported both in mingw and MSVC modes.

The vptr tests expect to get demangled C++ type info names, but
Itanium C++ typenames don't get demangled by ubsan on Windows.

The test that tries to build a .so doesn't work as such on
Windows.

While mingw toolchains do support weak symbols, the relevant
sanitizer symbols aren't made weak on Windows.

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

18 months ago[OpenMP] Prefix outlined and reduction func names with original func's name
Itay Bookstein [Fri, 23 Dec 2022 09:35:47 +0000 (11:35 +0200)]
[OpenMP] Prefix outlined and reduction func names with original func's name

This patch prefixes omp outlined helpers and reduction funcs
with the original function's name.

Reviewed By: jdoerfert

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

18 months agoworkflows/release-binaries: Add missing output variable
Tom Stellard [Wed, 19 Apr 2023 19:58:59 +0000 (12:58 -0700)]
workflows/release-binaries: Add missing output variable

Reviewed By: thieta

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

18 months ago[cmake] Explicitly disable download step
Vitaly Buka [Wed, 19 Apr 2023 19:51:00 +0000 (12:51 -0700)]
[cmake] Explicitly disable download step

Fixes the following on cmake version 3.24.2:
'tools/clang/runtime/compiler-rt-stamps/compiler-rt-source_dirinfo.txt',
needed by 'tools/clang/runtime/compiler-rt-stamps/compiler-rt-download',
missing and no known rule to make it

Maybe related to https://cmake.org/cmake/help/latest/release/3.24.html#modules

18 months ago[BOLT][NFC] Move phdr typedef to cpp file
Nathan Sidwell [Tue, 18 Apr 2023 22:14:21 +0000 (18:14 -0400)]
[BOLT][NFC] Move phdr typedef to cpp file

This typedef is only used inside the RewriteInstance source file, let's not
expose it in the header file -- even if private.

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

18 months ago[BOLT] Adjust Shdr alignment
Nathan Sidwell [Tue, 18 Apr 2023 22:13:16 +0000 (18:13 -0400)]
[BOLT] Adjust Shdr alignment

Shdr's are not necesarily size 2^n, and there is no reason to align to
that boundary if they are.

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

18 months ago[libc++] Add helper script libcxx-lit for running tests
Louis Dionne [Tue, 18 Apr 2023 13:25:16 +0000 (13:25 +0000)]
[libc++] Add helper script libcxx-lit for running tests

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

18 months ago[InferAttrs] Mark frexp and modf as memory(argmem: write)
Daniel Woodworth [Wed, 19 Apr 2023 19:23:57 +0000 (15:23 -0400)]
[InferAttrs] Mark frexp and modf as memory(argmem: write)

These two math library functions can't write to errno, but they do
produce two results and store the second result to a pointer passed as
their second argument. Appropriately marking them as
memory(argmem: write) enables more optimizations on calls to them.

Reviewed By: xbolva00

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

18 months ago[CMake] Switch back to -fPIC for Fuchsia Toolchain
Daniel Thornburgh [Mon, 17 Apr 2023 22:54:11 +0000 (15:54 -0700)]
[CMake] Switch back to -fPIC for Fuchsia Toolchain

This reverts commit 1fab236e6e4575d5af4f4722216df4dd6a872795.

Shipping LLDB means distributing libLLDB.so, which will need to be built
with PIC. Disabling PIC also removes the libLTO target, which is a hard
dependency of the LLDB test suite.

Reviewed By: abrachet

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

18 months ago[MLIR][LLVM] Realign allocas to avoid dynamic realignment in inliner.
Johannes de Fine Licht [Tue, 18 Apr 2023 15:17:13 +0000 (15:17 +0000)]
[MLIR][LLVM] Realign allocas to avoid dynamic realignment in inliner.

When the natural stack alignment is not set or is larger than or equal
to the target alignment required by a read-only byval argument defined
by an alloca, avoid the copy by just realigning the alloca to the target
alignment.

The code to check existing alignment is reorganized a bit to avoid
redundant casts.

This also includes a bugfix for passing a null DataLayoutInterface to
the DataLayout constructor when no parent op defines
DataLayoutInterface, and will now pass ModuleOp instead in this case.

Reviewed By: gysit

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

18 months ago[pseudo] Use shared copy of bundle_resources.py
Sam McCall [Wed, 19 Apr 2023 18:38:15 +0000 (20:38 +0200)]
[pseudo] Use shared copy of bundle_resources.py

18 months agoRevert D146987 "[Assignment Tracking] Enable by default"
OCHyams [Wed, 19 Apr 2023 18:16:40 +0000 (19:16 +0100)]
Revert D146987 "[Assignment Tracking] Enable by default"

This reverts commit 89d27854ec7f5e8bd83e72fa574740bf3d06355b.

See https://reviews.llvm.org/D146987 for issues.

18 months ago[gn build] Port a443b3d18ef4 (HTMLLogger.inc)
Nico Weber [Wed, 19 Apr 2023 17:52:40 +0000 (13:52 -0400)]
[gn build] Port a443b3d18ef4 (HTMLLogger.inc)

Similar to 374db8fc2e49f.

18 months ago[mlir] Allow to specify target type in `convertType`
Jakub Kuderski [Wed, 19 Apr 2023 17:51:13 +0000 (13:51 -0400)]
[mlir] Allow to specify target type in `convertType`

Add a new helper function for the type converter that takes care of
casting to the target type.

This is to avoid bugs where an incorrect cast function is used after
type conversion, e.g., `dyn_cast` or `cast`. These are not guaranteed to
work when type conversion fails, or when type conversion succeeds but
the provided type converted returned a type that a conversion pattern
did not expect.

I saw this being an issue in some SPIR-V passes and in mlir-hlo.

Exercise the new function in a couple of passes. As a side-effect, this
also made the code more concise.

Reviewed By: rriddle, mehdi_amini

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

18 months agoRevert "[lldb] Fix bug to update process public run lock with process state"
Med Ismail Bennani [Wed, 19 Apr 2023 17:46:17 +0000 (10:46 -0700)]
Revert "[lldb] Fix bug to update process public run lock with process state"

This reverts commit 14f00213b202a82b895a6ab749262d4382435012.

18 months ago[mlir][openacc] Keep region when applying data operand conversion
Valentin Clement [Wed, 19 Apr 2023 17:27:15 +0000 (10:27 -0700)]
[mlir][openacc] Keep region when applying data operand conversion

Keep the region when the operation has one. The previous code
was throwing away the region when creating the new version
of the operation.

Reviewed By: razvanlupusoru

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

18 months ago[clang] makes `__is_trivially_equality_comparable` available as a struct
Christopher Di Bella [Wed, 19 Apr 2023 00:58:43 +0000 (00:58 +0000)]
[clang] makes `__is_trivially_equality_comparable` available as a struct

Since this was originally a name in library, it needs an escape hatch
for versions of Clang that are slightly out-of-sync with libc++.

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

18 months ago[docs] Remove a duplicate or unnecessary 'to' in a sentence.
Hiroshi Yamauchi [Tue, 18 Apr 2023 20:05:52 +0000 (13:05 -0700)]
[docs] Remove a duplicate or unnecessary 'to' in a sentence.

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

18 months ago[lldb] Fix bug to update process public run lock with process state
Med Ismail Bennani [Wed, 19 Apr 2023 06:35:45 +0000 (23:35 -0700)]
[lldb] Fix bug to update process public run lock with process state

This patch should address an issue that caused the process public run
lock to not be updated during a process launch/attach when the process
stops.

That caused the public run lock to report its state as running while the
process state is stopped. This prevents the users to interact with the
process (through the command line or via the SBAPI) since it's
considered still running.

To address that, this patch refactors the name of the internal hijack
listeners to a specific pattern `lldb.internal.<action>.hijack` that
are used to ensure that we've attached to or launched a process successfully.

Then, when updating the process public state, after updating the state
value, if the process is not hijacked externally, meaning if the process
doens't have a hijack listener that matches the internal hijack
listeners pattern, we can update the public run lock accordingly.

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

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
18 months ago[Header][doc] Tweak wording for MWAIT[X] intrinsics
Paul Robinson [Wed, 19 Apr 2023 16:57:17 +0000 (09:57 -0700)]
[Header][doc] Tweak wording for MWAIT[X] intrinsics

18 months agoRevert "[OpenMP] Prefix outlined and reduction func names with original func's name"
Itay Bookstein [Wed, 19 Apr 2023 16:08:11 +0000 (19:08 +0300)]
Revert "[OpenMP] Prefix outlined and reduction func names with original func's name"

This reverts commit 029bfc311d4d7d3cd90be81bb08c046848796d02.

18 months ago[Headers][doc] Add/revise MONITOR/MWAIT descriptions
Paul Robinson [Tue, 18 Apr 2023 19:37:49 +0000 (12:37 -0700)]
[Headers][doc] Add/revise MONITOR/MWAIT descriptions

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

18 months ago[flang] Semantics for !DIR$ IGNORE_TKR
Peter Klausler [Mon, 10 Apr 2023 18:05:03 +0000 (11:05 -0700)]
[flang] Semantics for !DIR$ IGNORE_TKR

Implement semantics for the IGNORE_TKR directive as it is interpreted
by the PGI / NVFORTRAN compiler.

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

18 months ago[OpenMP] Prefix outlined and reduction func names with original func's name
Itay Bookstein [Fri, 23 Dec 2022 09:35:47 +0000 (11:35 +0200)]
[OpenMP] Prefix outlined and reduction func names with original func's name

This patch attempts to prefix omp outlined helpers and reduction funcs
with the original function's name.

Reviewed By: jdoerfert

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

18 months ago[compiler-rt] [test] [profile] Generalize existing MSVC XFAILs to cover mingw too
Martin Storsjö [Wed, 12 Apr 2023 11:45:41 +0000 (11:45 +0000)]
[compiler-rt] [test] [profile] Generalize existing MSVC XFAILs to cover mingw too

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

18 months ago[compiler-rt] [test] Don't override config.unsupported in TestCases/Windows
Martin Storsjö [Fri, 14 Apr 2023 20:58:34 +0000 (20:58 +0000)]
[compiler-rt] [test] Don't override config.unsupported in TestCases/Windows

This is a leftover from when these tests were added in
2bdca2006941a3a7de8e16ea9af9a758b367ee32 in 2014 (when the toplevel
asan/lit.cfg set "config.unsupported = True" on Windows). When the
common tests were included on Windows in
89d994367a597134fa7e1724314044e217718165 in 2015, that commit should
have removed the now unnecessary "config.unsupported = False" line here.

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

18 months ago[libcxx] [ci] Run the libcxxabi and libunwind tests in mingw configurations
Martin Storsjö [Wed, 5 Apr 2023 12:25:09 +0000 (15:25 +0300)]
[libcxx] [ci] Run the libcxxabi and libunwind tests in mingw configurations

The check-runtimes function runs check-cxx, check-cxxabi and check-unwind.

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

18 months ago[TTI][BPF] Ensure ArgumentPromotion Not Exceeding Target MaxArgs
Yonghong Song [Mon, 17 Apr 2023 18:11:59 +0000 (11:11 -0700)]
[TTI][BPF] Ensure ArgumentPromotion Not Exceeding Target MaxArgs

With LLVM patch https://reviews.llvm.org/D148269, we hit a linux kernel
bpf selftest compilation failure like below:
  ...
  progs/test_xdp_noinline.c:739:8: error: too many args to t8: i64 = GlobalAddress<ptr @encap_v4> 0, progs/test_xdp_noinline.c:739:8
              if (!encap_v4(xdp, cval, &pckt, dst, pkt_bytes))
                   ^
  ...
  progs/test_xdp_noinline.c:321:6: error: defined with too many args
  bool encap_v4(struct xdp_md *xdp, struct ctl_value *cval,
       ^
  ...

Note that bpf selftests are compiled with -O2 which is
the recommended flag for bpf community.

The bpf backend calling convention is only allowing 5
parameters in registers and does not allow pass arguments
through stacks. In the above case, ArgumentPromotionPass
replaced parameter '&pckt' as two parameters, so the total
number of arguments after ArgumentPromotion pass becomes 6
and this caused later compilation failure during instruction
selection phase.

This patch added a TargetTransformInfo hook getMaxNumArgs()
which returns 5 for BPF and UINT_MAX for other targets.

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

18 months ago[NFC][AArch64] Add cost model tests for extending loads
David Sherwood [Tue, 11 Apr 2023 12:10:33 +0000 (12:10 +0000)]
[NFC][AArch64] Add cost model tests for extending loads

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

18 months ago[libc++] Adds missing includes.
Mark de Wever [Tue, 18 Apr 2023 17:19:48 +0000 (19:19 +0200)]
[libc++] Adds missing includes.

This patch makes are code less dependant on transitive includes.

This was part of D145800. This patch will be abandoned, but these
changes are still useful. I manually verified declarations of the new
includes are used in these files.

Reviewed By: #libc, philnik

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

18 months ago[AMDGPU] NFC. Refactor GISel for cmp intrinsics
Joe Nash [Mon, 17 Apr 2023 21:22:43 +0000 (17:22 -0400)]
[AMDGPU] NFC. Refactor GISel for cmp intrinsics

Combine the logic for fcmp and icmp intrinsics and use operand presence
instead.

Reviewed By: kosarev, foad

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

18 months ago[AMDGPU] Fix some check prefixes
Jay Foad [Wed, 19 Apr 2023 14:26:32 +0000 (15:26 +0100)]
[AMDGPU] Fix some check prefixes

18 months ago[AMDGPU] Remove unused check lines from tests
Jay Foad [Wed, 19 Apr 2023 14:23:55 +0000 (15:23 +0100)]
[AMDGPU] Remove unused check lines from tests

18 months ago[MLIR] Fix missing ::mlir namespace
Arash Taheri-Dezfouli [Wed, 19 Apr 2023 15:09:29 +0000 (15:09 +0000)]
[MLIR] Fix missing ::mlir namespace

Add a missing ::mlir namespace for MixedContainerType
that only triggers if the user is not using namespace mlir.

Reviewed By: rriddle

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

18 months ago[dwarfdump][AMDGPU] Support EF_AMDGPU_MACH_NONE
Scott Linder [Wed, 19 Apr 2023 15:02:08 +0000 (15:02 +0000)]
[dwarfdump][AMDGPU] Support EF_AMDGPU_MACH_NONE

A quirk of the AMDGPU backend is EF_AMDGPU_MACH_NONE, which is not
specific to the r600 or amdgcn architecture, but can be combined with
either.

AMDGPU ELF code objects with this mach value cannot be mapped back to a
Triple architecture, as it could be either r600 or amdgcn. For
llvm-dwarfdump this means the normal method of inspecting
ObjectFile::getArch to determine how to handle relocations is
insufficient.

This patch adds an extra check for ELF code objects which would
otherwise be categorized as UnknownArch, making it possible to use
llvm-dwarfdump with them. For completeness it also adds support for
known r600 machines.

This also adds specific tests for llvm-dwarfdump for amdgcn and r600,
both with known and unknown mach values.

Reviewed By: jhenderson

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

18 months ago[flang][openacc] Add OpenACC pointer interface to FIR pointer types
Razvan Lupusoru [Tue, 18 Apr 2023 22:42:16 +0000 (15:42 -0700)]
[flang][openacc] Add OpenACC pointer interface to FIR pointer types

The OpenACC dialect data clauses require for variables appearing in data
operations to implement the `PointerLikeType` interface (similarly to
OpenMP dialect). Thus, this interface needs attached to FIR types.

Two of the FIR types, HeapType and LLVMPointerType, did not provide
getElementType - now they do by calling getEleTy. This cleans up the
interface attachment for both OpenACC and OpenMP dialects.

Reviewed By: clementval, jeanPerier

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

18 months ago[AArch64][CodeGen] Allow vectors larger than hardware support to use SVE's load zero...
Dinar Temirbulatov [Wed, 19 Apr 2023 14:17:32 +0000 (14:17 +0000)]
[AArch64][CodeGen] Allow vectors larger than hardware support to use SVE's load zero/sign-extend for fixed vectors.

Prefer to fold LOAD + SIGN/ZEROEXTEND to SVE load and sign extend instructions
for fixed-length-vectors even if a type is not representable on a hardware.

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

18 months agoRemove unused ValueTracking.h include from DebugInfo.cpp
OCHyams [Wed, 19 Apr 2023 14:14:18 +0000 (15:14 +0100)]
Remove unused ValueTracking.h include from DebugInfo.cpp

Buildbot: https://buildkite.com/llvm-project/upstream-bazel/builds/
                        59967#01879985-8d44-4041-9cd0-a1e41371208e

See https://reviews.llvm.org/D148536

18 months ago[AMDGPU] Remove unused check lines from GlobalISel IR tests
Jay Foad [Wed, 19 Apr 2023 14:12:50 +0000 (15:12 +0100)]
[AMDGPU] Remove unused check lines from GlobalISel IR tests

18 months ago[dataflow] add missing clangLex dep after a443b3d18ef4d01e7
Sam McCall [Wed, 19 Apr 2023 14:11:58 +0000 (16:11 +0200)]
[dataflow] add missing clangLex dep after a443b3d18ef4d01e7

18 months ago[SCF] Clean up ForOpTensorCastFolder and harden it against nop tensor casts
Benjamin Kramer [Wed, 19 Apr 2023 13:31:34 +0000 (15:31 +0200)]
[SCF] Clean up ForOpTensorCastFolder and harden it against nop tensor casts

The code was inserting a new cast, discarding it, then inserting it
again.

The self-cast issue is the root of #62135 because it would end up
dropping the loop and inserting an invalid cast to itself. As far as I
can tell tensor.cast with the same src and dst types is not invalid but
it can't really be tested in isolation as it's immediately folded.

Fixes #62135

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

18 months ago[AMDGPU] Remove unused check lines from GlobalISel MIR tests
Jay Foad [Wed, 19 Apr 2023 13:54:50 +0000 (14:54 +0100)]
[AMDGPU] Remove unused check lines from GlobalISel MIR tests

18 months ago[dataflow] add HTML logger: browse code/cfg/analysis timeline/state
Sam McCall [Wed, 8 Mar 2023 15:13:28 +0000 (16:13 +0100)]
[dataflow] add HTML logger: browse code/cfg/analysis timeline/state

With -dataflow-log=/dir we will write /dir/0.html etc for each
function analyzed.

These files show the function's code and CFG, and the path through
the CFG taken by the analysis. At each analysis point we can see the
lattice state.

Currently the lattice state dump is not terribly useful but we can
improve this: showing values associated with the current Expr,
simplifying flow condition, highlighting changes etc.

(Trying not to let this patch scope-creep too much, so I ripped out the
half-finished features)

Demo: https://htmlpreview.github.io/?https://gist.githubusercontent.com/sam-mccall/1746985bf13406bd19181af281aea9ff/raw/9718fdd48406dabccb3092acd983b4bd55da9dfa/analysis.html

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

18 months ago[OpenMP][MLIR] Add lowering of omp::FlagsAttr to LLVM-IR
Andrew Gozillon [Wed, 19 Apr 2023 13:21:24 +0000 (08:21 -0500)]
[OpenMP][MLIR] Add lowering of omp::FlagsAttr to LLVM-IR

The omp::FlagsAttr contains OpenMP RTL flags
given by a user to the compiler and a frontend
(flang currently) then populates the omp::FlagsAttr
which will then lower these to LLVM globals
which are utilised by the OpenMP runtime.

Reviewers: jdoerfert

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

18 months ago[AArch64] Remove dead tryMLAV64LaneV128 and tryMULLV64LaneV128 code.
David Green [Wed, 19 Apr 2023 13:26:27 +0000 (14:26 +0100)]
[AArch64] Remove dead tryMLAV64LaneV128 and tryMULLV64LaneV128 code.

As far as I can tell this code is never used, as the pattern recognised by
checkHighLaneIndex (an duplane with insert_subvec and extract_subvec) will not
be generated any more. There are no tests that change from removing it
(including the clang neon tests), and it didn't appear to come up in any
benchmarks I ran. There are already existing tablegen patterns for MLA with
index and s/umull with index.

Removing it also prevents it from causing problems for SVE, as in #62151.

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

18 months ago[DAGCombine][AArch64] Allow transformable to legal vectors to be used for MULH lowering.
Dinar Temirbulatov [Wed, 19 Apr 2023 13:24:58 +0000 (13:24 +0000)]
[DAGCombine][AArch64] Allow transformable to legal vectors to be used for MULH lowering.

It looks like it is still profitable to accept a transformable to a legal vector
type, not just a legal vector, as long as vector elements are the same between
two of those types.

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

18 months agoReapply D146987 "[Assignment Tracking] Enable by default"
OCHyams [Wed, 19 Apr 2023 12:59:08 +0000 (13:59 +0100)]
Reapply D146987 "[Assignment Tracking] Enable by default"

This reverts commit 7674ae7231c4e286b93eb399e475765630666f8b which
reverts D146987.

See https://reviews.llvm.org/D146987 for issues.

18 months ago[libc] Add the '--threads' and '--blocks' option to the GPU loaders
Joseph Huber [Mon, 17 Apr 2023 20:08:59 +0000 (15:08 -0500)]
[libc] Add the '--threads' and '--blocks' option to the GPU loaders

We will want to test the GPU `libc` with multiple threads in the future.
This patch adds the `--threads` and `--blocks` option to set the `x`
dimension of the kernel. Using CUDA terminology instead of OpenCL for
familiarity.

Depends on D148288 D148342

Reviewed By: jdoerfert, sivachandra, tra

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

18 months ago[libc] Add a support library for GPU utilities
Joseph Huber [Tue, 18 Apr 2023 14:44:27 +0000 (09:44 -0500)]
[libc] Add a support library for GPU utilities

The GPU has many features that can only be accessed through builtin or
intrinsic functions. Furthermore, these functions are unique for each
GPU target. This patch outlines an interface to create a common `libc`
interface to access these. Currently I only implement a function for the
CUDA equivalent of `blockIdx.x`. More will be added in the future.

Reviewed By: sivachandra

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

18 months ago[SLP]Fix cost estimation for buildvectors with extracts and/or constants.
Alexey Bataev [Fri, 14 Apr 2023 16:35:03 +0000 (09:35 -0700)]
[SLP]Fix cost estimation for buildvectors with extracts and/or constants.

If the partial matching is found and some other scalars must be
inserted, need to account the cost of the extractelements, transformed
to shuffles, and/or reused entries and calculate the cost of inserting
constants properly into the non-poison vectors.
Also, fixed the cost calculation for final gather/buildvector sequence.

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

18 months ago[SanitizerBinaryMetadata] Respect no_sanitize("thread") function attribute
Marco Elver [Wed, 19 Apr 2023 12:46:42 +0000 (14:46 +0200)]
[SanitizerBinaryMetadata] Respect no_sanitize("thread") function attribute

To avoid false positives, respect no_sanitize("thread") when atomics
metadata is enabled.

Reviewed By: dvyukov

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

18 months ago[gn build] Port bf47c1ed8556
LLVM GN Syncbot [Wed, 19 Apr 2023 12:38:32 +0000 (12:38 +0000)]
[gn build] Port bf47c1ed8556

18 months agoReapply "[Assignment Tracking] Fix fragment error for some DSE-shortened stores"
OCHyams [Wed, 19 Apr 2023 12:11:22 +0000 (13:11 +0100)]
Reapply "[Assignment Tracking] Fix fragment error for some DSE-shortened stores"

This reverts commit 6db6ab4815a44bfcaabfcdd84a0ff458394f6f52 which reverts
D148536.

Build issues addressed in D148698.

18 months ago[dataflow] Extract arena for Value/StorageLocation out of DataflowAnalysisContext
Sam McCall [Mon, 17 Apr 2023 18:35:20 +0000 (20:35 +0200)]
[dataflow] Extract arena for Value/StorageLocation out of DataflowAnalysisContext

DataflowAnalysisContext has a few too many responsibilities, this narrows them.

It also allows the Arena to be shared with analysis steps, which need to create
Values, without exposing the whole DACtx API (flow conditions etc).
This means Environment no longer needs to proxy all these methods.
(For now it still does, because there are many callsites to update, and maybe
if we separate bool formulas from values we can avoid churning them twice)

In future, if we untangle the concepts of Values from boolean formulas/atoms,
Arena would also be responsible for creating formulas and managing atom IDs.

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

18 months agoValueTracking: Handle shufflevector in computeKnownFPClass
Matt Arsenault [Thu, 13 Apr 2023 01:33:02 +0000 (21:33 -0400)]
ValueTracking: Handle shufflevector in computeKnownFPClass

18 months agoValueTracking: Add baseline tests for shufflevector computeKnownFPClass handling
Matt Arsenault [Tue, 18 Apr 2023 14:28:39 +0000 (10:28 -0400)]
ValueTracking: Add baseline tests for shufflevector computeKnownFPClass handling

18 months agoValueTracking: Handle insertelement in computeKnownFPClass
Matt Arsenault [Wed, 12 Apr 2023 23:21:49 +0000 (19:21 -0400)]
ValueTracking: Handle insertelement in computeKnownFPClass

18 months agoValueTracking: sitofp cannot return -0
Matt Arsenault [Thu, 13 Apr 2023 13:48:08 +0000 (09:48 -0400)]
ValueTracking: sitofp cannot return -0

18 months agoValueTracking: Add baseline test for computeKnownFPClass for minnum/maxnum
Matt Arsenault [Sat, 8 Apr 2023 23:29:53 +0000 (19:29 -0400)]
ValueTracking: Add baseline test for computeKnownFPClass for minnum/maxnum

18 months agoValueTracking: Add more fpext and fptrunc tests
Matt Arsenault [Mon, 17 Apr 2023 23:12:18 +0000 (19:12 -0400)]
ValueTracking: Add more fpext and fptrunc tests

18 months ago[lldb][RISCV] Add missing flags pointer to register infos
David Spickett [Wed, 19 Apr 2023 11:42:14 +0000 (11:42 +0000)]
[lldb][RISCV] Add missing flags pointer to register infos

 efd64c2f2506df3e2ed6d9da68e49f03fc31763c added these.

18 months ago[hwasan] provide a runtime flag for printing remaining threads in error report as...
Enna1 [Wed, 19 Apr 2023 11:27:26 +0000 (19:27 +0800)]
[hwasan] provide a runtime flag for printing remaining threads in error report as an extra information

This patch adds a runtime flag `print_live_threads_info`, which defaults to true, controls whether or not prints remaining threads in error report as an extra information.
We(ByteDance) are in the process of enabling hwasan for our server-side applications on AArch64/Linux, these server-side applications have thousands of threads, so it is nice to have this option.

Reviewed By: fmayer

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

18 months ago[NFC] Rename isPointerOffset to getPointerOffsetFrom and move to Value.h
OCHyams [Wed, 19 Apr 2023 10:59:37 +0000 (11:59 +0100)]
[NFC] Rename isPointerOffset to getPointerOffsetFrom and move to Value.h

Linking LLVMCore failed when building D148536 with shared libs enabled:
https://lab.llvm.org/buildbot/#/builders/121/builds/29766

Make isPointerOffset a Value method and rename it to getPointerOffsetFrom.

Reviewed By: jmorse

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

18 months ago[libcxxabi] [test] Fix the mingw test config
Martin Storsjö [Thu, 30 Mar 2023 11:40:17 +0000 (14:40 +0300)]
[libcxxabi] [test] Fix the mingw test config

Don't link libc++abi separately in addition to the main -lc++; in
mingw build configs, libc++abi is always bundled into libc++
(via LIBCXX_ENABLE_STATIC_ABI_LIBRARY).

In the case of a shared linked libc++, linking a separate static
libc++abi leads to linker errors.

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

18 months ago[libcxxabi] [test] Avoid mingw warnings about missing a return statement
Martin Storsjö [Sat, 1 Apr 2023 22:45:07 +0000 (01:45 +0300)]
[libcxxabi] [test] Avoid mingw warnings about missing a return statement

With current versions of mingw-w64 headers, code following
assert(false) isn't considered unreachable - thus add a dummy
"return nullptr;", to avoid warnings (treated as errors) for a
missing return statement.

The root cause does get fixed further upstream in mingw-w64 in
https://github.com/mingw-w64/mingw-w64/commit/1690994f515910a31b9fb7c7bd3a52d4ba987abe
though.

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

18 months ago[libcxxabi] Omit dllimport in public headers in MinGW mode
Martin Storsjö [Sat, 15 Apr 2023 21:58:51 +0000 (21:58 +0000)]
[libcxxabi] Omit dllimport in public headers in MinGW mode

This matches the corresponding change to libcxx headers in
dfa88927ae1411ccc3b248b7e624f2acf623d947.

This avoids needing to define _LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS
when building libcxxabi tests, for two reasons:
- It defaults to normal linkage (as opposed to dllimport), fixing
  linking of a static library version of libcxx/libcxxabi
- It avoids issues with using dllimport declarations on symbols when
  including cxxabi implementations into the testcase itself

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

18 months ago[AArch64][CostModel]: Add costs for zero/sign extend.
Hassnaa Hamdi [Wed, 19 Apr 2023 09:23:13 +0000 (09:23 +0000)]
[AArch64][CostModel]: Add costs for zero/sign extend.

Add cost for extending to illegal scalable vector types.
Add testing file for the extend operations.

Reviewed By: sdesmalen

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

18 months agoMake use of '#pragma clang diagnostic' only with __clang__.
Martin Liska [Wed, 19 Apr 2023 09:47:43 +0000 (11:47 +0200)]
Make use of '#pragma clang diagnostic' only with __clang__.

Otherwise one gets the following warning with GCC:
warning: ignoring ‘#pragma clang diagnostic’ [-Wunknown-pragmas]

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

18 months ago[AMDGPU] Add more verbose logs to PromoteAlloca
pvanhout [Tue, 18 Apr 2023 12:22:45 +0000 (14:22 +0200)]
[AMDGPU] Add more verbose logs to PromoteAlloca

More specifically make it more talkative when it's looking at the users of
an alloca to promote it to a vector.

A common failure point of the pass is unknown or weird users of the alloca.
While debugging issues related to this pass one of the first thing I usually
did was to add logs to see how the users were being handled.
Having such logs in directly seems to be a nice addition.

Reviewed By: arsenm, rampitec

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

18 months ago[compiler-rt][ASAN] Replace find_executable with shtuil.which in script
David Spickett [Mon, 17 Apr 2023 13:36:03 +0000 (13:36 +0000)]
[compiler-rt][ASAN] Replace find_executable with shtuil.which in script

distutils is deprecated and shutil.which is the suggested
replacement for this function.

https://peps.python.org/pep-0632/#migration-advice
https://docs.python.org/3/library/shutil.html#shutil.which

which was added in 3.3 (https://docs.python.org/3/library/shutil.html#shutil.which)
and LLVM requires at least 3.6 (https://llvm.org/docs/GettingStarted.html#software).

Reviewed By: delcypher, vitalybuka

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

18 months agoRevert "[Assignment Tracking] Fix fragment error for some DSE-shortened stores"
OCHyams [Wed, 19 Apr 2023 09:02:24 +0000 (10:02 +0100)]
Revert "[Assignment Tracking] Fix fragment error for some DSE-shortened stores"

This reverts commit fca3e8e024f0015604d21e6f76f3e199345679c5.

Buildbot: https://lab.llvm.org/buildbot/#/builders/121/builds/29766

18 months agoRevert D146987 "[Assignment Tracking] Enable by default"
OCHyams [Wed, 19 Apr 2023 09:01:40 +0000 (10:01 +0100)]
Revert D146987 "[Assignment Tracking] Enable by default"

This reverts commit 107b307bd61e51aa66ea41f1a2c92c1459b39c7e due
to build errors in a parent commit fca3e8e024f0015604d21e6f76f3e199345679c5

18 months ago[AMDGPU] Don't transform illegal intrinsics to V_ILLEGAL
Jay Foad [Wed, 12 Apr 2023 13:22:40 +0000 (14:22 +0100)]
[AMDGPU] Don't transform illegal intrinsics to V_ILLEGAL

This reverts parts of D123693. The functionality of allowing unsupported
intrinsics to select has been superseded by D139000 "Remove function
with incompatible features".

Retain assembler/disassembler support for v_illegal on GFX10+ only,
where it is documented.

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

18 months ago[docs] Fix the CMAKE_BUILD_TYPE option in the cmake command in GettingStarted.rst
terrydang [Wed, 19 Apr 2023 08:45:05 +0000 (09:45 +0100)]
[docs] Fix the CMAKE_BUILD_TYPE option in the cmake command in GettingStarted.rst

The cmake command contained a duplicate CMAKE_BUILD_TYPE option in the
section "Compiling the LLVM Suite Source Code".

18 months ago[reland][libc] handle memset sequence as a separate struct
Guillaume Chatelet [Tue, 18 Apr 2023 15:16:20 +0000 (15:16 +0000)]
[reland][libc] handle memset sequence as a separate struct

These sequence of calls don't really make sense for head_tail and loop_and_tail.

18 months ago[RISCV] Combine concat_vectors of loads into strided loads
Luke Lau [Thu, 6 Apr 2023 14:26:31 +0000 (15:26 +0100)]
[RISCV] Combine concat_vectors of loads into strided loads

If we're concatenating several smaller loads separated by a stride, we
can try and increase the element size and perform a strided load.
For example:

```
concat_vectors (load v4i8, p+0), (load v4i8, p+n), (load v4i8, p+n*2), (load v4i8, p+n*3)
=>
vlse32 p, stride=n, VL=4
```

This pattern can be produced by the SLP vectorizer.

A special case is when the stride is exactly equal to the width of the
vector, in which case it can be converted into a single consecutive
vector load. For example:

```
concat_vectors (load v4i8, p), (load v4i8, p+4), (load v4i8, p+8), (load v4i8, p+12)
=>
vle8 p, VL=16
```

Reviewed By: craig.topper

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

18 months ago[RISCV] Add tests for concats of vectors that could become strided loads
Luke Lau [Thu, 6 Apr 2023 13:48:37 +0000 (14:48 +0100)]
[RISCV] Add tests for concats of vectors that could become strided loads

These patterns of concat_vector nodes of loads can be combined into
widened vector loads or a strided vector loads.

Co-authored-by: Philip Reames <preames@rivosinc.com>
Differential Revision: https://reviews.llvm.org/D147712

18 months agoReapply D146987 "[Assignment Tracking] Enable by default"
OCHyams [Wed, 19 Apr 2023 08:20:58 +0000 (09:20 +0100)]
Reapply D146987 "[Assignment Tracking] Enable by default"

This reverts commit efc8b52cbd942f4bd5ffe8f64da5fb8a3b7adc32
which reverts D146987.

See https://reviews.llvm.org/D146987 for issues.

18 months ago[Assignment Tracking] Fix fragment error for some DSE-shortened stores
OCHyams [Wed, 19 Apr 2023 07:43:02 +0000 (08:43 +0100)]
[Assignment Tracking] Fix fragment error for some DSE-shortened stores

`shortenAssignment` inserts dbg.assigns with fragments describing the dead part
of a shortened store after each dbg.assign linked to the store.

Without this patch it doesn't take into account that the dead part of a
shortened store may be outside the bounds of a variable of a linked
dbg.assign. It also doesn't correctly account for a non-zero offset in the
address modifying `DIExpression` of the dbg.assign (which is possible for
fragments now even though whole variables currently cannot have a non-zero
offset in their alloca).

Fix this by moving the dead slice into variable-space and performing an
intersect of that adjusted slice with the existing fragment.

This fixes a verifier error reported when building fuchsia with assignment
tracking enabled:
https://ci.chromium.org/ui/p/fuchsia/builders/ci/
        clang_toolchain.ci.core.x64-release/b8784000953022145169/overview

Reviewed By: jmorse

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

18 months agoRevert "Reapply [SimplifyCFG][LICM] Preserve nonnull, range and align metadata when...
Krasimir Georgiev [Wed, 19 Apr 2023 08:26:38 +0000 (08:26 +0000)]
Revert "Reapply [SimplifyCFG][LICM] Preserve nonnull, range and align metadata when speculating"

This reverts commit 6f7e5c0f1ac6cc3349a2e1479ac4208465b272c6.

Seems to expose a miscompile in rust, possibly exposing a bug in LLVM
somewhere. Investigation thread over at:
https://rust-lang.zulipchat.com/#narrow/stream/187780-t-compiler.2Fwg-llvm/topic/LLVM.20D146629.20breakage

18 months ago[LLDB][RISCV] Add RVV register infos
Emmmer [Mon, 6 Feb 2023 08:17:14 +0000 (16:17 +0800)]
[LLDB][RISCV] Add RVV register infos

RVV stands for "RISC-V V Extension", which adds 32 vector registers, and seven unprivileged CSRs (vstart, vxsat, vxrm, vcsr, vtype, vl, vlenb) to a base scalar RISC-V ISA.

The base vector extension is intended to provide general support for data-parallel execution within the 32-bit instruction encoding space, with later vector extensions supporting richer functionality for certain domains.

This patch adds the definitions of RVV registers in `RegisterInfos_riscv64.h`, whose purpose is to provide support (such as reading, writing, and calculating the offsets) for future register-related functions.

Reviewed By: kito-cheng

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

18 months ago[llvm-exegesis] Allow setting dump file name
Pavel Kosov [Wed, 19 Apr 2023 07:59:07 +0000 (10:59 +0300)]
[llvm-exegesis] Allow setting dump file name

This will be used for writing test cases.

~~

Huawei RRI, OS Lab

Reviewed By: courbet

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

18 months ago[flang][hlfir] Apply component lower bounds in hlfir.designate codegen
Jean Perier [Wed, 19 Apr 2023 07:00:51 +0000 (09:00 +0200)]
[flang][hlfir] Apply component lower bounds in hlfir.designate codegen

The array component indices in the "path" of a fir.slice are zero based
because FIR does not know about the component lower bounds.
When lowering hlfir.designate to FIR for `array%x(i, j)`, convert `i` and
`j` to zero based indices before generating the fir.slice.

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

18 months ago[GlobalISelEmitter] handle operand without MVT/class
Chen Zheng [Mon, 9 Jan 2023 04:07:52 +0000 (04:07 +0000)]
[GlobalISelEmitter] handle operand without MVT/class

There are some patterns in td files without MVT/class set
for some operands in target pattern that are from the source
pattern. This prevents GlobalISelEmitter from adding them as
a valid rule, because the target child operand is an
unsupported kind operand. For now, for a leaf child, only
IntInit and DefInit are handled in GlobalISelEmitter.

This issue can be workaround by adding MVT/class to the
patterns in the td files, like the workarounds for patterns
anyext and setcc in PPCInstrInfo.td in D140878.

To avoid adding the same workarounds for other patterns in
td files, this patch tries to handle the UnsetInit case in
GlobalISelEmitter.

Adding the new handling allows us to remove the workarounds
in the td files and also generates many selection rules for
PPC target.

Reviewed By: arsenm

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

18 months ago[mlir][linalg] ValueBoundsOpInterface: Add support for linalg.index
Matthias Springer [Wed, 19 Apr 2023 06:49:20 +0000 (15:49 +0900)]
[mlir][linalg] ValueBoundsOpInterface: Add support for linalg.index

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

18 months ago[clang][Interp][NFC] Small State.cpp refactoring
Timm Bäder [Wed, 19 Apr 2023 06:10:13 +0000 (08:10 +0200)]
[clang][Interp][NFC] Small State.cpp refactoring

18 months ago[RISCV] Fix canonical ordering of s* vs z* extensions in RISCVISAInfo
Alex Bradbury [Wed, 19 Apr 2023 06:03:57 +0000 (07:03 +0100)]
[RISCV] Fix canonical ordering of s* vs z* extensions in RISCVISAInfo

As noted in https://reviews.llvm.org/D148315, the ordering logic for
OrderedExtensionMap currently puts s* before z* extensions, but per the
ISA manual the correct order should be z* and then s* (with the
exception of zxm*, which are ordered after s*).

This patch fixes the ordering and adds a TODO for zxm*. The changes are
visible in the test case added in
a35e67fc5be654a7efdfa6125343b90f8960a487 which also demonstrates an
issue with the ordering of single letter extensions (which isn't
addressed in this patch).

This ordering matches the one used by GCC/binutils as well.

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

18 months ago[clang][Bazel] Add missing dependency after 310ee08d5d4
Adrian Kuegel [Wed, 19 Apr 2023 05:56:28 +0000 (07:56 +0200)]
[clang][Bazel] Add missing dependency after 310ee08d5d4