platform/upstream/llvm.git
2 years ago[analyzer] Done some changes to detect Uninitialized read by the char array manipulat...
phyBrackets [Fri, 4 Mar 2022 06:45:27 +0000 (12:15 +0530)]
[analyzer] Done some changes to detect Uninitialized read by the char array manipulation functions

Few weeks back I was experimenting with reading the uninitialized values from src , which is actually a bug but the CSA seems to give up at that point . I was curious about that and I pinged @steakhal on the discord and according to him this seems to be a genuine issue and needs to be fix. So I goes with fixing this bug and thanks to @steakhal who help me creating this patch. This feature seems to break some tests but this was the genuine problem and the broken tests also needs to fix in certain manner. I add a test but yeah we need more tests,I'll try to add more tests.Thanks

Reviewed By: steakhal, NoQ

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

2 years ago[LoongArch] Delete unnecessary comments in LoongArchMCTargetDesc.cpp
Weining Lu [Fri, 4 Mar 2022 05:36:58 +0000 (13:36 +0800)]
[LoongArch] Delete unnecessary comments in LoongArchMCTargetDesc.cpp

2 years agoFix for D119899
David Blaikie [Fri, 4 Mar 2022 05:19:51 +0000 (05:19 +0000)]
Fix for D119899

2 years agoMore bazel fixes
David Blaikie [Fri, 4 Mar 2022 04:20:08 +0000 (04:20 +0000)]
More bazel fixes

2 years ago[PDLL] Attempt to fix shared libraries build
River Riddle [Fri, 4 Mar 2022 04:20:36 +0000 (20:20 -0800)]
[PDLL] Attempt to fix shared libraries build

PDLLParser now depends on TableGen, which disables LLVM_DYLIB

2 years agoMore bazel fixes
David Blaikie [Fri, 4 Mar 2022 04:15:38 +0000 (04:15 +0000)]
More bazel fixes

2 years ago[MLIR] Extend isLoopMemoryParallel to account for locally allocated memrefs
Uday Bondhugula [Thu, 3 Mar 2022 01:18:27 +0000 (06:48 +0530)]
[MLIR] Extend isLoopMemoryParallel to account for locally allocated memrefs

Extend isLoopMemoryParallel check to include locally allocated memrefs.
This strengthens and also speeds up the dependence check used by the
utility by excluding locally allocated memrefs where appropriate.

Additional memref dialect ops can be supported exhaustively via proper
interfaces.

Reviewed By: dcaballe

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

2 years ago[MLIR][OpenMP] Mark openmp.parallel and omp.wsloop as having recursive side effects
William S. Moses [Wed, 2 Mar 2022 23:57:58 +0000 (18:57 -0500)]
[MLIR][OpenMP] Mark openmp.parallel and omp.wsloop as having recursive side effects

An OpenMP wsloop is simply a regular for loop with the bounds determined by the thread number, and the same justification to allow this for scf.for works for omp.wsloop.

An OpenMP parallel is a parallel for, per thread. Similarly the same justification for scf.parallel having recursive side effects applies here.

In both cases the general justification is that the ops themselves don't have side effects (besides inaccessible runtime-specific memory) and thus the side effects are simply that of the contained ops.

Reviewed By: bondhugula

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

2 years ago[PDLL] Specify LLVM_LINK_COMPONENTS using LINK_COMPONENTS
River Riddle [Fri, 4 Mar 2022 03:05:57 +0000 (19:05 -0800)]
[PDLL] Specify LLVM_LINK_COMPONENTS using LINK_COMPONENTS

2 years agoBazel fixes for 81f2f4dfb2922e4f7af8bbfd8b653eda7c1f1339
David Blaikie [Fri, 4 Mar 2022 01:02:18 +0000 (01:02 +0000)]
Bazel fixes for 81f2f4dfb2922e4f7af8bbfd8b653eda7c1f1339

2 years ago[lld-macho][nfc] Decouple tapi-link.s test from libSystem
Jez Ng [Fri, 4 Mar 2022 00:48:34 +0000 (19:48 -0500)]
[lld-macho][nfc] Decouple tapi-link.s test from libSystem

If we fix https://github.com/llvm/llvm-project/issues/54184, we will end
up including libSystem in every %lld invocation, which would break
tapi-link.s as it assumes that libSystem isn't directly linked (instead
it goes through libReexportSystem).

Let's remove this unnecessary coupling, as well as use `split-file`
instead of having a separate file under `Inputs`.

Reviewed By: #lld-macho, oontvoo

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

2 years ago[gn build] Port e865fa75308a
LLVM GN Syncbot [Fri, 4 Mar 2022 00:22:21 +0000 (00:22 +0000)]
[gn build] Port e865fa75308a

2 years agoFix race condition when launching and attaching.
Greg Clayton [Sun, 27 Feb 2022 20:01:19 +0000 (10:01 -1000)]
Fix race condition when launching and attaching.

This is a modified version of a previous patch that was reverted: https://reviews.llvm.org/D119797
This version only waits for the process to stop when using "launchCommands" or "attachCommands"...

...and doesn't play with the async mode when doing normal launch/attach.

We discovered that when using "launchCommands" or "attachCommands" that there was an issue where these commands were not being run synchronously. There were further problems in this case where we would get thread events for the process that was just launched or attached before the IDE was ready, which is after "configurationDone" was sent to lldb-vscode.

This fix introduces the ability to wait for the process to stop after "launchCommands" or "attachCommands" are run to ensure that we have a stopped process point that is ready for the debug session to proceed. We spin up the thread that listens for process events before we start the launch or attach, but we don't want stop events being delivered through the DAP protocol until the "configurationDone" packet is received. We now always ignore the stop event with a stop ID of 1, which is the first stop. All normal launch and attach scenarios use the synchronous mode, and "launchCommands and "attachCommands" run an array of LLDB commands in async mode.

This should make our launch with "launchCommands" and attach with "attachCommands" avoid a race condition when the process is being launched or attached.

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

2 years ago[PDLL] Add support for tablegen includes and importing ODS information
River Riddle [Tue, 15 Feb 2022 22:32:37 +0000 (14:32 -0800)]
[PDLL] Add support for tablegen includes and importing ODS information

