devfs: Explicitly disable inotify
In principle, inotify can be used to leak timing information about I/O
device accesses by privileged process, which might be sensitive, e.g.,
in the case of /dev/input. See https://inoti.fyi/#1-linux-inter-keystroke-timing
In practice this does not work since I/O to devfs nodes does not go
through vnodes, so the INOTIFY() calls in various VOP hooks do not fire.
But, let's explicitly define a no-op VOP_INOTIFY to help ensure that no
one tries to "fix" this bug.
Alternately we could simply ignore VCHR/VBLK vnodes in vn_inotify().
However, maybe someday it'll be desirable to enable inotify for specific
device files, in which case the filtering should live in devfs.
Add a regression test.
Reported by: Sudheendra Raghav Neela <sneela at tugraz.at>
Reviewed by: kib
[8 lines not shown]
[CIR][NFC] Test cold/optsize/minsize function attribute interplay (#232522)
#232131 implemented cold-to-optsize (plus minsize/naked/noduplicate and
user optnone) in setCIRFunctionAttributesForDefinition. Pin the
optimization-level interplay its tests do not cover: a cold definition
gets optsize at -O2 but not at -O0, minsize keeps optsize on at -O0 by
suppressing the O0-implies-optnone default, optnone suppresses optsize,
and declarations and call sites carry cold alone.
Assisted-by: Muse Code (Muse).
[CIR][NFC] Do not copy CIRGenBuilderTy per vtable component (#232509)
CIRGenBuilderTy carries two StringMaps by value (record name and global
versioning maps), which grow to tens of thousands of entries over a
translation unit. getVTableComponent copied the builder on every call,
deep-copying both maps per vtable component: quadratic work that cost
~12.5s while selfhosting clang/unittests/AST/ASTImporterTest.cpp.
Take the builder by reference instead, matching every other call site.
Also take it by reference in genVscaleTimesFactor, the only other
by-value use.
ASTImporterTest -fclangir wall time goes from 87.4s to 75.0s; output is
unchanged.
[CIR] Honor -fembed-bitcode (#231482)
Runtime JIT reads flags like -O3 from the embedded command line, so it
compiles HIP SPIR-V always at -O0 without it
[CIR] Convert switch.flat successor operands in lowering to LLVM (#232510)
CIRToLLVMSwitchFlatOpLowering forwarded the raw CIR successor operands
into the new llvm.switch while the destination block arguments had been
type-converted, so any forwarded successor operand failed verification
with 'type mismatch for bb argument'. No CIR type is also an LLVM type,
so every operand was affected.
This forwards adaptor.getDefaultOperands()/adaptor.getCaseOperands()
like the br lowering does.
[AMDGPU][CodeGen] Allow remat with multiple users in multiple regions
This relaxes one of the constraints on rematerialization candidates in
the scheduler's `PreRARematStage`. The current implementation only allows
rematerializing a register if it has users in a single region. This
allows it when a register has multiple users in multiple regions.
In such cases the register is rematerialized as many times as there are
using regions, just before the first user in each using region. The cost
model for assessing rematerialization opportunities now takes into
account that mutliple new instructions may be created for each candidate.
[LV] Only charge legacy scalarization costs for replicated recipes. (#232519)
The legacy cost model may decide to scalarize instructions if profitable
which get lowered to VPReplicateRecipes. In some cases, VPlan
transformations
may optimize those recipes, in which case the legacy reasoning does no
longer apply to them, e.g. because we converted a truncate of an
induction to a truncate of the canonical IV.
Only apply legacy costs in precomputeCosts to replicate recipes.