[llvm] [llvm-exegesis] Let ArrayRef infer the array size (NFC) (PR #88241)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 10 00:50:26 PDT 2024
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/88241
None
>From d562052bf8753d1122aac521fcac8758892b5700 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Tue, 9 Apr 2024 21:29:23 -0700
Subject: [PATCH] [llvm-exegesis] Let ArrayRef infer the array size (NFC)
---
llvm/tools/llvm-exegesis/lib/X86/Target.cpp | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/llvm/tools/llvm-exegesis/lib/X86/Target.cpp b/llvm/tools/llvm-exegesis/lib/X86/Target.cpp
index 31bec2545926b6..dbb2bf409316e7 100644
--- a/llvm/tools/llvm-exegesis/lib/X86/Target.cpp
+++ b/llvm/tools/llvm-exegesis/lib/X86/Target.cpp
@@ -769,11 +769,9 @@ class ExegesisX86Target : public ExegesisTarget {
ArrayRef<unsigned> getUnavailableRegisters() const override {
if (DisableUpperSSERegisters)
- return ArrayRef(kUnavailableRegistersSSE,
- sizeof(kUnavailableRegistersSSE) /
- sizeof(kUnavailableRegistersSSE[0]));
+ return ArrayRef(kUnavailableRegistersSSE);
- return ArrayRef(kUnavailableRegisters, std::size(kUnavailableRegisters));
+ return ArrayRef(kUnavailableRegisters);
}
bool allowAsBackToBack(const Instruction &Instr) const override {
More information about the llvm-commits
mailing list