This commit adds support for processing tablegen include files, and importing
various information from ODS. This includes operations, attribute+type constraints,
attribute/operation/type interfaces, etc. This will allow for much more robust tooling,
and also allows for referencing ODS constructs directly within PDLL (imported interfaces
can be used as constraints, operation result names can be used for member access, etc).

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

2 years ago[TableGen] Add a library-based entry point for parsing td files
River Riddle [Tue, 15 Feb 2022 06:22:53 +0000 (22:22 -0800)]
[TableGen] Add a library-based entry point for parsing td files

This commit adds a new `TableGenParseFile` entry point for tablegen
that parses an input buffer and invokes a callback function with
a record keeper (notably without an output buffer). This kind of entry
point is very useful for tablegen consuming tools that don't create
output, and want invoke tablegen multiple times. The current way
that we interact with tablegen is via relative includes to
TGParser(not great).

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

2 years ago[LTO] Initialize canAutoHide() using canBeOmittedFromSymbolTable()
Jez Ng [Fri, 4 Mar 2022 00:04:11 +0000 (19:04 -0500)]
[LTO] Initialize canAutoHide() using canBeOmittedFromSymbolTable()

Per discussion on
https://reviews.llvm.org/D59709#inline-1148734, this seems like the
right course of action. `canBeOmittedFromSymbolTable()` subsumes and
generalizes the previous logic. In addition to handling `linkonce_odr`
`unnamed_addr` globals, we now also internalize `linkonce_odr` +
`local_unnamed_addr` constants.

Reviewed By: tejohnson

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

2 years ago[lld-macho][nfc] Use %lld-watchos substitution in bind-opcodes.s
Jez Ng [Thu, 3 Mar 2022 23:50:59 +0000 (18:50 -0500)]
[lld-macho][nfc] Use %lld-watchos substitution in bind-opcodes.s

Previously, we were using a syslibroot that pointed to macos while
linking against arch arm64_32, which didn't really make sense. It isn't
currently an issue, but will be if we add the `-lSystem` as part of
dealing with https://github.com/llvm/llvm-project/issues/54184.

2 years ago[lld-macho][nfc] Avoid using absolute addresses in cgprofile-icf.s
Jez Ng [Thu, 3 Mar 2022 23:58:08 +0000 (18:58 -0500)]
[lld-macho][nfc] Avoid using absolute addresses in cgprofile-icf.s

If we fix https://github.com/llvm/llvm-project/issues/54184, the
`dyld_stub_binder` symbol will get included in every output dylib. This
would cause the addresses of the other symbols to shift, breaking the
test as it currently stands. Let's make the test more flexible.

Reviewed By: lgrey

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

2 years ago[RISCV] With Zbb, fold (sext_inreg (abs X)) -> (max X, (negw X))
Craig Topper [Thu, 3 Mar 2022 22:21:59 +0000 (14:21 -0800)]
[RISCV] With Zbb, fold (sext_inreg (abs X)) -> (max X, (negw X))

With Zbb, abs is expanded to (max X, neg) by default. If X has 33 or
more sign bits, we can expand it a little early using negw instead of
neg to save a sext_inreg. If X started as a 32 bit value, type
legalization would have inserted a sext before the abs so X having
33 sign bits should always be true.

Note: I've used ISD::FREEZE here since we increase the number of uses.
Our default expansion for ABS doesn't do that, but I think that's a bug.

We can't do this with custom type legalization because ISD::FREEZE
doesn't propagate sign bits so later DAG combine won't expand be
able to see optmize it.

Alives2 https://alive2.llvm.org/ce/z/Gx3RNe

Reviewed By: spatel

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

2 years ago[hmaptool] Fix string decoding for Python 3
Shoaib Meenai [Sun, 23 Jan 2022 20:51:46 +0000 (12:51 -0800)]
[hmaptool] Fix string decoding for Python 3

Our "strings" were actually bytes, which made verbose dumping fail.
Decode them so they actually become strings.

Reviewed By: bruno

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

2 years ago[hmaptool] Fix dumping
Shoaib Meenai [Sun, 23 Jan 2022 20:50:01 +0000 (12:50 -0800)]
[hmaptool] Fix dumping

It was complaining about too many values to unpack, since our struct
unpack format string specified six members, but we only had five
variables to unpack to. The sixth value is the max value length, but
it's not used in dumping, so we can ignore it.

Reviewed By: bruno

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

2 years agoRevert "[MergeICmps] Don't require GEP"
Arthur Eubanks [Thu, 3 Mar 2022 22:55:09 +0000 (14:55 -0800)]
Revert "[MergeICmps] Don't require GEP"

This reverts commit e7fb1c15cb85d748c1c4fdd5a2eb5613ec7bef1d.

Causes crashes, see https://reviews.llvm.org/rGe7fb1c15cb85d748c1c4fdd5a2eb5613ec7bef1d.

2 years ago[CMake] Update cache file for Win to ARM cross tooolchain. NFC.
Vladimir Vereschaka [Thu, 3 Mar 2022 22:32:16 +0000 (14:32 -0800)]
[CMake] Update cache file for Win to ARM cross tooolchain. NFC.

Removed passing CMAKE_AR from the library configurations.

2 years ago[lldb] Fix the build after 8b3b66ea63d6
Jonas Devlieghere [Thu, 3 Mar 2022 21:56:59 +0000 (13:56 -0800)]
[lldb] Fix the build after 8b3b66ea63d6

Remove remaining calls to FileSystem::Collect.

2 years ago[Mips] support "sp" named register
Nick Desaulniers [Thu, 3 Mar 2022 21:42:10 +0000 (13:42 -0800)]
[Mips] support "sp" named register

After Linux kernel commit
commit 200ed341b864 ("mips: Implement "current_stack_pointer"")
We observe the following build error when compiling the Linux kernel
targeting Mips:
fatal error: error in backend: Invalid register name global variable

Fixes: https://github.com/llvm/llvm-project/issues/54174
Link: https://github.com/ClangBuiltLinux/linux/issues/1608
Reviewed By: atanasyan

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

