[Instrumentor] Add runtime examples: [1/N] A flop counter
This adds a instrumentor-examples folder into compiler RT to showcase
use cases of the instrumentor. The initial example is a program that,
via instrumentation, counts the number of flops performed.
Partially developped by Claude (AI), tested and verified by me.
[docs] Rename LangRef.{rst|md}
Tracking issue: #201242
This commit does not use valid markdown, so the docs will not build, but they will be fixed in an immediate follow-up commit that does the migration.
[CIR] Use the AST result type for sizeof/alignof constants (#203942)
On targets where `size_t` is narrower than 64 bits (e.g. `i686`), CIR
codegen for `sizeof`/`alignof`/`__builtin_vectorelements` crashes with a
type/value bitwidth mismatch.
The result of these expressions is `size_t`, but the emitted integer
constant was built with a hardcoded 64-bit type. `EvaluateKnownConstInt`
returns an `APSInt` with the width of the AST result type (32 bits on
this target), so it no longer matches the `IntAttr`'s type and trips the
`IntAttr` verifier.
### How to Reproduce
```c++
using size_t = decltype(sizeof(int));
size_t size_of_int() { return sizeof(int); }
clang -cc1 -std=c++20 -triple i686-unknown-linux-gnu -fclangir \
-emit-cir test.cpp -o test.cir
[9 lines not shown]
[AMDGPU] Fold constant offsets into named barrier addresses
Allow isOffsetFoldingLegal to fold a constant offset into an LDS
named-barrier global, and include the node offset when materializing the
LDS address in LowerGlobalAddress. s_barrier_signal_var on a GEP'd named
barrier now selects the immediate form, matching a bare global and GlobalISel.
Change-Id: I2ce500917c3d47cd3687473406decc7430d73361
Assisted-by: Cursor
[AMDGPU] Pre-commit test for constant-offset named barrier signal_var
A GEP into a named-barrier array (&bars[1]) lowers s_barrier_signal_var to
the dynamic m0 form on SelectionDAG, unlike the bare global and GlobalISel.
Change-Id: I8846eb200b1e28785adfdfcaa082390170f4ea2d
Assisted-by: Cursor
[lldb] Use heuristics to extend rather than replace error message (#205196)
When an attach fails, HandlePacket_A tries to explain why. The last two
checks are heuristics that discard any error debugserver already
produced for this specific failure.
The guess can be wrong, for example the PT_DENY_ATTACH test case from
#204688 is incorrectly reported as failing due to it running in a
non-interactive debug session on the bots.
Include debugserver's real error into the heuristic message, instead of
replacing it, so the real reason is never lost.
loader.efi: Fix a comment
Move a comment further up in the file. After the sethead() we need to
use efi_exit(), not after the performance measuring stuff.
Sponsored by: Netflix
edk2: Bring in some more files from edk2-stable202502
These are needed for memdisk support, so import them separately.
These are from 202502, like all the other files here.
Sponsored by: Netflix
qemu: Add tools to generate useful tables from FreeBSD sources
This generates a table of all the socket options with fixed types
so that programs like qemu can use those tables rather than having
to free code thigs.
Sponsored by: Netflix
vgrind: Tear down vgrind support
vgrind has been disconnected from the build for a while. Remove from
the build, and gc vgrid support in the few remaining places.
Reviewed by: jhb
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D57648
edk2: Fixup imported files line endings
Since these files were a direct commit, I don't have to fix the vendor
branch. Remove the DOS line endings. It doesn't matter one way or another,
but we should be consistent within the tree.
Sponsored by: Netflix
Update to version 9.2.0707.
Changes:
- patch 9.2.0707: completion: popup misplaced when text before it is concealed
- runtime(doc): document Solaris as supported OS
- runtime(dtrace): handle DTrace probe highlighting before action blocks
- patch 9.2.0706: tests: test_terminal3 may fail when $SHELL is zsh
- runtime(beancount): Add support for non-ASCII account names
- patch 9.2.0705: :delete # silently fails to update "# and clobbers "0
- patch 9.2.0704: GTK4: not handling mouse events
- patch 9.2.0703: session file does not store relative Vim9 autoload imports
- patch 9.2.0702: :windo and :tabdo create an extra window with 'winfixbuf'
- runtime(fennel): Update Last Update header
- runtime(fennel): add more ";" comment leaders to 'comments'
- patch 9.2.0701: tests: test_terminal.vim does not wait for job to finish
- patch 9.2.0700: configure: -lrt requirement for timer_create not detected
- nsis: Remove NSIS Installer Code
- patch 9.2.0699: [security]: possible code execution with python complete
- patch 9.2.0698: [security]: Out-of-bounds write with soundfold()
[122 lines not shown]
[SCEV] Preserve LCSSA when reusing dominating variable
This seems to just be a missing case in SCEV. This came up when looking
at making LSR preserve LCSSA for the NewPM. Regression test of that
nature has been added.
Reviewers: fhahn, nikic, arsenm
Pull Request: https://github.com/llvm/llvm-project/pull/192831
[MemoryBuiltins][NFC] Allow users to retrieve detailed (de)allocation info
There are some helpers to inspect a value or call but not all
information about the (de)allocation are made available outside of
MemoryBuiltins.cpp. The two new functions allow users a more in-depth
view of (de)allocations through a single API. To help with this, we now
read the alloc_align attribute to provide better alignment information
to users. alloc-family is used as well. Two new helpers provide argument
numbers, rather than values.
Co-authored-by: Antonio Frighetto <me at antoniofrighetto.com>
Clean up embedded slog metaslab across txgs
On a read-write import, metaslab_set_fragmentation() can dirty a
metaslab via vdev_dirty() while still in the txg==0 load path when its
space map has an unexpected bonus size (e.g. a makefs-created pool
whose space-map dnodes use the boot loader's 24-byte space_map_phys_t
with nblkptr=3, giving db_size=64). If that metaslab is then selected
as the embedded slog, vdev_metaslab_init() only removed it from
vdev_ms_list when txg != 0, so the txg==0 case left it queued and
metaslab_fini() tripped VERIFY(!txg_list_member(&vd->vdev_ms_list,
msp, t)).
Remove slog_ms from the dirty list for every TXG_SIZE slot before
metaslab_fini() so the cleanup is correct regardless of txg.
Reported on FreeBSD as PR 281520:
External-issue: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281520
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
[2 lines not shown]
wg(4): Add a test case for too many allowed IP address ranges.
PR kern/60232: kernel panic when adding a wireguard peer with too
many allowed IP addresses