[DebugInfo][FLMD] Add core FLMD context + node classes
This patch starts implementing the core FLMD context and node classes,
which serve to replace the existing DILocation-based source location model.
Most of the additions of this patch are in FunctionLocalMetadata.h, which
defines the context class MDFunctionLocalContext and the data types that it
stores, and also includes verifier changes to test some of the basic
semantics of these classes.
The contents of FunctionLocalMetadata.h are largely unmodified in later
patches, meaning this is a complete implementation of the basic class
interfaces, not including support functions, e.g. IR/Bitcode, value
mapping, or updating the contents through transformations such as inlining.
This patch also does not include FLDebugLoc, the class that replaces
DebugLoc as the main source location storage mechanism; these will all be
added in followup patches.
[Mips] Fix fixpoint iteration in MipsBranchExpansion (#242779)
The loop only continued when handleForbiddenSlot() made a change, so
NOPs added by handleFPUDelaySlot(), handleLoadDelaySlot() and
handleMFLO() could push a branch out of range without long branch
expansion running again, leading to "out of range PC16 fixup" errors.
Only long branch expansion depends on instruction sizes, so run it
last and repeat until it makes no more changes. Long branch expansion
can create new forbidden slot hazards on R6, so handle the hazards
again after each change. handleMFLO() only runs once since long branch
expansion does not create MFLO/MFHI hazards and it is not idempotent.
handleSlot() checked for Mips::NOP to avoid adding a second NOP, but
insertNop() creates SLL $zero, $zero, 0, so every rerun added another
NOP. Check for both forms.
Load delay, FPU delay and MFLO tests are from #223900.
[4 lines not shown]
[CIR] Emit memset when zero-initalizing a big struct (#244282)
This adds CIR version of `CheckAggExprForMemSetUse` in order to emit
memset instead of individual zero stores just like in OGCG. It moves a
few functions to CodeGenUtils to avoid a bunch of copy-pasting. This
also allows to zero paddings between struct fields. This is not required
by C++ rules but both GCC and clang with OGCG do this and I found some
real app code relying on this.
Assisted-by: claude
LiveIntervals: fix shrinkToUses to consider early-clobber slots (#238749)
shrinkSubRangeToUses() is called by PHIElimination, before
TwoAddressInstruction ensures tied operands share the same vreg. It
tries to find early-clobber uses by checking if the used vreg is also
defined by the parent instruction. This cannot happen, as tied uses
haven't been rewritten yet.
Instead, we need to query whether the use is tied to an early clobber
def when still in SSA form. This is similar to what LiveIntervalCalc
does when building a LiveInterval. A common
MachineOperand::isEarlyClobberDefOrUse() has been created.
Note that PHIElimination does not call shrinkToUses for the main range,
and instead shrinks the LI itself. It preserves the original slot that
was found by LiveIntervalCalc, so no fix was needed there. I still
updated shrinkToUses to use isEarlyClobberDefOrUse. This ensures the
later TwoAddressInstruction does not temporarily create wrong intervals
when rewriting tied registers.
[7 lines not shown]
[mlir][ODS] Generate hooks that register the attributes and types of a dialect (#243481)
Dialects registered their generated attributes and types by expanding
`GET_ATTRDEF_LIST` (or `GET_TYPEDEF_LIST`) into the template arguments
of `addAttributes` (or `addTypes`).
This requires each and every type and attribute and their storage
classes' to be defined at the callsite and is generally boilerplate that
exists in most dialects.
This PR introduces a single registration hook that is generated by ODS
and called automatically from dialects' constructors if
`useDefaultAttributeRegistration` (and corresponding type field) is set.
The field defaults to a new `hasAttributes` flag which initializes
common defaults for attribute and type implementations using a single
flag.
The motivation and further advantage of this approach is that we can
then also change the implementation of the registration method in ODS
while keeping API compatibility. This is required for partitioning of
[11 lines not shown]
rt5-cli: Import rt5-cli-5.0.11 as wip/rt5-cli
rt allows you to interact with an RT server over HTTP, and offers
an interface to RT's functionality that is better-suited to automation
and integration with other tools.
This package tracks RT 5.x branch.
Based on devel/rt4-cli.
[clang][AMDGPU] Fix codegen crash when some builtins have bad atomic orderings (#241876)
We were emitting a warning but returning "true" which replaced the expr
with a Poison, leading to a crash during CodeGen. Fix that + properly
handle bad atomic orderings for fence/monitor load/coop atomics.
Assisted-by: Claude Opus 5.5
Fixes #239597
[analyzer] Compute the statement crash trace location lazily (#245071)
ProcessStmt, Visit, processBranch, ProcessLoopExit and
ProcessLifetimeEnd pushed a PrettyStackTraceLoc for every statement they
evaluate, which called the out-of-line Stmt::getBeginLoc eagerly
although the location is only needed if a crash trace is printed.
Use a small PrettyStackTraceEntry subclass that keeps the statement and
computes its location in print(). The printed text is unchanged.
On some LLVM TUs (GVN, LiveVariables, RegionStore, SemaExpr) this
reduces the instructions of the static analyzer by 0.16-0.19%. The
cycles (-0.3% to -1.1%) and peak memory changes are within noise.
Assisted-by: Claude Opus 5.5
Co-authored-by: Gabor Horvath <gaborh at apple.com>
[analyzer] Format the block entrance crash trace lazily (#244841)
runCheckersForBlockEntrance created a PrettyStackTraceFormat on every
block edge. It formats its message eagerly with two vsnprintf calls, and
the message does not fit its inline buffer, so it also allocated each
time.
Use a small PrettyStackTraceEntry subclass that keeps a reference to the
BlockEntrance and formats the same text only when a crash trace is
printed.
On some LLVM TUs (GVN, LiveVariables, RegionStore, SemaExpr) this
reduces the instructions of the static analyzer by 0.6-1.0%. The cycles
and peak memory changes are within noise. The diagnostics are unchanged.
Assisted-by: Claude Opus 5.5
Co-authored-by: Gabor Horvath <gaborh at apple.com>
[IR] Return early in Constant::getRelocationInfo (NFC) (#240044)
getRelocationInfo() scans a constant's operands to find the strongest
relocation kind it needs (none, local, or global). Once it sees an
operand that needs a global relocation, the result cannot change, so we
can return right away.
Part of #236952.
Assisted-by: Gemini
[CodeGen] Defer pointer-auth check in getKindForGlobal (NFC) (#240045)
When deciding whether a constant global can go in a plain read-only
section or needs dynamic fixups (.data.rel.ro), getKindForGlobal() scans
the entire initializer for pointer-authentication constants first. Move
that scan after the standard dynamic-relocation check so we don't walk
large constant initializers that already need dynamic fixups anyway.
Part of #236952.
Assisted-by: Gemini
shells/oh-my-posh: update to 33.3.1
v33.3.1
Bug Fixes
fish: insert space before expanding abbreviations (3e6f046), closes #8005
v33.3.0
Bug Fixes
git: clean repo reports changes with native_status on Windows (bc3401f), closes #8001
path: apply home_icon to tilde paths in Format (d6b8774), closes #7966
Features
cli: add --max-columns-less to narrow the terminal width (5946666)