[DebugInfo] Don't match wrong NULL in CHECK lines of dwarf5-debug-info-static-member.ll (#184694)
Fixes failure on clang-ppc64le-rhel buildbot
(https://lab.llvm.org/buildbot/#/builders/145/builds/13080) after
#184219.
On ppc64le, children are not produced for DW_TAG_subprogram "main" in
this test. Therefore, dwarfdump doesn't print NULL after this tag. On
other platforms (AArch64/X86), DW_TAG_subprogram has DW_TAG_variable
"instance_C", which should not be matched by the check lines.
Loosened the check lines (turned CHECK-NEXT into CHECK) to make them
work for all mentioned platforms.
[Clang] Only define `wchar_size` module flag if non-standard (#184668)
Summary:
This PR simply changes the behavior of the `wchar_size` flag. Currently,
we emit this in all cases for all targets. This causes problems during
LLVM-IR linking, specifically because this would vary between Linux and
Windows in unintuitive ways. Now we have an llvm::Triple helper to
determine the size from the known values. The module flag will only be
emitted if these do not match (indicating a non-standard environment).
In addition to fixing AMDGCN bitcode linking, this also means we don't
need to bloat *every* IR module compiled by clang with this flag. The
changed tests reflects this, one less unnecessary piece of metadata.
[SLP]Do not consider split vectorize nodes as vector phi nodes
Split vectorize nodes should not be considered as vector PHI nodes, when
trying to find the insertion point for the postpotned nodes.
Fixes #184585
[clang-doc] Sort index and avoid non-determinism (#184675)
Consolidate logic to get sorted children from StringMap.
Using the new API makes it more natural to not miss cases
where we missed sorting the children directly.
This also allows us to remove -DAG checks from tests and have
deterministic ordering.
[CIR] Upstream global variable replacement (#184686)
This change upstreams the CIR implementation of global variable
replacement. When we get a call to get or create a global variable using
a type that does not match the previous type for a variable of the same
name, we need to replace the old definition with the new one. In classic
codegen that was as simple as replaceAllUses+eraseFromParent, but in CIR
because we have typed pointers, we need to visit the uses and update
them with bitcasts to reflect the new type.
[lld][WebAssembly] Convert weak-alias tests to assembly. NFC (#184667)
This actually both improves and simplifies the `Inputs/weak_alias`. With
the `.ll` version we ended up using memory and `__stack_pointer` and
locals, but LLVM ended up generated `call` rather than `call_indirect`
for the `call_alias_ptr` and `call_direct_ptr`. With the assembly tests
we can ensure the usage of `call_indirect` while avoiding all the other
stuff.
[dsymutil] Add option to filter debug map objects by allow/disallow-list (#182083)
# Motivation
When using `dsymutil` to generate dSYM for large binaries, sometimes we
want to keep only some of the object files. This has the benefits of
reduced dSYM size and improved performance of LLDB and other tools which
consume the dSYM.
The current way to achieve this is to use YAML input (the `dsymutil -y`
option). However, it doesn't really solve the problem:
1. The whole debug map has to be parsed somewhere else first, before
filtered down to the wanted parts.
2. Said info is written then read by `dsymutil`. The I/O is redundant.
# Change
This patch propose a new way, by adding new options (`dsymutil --allow
<path>` and `--disallow <path>`), which will only process object files
[10 lines not shown]
[LLDB] Allow symbols added by linker scripts to be examined. (#184679)
Symbols added by linker scripts do not have debug information or types,
but they do have addresses. Sometimes users need to see the addresses of
these symbols. Currently these symbols end up being assigned
'eSymbolTypeInvalid', so any attempt to look at them fails. This fixes
that issue.
[DebugInfo] Don't specify target triple for cross-cu-linkonce-distinct.ll (#184685)
Fixes buildbot failures after #184219.
Target triple line was added to this test in https://reviews.llvm.org/D144007, but it's needless.
[GOFF] Set reference to ADA
Function symbols must have a reference to the ADA, because this becomes
the value of the r5 register when the function is called. Simply get the
value from the begin symbol of the section.
[MemProf] Add stack IDs to MemProfUse optimization remarks (#184670)
This makes the remarks more equivalent for analysis to what we emit to
stderr under -memprof-print-match-info.
libclc: Enable generic address space for amdgpu build
Based on the macros in clc_func.h, the generic address space
functions weren't being built. amdhsa triples assume flat address
space is available. If we really cared about preserving gfx6 on
mesa3d, we would need to split the build. But given that clover
was deleted, don't bother.
[DAG] isKnownToBeAPowerOfTwo - Power of 2 value is known to be power of 2 after BSWAP/BITREVERSE (#182207)
This is my first pr specifically for llvm
Fixes #181657
Allows the isKnownToBeAPowerOfTwo function to handle BSWAP and
BITREVERSE dag operations.
[HLSL] groupshared variables should be implicitly extern and should not be initialized (#184459)
Makes groupshared variables have extern storage class which prevents
them from being initialized if no initializer is provided. If one is
provided as below:
```
groupshared uint A = 1;
```
A warning, which is an error by default, is produced that says the
initializer is ignored and the variable is NOT initialized.
Closes #183602
[WebAssembly] MC support for acquire-release atomics (#183656)
Initial support for acquire-release atomics, specified as part of
https://github.com/WebAssembly/shared-everything-threads
This adds an ordering operand to atomic loads, stores, RMWs,
wait/notify,
and fences. It currently defaults to 0 and ISel is not updated yet, so
atomics produced by the compiler will still always be seqcst.
Asm parsing and printing, binary emission and disassembly are all
updated. Binary emission will always use the old encoding because the
encoding is smaller, and to get backwards compatibility for free.