[llc] Fix save-stats test in read only directories (#167403)
The save stats test would fail downstream due to the tests being run
from a read only directory. The cwd flag would attempt to place the
statistics in that read only directory, causing an error. This patch
ensures that the tests are always run from a temp directory.
CodeGen: Keep reference to TargetRegisterInfo in TargetInstrInfo (#158224)
Both conceptually belong to the same subtarget, so it should not
be necessary to pass in the context TargetRegisterInfo to any
TargetInstrInfo member. Add this reference so those superfluous
arguments can be removed.
Most targets placed their TargetRegisterInfo as a member
in TargetInstrInfo. A few had this owned by the TargetSubtargetInfo,
so unify all targets to look the same.
Add default empty header filter regex to root .clang-tidy (#167386)
After https://github.com/llvm/llvm-project/pull/164165, we emit warnings
from non-system headers by default.
This change only preserves functionality of `clang-tidy` as it was
before the change.
[llvm][asmprinter] Make call graph section deterministic
The call-graph-section-assembly.ll tests in CodeGen/X86 and
CodeGen/Aarch64 bot fail under LLVM_REVERSE_ITERATION. These sets should
use SmallSetVector to avoid non-determinism in the ouput.
[flang][NFC] Characterize allocation based on MemAlloc effect instead of pattern matching (#166806)
Flang alias analysis used to find allocation site by pattern matching
allocation ops in mainly FIR dialect. This MR extends the
characterization to instead characterize based on whether the result of
an op has MemAlloc effect.
[AArch64] Allow peephole to optimize AND + signed compare with 0 (#153608)
This should be the peephole's job. Because and sets V flag to 0, this is
why signed comparisons with 0 are okay to replace with tst. Note this is
only for AArch64, because ANDS on ARM leaves the V flag the same.
Fixes: https://github.com/llvm/llvm-project/issues/154387
[flang][CUDA] Unify element size computation in CUF helpers (#167398)
Refactor computeWidth from CUFOpConversion into a shared helper function
computeElementByteSize in CUFCommon.
[VPlan] Update canNarrowLoad to check WidenMember0's op first (NFCI).
This hardens the code to check based on WideMember0's operands. This
ensures each call will go through the same check. Should be NFC
currently but needed when generalizing in follow-up patches.
[scudo] Small cleanup of memory tagging code. (#166860)
Make the systemSupportsMemoryTagging() function return even on system
that don't support memory tagging. This avoids the need to always check
if memory tagging is supported before calling th function.
Make systemSupportsMemoryTagging() cache the getauxval return value
instead of calling the function every time.
Updated the code that calls systemSupportsMemoryTagging().
CodeGen: Remove TRI argument from getRegClass
TargetInstrInfo now directly holds a reference to TargetRegisterInfo
and does not need TRI passed in anywhere.
CodeGen: Keep reference to TargetRegisterInfo in TargetInstrInfo
Both conceptually belong to the same subtarget, so it should not
be necessary to pass in the context TargetRegisterInfo to any
TargetInstrInfo member. Add this reference so those superfluous
arguments can be removed.
Most targets placed their TargetRegisterInfo as a member
in TargetInstrInfo. A few had this owned by the TargetSubtargetInfo,
so unify all targets to look the same.
CodeGen: Keep reference to TargetRegisterInfo in TargetInstrInfo
Both conceptually belong to the same subtarget, so it should not
be necessary to pass in the context TargetRegisterInfo to any
TargetInstrInfo member. Add this reference so those superfluous
arguments can be removed.
Most targets placed their TargetRegisterInfo as a member
in TargetInstrInfo. A few had this owned by the TargetSubtargetInfo,
so unify all targets to look the same.
AMDGPU: Select VGPR MFMAs by default
AGPRs are undesirable since they are only usable by a
handful instructions like loads, stores and mfmas and everything
else requires copies to/from VGPRs. Using the AGPR form should be
a measure of last resort if we must use more than 256 VGPRs.
[NFC][SpecialCaseList] Replace callback with return value (#165943)
This commit introduces `SpecialCaseList::Match`, a small struct to hold
the matched rule and its line number. This simplifies the `match`
methods by allowing them to return a single value instead of using a
callback.
---------
Co-authored-by: Copilot <175728472+Copilot at users.noreply.github.com>
[HLSL] Wrap offset info into a dedicated type. NFC
Rather than using a nullable SmallVector, use a wrapper class for offset
info. This simplifies places that need to handle whether or not there's
any offset information.
[VPlan] Use getDefiningRecipe instead of directly accessing Def. (NFC)
Use getDefiningRecipe to future-proof the code. Split off from
https://github.com/llvm/llvm-project/pull/156262 as suggested.
[llvm][asmprinter] Make call graph section deterministic
The call-graph-section-assembly.ll tests in CodeGen/X86 and
CodeGen/Aarch64 bot fail under LLVM_REVERSE_ITERATION. These sets should
use SetVector to avoid non-determinism in the ouput.