2 years ago[MLIR] [AMDGPU] Use correct flags when building SerializeToHsaco
Krzysztof Drewniak [Mon, 28 Feb 2022 15:56:17 +0000 (15:56 +0000)]
[MLIR] [AMDGPU] Use correct flags when building SerializeToHsaco

The SerializeToHsaco pass does not depend on ROCm being available on
the build system - it only requires ROCm to be present at runtime.
However, the CMake file that built it tested for
MLIR_ENABLE_ROCM_RUNNER , which implies that ROCm is currently
available and is used to control building ROCm integration tests.

Referencing MLIR_ENABLE_ROCM_RUNNER instead of
MLIR_ENABLE_ROCM_CONVERSIONS in the SerializeToHsaco build therefore
causes problems for clients who wish to build projects that depend on
this pass on a system without an AMD GPU present.

Reviewed By: whchung

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

2 years ago[NFC] Fix typos
Maksim Panchenko [Thu, 3 Mar 2022 01:35:49 +0000 (17:35 -0800)]
[NFC] Fix typos

Reviewed By: yota9, Amir

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

2 years ago[BOLT][NFC] Return MCRegister::NoRegister from MCPlusBuilder::getNoRegister()
Maksim Panchenko [Thu, 3 Mar 2022 02:30:40 +0000 (18:30 -0800)]
[BOLT][NFC] Return MCRegister::NoRegister from MCPlusBuilder::getNoRegister()

Reviewed By: yota9

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

2 years ago[lldb] Remove reproducer_handler from the driver
Jonas Devlieghere [Thu, 3 Mar 2022 20:56:31 +0000 (12:56 -0800)]
[lldb] Remove reproducer_handler from the driver

2 years ago[lldb] Remove FileSystem::Initialize from FileCollector
Jonas Devlieghere [Thu, 3 Mar 2022 19:52:02 +0000 (11:52 -0800)]
[lldb] Remove FileSystem::Initialize from FileCollector

This patch removes the ability to instantiate the LLDB FileSystem class
with a FileCollector. It keeps the ability to collect files, but uses
the FileCollectorFileSystem to do that transparently.

Because the two are intertwined, this patch also removes the
finalization logic which copied the files over out of process.

2 years agoRevert "Update bazel build rules to match 169ebf03ab2a6f16bfa32a36305929c7bc8e4784."
Benjamin Kramer [Thu, 3 Mar 2022 21:15:36 +0000 (22:15 +0100)]
Revert "Update bazel build rules to match 169ebf03ab2a6f16bfa32a36305929c7bc8e4784."

This reverts commit f2af453263569bca04df8229929d988ab82fa1d7. The
corresponding LLVM change was reverted in 27712243ab2680fa87b2de52ca4245d7c22f81f8.

2 years agoFixed sphinx build due to indentation
Aaron Ballman [Thu, 3 Mar 2022 21:03:05 +0000 (16:03 -0500)]
Fixed sphinx build due to indentation

2 years ago[libc++] Removes base member from tests.
Mark de Wever [Tue, 1 Mar 2022 17:02:10 +0000 (18:02 +0100)]
[libc++] Removes base member from tests.

Change the tests to use the base friend function instead of members.
Also changed some types to have a base friends instead of members.

Reviewed By: #libc, ldionne, Quuxplusone

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

2 years agoRevert "Inliner: Correctly merge amdgpu-unsafe-fp-atomics attribute"
Matt Arsenault [Thu, 3 Mar 2022 18:23:41 +0000 (13:23 -0500)]
Revert "Inliner: Correctly merge amdgpu-unsafe-fp-atomics attribute"

This reverts commit 169ebf03ab2a6f16bfa32a36305929c7bc8e4784.

This was effectively rendering the attribute useless in the real
world, although this is still broken.

2 years ago[x86] add tests for vector rotate; NFC
Sanjay Patel [Thu, 3 Mar 2022 17:50:48 +0000 (12:50 -0500)]
[x86] add tests for vector rotate; NFC

2 years ago[AArch64][x86] add tests for rotate/funnel combines; NFC
Sanjay Patel [Thu, 3 Mar 2022 16:01:12 +0000 (11:01 -0500)]
[AArch64][x86] add tests for rotate/funnel combines; NFC

2 years agoFix the order of modules-loaded event and the resultant breakpoint-changed event.
Jim Ingham [Thu, 3 Mar 2022 20:10:54 +0000 (12:10 -0800)]
Fix the order of modules-loaded event and the resultant breakpoint-changed event.

The order used to be breakpoint-changed first, which didn't make much sense.

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

2 years agoFix up the "lldb log break" channel output.
Jim Ingham [Thu, 3 Mar 2022 17:56:50 +0000 (09:56 -0800)]
Fix up the "lldb log break" channel output.

1) Make the BreakpointEventData::Dump actually do something useful.
2) Make the Breakpoint events print when the break log channel is on
without having to turn on the events channel.

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

2 years ago[NFC] move CheckInstantiatedFunctionTemplateConstraints to SemaConcepts.cpp
Erich Keane [Thu, 3 Mar 2022 19:45:44 +0000 (11:45 -0800)]
[NFC] move CheckInstantiatedFunctionTemplateConstraints to SemaConcepts.cpp

This is a Sema function that now no longer depends on any of the
functionality in SemaTemplateInstantiateDecl.cpp (as the static function
was moved to Sema in a previous NFC).  Moving it to SemaConcept means
that it and CheckFunctionConstraints can be changed to share more.

2 years ago[DSE] Cache liveOnEntry as clobbering access
Philip Reames [Thu, 3 Mar 2022 19:36:21 +0000 (11:36 -0800)]
[DSE] Cache liveOnEntry as clobbering access

This builds on @fhahn's D112313, and caches the liveOnEntry node as a optimized access. D112313 tied to only cache a known clobber. This change adds caching the fact that no clobber exists. It still does not cache may-clobber results.

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

2 years agoRevert "Reapply "[SLP] Schedule only sub-graph of vectorizable instructions"""
Philip Reames [Thu, 3 Mar 2022 19:24:32 +0000 (11:24 -0800)]
Revert "Reapply "[SLP] Schedule only sub-graph of vectorizable instructions"""

