[VPlan][NFC] Number blocks (#212023)
Assign numbers to blocks for more efficient dominator tree construction.
The number is identical to the index in CreatedBlocks of the VPlan.
This removes the last user of unnumbered graphs for dominator trees.
Note that the compile-time change here is practically unmeasurable. The
motivation really is to remove the non-number code path from the
dominator tree.
[MC][NFC] Use EnumStrings for AtSpecifiers (#211827)
Store at specifiers without relocations using EnumStrings, reducing
.data.rel.ro by 4-5kiB. This also saves the more compactly at now 6B per
entry instead of 24B.
[SimplfiyCFG] Deduplicate edges in `hoistSuccIdenticalTerminatorToSwitchOrIf` (#212017)
Fix domtree update by deduplicating edges to be inserted. Tested by the
function `@dedup`.
[PGO][HIP] Support hipModuleLoad in offload PGO (#211875)
Offload PGO finds profile sections by inspecting the image passed to
hipModuleLoadData. hipModuleLoad only provides a file name, so its
device
profile counters were not collected.
After a successful hipModuleLoad, read the code object with the existing
profile file-buffer helper and register it through the same path used by
in-memory module loads.
[DomTreeConstr][NFC] Resize NodeInfos once on construction (#211998)
This avoids frequent size checks when accessing node infos. All numbered
graphs support getMaxNumber().
Also move away from BB->getParent() as preliminary work for numbering
VPlan blocks -- there, getParent() has a different meaning.
[AArch64] Add FMIN/FMAX clustering (#210906)
This patch adds a subtarget feature that controls scheduling FMIN/FMAX
instructions back to back. Enabled on Apple CPU.
[SimplifyCFG] Fix DomTree update in `turnSwitchRangeIntoICmp` (#212006)
The original removal of `BB->Default` has been handled by
`createUnreachableSwitchDefault`.
When `OtherDest` is also unreachable, the edge should be removed.
This issue cannot be reproduced via
`-simplifycfg-require-and-preserve-domtree=1`. I just found it by
checking DT in `requestResimplify`.
[libcxx] Speed up xsgetn for always_noconv
In the always_noconv path, optimize character reads in the same way as
xsgetn.
Unlike fread, getwc has different semantics, so the same optimization
cannot be applied to wide characters. Therefore, only optimize the char
path.
[VPlan] Widen masked unit-stride consecutive accesses in VPlan. (#211315)
Extend the widenConsecutiveMemOps sub-pass to widen masked/predicated
unit-stride consecutive accesses VPlan-natively.
This requires exposing an instruction-independent
isLegalMaskedLoadOrStore in VPSelectionContext, as well as adding it to
VPCostContext. Some of the members will probably be useful for other
changes as well.
PR: https://github.com/llvm/llvm-project/pull/211315
[InstCombine] Fold icmp ptrtoaddr x, ptrtoaddr y -> icmp x, y (#211991)
Similar to the existing ptrtoint fold; this is valid, because icmp only
compares address bits. This addresses optimization regressions when
generating ptrtoaddr for pointer subtractions.
[lldb] Move GetVTableInfo to C++ language runtime (#207010)
The original PR was reverted in
https://github.com/llvm/llvm-project/pull/206816 due to a test failure
on lldb-aarch64-ubuntu.
Since I couldn't reproduce the failure, I decided to split the PR into
smaller chunks.
This is part 1/4 (the final state is on
https://github.com/Nerixyz/llvm-project/tree/refactor/common-abi-runtime-take2-4-of-4).
It moves `GetVTableInfo` and `TypeHasVTable` from the Itanium ABI
runtime to the C++ language runtime. Eventually, this will be used to
select the ABI runtime that's able to handle a vtable. For now, we
always ask and use Itanium.