[riscv] avoid cpu probing in li_ptr

CPU probing is an expensive thing to do and we should avoid doing it upon every li_ptr call.

Fixes performance regresion bisected in https://github.com/riscv-forks/electron/issues/1

Change-Id: Ib5ff89b2a730e08de6735123ae60adeffe811ed8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5612950
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Reviewed-by: Yahan Lu <yahan@iscas.ac.cn>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#94349}
This commit is contained in:
Levi Zim authored and V8 LUCI CQ committed 2024-06-11 01:10:31 +00:00
1 parent 3c208b559d
commit a3cc8522a4
2 files changed
+1 -1

No files matched your search

+1
View File
@@ -183,6 +183,7 @@ Kevin Gibbons <bakkot@gmail.com>
Keyhan Vakil <kvakil@googlecontrib.kvakil.me>
Kris Selden <kris.selden@gmail.com>
Kyounga Ra <kyounga@alticast.com>
Levi Zim <rsworktech@outlook.com>
Loo Rong Jie <loorongjie@gmail.com>
Lu Yahan <yahan@iscas.ac.cn>
Ludovic Mermod <ludovic.mermod@gmail.com>
-1
View File
@@ -1104,7 +1104,6 @@ void Assembler::GeneralLi(Register rd, int64_t imm) {
}
void Assembler::li_ptr(Register rd, int64_t imm) {
base::CPU cpu;
// Initialize rd with an address
// Pointers are 48 bits
// 6 fixed instructions are generated