This reverts commit 738042711bc08cde9135873200b1d088e6cf11c3. A second, apparently separate, issue has been reported on the original review.

2 years ago[RegAlloc] Add a complexity limit in growRegion() to cap compilation time.
Vasileios Porpodas [Tue, 1 Mar 2022 06:34:45 +0000 (22:34 -0800)]
[RegAlloc] Add a complexity limit in growRegion() to cap compilation time.

growRegion() does not scale in code with BBs with a very large number of edges.
In such code growRegion() becomes a compile-time bottleneck, consuming 60% of
the total compilation time.
This patch adds a limit to the complexity of growRegion() by incrementing a counter
in each iteration. We bail out once the limit is reached.

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

2 years ago[lldb] Remove reproducer verifier and corresponding command
Jonas Devlieghere [Thu, 3 Mar 2022 19:20:25 +0000 (11:20 -0800)]
[lldb] Remove reproducer verifier and corresponding command

This removes the reproducer verifier and the corresponding `reproducer
verify` subcommand.

2 years ago[AMDGPU] Added hsa-gfx90a-v3.s test. NFC.
Stanislav Mekhanoshin [Thu, 3 Mar 2022 19:17:50 +0000 (11:17 -0800)]
[AMDGPU] Added hsa-gfx90a-v3.s test. NFC.

2 years agoRevert "[GlobalOpt] Don't replace alias with aliasee if either alias/aliasee may...
Arthur Eubanks [Thu, 3 Mar 2022 18:57:10 +0000 (10:57 -0800)]
Revert "[GlobalOpt] Don't replace alias with aliasee if either alias/aliasee may be preemptible"

This reverts commit 30e8f83c84c5a302a559722fc0d2973dc3f425ee.

Causes huge compile time regressions on certain large files. Will followup offline with author.

2 years ago[lldb] Remove FileSystem::Initialize from VFS mapping
Jonas Devlieghere [Thu, 3 Mar 2022 18:30:43 +0000 (10:30 -0800)]
[lldb] Remove FileSystem::Initialize from VFS mapping

This patch removes the ability to instantiate the LLDB FileSystem class
based on a VFS overlay. This also removes the "hack" where we cast the
VFS to a RedirectingFileSystem to obtain the external path. You can
still instantiate a FileSystem with a VFS, but with the caveat that
operations that rely on the external path won't work.

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

2 years ago[AMDGPU] Add test for instructions unsupported on gfx940. NFC.
Stanislav Mekhanoshin [Thu, 3 Mar 2022 18:57:28 +0000 (10:57 -0800)]
[AMDGPU] Add test for instructions unsupported on gfx940. NFC.

2 years ago[memprof] Symbolize and cache stack frames.
Snehasish Kumar [Wed, 23 Feb 2022 20:37:42 +0000 (12:37 -0800)]
[memprof] Symbolize and cache stack frames.

Currently, symbolization of stack frames occurs on demand when the instrprof writer
iterates over all the records in the raw memprof reader. With this
change we symbolize and cache the frames immediately after reading the
raw profiles. For a large internal binary this results in a runtime
reduction of ~50% (2m -> 48s) when merging a memprof raw profile with a
raw instr profile to generate an indexed profile. This change also makes
it simpler in the future to generate additional calling context
metadata to attach to each memprof record.

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

2 years ago[libc++] Remove _LIBCXX_MODULES_BUILD and ext/ headers from header tests
Nikolas Klauser [Thu, 3 Mar 2022 13:32:41 +0000 (14:32 +0100)]
[libc++] Remove _LIBCXX_MODULES_BUILD and ext/ headers from header tests

Reviewed By: ldionne, Quuxplusone, #libc

Spies: libcxx-commits, arichardson

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

2 years ago[analyzer] Done some changes to detect Uninitialized read by the char array manipulat...
Shivam [Thu, 3 Mar 2022 15:32:34 +0000 (21:02 +0530)]
[analyzer] Done some changes to detect Uninitialized read by the char array manipulation functions

Few weeks back I was experimenting with reading the uninitialized values from src , which is actually a bug but the CSA seems to give up at that point . I was curious about that and I pinged @steakhal on the discord and according to him this seems to be a genuine issue and needs to be fix. So I goes with fixing this bug and thanks to @steakhal who help me creating this patch. This feature seems to break some tests but this was the genuine problem and the broken tests also needs to fix in certain manner. I add a test but yeah we need more tests,I'll try to add more tests.Thanks

Reviewed By: steakhal, NoQ

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

2 years ago[LLDB] Remove cases of using namespace llvm:: from header file
Shafik Yaghmour [Thu, 3 Mar 2022 18:39:06 +0000 (10:39 -0800)]
[LLDB] Remove cases of using namespace llvm:: from header file

We have using namespace llvm::dwarf in dwarf.h header globally. Replacing that
with a using namespace within lldb_private::dwarf and moving to a
using namespace lldb_private::dwarf in .cpp files and fully qualified names
in the few header files.

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

2 years ago[libc++] Move several defines to ADDITIONAL_COMPILE_FLAGS in the test suite
Louis Dionne [Thu, 3 Mar 2022 18:14:31 +0000 (13:14 -0500)]
[libc++] Move several defines to ADDITIONAL_COMPILE_FLAGS in the test suite

This avoids -Wmacro-redefined when turning warnings on with GCC.

2 years ago[libc++] Move .fail.cpp test to .verify.cpp
Louis Dionne [Thu, 3 Mar 2022 18:07:42 +0000 (13:07 -0500)]
[libc++] Move .fail.cpp test to .verify.cpp

2 years ago[CostModel] Change printer pass wording to work with update_analyze_test_checks.py
Arthur Eubanks [Thu, 3 Mar 2022 18:02:29 +0000 (10:02 -0800)]
[CostModel] Change printer pass wording to work with update_analyze_test_checks.py

update_analyze_test_checks.py looks for very specific wording, update
the printer pass to match the legacy `-analyze -cost-model` wording.

