[libc][math][NFC] Split log*f into *_double_eval.h and dispatch headers. (#240167)
- Move double-precision evaluations of log2f, logf, log10f, and log1pf
into dedicated src/__support/math/*_double_eval.h headers under
math::double_eval.
- Convert src/__support/math/{log2f,logf,log10f,log1pf}.h into dispatch
headers matching exp*f.h and powf.h.
- Parameterize smoke and unit tests for Default and DoubleEval variants
and update CMake and Bazel build targets.
Assisted-by: Gemini
[Hexagon] Recompute physreg live-ins after HexagonOptAddrMode (#240203)
HexagonOptAddrMode's RDF-based liveness recomputation can leave stale
(over-approximate) physical register live-ins on some blocks. This later
confuses If Conversion into adding an incorrect implicit old-value use
on a predicated load, whose register is undefined on a loop back-edge,
tripping the machine verifier with "Using an undefined physical
register".
Run a bounded conventional backward live-in recomputation after the RDF
recomputation to correct the live-in lists, mirroring the existing fix
in HexagonRDFOpt.
Fixes #224671.
[SampleProfile] Fix "proirity" typo in inliner option descriptions (#240160)
The `cl::desc` strings for the priority-based sample loader inliner
options
spell "priority" as "proirity" (the `i` and `o` are transposed):
- `-sample-profile-inline-growth-limit`
- `-sample-profile-inline-limit-min`
- `-sample-profile-inline-limit-max`
- `-sample-profile-hot-inline-threshold`
- `-sample-profile-icp-relative-hotness`
This fixes all five occurrences in
`llvm/lib/Transforms/IPO/SampleProfile.cpp`.
They are string literals only, so option names and behavior are
unchanged.
Found while comparing the description of
`-sample-profile-prioritized-inline`
with that of `-sample-profile-inline-growth-limit`.
[LV] Expand IR AddRecs from VPSCEVExpander in SafeUDivMode. (#240209)
VPSCEVExpander leaves some expressions for expansion in IR. Those may
get hoisted and executed before other runtime checks (like SCEV
predicate checks).
The expressions may only be valid if the SCEV predicates hold. For
example, a runtime check bound with an outer loop AddRec with step
%m /u (%stride + %y) becomes %m /u (%y + 1) after applying
%stride == 1, which divides by zero for %y == -1 and %stride != 1,
while the original loop is well defined.
Expand SCEVs via IR expander in SafeUDivMode, exposed via a
new constructor parameter, so they cannot cause UB.
[GVNHoist] Propogate getClobberingMemoryAccess after moveToPlace
getDefiningAccess in sfaeToHoistLdSt returns the nearest stores
if we don't query AA result by using getClobberingMemoryAccess. This
reduce the opportunity for optimization in sfaeToHoistLdSt as
isLiveOnEntryDef returns false without updating.
In the example (See Closes item): after hosting left.a and left.b,
getDefiningAccess returns `store q` before.
As a result, we call getClobberingMemoryAccess after relink the
hoisted expression.
Assisted-by: Claude # Test
Closes: #221578
[VPlan] Hoist sums of invariant operands of adds in runtime checks. (#240190)
When expanding a variant integer add for the runtime checks of an inner
loop in a loop nest, operands invariant in the outer loop were hoisted
individually during IR SCEV expansion.
Update VPlan-based SCEV epander to expand the sum of the invariant
operands plus the sum of the others, so the invariant sum is expanded in
IR and hoisted out of the outer loop.
powerpc/idle: Set 'RL' field in PSSCR on POWER9
The POWER9 does not do automatic state transitions when idling, so the
'MTL' field (Maximum Transition Level) is ignored. Thus, setting '0'
for the 'RL' field (Requested Level) as was done means it
doesn't transition to any power saving level. To fix this, set both the
'MTL' and the 'RL' fields to the same level.
On a Talos II at idle this drops the reported temperatures by ~10-15%.
MFC after: 3 days
powerpc/idle: Set 'RL' field in PSSCR on POWER9
The POWER9 does not do automatic state transitions when idling, so the
'MTL' field (Maximum Transition Level) is ignored. Thus, setting '0'
for the 'RL' field (Requested Level) as was done means it
doesn't transition to any power saving level. To fix this, set both the
'MTL' and the 'RL' fields to the same level.
On a Talos II at idle this drops the reported temperatures by ~10-15%.
MFC after: 3 days
py-test-benchmark: update to 5.3.1.
Fixed an AttributeError with pytest's public nodeid attribute by
avoiding the removed private node._nodeid attribute (fixes #321).
This adds support for Pytest 9.2. Contributed by Hfycium in #323.
Fixed Stats.hd15iqr returning the first datum above the Tukey upper
fence instead of the highest datum within it, so the statistic
reported the outlier it exists to exclude. ld15iqr was already
correct. Contributed by WatchTree-19 in #320.
Added workaround for pygal's broken PluginImportFixer (it's removed
from sys.meta_path).
[SLP]Do not form scalar reduction roots with external lane uses
Narrowed reductions keep chains with extra uses alive, so their leaves
need extracts from the root vector, which bitcast and bit pack roots
do not produce.
Fixes #240152
Assisted-by: Cursor
Reviewers:
Pull Request: https://github.com/llvm/llvm-project/pull/240216
[ELF] Symbol::resolve: Remove dead discardedSecIdx condition. NFC (#240213)
initializeSymbols used to call `resolve` with such an Undefined for a
global symbol defined in a discarded COMDAT member. Since D120626 all
callers pass discardedSecIdx=0 (except combineVersionedSymbol where
`this` is a Defined).
Merge tag 'devm_kmalloc_obj-v7.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull devm_kmalloc_obj conversion from Kees Cook:
- treewide refresh of kmalloc_obj() conversions
- devm_kmalloc_obj conversion rules added to Coccinelle scripting
- treewide conversion of devm_kmalloc() family to devm_kmalloc_obj()
* tag 'devm_kmalloc_obj-v7.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
treewide: Convert devm_kmalloc() family to the devm_kmalloc_obj() family
coccinelle: kmalloc_obj: Include devm_kmalloc_obj conversion rules
treewide: refresh kmalloc_obj() conversions
[SLP]Fix signedness of the last narrow part in split reductions
If the other parts are reduced in tree, the remaining narrow vector part
was extended to the reduction type with zext, ignoring its signedness.
Fixes #240151
Assisted-by: Cursor
Reviewers:
Pull Request: https://github.com/llvm/llvm-project/pull/240211