[GVNHoist] call patchReplacementInstruction in rauw
In Replace all User With function, we actually need to relax flag for
hoisting. In one miscompilation bug we have (see:
https://github.com/llvm/llvm-project/issues/236581). We actually need
dropPoisonGeneratingFlags.
After taking a look at patchReplacementInstruction, we actually need
callsite relaxation also.
As a result, we make rauw call this function directly. The only
difference is that Hoisting actually move the instruction so we cannot
set combineMetadataForCSE to true. We add a parameter to pass the
value and set the value to false by default.
Assisted-by: Claude # Test
[AMDGPU] Update src2 live range when converting WMMA to three-address form
Since #225174, `LiveIntervals` is computed before the two-address instruction
pass. A two-address WMMA ties `src2` to an early-clobber `vdst`, so if `src2`
dies at the WMMA, its live range ends at the early-clobber slot. When the pass
converts the WMMA to the three-address form, `src2` is no longer tied and is
read at the register slot, but `SIInstrInfo::convertToThreeAddress` only updates
the live range of the def. The machine verifier then reports "Live segment
ending at early clobber slot must be redefined by an EC def in the same
instruction".
This PR moves the end of such a segment to the register slot, for the main range
and the subranges.
Fixes LCOMPILER-3197.
[orc-rt] Replace 'sps_ci' namespace with nested 'sps::ci'. (#239464)
Not all SPS-based utilities are CI (Controller Interface). To reflect
this, this commit breaks the `sps_ci` namespace up into an `sps`
namespace (to be shared between all code that depends on SPS), and a
nested `sps::ci` namespace for CI code that depends on SPS.
[X86] Enable SlotIndexes compaction by default
Compacting SlotIndexes before greedy allocation drops the entries of
erased instructions, so live range sizes and instruction distances
reflect the code being allocated rather than how much was erased
before it. AMDGPU has done this since #235806; do the same for X86.
Codegen changes only through allocation: no new crashes, verifier
errors or allocation failures in the lit suites, including
EXPENSIVE_CHECKS, and a stage-2 build of LLVM, clang and lld with
-verify-machineinstrs passes its own tests. On llvm-test-suite at -O3,
spills drop 0.3% and .text 0.06%, with compile time unchanged.
Most test updates are regenerated checks. misched-matmul now inserts
20 spills instead of 24. live-debug-vars-stale-slotindexes.mir gets
one more use of %27 so that accumulate_fit still reaches the stale
index path it was written for.
[lldb] Correct Symbol's ctor from another Symbol (#239381)
As I was working on another issue with Claude, it happened to see this
discrepency but it wasn't directly relevant to the work I was doing
there, so I'm handling it separately.
Symbol::operator= initializes m_size_is_synthesized of the lhs object to
the value of the rhs side's ivar.
But Symbol::Symbol(const Symbol &rhs) does not copy this ivar, it
initializes it to false. Likely someone copied the basic constructor's
init list and missed this variable.
[orc-rt] Identify controller handlers by tag address (#239462)
orc_rt_ControllerHandlerTag was a void * whose value was passed to the
controller, but tags are meant to be global variables whose *address*
identifies the handler. Passing a tag variable's value instead would
silently pass the same (zero) value for every tag.
This commit makes orc_rt_ControllerHandlerTag a one-byte struct, moves
it into its own header (orc-rt-c/bedrock/ControllerHandlerTag.h), and
changes all APIs to take tags by pointer. Passing a tag by value is now
a compile error.
Tags must have distinct addresses, so:
- The struct is non-empty (an empty struct is a GNU extension in C, with
size 0, so distinct tags could share an address).
- Tags must not be const: the linker may fold identical read-only data
(e.g. under identical code folding). APIs take tags by non-const
pointer, so passing a const tag is an error in C++ and a warning in C.
[8 lines not shown]
Attributor: Check for assume knowledge once per attribute query
hasAttr and getAttrs looked for assume knowledge separately for each
queried attribute kind, but most modules have none.
CTMark instructions:u with -attributor-enable=light changes by O3
-0.13%, ThinLTO -0.10%. The attributor-light pass itself is 1.6-4.1%
faster (callgrind), and 0.6-1.7% faster with the other pending
Attributor compile-time changes applied.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[libc++] Adapt the LNT tooling to the new format of GET /series (#239352)
LNT's GET /series endpoint now accepts several metrics at a time, which
changes slightly its output format. Update the scripts to account for
that.
Assisted by Claude
misc/crush: Update to 0.100.0
While here, remove DISABLE_COMMAND_BLOCKING option.
Upstream has introduced "sysadmin mode" in which crush can run any
command, which is essentially equivalent to
DISABLE_COMMAND_BLOCKING. In addition, the upstream has also
introduced "permission" command with which you can configure which
commands are dangerous to your system.
Changelog: https://github.com/charmbracelet/crush/releases/tag/v0.100.0
Reported by: GitHub (watch releases)
[Demangle] Allow template arguments on the type of a conversion expression
A conversion expression 'cv <type> <expression>' parsed its type with
template-argument parsing disabled, so a template template parameter or
substitution followed by template arguments, as in S1_IT0_E, was not
accepted. No <expression> starts with 'I', so there is no ambiguity.
GCC emits the same form for decltype(S1<T>().~U()); clang's own
mangling of CodeGenCXX/mangle.cpp test51 fun3 hit this and could not be
demangled.
Part of #111345.
LLM-aided
[Demangle] Parse nested template arguments in a conversion operator's type
While parsing the <type> of a conversion operator, template arguments after
a type are not consumed, because they may belong to the operator itself
(a conversion function template such as cvT_IiE). That restriction was left
on while parsing the contents of a nested <template-args>, so a substitution
inside them was not allowed to take its own template arguments. For
example, in the name of `operator std::vector<int>()`,
_ZN1AcvSt6vectorIiSaIiEEEv, the `SaIiE` (std::allocator<int>) was parsed as
the bare substitution `Sa`, and the whole name was rejected.
Template arguments nested inside an I...E always belong to their own types,
so re-enable parsing them in parseTemplateArgs. The ambiguity only exists at
the outermost level of the conversion type, which is unchanged.
GCC emits the same manglings for these operators.
Part of #111345.
LLM-aided
lang/v8-beta: update to 15.8.62.9 (Chrome 158 beta)
- Update the dependency pins from DEPS and the Temporal crates to the
versions in Chromium's third_party/rust (ICU4X 2.4).
- Adapt the PartitionAlloc zero segment patches to the new
GetWellKnownReadOnlyRegions() interface, and the d8 ASLR check to
the new guard condition.
- Disable the new ECMA-402 ICU4X backend (v8_enable_ecma402_icu4x),
which needs another Rust library built by GN. It is only used when
enabled with runtime flags, and Node builds disable it as well.
lang/v8: update to 15.7.112.23 (Chrome 157 stable)
- Sync with lang/v8-beta at 15.7.112.9; DEPS is unchanged since then.
- Shim Cursor.__eq__ in metagen for LLVM < 21, which passes None to
clang_equalCursors.
- PartitionAlloc's GetStackTop() now returns uintptr_t; adjust the
FreeBSD implementation.
[clang-cl] Omit command line and workdir in CIFF CV debug info for reproducible builds. (#205736)
The command line can contain the arguments, such as the pathes or /pathmap options,
which could break a reproducible output for the object files. In addition to
`-gcodeview-commandline` option that drops the command line from the build info,
this patch adds a new `-gcodeview-cwd` option to exclude the current working
directory from the build info of the CodeView debug info sections.
Also it links `-gno-codeview-cwd` and `-gno-codeview-commandline` options with
CL's `/Brepro` option to match (partly) compiler behaviour with MSVC.