2 years ago[analyzer] Done some changes to detect Uninitialized read by the char array manipulat...
Shivam [Thu, 3 Mar 2022 15:32:34 +0000 (21:02 +0530)]
[analyzer] Done some changes to detect Uninitialized read by the char array manipulation functions

Few weeks back I was experimenting with reading the uninitialized values from src , which is actually a bug but the CSA seems to give up at that point . I was curious about that and I pinged @steakhal on the discord and according to him this seems to be a genuine issue and needs to be fix. So I goes with fixing this bug and thanks to @steakhal who help me creating this patch. This feature seems to break some tests but this was the genuine problem and the broken tests also needs to fix in certain manner. I add a test but yeah we need more tests,I'll try to add more tests.Thanks

Reviewed By: steakhal, NoQ

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

2 years ago[InstCombine][Analysis] Move getFCmpCode and getPredForFCmpCode to CmpInstAnalysis...
Craig Topper [Thu, 3 Mar 2022 17:16:20 +0000 (09:16 -0800)]
[InstCombine][Analysis] Move getFCmpCode and getPredForFCmpCode to CmpInstAnalysis. NFC

The similar getICmpCode and getPredForICmpCode are already there.
This moves FP for consistency.

I think InstCombine is currently the only user of both.

Reviewed By: RKSimon

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

2 years agoRevert "[lldb] Correct case in description of breakpoint --on-catch/throw"
David Spickett [Thu, 3 Mar 2022 17:20:31 +0000 (17:20 +0000)]
Revert "[lldb] Correct case in description of breakpoint --on-catch/throw"

This reverts commit 6b3b3ef344504334f43afe76c805d2e6e7b587e9.

Jim Ingham informed me that the upper case is a hint to the option
name, like you might see in a menu to show you what the shortcut is.

2 years ago[NFC] Change TemplateInstantiator to refer to the base using a typedef
Erich Keane [Thu, 3 Mar 2022 16:56:46 +0000 (08:56 -0800)]
[NFC] Change TemplateInstantiator to refer to the base using a typedef

A few places were inconsistent here, which makes a refactor to support
delayed concepts significantly more difficult.

2 years ago[flang][nfc] Fix GCC 11 build
Andrzej Warzynski [Thu, 3 Mar 2022 17:04:32 +0000 (17:04 +0000)]
[flang][nfc] Fix GCC 11 build

After merging https://reviews.llvm.org/D120801, Flang no longer builds
with GCC 11:
```
../llvm-project/flang/lib/Semantics/runtime-type-info.cpp:385:22: error: variable ‘lenParam’ set but not used [-Werror=unused-but-set-variable]
  385 |       for (SymbolRef lenParam : *lenParameters) {
      |                      ^~~~~~~~
```

I'm sending this without a review as a quick fix.

2 years ago[NFC][Clang][OpaquePtr] Remove calls to Address::deprecated in
Akira Hatanaka [Thu, 3 Mar 2022 16:54:46 +0000 (08:54 -0800)]
[NFC][Clang][OpaquePtr] Remove calls to Address::deprecated in
CGBlocks.cpp

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

2 years ago[lldb] Fix DataExtractor symbol conflict
Emre Kultursay [Thu, 3 Mar 2022 16:47:26 +0000 (08:47 -0800)]
[lldb] Fix DataExtractor symbol conflict

There are two DataExtractors in scope: one from the llvm namespace and
one from the lldb_private namespace. Some Microsoft Visual C++ compilers
(I tested with MSVC 14.23 specifically) cannot handle this situation,
and generate ambiguous symbol errors. This change fixes this compile
error.

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

2 years ago[IVDescriptor] Find original 'Previous' for first-order recurrences.
Florian Hahn [Thu, 3 Mar 2022 16:41:26 +0000 (16:41 +0000)]
[IVDescriptor] Find original 'Previous' for first-order recurrences.

This patch extends first-order recurrence handling to support cases
where we already sunk an instruction for a different recurrence, but
LastPrev comes before Previous.

To handle those cases correctly, we need to find the earliest entry for
the sink-after chain, because this is references the Previous from the
original recurrence. This is needed to ensure we use the correct
instruction as sink point.

Depends on D118558.

Reviewed By: Ayal

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

2 years ago[flang][nfc] Add missing build dependency
Andrzej Warzynski [Thu, 3 Mar 2022 16:33:54 +0000 (16:33 +0000)]
[flang][nfc] Add missing build dependency

Two buildbots have started failing recently:
* https://lab.llvm.org/buildbot/#/builders/181/builds/3894
* https://lab.llvm.org/buildbot/#/builders/191/builds/3908

Build error:
```
In file included from /home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/flang/examples/FlangOmpReport/FlangOmpReport.cpp:21:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/flang/include/flang/Frontend/FrontendActions.h:15:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/llvm/../mlir/include/mlir/IR/BuiltinOps.h:16:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/llvm/../mlir/include/mlir/IR/FunctionInterfaces.h:17:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/llvm/../mlir/include/mlir/IR/BuiltinTypes.h:12:
/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/llvm/../mlir/include/mlir/IR/BuiltinAttributeInterfaces.h:279:10: fatal error: 'mlir/IR/BuiltinAttributeInterfaces.h.inc' file not found
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
```

I have not been able to reproduce locally, but from this log it is clear
that the rule for `flangFrontend` is missing the
`MLIRBuiltinAttributeInterfacesIncGen` dependency from MLIR.  I couldn't
identify a breaking commit. I suspect that until now we have simply been
"lucky" and that dependency just happened to be built before
`flangFrontend`.

I am sending this without a review - the change is rather
straightforward and the only way to verify it is to make the buildbots
test it.

2 years ago[PS4] isPS4 and isPS4CPU are not meaningfully different
Paul Robinson [Wed, 2 Mar 2022 15:56:32 +0000 (10:56 -0500)]
[PS4] isPS4 and isPS4CPU are not meaningfully different

2 years ago[libc][Obvious] Add a few missing deps listings.
Siva Chandra Reddy [Thu, 3 Mar 2022 10:46:01 +0000 (10:46 +0000)]
[libc][Obvious] Add a few missing deps listings.

