[yaml2obj] Apply output size limit to COFF (#209695)
Route the yaml2obj max-size setting through the COFF emitter and
buffer COFF output with ContiguousBlobAccumulator. This rejects
oversized YAML descriptions consistently with ELF.
[CycleInfo] Drop GraphTraits and df_iterator. NFC (#209847)
depth_first uses SmallPtrSet visited-set, which is pure overhead on a
tree. Replace them with explicit child-stack walks and delete the unused
GraphTraits specializations to prevent misuse.
[Mips] Did not put fake_use into delay slot (#201537)
When compiling with -fextend-variable-liveness, the compiler generates FAKE_USE instructions that are not handled by the Mips assembly printer. This causes a fatal error: "Unsupported instruction : <MCInst 44 >" when using clang with -target mipsel-gnu-linux -Og.
The issue occurs because MipsDelaySlotFiller attempts to process FAKE_USE instructions (which are meta instructions) when searching for instructions to fill delay slots, eventually leading to the assembly printer trying to emit an unsupported instruction.
This patch fixes the crash by treating meta instructions (including FAKE_USE) the same way as debug instructions in the delay slot filler's searchRange function. Meta instructions should be skipped during delay slot filling.
Specifically, the fix:
1.Moves the terminateSearch check before debug/meta instruction checks to ensure proper search termination.
2.Adds isMetaInstruction() check alongside existing isDebugInstr() and isJumpTableDebugInfo() checks.
Fix #198835.
[lldb-dap] Migrate DAP io tests. (#209538)
the launch_io* tests now allow testing args, input, and environment
together.
Previously, these test configurations were mutually exclusive. They are
now combined, removing the need to create a separate test for each input
source.
Migrated Tests:
- TestDAP_io.py
- TestDAP_launch_io_integratedTerminal.py
- TestDAP_launch_io_internalConsole.py
[clang][bytecode] long double on arm64 darwin is 8 bytes (NFC) (#209930)
This test was failing on arm64 darwin targets. Generalise the #if so
that the win32 branch is also taken by arm64 darwin.
rdar://182340494
Make Multiversion Function Resolvers set CurFn (#209918)
Commit #197789 manages to try to reference CurFn while generating a
trap, which some of the multiversion resolvers do. This patch makes sure
we set it to the resolver so we are inserting stuff into the right
places.
This somewhat shockingly causes no tests to fail, but it SHOULD stop the
UBSan failures.
[TableGen] Pool duplicate code-emitter base encodings (#202619)
Pool duplicate multiword instruction base encodings across the default
encoding table and all hardware-mode encoding tables as unique `APInt`
rows, then emit a pointer-free fixed-width `uint64_t` row table and one
smallest-width opcode-to-row index table per mode. Use the pooled
representation only when the combined values and indices are smaller
than the original tables.
On a Release build, the AMDGPU base-encoding payload shrinks by 440,888
bytes, `llvm-mc` and `llc` each shrink by 445,632 bytes, and the LLVM
driver shrinks by 429,120 bytes.
All 421 TableGen tests passed.
Work towards #202616
AI tool disclosure: Co-authored with OpenAI Codex.
[lldb-dap] Migrate lldb-dap tests in `lldb-dap/breakpoint` (#208166)
migrate breakpointLocations, logpoints, setBreakpoints
exceptionBreakpoints and functionBreakpoints test
[MCSched] Allow tuning LoadLatency/MispredictPenalty (#203139)
This means an existing scheduling model can be tweaked at runtime to
support an unknown processor rather than adding an entirely new model.
This is done with TargetSubtargetInfo so that specific targets can
override the relevant callbacks and the mechanism can eventually work
with LTO.
[libc][baremetal] expose `malloc_usable_size` from freelist heap (#208337)
Expose the `malloc_usable_size` API by reconstruct the `BlockRef` from a
pointer to the head of user payload. The operation is cheap as we only
do a query to the block header to obtain the metadata.
Assisted-by: Gemini based automation tools (human-in-the-loop)
[BOLT] Skip function instead of aborting on jump table analysis failure (#206742)
`analyzeJumpTable()` runs twice on a candidate jump table: once from
`analyzeMemoryAt` while the referencing function is being disassembled,
and
again from `populateJumpTables()` after disassembly. The second run is
stricter,
because the check that an entry points at an instruction
(`getInstructionAtOffset`) only fires once the target function reaches
the
`Disassembled` state. A table can therefore be accepted the first time
and
rejected the second -- for instance when an entry lands at an address
with no
instruction (a symbol whose declared size is larger than its
disassembled
extent). `populateJumpTables()` reached `llvm_unreachable("jump table
heuristic
failure")` and aborted in that case.
[14 lines not shown]
[flang][cuda] Decouple CUFInit from CUDA language features (#209846)
In some cases, we do not want to emit the CUFInit function in the main.
Add a specific language feature for it so we can decouple it.