[llvm] 1325216 - [NFC] Move useSVEForFixedLengthVectors into AArch64Subtarget.h
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 25 01:49:10 PST 2022
Author: David Sherwood
Date: 2022-01-25T09:49:04Z
New Revision: 13252160c3984b52a210bfa6ec64b9be4c911920
URL: https://github.com/llvm/llvm-project/commit/13252160c3984b52a210bfa6ec64b9be4c911920
DIFF: https://github.com/llvm/llvm-project/commit/13252160c3984b52a210bfa6ec64b9be4c911920.diff
LOG: [NFC] Move useSVEForFixedLengthVectors into AArch64Subtarget.h
Given how small the function is and how often it gets used it
makes more sense to live in the header file.
Differential Revision: https://reviews.llvm.org/D117883
Added:
Modified:
llvm/lib/Target/AArch64/AArch64Subtarget.cpp
llvm/lib/Target/AArch64/AArch64Subtarget.h
Removed:
################################################################################
diff --git a/llvm/lib/Target/AArch64/AArch64Subtarget.cpp b/llvm/lib/Target/AArch64/AArch64Subtarget.cpp
index f4d046078d68e..a4f4b85821822 100644
--- a/llvm/lib/Target/AArch64/AArch64Subtarget.cpp
+++ b/llvm/lib/Target/AArch64/AArch64Subtarget.cpp
@@ -373,9 +373,4 @@ void AArch64Subtarget::mirFileLoaded(MachineFunction &MF) const {
MFI.computeMaxCallFrameSize(MF);
}
-bool AArch64Subtarget::useSVEForFixedLengthVectors() const {
- // Prefer NEON unless larger SVE registers are available.
- return hasSVE() && getMinSVEVectorSizeInBits() >= 256;
-}
-
bool AArch64Subtarget::useAA() const { return UseAA; }
diff --git a/llvm/lib/Target/AArch64/AArch64Subtarget.h b/llvm/lib/Target/AArch64/AArch64Subtarget.h
index 5057dbec653e1..3e3c0f6aba15c 100644
--- a/llvm/lib/Target/AArch64/AArch64Subtarget.h
+++ b/llvm/lib/Target/AArch64/AArch64Subtarget.h
@@ -680,7 +680,10 @@ class AArch64Subtarget final : public AArch64GenSubtargetInfo {
return MinSVEVectorSizeInBits;
}
- bool useSVEForFixedLengthVectors() const;
+ bool useSVEForFixedLengthVectors() const {
+ // Prefer NEON unless larger SVE registers are available.
+ return hasSVE() && getMinSVEVectorSizeInBits() >= 256;
+ }
unsigned getVScaleForTuning() const { return VScaleForTuning; }
};
More information about the llvm-commits
mailing list