2 years ago[UpdateTestChecks] Don't skip first line with --filter
Sebastian Neubauer [Mon, 14 Feb 2022 11:07:34 +0000 (12:07 +0100)]
[UpdateTestChecks] Don't skip first line with --filter

body_start was never used, resulting in the first filtered line to be
skipped.
Fixes the --filter option introduced in D117694.

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

2 years ago[libcxx][test][NFC] Add tests for constructors of unordered [multi]map since C++14
Ruslan Arutyunyan [Thu, 3 Mar 2022 14:04:59 +0000 (17:04 +0300)]
[libcxx][test][NFC] Add tests for constructors of unordered [multi]map since C++14

Add tests for C++14 constructors in unordered_map and unordered_multimap

unordered_[multi]map(size_type sz, const allocator_type& alloc);
unordered_[multi]map(size_type sz, const hasher& hash, const allocator_type& alloc);

template <class InputIt>
unordered_[multi]map(InputIt first, InputIt last, size_type sz, const allocator_type& alloc);

template <class InputIt>
unordered_[multi]map(InputIt first, InputIt last, size_type sz, const hasher& hash, const allocator_type& alloc);

unordered_[multi]map(initializer_list<value_type> init, size_type sz, const allocator_type& alloc);
unordered_[multi]map(initializer_list<value_type> init, size_type sz, const hasher& hash, const allocator_type& alloc);

Reviewed By: ldionne, rarutyun, #libc

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

2 years ago[Attributor] Regenerate test checks (NFC)
Nikita Popov [Thu, 3 Mar 2022 15:59:17 +0000 (16:59 +0100)]
[Attributor] Regenerate test checks (NFC)

2 years ago[mlir] Fix gcc -std=c++17 compilation.
Michael Kruse [Thu, 3 Mar 2022 14:57:22 +0000 (08:57 -0600)]
[mlir] Fix gcc -std=c++17 compilation.

Ensure that `Handler` within the class is interpreted as the as the current template instantiation (instead the class template itself).

Fixes #53447

Reviewed By: rriddle

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

2 years ago[Clang] Diagnose invalid member variable with template parameters
Corentin Jabot [Thu, 3 Mar 2022 10:27:45 +0000 (11:27 +0100)]
[Clang] Diagnose invalid member variable with template parameters

Fixes https://github.com/llvm/llvm-project/issues/54151

Reviewed By: erichkeane, aaron.ballman

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

2 years ago[mlir][linalg] NFC: minor cleanups after moving pad to tensor dialect
Lei Zhang [Thu, 3 Mar 2022 14:44:40 +0000 (09:44 -0500)]
[mlir][linalg] NFC: minor cleanups after moving pad to tensor dialect

Reviewed By: mravishankar

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

2 years ago[Concepts] Check constraints for explicit template instantiations
Roy Jacobson [Thu, 3 Mar 2022 14:17:07 +0000 (06:17 -0800)]
[Concepts] Check constraints for explicit template instantiations

The standard requires[0] member function constraints to be checked when
explicitly instantiating classes. This patch adds this constraints
check.

This issue is tracked as #46029 [1].

Note that there's an related open CWG issue (2421[2]) about what to do when
multiple candidates have satisfied constraints. This is particularly an
issue because mangling doesn't contain function constraints, and so the
following code still ICEs with definition with same mangled name
'_ZN1BIiE1fEv' as another definition:

template<class T>
struct B {
  int f() requires std::same_as<T, int> {
    return 0;
  }
  int f() requires (std::same_as<T, int> &&
                    !std::same_as<T, char>) {
    return 1;
  }
};

template struct B<int>;

Also note that the constraints checking while instantiating *functions*
is still not implemented. I started looking at it but It's a bit more
complicated. I believe in such a case we have to consider the partial
constraints order and potentially choose the best candidate out of the
set of multiple valid ones.

[0]: https://eel.is/c++draft/temp.explicit#10
[1]: https://github.com/llvm/llvm-project/issues/46029
[2]: https://cplusplus.github.io/CWG/issues/2421.html

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

2 years ago[libc++] Fix initialization of __fill_
Jake Egan [Thu, 3 Mar 2022 14:28:23 +0000 (09:28 -0500)]
[libc++] Fix initialization of __fill_

`basic_ios` delays initialization of `__fill_` to `widen(' ')` until `fill()` is called. But, `fill(char_type)` is missing this logic, so the fill character does not get initialized to whitespace if `fill(char_type)` is called first. This patch adds this logic to `fill(char_type)`.

Reviewed By: #libc, ldionne, Quuxplusone

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

2 years ago[SDAG] try harder to remove a rotate from X == 0
Sanjay Patel [Thu, 3 Mar 2022 13:48:25 +0000 (08:48 -0500)]
[SDAG] try harder to remove a rotate from X == 0

https://alive2.llvm.org/ce/z/mJP7XP

This can be viewed as expanding the compare into and/or-of-compares:
https://alive2.llvm.org/ce/z/bkZYWE
followed by reduction of each compare.

This could be extended in several ways:
1. There's a (X & Y) == -1 sibling.
2. We can recurse through more than 1 'or'.
3. The fold could be generalized beyond rotates - any operation that
   only changes the order of bits (bswap, bitreverse).

This is a transform noted in D111530.

2 years ago[x86] add tests for setcc of rotate; NFC
Sanjay Patel [Wed, 2 Mar 2022 21:58:02 +0000 (16:58 -0500)]
[x86] add tests for setcc of rotate; NFC

2 years ago[FuncSpec] Remove unnecessary function pointer type check
Nikita Popov [Thu, 3 Mar 2022 14:18:15 +0000 (15:18 +0100)]
[FuncSpec] Remove unnecessary function pointer type check

We will check a bit later that the constant is in fact a function,
so the separate check for a function pointer type is largely
redunant. Also simplify the cast stripping with
stripPointerCasts().

2 years ago[AArch64] Use first op of FADDPv* instead of implicit def.
Florian Hahn [Thu, 3 Mar 2022 13:32:08 +0000 (13:32 +0000)]
[AArch64] Use first op of FADDPv* instead of implicit def.

