[all-commits] [llvm/llvm-project] e0092e: [RISCV][clang] Optimize memory usage of intrinsic ...
Brandon Wu via All-commits
all-commits at lists.llvm.org
Thu Jan 25 19:16:40 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e0092eae431956a2fd17f7ea88e7ba26d5e44f7e
https://github.com/llvm/llvm-project/commit/e0092eae431956a2fd17f7ea88e7ba26d5e44f7e
Author: Brandon Wu <brandon.wu at sifive.com>
Date: 2024-01-26 (Fri, 26 Jan 2024)
Changed paths:
M clang/include/clang/Support/RISCVVIntrinsicUtils.h
M clang/lib/Sema/SemaRISCVVectorLookup.cpp
M clang/lib/Support/RISCVVIntrinsicUtils.cpp
Log Message:
-----------
[RISCV][clang] Optimize memory usage of intrinsic lookup table (#77487)
This patch optimize:
1. Reduce string size of RVVIntrinsicDef.
2. Reduce the type size of the index of intrinsics.
I use valgrind --tool=massif to analyze a simple program:
```
#include <riscv_vector.h>
vint32m1_t test(vint32m1_t v1, vint32m1_t v2, size_t vl) {
return __riscv_vadd(v1, v2, vl);
}
```
and before optimization, the peak memory usage is 15.68MB,
after optimization, the peak memory usage is 13.69MB.
More information about the All-commits
mailing list