This patch updates the FADDPv* patterns that only use the lower half of
the result register. For those patterns, the second operand does not
matter because its results won't be used.

Instead of introducing new implicit defs for those operands, just use
the first operand. The problem with using new implicit defs is that
register allocation can introduce unnecessary dependencies by using a
different register than the first operand.

For motivating cases, see the changes in the fadd_reduction_*_in_loop
cases. Without this change, the first faddp in the loop has an
unnecessary additional dependency through v0, which is also used for
a cross-iteration reduction.

This can noticeable impact performance. For slightly bigger loops,
this change can improve performance by 15%.

Reviewed By: sdesmalen, t.p.northover

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

2 years ago[pseudo] Fix an out-of-bound access for LRTable::Actions.
Haojian Wu [Thu, 3 Mar 2022 13:21:31 +0000 (14:21 +0100)]
[pseudo] Fix an out-of-bound access for LRTable::Actions.

Without this patch, when End == Start, we access Actions[Actions.end()]
though we return an empty result.
This fixes an assertion failure in MSVC STL debug build.

2 years ago[mlir][bufferize] Always bufferize top-to-bottom
Matthias Springer [Thu, 3 Mar 2022 12:52:11 +0000 (21:52 +0900)]
[mlir][bufferize] Always bufferize top-to-bottom

This ensures that we generate memref types with matching layout maps. (Especially when using partial bufferization passes.)

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

2 years ago[FuncSpec][NFC] Refactor internal structures.
Alexandros Lamprineas [Thu, 3 Mar 2022 11:53:01 +0000 (11:53 +0000)]
[FuncSpec][NFC] Refactor internal structures.

`ArgInfo` is reduced to only contain a pair of {formal,actual} values.
The specialized function `Fn` and the `Partial` flag are redundant in
this structure. The `Gain` is moved to a new struct `SpecializationInfo`.

The value mappings created by cloneCandidateFunction() are being used
by rewriteCallSites() for matching the formal arguments of recursive
functions.

The list of specializations is passed by reference to calculateGains()
instead of being returned by value.

The `IsPartial` flag is removed from isArgumentInteresting() and
getPossibleConstants() as it's no longer used anywhere in the code.

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

2 years ago[clang-format] Handle wrapped else for RemoveBracesLLVM
owenca [Thu, 3 Mar 2022 07:36:34 +0000 (23:36 -0800)]
[clang-format] Handle wrapped else for RemoveBracesLLVM

Removes the newline before the right brace that's followed by an
else on the next line.

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

2 years ago[RISCV] Add cost modelling for masked memory op
Alex Tsao [Wed, 2 Mar 2022 18:03:48 +0000 (02:03 +0800)]
[RISCV] Add cost modelling for masked memory op

The patch adds very basic cost model for masked memory op on scalable vector.

Reviewed By: frasercrmck

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

2 years ago[gn build] Port 8de8731591fe
LLVM GN Syncbot [Thu, 3 Mar 2022 12:36:38 +0000 (12:36 +0000)]
[gn build] Port 8de8731591fe

2 years agoRevert "[VP] Introducing VectorBuilder, the VP intrinsic builder"
Simon Moll [Thu, 3 Mar 2022 12:34:20 +0000 (13:34 +0100)]
Revert "[VP] Introducing VectorBuilder, the VP intrinsic builder"

This reverts commit 8bcbfb50e8ea24998f9adf2f50b1f63b499299ed.

Taking this patch offline to fix breakage: https://lab.llvm.org/buildbot/#/builders/110/builds/10912

2 years ago[libc++] Use -I instead of -isystem to include headers in the test suite
Nikolas Klauser [Thu, 3 Mar 2022 11:10:30 +0000 (12:10 +0100)]
[libc++] Use -I instead of -isystem to include headers in the test suite

Using -isystem marks the headers as system headers, which means that we
don't actually get all the warnings that we'd normally get if we included
the headers as user headers.

The goal of the test suite is normally to mirror as closely as possible
how users would use the library. Technically, this change goes against
that philosophy, since users should be using `-isystem` (if they ever
need to specify the libc++ path explicitly, which should be a rare
occurence). However, I believe fishing out additional warnings from
the headers provides more value, hence this change. Ideally, we'd be
able to still use `-isystem`, but instruct Clang to still emit warnings
from the libc++ headers (e.g. we could tell Clang to emit warnings in
any file inside `<...>/usr/include/c++/v1`).

Reviewed By: #libc, ldionne, #libc_abi

Spies: Mordante, EricWF, mstorsjo, mgorny, aheejin, arichardson, philnik, jloser, libcxx-commits

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

2 years ago[libcxx][test][NFC] Add tests for C++14 constructors of unordered sets
Ruslan Arutyunyan [Thu, 3 Mar 2022 11:48:54 +0000 (14:48 +0300)]
[libcxx][test][NFC] Add tests for C++14 constructors of unordered sets

Add tests for C++14 constructors in unordered_set and unordered_multiset:

unordered_[multi]set(size_type sz, const allocator_type& alloc);
unordered_[multi]set(size_type sz, const hasher& hash, const allocator_type& alloc);

template <class InputIt>
unordered_[multi]set(InputIt first, InputIt last, size_type sz, const allocator_type& alloc);

template <class InputIt>
unordered_[multi]set(InputIt first, InputIt last, size_type sz, const hasher& hash, const allocator_type& alloc);

unordered_[multi]set(initializer_list<value_type> init, size_type sz, const allocator_type& alloc);
unordered_[multi]set(initializer_list<value_type> init, size_type sz, const hasher& hash, const allocator_type& alloc);

Reviewed By: ldionne, Quuxplusone, rarutyun, #libc

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

2 years ago[X86][XOP] Tidyup VPHADD/VPHSUB unary horizontal ops default schedule class
Simon Pilgrim [Thu, 3 Mar 2022 12:07:48 +0000 (12:07 +0000)]
[X86][XOP] Tidyup VPHADD/VPHSUB unary horizontal ops default schedule class

Based off Agner and AMD SoG tables, the XOP VPHADD/VPHSUB unary horizontal ops are as fast as basic arithmetic ops, not the slower SSSE3 binary horizontal add/sub ops. This also matches what the bdver2 model already lists.

Noticed while investigating reduction add optimizations.

2 years ago[NFC] TypePromotion test
Sam Parker [Thu, 3 Mar 2022 11:47:02 +0000 (11:47 +0000)]
[NFC] TypePromotion test

2 years agoReapply [lit] Read command stdout/stderr as text on Windows
Martin Storsjö [Sat, 26 Feb 2022 22:16:24 +0000 (00:16 +0200)]
Reapply [lit] Read command stdout/stderr as text on Windows

This takes care of normalizing newlines back to single LF instead
of CRLF.

Fix up a couple tests that accidentally pass binary data to stdout.

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

2 years ago[libcxx] [test] Fix get/put long_double_ru_RU on Glibc, FreeBSD and Windows
Martin Storsjö [Tue, 22 Feb 2022 11:23:53 +0000 (13:23 +0200)]
[libcxx] [test] Fix get/put long_double_ru_RU on Glibc, FreeBSD and Windows

Note, reducing ios.width() in put_long_double instead of using variable
padding, when using a variable width symbol. Some of those tests didn't
actually trigger any padding in the existing form, with a longer
currency symbol; reduce the width so there's no actual padding with the
slightly shorter currency symbol either.

The tests for the international currency symbol use the same amount of
padding on all platforms, so they still exercise the padding properly.

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

2 years ago[AArch64] Update costs for some fp16 converts
David Green [Thu, 3 Mar 2022 11:17:24 +0000 (11:17 +0000)]
[AArch64] Update costs for some fp16 converts

This updates the costs for FP16 converts, as some of them were pretty
high.

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

2 years ago[mlir][linalg][bufferize] Migrate --linalg-bufferize to BufferizableOpInterface-based...
Matthias Springer [Thu, 3 Mar 2022 10:50:32 +0000 (19:50 +0900)]
[mlir][linalg][bufferize] Migrate --linalg-bufferize to BufferizableOpInterface-based bufferization

This commit deletes the old dialect conversion-based bufferization patterns, which are now obsolete.

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

2 years ago[AArch64] Vector shifts cost 1
David Green [Thu, 3 Mar 2022 10:42:57 +0000 (10:42 +0000)]
[AArch64] Vector shifts cost 1

The costs of vector shifts was 2 as opposed to 1, as the nodes are
marked custom. Fix this like the others and mark the nodes as cheap.

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

2 years ago[gn build] Port 8bcbfb50e8ea
LLVM GN Syncbot [Thu, 3 Mar 2022 10:33:40 +0000 (10:33 +0000)]
[gn build] Port 8bcbfb50e8ea

2 years ago[VP] Introducing VectorBuilder, the VP intrinsic builder
Simon Moll [Thu, 3 Mar 2022 10:31:42 +0000 (11:31 +0100)]
[VP] Introducing VectorBuilder, the VP intrinsic builder

VectorBuilder wraps around an IRBuilder and
VectorBuilder::createVectorInstructions emits VP intrinsics as if they
were regular instructions.

Reviewed By: craig.topper

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

2 years agoRevert "[mlir] Add extensible dialects"
Andrzej Warzynski [Thu, 3 Mar 2022 10:24:35 +0000 (10:24 +0000)]
Revert "[mlir] Add extensible dialects"

This reverts commit dbe9f0914fcfd8444fd9656821af0f1a34a27e7a.

The flang-x86_64-windows buildbot has been failing since this has been merged:
* https://lab.llvm.org/buildbot/#/builders/172/builds/9124
Similar failure was reported by the pre-commit CI.

2 years ago[analyzer] Improve NoOwnershipChangeVisitor's understanding of deallocators
Kristóf Umann [Fri, 4 Feb 2022 14:40:26 +0000 (15:40 +0100)]
[analyzer] Improve NoOwnershipChangeVisitor's understanding of deallocators

The problem with leak bug reports is that the most interesting event in the code
is likely the one that did not happen -- lack of ownership change and lack of
deallocation, which is often present within the same function that the analyzer
inlined anyway, but not on the path of execution on which the bug occured. We
struggle to understand that a function was responsible for freeing the memory,
but failed.

D105819 added a new visitor to improve memory leak bug reports. In addition to
inspecting the ExplodedNodes of the bug pat, the visitor tries to guess whether
the function was supposed to free memory, but failed to. Initially (in D108753),
this was done by checking whether a CXXDeleteExpr is present in the function. If
so, we assume that the function was at least party responsible, and prevent the
analyzer from pruning bug report notes in it. This patch improves this heuristic
by recognizing all deallocator functions that MallocChecker itself recognizes,
by reusing MallocChecker::isFreeingCall.

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

2 years ago[InstCombine] Support opaque pointers in callee bitcast fold
Nikita Popov [Thu, 3 Mar 2022 10:05:31 +0000 (11:05 +0100)]
[InstCombine] Support opaque pointers in callee bitcast fold

To make this actually trigger, we also need to check whether the
function types differ, which is a hidden cast under opaque pointers.
The transform is somewhat less relevant there because it is
primarily about pointer bitcasts, but it can also happen with other
bit- or pointer-castable types.

Byval handling is easier with opaque pointers because there is no
need to adjust the byval type, we only need to make sure that it's
still a pointer.

2 years ago[lldb] Correct case in description of breakpoint --on-catch/throw
David Spickett [Thu, 3 Mar 2022 10:04:07 +0000 (10:04 +0000)]
[lldb] Correct case in description of breakpoint --on-catch/throw

Somehow we ended up with catcH/throW.

2 years ago[InstCombine] Remove unnecessary byval check in callee cast fold
Nikita Popov [Thu, 3 Mar 2022 09:49:00 +0000 (10:49 +0100)]
[InstCombine] Remove unnecessary byval check in callee cast fold

The logic for handling this was fixed in
8d7f118ab2b9e51d6cf2811291e319b4d977eb8c, but the check for byval
on the callee was retained. This resulted in a weird situation
where the transform would work depending on whether the byval
was only on the call or on both the call and the function.