optimize builtin

This commit is contained in:
2024-10-30 03:13:37 +00:00
parent 2900a11dc3
commit a9e6499cee
4 changed files with 252 additions and 190 deletions

View File

@ -3,10 +3,10 @@
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
# Change to the script directory # Change to the script directory
cd "$SCRIPT_DIR" cd "$SCRIPT_DIR"
clang-18 -S -emit-llvm --target=riscv32-unknown-elf -O2 -fno-builtin-printf -fno-builtin-memcpy \ clang-18 -S -emit-llvm --target=riscv32-unknown-elf -O3 -fno-builtin-printf -fno-builtin-memcpy -fno-builtin-memmove \
builtin.c -o builtin_intermediate.ll builtin.c -o builtin_intermediate.ll
sed 's/_builtin_/.builtin./g;s/string_/string./g;s/array_/array./g' builtin_intermediate.ll > builtin.ll sed 's/_builtin_/.builtin./g;s/string_/string./g;s/array_/array./g' builtin_intermediate.ll > builtin.ll
rm builtin_intermediate.ll rm builtin_intermediate.ll
llc-18 -march=riscv32 -mattr=+m builtin.ll -o builtin_intermediate.s -O2 llc-18 -march=riscv32 -mattr=+m builtin.ll -o builtin_intermediate.s -O3
sed 's/Lfunc/builtin_Lfunc/g;s/L.str/builtin_L.str/g' builtin_intermediate.s > builtin.s sed 's/Lfunc/builtin_Lfunc/g;s/L.str/builtin_L.str/g' builtin_intermediate.s > builtin.s
rm builtin_intermediate.s rm builtin_intermediate.s

View File

@ -10,16 +10,26 @@ int scanf(const char *format, ...);
int sprintf(char *str, const char *pattern, ...); int sprintf(char *str, const char *pattern, ...);
int sscanf(const char *str, const char *pattern, ...); int sscanf(const char *str, const char *pattern, ...);
char *strcat(char *dest, const char *src); char *strcat(char *dest, const char *src);
void *memcpy(void *dest, const void *src, unsigned int n);
void *memmove(void *dest, const void *src, unsigned int n);
char *_builtin_strcat(char *dest, const char *src) { char *_builtin_strcat(char *dest, const char *src) {
int len1 = strlen(dest); int len1 = strlen(dest);
int len2 = strlen(src); int len2 = strlen(src);
char *res = (char *)malloc(len1 + len2 + 1); char *res = (char *)malloc(len1 + len2 + 1);
if (len1 < 32) {
for (int i = 0; i < len1; i++) { for (int i = 0; i < len1; i++) {
res[i] = dest[i]; res[i] = dest[i];
} }
} else {
memcpy(res, dest, len1);
}
if (len2 < 32) {
for (int i = 0; i < len2; i++) { for (int i = 0; i < len2; i++) {
res[i + len1] = src[i]; res[i + len1] = src[i];
} }
} else {
memcpy(res + len1, src, len2);
}
res[len1 + len2] = '\0'; res[len1 + len2] = '\0';
return res; return res;
} }
@ -33,9 +43,13 @@ int string_length(char *self) {
char *string_substring(char *self, int left, int right) { char *string_substring(char *self, int left, int right) {
int len = right - left; int len = right - left;
char *res = (char *)malloc(len + 1); char *res = (char *)malloc(len + 1);
if (len < 32) {
for (int i = 0; i < len; i++) { for (int i = 0; i < len; i++) {
res[i] = self[left + i]; res[i] = self[left + i];
} }
} else {
memmove(res, self + left, len);
}
res[len] = '\0'; res[len] = '\0';
return res; return res;
} }
@ -44,21 +58,11 @@ int string_parseInt(char *self) {
sscanf(self, "%d", &res); sscanf(self, "%d", &res);
return res; return res;
} }
int string_ord(char *self, int index) { int string_ord(char *self, int index) { return self[index]; }
return self[index]; void print(char *str) { printf("%s", str); }
} void println(char *str) { printf("%s\n", str); }
void print(char *str) { void printInt(int n) { printf("%d", n); }
printf("%s", str); void printlnInt(int n) { printf("%d\n", n); }
}
void println(char *str) {
printf("%s\n", str);
}
void printInt(int n) {
printf("%d", n);
}
void printlnInt(int n) {
printf("%d\n", n);
}
char *toString(int n) { char *toString(int n) {
char *res = (char *)malloc(15); char *res = (char *)malloc(15);
sprintf(res, "%d", n); sprintf(res, "%d", n);
@ -99,9 +103,7 @@ int getInt() {
return res; return res;
} }
void* _builtin_AllocateClassBody(int size) { void *_builtin_AllocateClassBody(int size) { return malloc(size); }
return malloc(size);
}
int _builtin_GetArrayLength(void *array) { int _builtin_GetArrayLength(void *array) {
int res = 0; int res = 0;

View File

@ -8,45 +8,61 @@ target triple = "riscv32-unknown-unknown-elf"
@.str.2 = private unnamed_addr constant [4 x i8] c"%s\0A\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"%s\0A\00", align 1
@.str.3 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @.str.3 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
; Function Attrs: nofree nounwind memory(write, argmem: read, inaccessiblemem: readwrite) ; Function Attrs: nounwind
define dso_local noalias noundef ptr @.builtin.strcat(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 { define dso_local noundef ptr @.builtin.strcat(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
%3 = tail call i32 @strlen(ptr noundef nonnull dereferenceable(1) %0) #11 %3 = tail call i32 @strlen(ptr noundef nonnull dereferenceable(1) %0) #11
%4 = tail call i32 @strlen(ptr noundef nonnull dereferenceable(1) %1) #11 %4 = tail call i32 @strlen(ptr noundef nonnull dereferenceable(1) %1) #11
%5 = add nsw i32 %4, %3 %5 = add nsw i32 %4, %3
%6 = add nsw i32 %5, 1 %6 = add nsw i32 %5, 1
%7 = tail call ptr @malloc(i32 noundef %6) #12 %7 = tail call ptr @malloc(i32 noundef %6) #12
%8 = icmp sgt i32 %3, 0 %8 = icmp slt i32 %3, 32
br i1 %8, label %12, label %9 br i1 %8, label %9, label %18
9: ; preds = %12, %2 9: ; preds = %2
%10 = getelementptr i8, ptr %7, i32 %3 %10 = icmp sgt i32 %3, 0
%11 = icmp sgt i32 %4, 0 br i1 %10, label %11, label %20
br i1 %11, label %21, label %19
12: ; preds = %2, %12 11: ; preds = %9, %11
%13 = phi i32 [ %17, %12 ], [ 0, %2 ] %12 = phi i32 [ %16, %11 ], [ 0, %9 ]
%14 = getelementptr inbounds i8, ptr %0, i32 %13 %13 = getelementptr inbounds i8, ptr %0, i32 %12
%15 = load i8, ptr %14, align 1, !tbaa !6 %14 = load i8, ptr %13, align 1, !tbaa !6
%16 = getelementptr inbounds i8, ptr %7, i32 %13 %15 = getelementptr inbounds i8, ptr %7, i32 %12
store i8 %15, ptr %16, align 1, !tbaa !6 store i8 %14, ptr %15, align 1, !tbaa !6
%17 = add nuw nsw i32 %13, 1 %16 = add nuw nsw i32 %12, 1
%18 = icmp eq i32 %17, %3 %17 = icmp eq i32 %16, %3
br i1 %18, label %9, label %12, !llvm.loop !9 br i1 %17, label %20, label %11, !llvm.loop !9
19: ; preds = %21, %9 18: ; preds = %2
%20 = getelementptr inbounds i8, ptr %7, i32 %5 %19 = tail call ptr @memcpy(ptr noundef %7, ptr noundef %0, i32 noundef %3) #13
store i8 0, ptr %20, align 1, !tbaa !6 br label %20
20: ; preds = %11, %9, %18
%21 = icmp slt i32 %4, 32
%22 = getelementptr i8, ptr %7, i32 %3
br i1 %21, label %23, label %32
23: ; preds = %20
%24 = icmp sgt i32 %4, 0
br i1 %24, label %25, label %34
25: ; preds = %23, %25
%26 = phi i32 [ %30, %25 ], [ 0, %23 ]
%27 = getelementptr inbounds i8, ptr %1, i32 %26
%28 = load i8, ptr %27, align 1, !tbaa !6
%29 = getelementptr i8, ptr %22, i32 %26
store i8 %28, ptr %29, align 1, !tbaa !6
%30 = add nuw nsw i32 %26, 1
%31 = icmp eq i32 %30, %4
br i1 %31, label %34, label %25, !llvm.loop !11
32: ; preds = %20
%33 = tail call ptr @memcpy(ptr noundef %22, ptr noundef %1, i32 noundef %4) #13
br label %34
34: ; preds = %25, %23, %32
%35 = getelementptr inbounds i8, ptr %7, i32 %5
store i8 0, ptr %35, align 1, !tbaa !6
ret ptr %7 ret ptr %7
21: ; preds = %9, %21
%22 = phi i32 [ %26, %21 ], [ 0, %9 ]
%23 = getelementptr inbounds i8, ptr %1, i32 %22
%24 = load i8, ptr %23, align 1, !tbaa !6
%25 = getelementptr i8, ptr %10, i32 %22
store i8 %24, ptr %25, align 1, !tbaa !6
%26 = add nuw nsw i32 %22, 1
%27 = icmp eq i32 %26, %4
br i1 %27, label %19, label %21, !llvm.loop !11
} }
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
@ -61,8 +77,10 @@ declare dso_local noalias noundef ptr @malloc(i32 noundef) local_unnamed_addr #3
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
declare dso_local ptr @memcpy(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #4
; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read)
define dso_local i32 @string.length(ptr nocapture noundef readonly %0) local_unnamed_addr #4 { define dso_local i32 @string.length(ptr nocapture noundef readonly %0) local_unnamed_addr #5 {
br label %2 br label %2
2: ; preds = %2, %1 2: ; preds = %2, %1
@ -77,46 +95,56 @@ define dso_local i32 @string.length(ptr nocapture noundef readonly %0) local_unn
ret i32 %3 ret i32 %3
} }
; Function Attrs: nofree nounwind memory(write, argmem: read, inaccessiblemem: readwrite) ; Function Attrs: nounwind
define dso_local noalias noundef ptr @string.substring(ptr nocapture noundef readonly %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #0 { define dso_local noundef ptr @string.substring(ptr noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #0 {
%4 = sub nsw i32 %2, %1 %4 = sub nsw i32 %2, %1
%5 = add nsw i32 %4, 1 %5 = add nsw i32 %4, 1
%6 = tail call ptr @malloc(i32 noundef %5) #12 %6 = tail call ptr @malloc(i32 noundef %5) #12
%7 = getelementptr i8, ptr %0, i32 %1 %7 = icmp slt i32 %4, 32
%8 = icmp sgt i32 %4, 0 %8 = getelementptr i8, ptr %0, i32 %1
br i1 %8, label %11, label %9 br i1 %7, label %9, label %18
9: ; preds = %11, %3 9: ; preds = %3
%10 = getelementptr inbounds i8, ptr %6, i32 %4 %10 = icmp sgt i32 %4, 0
store i8 0, ptr %10, align 1, !tbaa !6 br i1 %10, label %11, label %20
ret ptr %6
11: ; preds = %3, %11 11: ; preds = %9, %11
%12 = phi i32 [ %16, %11 ], [ 0, %3 ] %12 = phi i32 [ %16, %11 ], [ 0, %9 ]
%13 = getelementptr i8, ptr %7, i32 %12 %13 = getelementptr i8, ptr %8, i32 %12
%14 = load i8, ptr %13, align 1, !tbaa !6 %14 = load i8, ptr %13, align 1, !tbaa !6
%15 = getelementptr inbounds i8, ptr %6, i32 %12 %15 = getelementptr inbounds i8, ptr %6, i32 %12
store i8 %14, ptr %15, align 1, !tbaa !6 store i8 %14, ptr %15, align 1, !tbaa !6
%16 = add nuw nsw i32 %12, 1 %16 = add nuw nsw i32 %12, 1
%17 = icmp eq i32 %16, %4 %17 = icmp eq i32 %16, %4
br i1 %17, label %9, label %11, !llvm.loop !13 br i1 %17, label %20, label %11, !llvm.loop !13
18: ; preds = %3
%19 = tail call ptr @memmove(ptr noundef %6, ptr noundef %8, i32 noundef %4) #13
br label %20
20: ; preds = %11, %9, %18
%21 = getelementptr inbounds i8, ptr %6, i32 %4
store i8 0, ptr %21, align 1, !tbaa !6
ret ptr %6
} }
declare dso_local ptr @memmove(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #4
; Function Attrs: nofree nounwind ; Function Attrs: nofree nounwind
define dso_local i32 @string.parseInt(ptr nocapture noundef readonly %0) local_unnamed_addr #5 { define dso_local i32 @string.parseInt(ptr nocapture noundef readonly %0) local_unnamed_addr #6 {
%2 = alloca i32, align 4 %2 = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #13 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #14
%3 = call i32 (ptr, ptr, ...) @sscanf(ptr noundef %0, ptr noundef nonnull @.str, ptr noundef nonnull %2) #11 %3 = call i32 (ptr, ptr, ...) @sscanf(ptr noundef %0, ptr noundef nonnull @.str, ptr noundef nonnull %2) #11
%4 = load i32, ptr %2, align 4, !tbaa !14 %4 = load i32, ptr %2, align 4, !tbaa !14
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #13 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #14
ret i32 %4 ret i32 %4
} }
; Function Attrs: nofree nounwind ; Function Attrs: nofree nounwind
declare dso_local noundef i32 @sscanf(ptr nocapture noundef readonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #5 declare dso_local noundef i32 @sscanf(ptr nocapture noundef readonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #6
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read)
define dso_local i32 @string.ord(ptr nocapture noundef readonly %0, i32 noundef %1) local_unnamed_addr #6 { define dso_local i32 @string.ord(ptr nocapture noundef readonly %0, i32 noundef %1) local_unnamed_addr #7 {
%3 = getelementptr inbounds i8, ptr %0, i32 %1 %3 = getelementptr inbounds i8, ptr %0, i32 %1
%4 = load i8, ptr %3, align 1, !tbaa !6 %4 = load i8, ptr %3, align 1, !tbaa !6
%5 = zext i8 %4 to i32 %5 = zext i8 %4 to i32
@ -124,69 +152,69 @@ define dso_local i32 @string.ord(ptr nocapture noundef readonly %0, i32 noundef
} }
; Function Attrs: nounwind ; Function Attrs: nounwind
define dso_local void @print(ptr noundef %0) local_unnamed_addr #7 { define dso_local void @print(ptr noundef %0) local_unnamed_addr #0 {
%2 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull @.str.1, ptr noundef %0) #14 %2 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull @.str.1, ptr noundef %0) #13
ret void ret void
} }
declare dso_local i32 @printf(ptr noundef, ...) local_unnamed_addr #8 declare dso_local i32 @printf(ptr noundef, ...) local_unnamed_addr #4
; Function Attrs: nounwind ; Function Attrs: nounwind
define dso_local void @println(ptr noundef %0) local_unnamed_addr #7 { define dso_local void @println(ptr noundef %0) local_unnamed_addr #0 {
%2 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull @.str.2, ptr noundef %0) #14 %2 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull @.str.2, ptr noundef %0) #13
ret void ret void
} }
; Function Attrs: nounwind ; Function Attrs: nounwind
define dso_local void @printInt(i32 noundef %0) local_unnamed_addr #7 { define dso_local void @printInt(i32 noundef %0) local_unnamed_addr #0 {
%2 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull @.str, i32 noundef %0) #14 %2 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull @.str, i32 noundef %0) #13
ret void ret void
} }
; Function Attrs: nounwind ; Function Attrs: nounwind
define dso_local void @printlnInt(i32 noundef %0) local_unnamed_addr #7 { define dso_local void @printlnInt(i32 noundef %0) local_unnamed_addr #0 {
%2 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull @.str.3, i32 noundef %0) #14 %2 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull @.str.3, i32 noundef %0) #13
ret void ret void
} }
; Function Attrs: nofree nounwind ; Function Attrs: nofree nounwind
define dso_local noalias noundef ptr @toString(i32 noundef %0) local_unnamed_addr #5 { define dso_local noalias noundef ptr @toString(i32 noundef %0) local_unnamed_addr #6 {
%2 = tail call dereferenceable_or_null(15) ptr @malloc(i32 noundef 15) #12 %2 = tail call dereferenceable_or_null(15) ptr @malloc(i32 noundef 15) #12
%3 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %0) #11 %3 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %0) #11
ret ptr %2 ret ptr %2
} }
; Function Attrs: nofree nounwind ; Function Attrs: nofree nounwind
declare dso_local noundef i32 @sprintf(ptr noalias nocapture noundef writeonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #5 declare dso_local noundef i32 @sprintf(ptr noalias nocapture noundef writeonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #6
; Function Attrs: nofree nounwind ; Function Attrs: nofree nounwind
define dso_local noundef ptr @getString() local_unnamed_addr #5 { define dso_local noundef ptr @getString() local_unnamed_addr #6 {
%1 = tail call dereferenceable_or_null(1024) ptr @malloc(i32 noundef 1024) #12 %1 = tail call dereferenceable_or_null(1024) ptr @malloc(i32 noundef 1024) #12
%2 = tail call i32 (ptr, ...) @scanf(ptr noundef nonnull @.str.1, ptr noundef %1) #11 %2 = tail call i32 (ptr, ...) @scanf(ptr noundef nonnull @.str.1, ptr noundef %1) #11
ret ptr %1 ret ptr %1
} }
; Function Attrs: nofree nounwind ; Function Attrs: nofree nounwind
declare dso_local noundef i32 @scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5 declare dso_local noundef i32 @scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #6
; Function Attrs: nofree nounwind ; Function Attrs: nofree nounwind
define dso_local i32 @getInt() local_unnamed_addr #5 { define dso_local i32 @getInt() local_unnamed_addr #6 {
%1 = alloca i32, align 4 %1 = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #13 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #14
%2 = call i32 (ptr, ...) @scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1) #11 %2 = call i32 (ptr, ...) @scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1) #11
%3 = load i32, ptr %1, align 4, !tbaa !14 %3 = load i32, ptr %1, align 4, !tbaa !14
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #13 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #14
ret i32 %3 ret i32 %3
} }
; Function Attrs: mustprogress nofree nounwind willreturn memory(inaccessiblemem: readwrite) ; Function Attrs: mustprogress nofree nounwind willreturn memory(inaccessiblemem: readwrite)
define dso_local noalias noundef ptr @.builtin.AllocateClassBody(i32 noundef %0) local_unnamed_addr #9 { define dso_local noalias noundef ptr @.builtin.AllocateClassBody(i32 noundef %0) local_unnamed_addr #8 {
%2 = tail call ptr @malloc(i32 noundef %0) #12 %2 = tail call ptr @malloc(i32 noundef %0) #12
ret ptr %2 ret ptr %2
} }
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read)
define dso_local i32 @.builtin.GetArrayLength(ptr nocapture noundef readonly %0) local_unnamed_addr #6 { define dso_local i32 @.builtin.GetArrayLength(ptr nocapture noundef readonly %0) local_unnamed_addr #7 {
%2 = getelementptr inbounds i8, ptr %0, i32 -4 %2 = getelementptr inbounds i8, ptr %0, i32 -4
%3 = load i8, ptr %2, align 1, !tbaa !6 %3 = load i8, ptr %2, align 1, !tbaa !6
%4 = zext i8 %3 to i32 %4 = zext i8 %3 to i32
@ -209,7 +237,7 @@ define dso_local i32 @.builtin.GetArrayLength(ptr nocapture noundef readonly %0)
} }
; Function Attrs: nofree nounwind memory(write, argmem: read, inaccessiblemem: readwrite) ; Function Attrs: nofree nounwind memory(write, argmem: read, inaccessiblemem: readwrite)
define dso_local noalias nonnull ptr @.builtin.RecursiveAllocateArray(i32 noundef %0, i32 noundef %1, ptr nocapture noundef readonly %2) local_unnamed_addr #0 { define dso_local noalias nonnull ptr @.builtin.RecursiveAllocateArray(i32 noundef %0, i32 noundef %1, ptr nocapture noundef readonly %2) local_unnamed_addr #9 {
%4 = icmp eq i32 %0, 1 %4 = icmp eq i32 %0, 1
%5 = load i32, ptr %2, align 4, !tbaa !14 %5 = load i32, ptr %2, align 4, !tbaa !14
%6 = trunc i32 %5 to i8 %6 = trunc i32 %5 to i8
@ -293,21 +321,21 @@ define dso_local noalias nonnull ptr @.builtin.AllocateArray(i32 noundef %0, i32
ret ptr %16 ret ptr %16
} }
attributes #0 = { nofree nounwind memory(write, argmem: read, inaccessiblemem: readwrite) "no-builtin-memcpy" "no-builtin-printf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="generic-rv32" "target-features"="+32bit,+a,+c,+m,+relax,-d,-e,-experimental-zacas,-experimental-zcmop,-experimental-zfbfmin,-experimental-zicfilp,-experimental-zicfiss,-experimental-zimop,-experimental-ztso,-experimental-zvfbfmin,-experimental-zvfbfwma,-f,-h,-smaia,-smepmp,-ssaia,-svinval,-svnapot,-svpbmt,-v,-xcvalu,-xcvbi,-xcvbitmanip,-xcvelw,-xcvmac,-xcvmem,-xcvsimd,-xsfvcp,-xsfvfnrclipxfqf,-xsfvfwmaccqqq,-xsfvqmaccdod,-xsfvqmaccqoq,-xtheadba,-xtheadbb,-xtheadbs,-xtheadcmo,-xtheadcondmov,-xtheadfmemidx,-xtheadmac,-xtheadmemidx,-xtheadmempair,-xtheadsync,-xtheadvdot,-xventanacondops,-za128rs,-za64rs,-zawrs,-zba,-zbb,-zbc,-zbkb,-zbkc,-zbkx,-zbs,-zca,-zcb,-zcd,-zce,-zcf,-zcmp,-zcmt,-zdinx,-zfa,-zfh,-zfhmin,-zfinx,-zhinx,-zhinxmin,-zic64b,-zicbom,-zicbop,-zicboz,-ziccamoa,-ziccif,-zicclsm,-ziccrse,-zicntr,-zicond,-zicsr,-zifencei,-zihintntl,-zihintpause,-zihpm,-zk,-zkn,-zknd,-zkne,-zknh,-zkr,-zks,-zksed,-zksh,-zkt,-zmmul,-zvbb,-zvbc,-zve32f,-zve32x,-zve64d,-zve64f,-zve64x,-zvfh,-zvfhmin,-zvkb,-zvkg,-zvkn,-zvknc,-zvkned,-zvkng,-zvknha,-zvknhb,-zvks,-zvksc,-zvksed,-zvksg,-zvksh,-zvkt,-zvl1024b,-zvl128b,-zvl16384b,-zvl2048b,-zvl256b,-zvl32768b,-zvl32b,-zvl4096b,-zvl512b,-zvl64b,-zvl65536b,-zvl8192b" } attributes #0 = { nounwind "no-builtin-memcpy" "no-builtin-memmove" "no-builtin-printf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="generic-rv32" "target-features"="+32bit,+a,+c,+m,+relax,-d,-e,-experimental-zacas,-experimental-zcmop,-experimental-zfbfmin,-experimental-zicfilp,-experimental-zicfiss,-experimental-zimop,-experimental-ztso,-experimental-zvfbfmin,-experimental-zvfbfwma,-f,-h,-smaia,-smepmp,-ssaia,-svinval,-svnapot,-svpbmt,-v,-xcvalu,-xcvbi,-xcvbitmanip,-xcvelw,-xcvmac,-xcvmem,-xcvsimd,-xsfvcp,-xsfvfnrclipxfqf,-xsfvfwmaccqqq,-xsfvqmaccdod,-xsfvqmaccqoq,-xtheadba,-xtheadbb,-xtheadbs,-xtheadcmo,-xtheadcondmov,-xtheadfmemidx,-xtheadmac,-xtheadmemidx,-xtheadmempair,-xtheadsync,-xtheadvdot,-xventanacondops,-za128rs,-za64rs,-zawrs,-zba,-zbb,-zbc,-zbkb,-zbkc,-zbkx,-zbs,-zca,-zcb,-zcd,-zce,-zcf,-zcmp,-zcmt,-zdinx,-zfa,-zfh,-zfhmin,-zfinx,-zhinx,-zhinxmin,-zic64b,-zicbom,-zicbop,-zicboz,-ziccamoa,-ziccif,-zicclsm,-ziccrse,-zicntr,-zicond,-zicsr,-zifencei,-zihintntl,-zihintpause,-zihpm,-zk,-zkn,-zknd,-zkne,-zknh,-zkr,-zks,-zksed,-zksh,-zkt,-zmmul,-zvbb,-zvbc,-zve32f,-zve32x,-zve64d,-zve64f,-zve64x,-zvfh,-zvfhmin,-zvkb,-zvkg,-zvkn,-zvknc,-zvkned,-zvkng,-zvknha,-zvknhb,-zvks,-zvksc,-zvksed,-zvksg,-zvksh,-zvkt,-zvl1024b,-zvl128b,-zvl16384b,-zvl2048b,-zvl256b,-zvl32768b,-zvl32b,-zvl4096b,-zvl512b,-zvl64b,-zvl65536b,-zvl8192b" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-builtin-memcpy" "no-builtin-printf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="generic-rv32" "target-features"="+32bit,+a,+c,+m,+relax,-d,-e,-experimental-zacas,-experimental-zcmop,-experimental-zfbfmin,-experimental-zicfilp,-experimental-zicfiss,-experimental-zimop,-experimental-ztso,-experimental-zvfbfmin,-experimental-zvfbfwma,-f,-h,-smaia,-smepmp,-ssaia,-svinval,-svnapot,-svpbmt,-v,-xcvalu,-xcvbi,-xcvbitmanip,-xcvelw,-xcvmac,-xcvmem,-xcvsimd,-xsfvcp,-xsfvfnrclipxfqf,-xsfvfwmaccqqq,-xsfvqmaccdod,-xsfvqmaccqoq,-xtheadba,-xtheadbb,-xtheadbs,-xtheadcmo,-xtheadcondmov,-xtheadfmemidx,-xtheadmac,-xtheadmemidx,-xtheadmempair,-xtheadsync,-xtheadvdot,-xventanacondops,-za128rs,-za64rs,-zawrs,-zba,-zbb,-zbc,-zbkb,-zbkc,-zbkx,-zbs,-zca,-zcb,-zcd,-zce,-zcf,-zcmp,-zcmt,-zdinx,-zfa,-zfh,-zfhmin,-zfinx,-zhinx,-zhinxmin,-zic64b,-zicbom,-zicbop,-zicboz,-ziccamoa,-ziccif,-zicclsm,-ziccrse,-zicntr,-zicond,-zicsr,-zifencei,-zihintntl,-zihintpause,-zihpm,-zk,-zkn,-zknd,-zkne,-zknh,-zkr,-zks,-zksed,-zksh,-zkt,-zmmul,-zvbb,-zvbc,-zve32f,-zve32x,-zve64d,-zve64f,-zve64x,-zvfh,-zvfhmin,-zvkb,-zvkg,-zvkn,-zvknc,-zvkned,-zvkng,-zvknha,-zvknhb,-zvks,-zvksc,-zvksed,-zvksg,-zvksh,-zvkt,-zvl1024b,-zvl128b,-zvl16384b,-zvl2048b,-zvl256b,-zvl32768b,-zvl32b,-zvl4096b,-zvl512b,-zvl64b,-zvl65536b,-zvl8192b" } attributes #2 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-builtin-memcpy" "no-builtin-memmove" "no-builtin-printf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="generic-rv32" "target-features"="+32bit,+a,+c,+m,+relax,-d,-e,-experimental-zacas,-experimental-zcmop,-experimental-zfbfmin,-experimental-zicfilp,-experimental-zicfiss,-experimental-zimop,-experimental-ztso,-experimental-zvfbfmin,-experimental-zvfbfwma,-f,-h,-smaia,-smepmp,-ssaia,-svinval,-svnapot,-svpbmt,-v,-xcvalu,-xcvbi,-xcvbitmanip,-xcvelw,-xcvmac,-xcvmem,-xcvsimd,-xsfvcp,-xsfvfnrclipxfqf,-xsfvfwmaccqqq,-xsfvqmaccdod,-xsfvqmaccqoq,-xtheadba,-xtheadbb,-xtheadbs,-xtheadcmo,-xtheadcondmov,-xtheadfmemidx,-xtheadmac,-xtheadmemidx,-xtheadmempair,-xtheadsync,-xtheadvdot,-xventanacondops,-za128rs,-za64rs,-zawrs,-zba,-zbb,-zbc,-zbkb,-zbkc,-zbkx,-zbs,-zca,-zcb,-zcd,-zce,-zcf,-zcmp,-zcmt,-zdinx,-zfa,-zfh,-zfhmin,-zfinx,-zhinx,-zhinxmin,-zic64b,-zicbom,-zicbop,-zicboz,-ziccamoa,-ziccif,-zicclsm,-ziccrse,-zicntr,-zicond,-zicsr,-zifencei,-zihintntl,-zihintpause,-zihpm,-zk,-zkn,-zknd,-zkne,-zknh,-zkr,-zks,-zksed,-zksh,-zkt,-zmmul,-zvbb,-zvbc,-zve32f,-zve32x,-zve64d,-zve64f,-zve64x,-zvfh,-zvfhmin,-zvkb,-zvkg,-zvkn,-zvknc,-zvkned,-zvkng,-zvknha,-zvknhb,-zvks,-zvksc,-zvksed,-zvksg,-zvksh,-zvkt,-zvl1024b,-zvl128b,-zvl16384b,-zvl2048b,-zvl256b,-zvl32768b,-zvl32b,-zvl4096b,-zvl512b,-zvl64b,-zvl65536b,-zvl8192b" }
attributes #3 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-builtin-memcpy" "no-builtin-printf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="generic-rv32" "target-features"="+32bit,+a,+c,+m,+relax,-d,-e,-experimental-zacas,-experimental-zcmop,-experimental-zfbfmin,-experimental-zicfilp,-experimental-zicfiss,-experimental-zimop,-experimental-ztso,-experimental-zvfbfmin,-experimental-zvfbfwma,-f,-h,-smaia,-smepmp,-ssaia,-svinval,-svnapot,-svpbmt,-v,-xcvalu,-xcvbi,-xcvbitmanip,-xcvelw,-xcvmac,-xcvmem,-xcvsimd,-xsfvcp,-xsfvfnrclipxfqf,-xsfvfwmaccqqq,-xsfvqmaccdod,-xsfvqmaccqoq,-xtheadba,-xtheadbb,-xtheadbs,-xtheadcmo,-xtheadcondmov,-xtheadfmemidx,-xtheadmac,-xtheadmemidx,-xtheadmempair,-xtheadsync,-xtheadvdot,-xventanacondops,-za128rs,-za64rs,-zawrs,-zba,-zbb,-zbc,-zbkb,-zbkc,-zbkx,-zbs,-zca,-zcb,-zcd,-zce,-zcf,-zcmp,-zcmt,-zdinx,-zfa,-zfh,-zfhmin,-zfinx,-zhinx,-zhinxmin,-zic64b,-zicbom,-zicbop,-zicboz,-ziccamoa,-ziccif,-zicclsm,-ziccrse,-zicntr,-zicond,-zicsr,-zifencei,-zihintntl,-zihintpause,-zihpm,-zk,-zkn,-zknd,-zkne,-zknh,-zkr,-zks,-zksed,-zksh,-zkt,-zmmul,-zvbb,-zvbc,-zve32f,-zve32x,-zve64d,-zve64f,-zve64x,-zvfh,-zvfhmin,-zvkb,-zvkg,-zvkn,-zvknc,-zvkned,-zvkng,-zvknha,-zvknhb,-zvks,-zvksc,-zvksed,-zvksg,-zvksh,-zvkt,-zvl1024b,-zvl128b,-zvl16384b,-zvl2048b,-zvl256b,-zvl32768b,-zvl32b,-zvl4096b,-zvl512b,-zvl64b,-zvl65536b,-zvl8192b" } attributes #3 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-builtin-memcpy" "no-builtin-memmove" "no-builtin-printf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="generic-rv32" "target-features"="+32bit,+a,+c,+m,+relax,-d,-e,-experimental-zacas,-experimental-zcmop,-experimental-zfbfmin,-experimental-zicfilp,-experimental-zicfiss,-experimental-zimop,-experimental-ztso,-experimental-zvfbfmin,-experimental-zvfbfwma,-f,-h,-smaia,-smepmp,-ssaia,-svinval,-svnapot,-svpbmt,-v,-xcvalu,-xcvbi,-xcvbitmanip,-xcvelw,-xcvmac,-xcvmem,-xcvsimd,-xsfvcp,-xsfvfnrclipxfqf,-xsfvfwmaccqqq,-xsfvqmaccdod,-xsfvqmaccqoq,-xtheadba,-xtheadbb,-xtheadbs,-xtheadcmo,-xtheadcondmov,-xtheadfmemidx,-xtheadmac,-xtheadmemidx,-xtheadmempair,-xtheadsync,-xtheadvdot,-xventanacondops,-za128rs,-za64rs,-zawrs,-zba,-zbb,-zbc,-zbkb,-zbkc,-zbkx,-zbs,-zca,-zcb,-zcd,-zce,-zcf,-zcmp,-zcmt,-zdinx,-zfa,-zfh,-zfhmin,-zfinx,-zhinx,-zhinxmin,-zic64b,-zicbom,-zicbop,-zicboz,-ziccamoa,-ziccif,-zicclsm,-ziccrse,-zicntr,-zicond,-zicsr,-zifencei,-zihintntl,-zihintpause,-zihpm,-zk,-zkn,-zknd,-zkne,-zknh,-zkr,-zks,-zksed,-zksh,-zkt,-zmmul,-zvbb,-zvbc,-zve32f,-zve32x,-zve64d,-zve64f,-zve64x,-zvfh,-zvfhmin,-zvkb,-zvkg,-zvkn,-zvknc,-zvkned,-zvkng,-zvknha,-zvknhb,-zvks,-zvksc,-zvksed,-zvksg,-zvksh,-zvkt,-zvl1024b,-zvl128b,-zvl16384b,-zvl2048b,-zvl256b,-zvl32768b,-zvl32b,-zvl4096b,-zvl512b,-zvl64b,-zvl65536b,-zvl8192b" }
attributes #4 = { nofree norecurse nosync nounwind memory(argmem: read) "no-builtin-memcpy" "no-builtin-printf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="generic-rv32" "target-features"="+32bit,+a,+c,+m,+relax,-d,-e,-experimental-zacas,-experimental-zcmop,-experimental-zfbfmin,-experimental-zicfilp,-experimental-zicfiss,-experimental-zimop,-experimental-ztso,-experimental-zvfbfmin,-experimental-zvfbfwma,-f,-h,-smaia,-smepmp,-ssaia,-svinval,-svnapot,-svpbmt,-v,-xcvalu,-xcvbi,-xcvbitmanip,-xcvelw,-xcvmac,-xcvmem,-xcvsimd,-xsfvcp,-xsfvfnrclipxfqf,-xsfvfwmaccqqq,-xsfvqmaccdod,-xsfvqmaccqoq,-xtheadba,-xtheadbb,-xtheadbs,-xtheadcmo,-xtheadcondmov,-xtheadfmemidx,-xtheadmac,-xtheadmemidx,-xtheadmempair,-xtheadsync,-xtheadvdot,-xventanacondops,-za128rs,-za64rs,-zawrs,-zba,-zbb,-zbc,-zbkb,-zbkc,-zbkx,-zbs,-zca,-zcb,-zcd,-zce,-zcf,-zcmp,-zcmt,-zdinx,-zfa,-zfh,-zfhmin,-zfinx,-zhinx,-zhinxmin,-zic64b,-zicbom,-zicbop,-zicboz,-ziccamoa,-ziccif,-zicclsm,-ziccrse,-zicntr,-zicond,-zicsr,-zifencei,-zihintntl,-zihintpause,-zihpm,-zk,-zkn,-zknd,-zkne,-zknh,-zkr,-zks,-zksed,-zksh,-zkt,-zmmul,-zvbb,-zvbc,-zve32f,-zve32x,-zve64d,-zve64f,-zve64x,-zvfh,-zvfhmin,-zvkb,-zvkg,-zvkn,-zvknc,-zvkned,-zvkng,-zvknha,-zvknhb,-zvks,-zvksc,-zvksed,-zvksg,-zvksh,-zvkt,-zvl1024b,-zvl128b,-zvl16384b,-zvl2048b,-zvl256b,-zvl32768b,-zvl32b,-zvl4096b,-zvl512b,-zvl64b,-zvl65536b,-zvl8192b" } attributes #4 = { "no-builtin-memcpy" "no-builtin-memmove" "no-builtin-printf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="generic-rv32" "target-features"="+32bit,+a,+c,+m,+relax,-d,-e,-experimental-zacas,-experimental-zcmop,-experimental-zfbfmin,-experimental-zicfilp,-experimental-zicfiss,-experimental-zimop,-experimental-ztso,-experimental-zvfbfmin,-experimental-zvfbfwma,-f,-h,-smaia,-smepmp,-ssaia,-svinval,-svnapot,-svpbmt,-v,-xcvalu,-xcvbi,-xcvbitmanip,-xcvelw,-xcvmac,-xcvmem,-xcvsimd,-xsfvcp,-xsfvfnrclipxfqf,-xsfvfwmaccqqq,-xsfvqmaccdod,-xsfvqmaccqoq,-xtheadba,-xtheadbb,-xtheadbs,-xtheadcmo,-xtheadcondmov,-xtheadfmemidx,-xtheadmac,-xtheadmemidx,-xtheadmempair,-xtheadsync,-xtheadvdot,-xventanacondops,-za128rs,-za64rs,-zawrs,-zba,-zbb,-zbc,-zbkb,-zbkc,-zbkx,-zbs,-zca,-zcb,-zcd,-zce,-zcf,-zcmp,-zcmt,-zdinx,-zfa,-zfh,-zfhmin,-zfinx,-zhinx,-zhinxmin,-zic64b,-zicbom,-zicbop,-zicboz,-ziccamoa,-ziccif,-zicclsm,-ziccrse,-zicntr,-zicond,-zicsr,-zifencei,-zihintntl,-zihintpause,-zihpm,-zk,-zkn,-zknd,-zkne,-zknh,-zkr,-zks,-zksed,-zksh,-zkt,-zmmul,-zvbb,-zvbc,-zve32f,-zve32x,-zve64d,-zve64f,-zve64x,-zvfh,-zvfhmin,-zvkb,-zvkg,-zvkn,-zvknc,-zvkned,-zvkng,-zvknha,-zvknhb,-zvks,-zvksc,-zvksed,-zvksg,-zvksh,-zvkt,-zvl1024b,-zvl128b,-zvl16384b,-zvl2048b,-zvl256b,-zvl32768b,-zvl32b,-zvl4096b,-zvl512b,-zvl64b,-zvl65536b,-zvl8192b" }
attributes #5 = { nofree nounwind "no-builtin-memcpy" "no-builtin-printf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="generic-rv32" "target-features"="+32bit,+a,+c,+m,+relax,-d,-e,-experimental-zacas,-experimental-zcmop,-experimental-zfbfmin,-experimental-zicfilp,-experimental-zicfiss,-experimental-zimop,-experimental-ztso,-experimental-zvfbfmin,-experimental-zvfbfwma,-f,-h,-smaia,-smepmp,-ssaia,-svinval,-svnapot,-svpbmt,-v,-xcvalu,-xcvbi,-xcvbitmanip,-xcvelw,-xcvmac,-xcvmem,-xcvsimd,-xsfvcp,-xsfvfnrclipxfqf,-xsfvfwmaccqqq,-xsfvqmaccdod,-xsfvqmaccqoq,-xtheadba,-xtheadbb,-xtheadbs,-xtheadcmo,-xtheadcondmov,-xtheadfmemidx,-xtheadmac,-xtheadmemidx,-xtheadmempair,-xtheadsync,-xtheadvdot,-xventanacondops,-za128rs,-za64rs,-zawrs,-zba,-zbb,-zbc,-zbkb,-zbkc,-zbkx,-zbs,-zca,-zcb,-zcd,-zce,-zcf,-zcmp,-zcmt,-zdinx,-zfa,-zfh,-zfhmin,-zfinx,-zhinx,-zhinxmin,-zic64b,-zicbom,-zicbop,-zicboz,-ziccamoa,-ziccif,-zicclsm,-ziccrse,-zicntr,-zicond,-zicsr,-zifencei,-zihintntl,-zihintpause,-zihpm,-zk,-zkn,-zknd,-zkne,-zknh,-zkr,-zks,-zksed,-zksh,-zkt,-zmmul,-zvbb,-zvbc,-zve32f,-zve32x,-zve64d,-zve64f,-zve64x,-zvfh,-zvfhmin,-zvkb,-zvkg,-zvkn,-zvknc,-zvkned,-zvkng,-zvknha,-zvknhb,-zvks,-zvksc,-zvksed,-zvksg,-zvksh,-zvkt,-zvl1024b,-zvl128b,-zvl16384b,-zvl2048b,-zvl256b,-zvl32768b,-zvl32b,-zvl4096b,-zvl512b,-zvl64b,-zvl65536b,-zvl8192b" } attributes #5 = { nofree norecurse nosync nounwind memory(argmem: read) "no-builtin-memcpy" "no-builtin-memmove" "no-builtin-printf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="generic-rv32" "target-features"="+32bit,+a,+c,+m,+relax,-d,-e,-experimental-zacas,-experimental-zcmop,-experimental-zfbfmin,-experimental-zicfilp,-experimental-zicfiss,-experimental-zimop,-experimental-ztso,-experimental-zvfbfmin,-experimental-zvfbfwma,-f,-h,-smaia,-smepmp,-ssaia,-svinval,-svnapot,-svpbmt,-v,-xcvalu,-xcvbi,-xcvbitmanip,-xcvelw,-xcvmac,-xcvmem,-xcvsimd,-xsfvcp,-xsfvfnrclipxfqf,-xsfvfwmaccqqq,-xsfvqmaccdod,-xsfvqmaccqoq,-xtheadba,-xtheadbb,-xtheadbs,-xtheadcmo,-xtheadcondmov,-xtheadfmemidx,-xtheadmac,-xtheadmemidx,-xtheadmempair,-xtheadsync,-xtheadvdot,-xventanacondops,-za128rs,-za64rs,-zawrs,-zba,-zbb,-zbc,-zbkb,-zbkc,-zbkx,-zbs,-zca,-zcb,-zcd,-zce,-zcf,-zcmp,-zcmt,-zdinx,-zfa,-zfh,-zfhmin,-zfinx,-zhinx,-zhinxmin,-zic64b,-zicbom,-zicbop,-zicboz,-ziccamoa,-ziccif,-zicclsm,-ziccrse,-zicntr,-zicond,-zicsr,-zifencei,-zihintntl,-zihintpause,-zihpm,-zk,-zkn,-zknd,-zkne,-zknh,-zkr,-zks,-zksed,-zksh,-zkt,-zmmul,-zvbb,-zvbc,-zve32f,-zve32x,-zve64d,-zve64f,-zve64x,-zvfh,-zvfhmin,-zvkb,-zvkg,-zvkn,-zvknc,-zvkned,-zvkng,-zvknha,-zvknhb,-zvks,-zvksc,-zvksed,-zvksg,-zvksh,-zvkt,-zvl1024b,-zvl128b,-zvl16384b,-zvl2048b,-zvl256b,-zvl32768b,-zvl32b,-zvl4096b,-zvl512b,-zvl64b,-zvl65536b,-zvl8192b" }
attributes #6 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) "no-builtin-memcpy" "no-builtin-printf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="generic-rv32" "target-features"="+32bit,+a,+c,+m,+relax,-d,-e,-experimental-zacas,-experimental-zcmop,-experimental-zfbfmin,-experimental-zicfilp,-experimental-zicfiss,-experimental-zimop,-experimental-ztso,-experimental-zvfbfmin,-experimental-zvfbfwma,-f,-h,-smaia,-smepmp,-ssaia,-svinval,-svnapot,-svpbmt,-v,-xcvalu,-xcvbi,-xcvbitmanip,-xcvelw,-xcvmac,-xcvmem,-xcvsimd,-xsfvcp,-xsfvfnrclipxfqf,-xsfvfwmaccqqq,-xsfvqmaccdod,-xsfvqmaccqoq,-xtheadba,-xtheadbb,-xtheadbs,-xtheadcmo,-xtheadcondmov,-xtheadfmemidx,-xtheadmac,-xtheadmemidx,-xtheadmempair,-xtheadsync,-xtheadvdot,-xventanacondops,-za128rs,-za64rs,-zawrs,-zba,-zbb,-zbc,-zbkb,-zbkc,-zbkx,-zbs,-zca,-zcb,-zcd,-zce,-zcf,-zcmp,-zcmt,-zdinx,-zfa,-zfh,-zfhmin,-zfinx,-zhinx,-zhinxmin,-zic64b,-zicbom,-zicbop,-zicboz,-ziccamoa,-ziccif,-zicclsm,-ziccrse,-zicntr,-zicond,-zicsr,-zifencei,-zihintntl,-zihintpause,-zihpm,-zk,-zkn,-zknd,-zkne,-zknh,-zkr,-zks,-zksed,-zksh,-zkt,-zmmul,-zvbb,-zvbc,-zve32f,-zve32x,-zve64d,-zve64f,-zve64x,-zvfh,-zvfhmin,-zvkb,-zvkg,-zvkn,-zvknc,-zvkned,-zvkng,-zvknha,-zvknhb,-zvks,-zvksc,-zvksed,-zvksg,-zvksh,-zvkt,-zvl1024b,-zvl128b,-zvl16384b,-zvl2048b,-zvl256b,-zvl32768b,-zvl32b,-zvl4096b,-zvl512b,-zvl64b,-zvl65536b,-zvl8192b" } attributes #6 = { nofree nounwind "no-builtin-memcpy" "no-builtin-memmove" "no-builtin-printf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="generic-rv32" "target-features"="+32bit,+a,+c,+m,+relax,-d,-e,-experimental-zacas,-experimental-zcmop,-experimental-zfbfmin,-experimental-zicfilp,-experimental-zicfiss,-experimental-zimop,-experimental-ztso,-experimental-zvfbfmin,-experimental-zvfbfwma,-f,-h,-smaia,-smepmp,-ssaia,-svinval,-svnapot,-svpbmt,-v,-xcvalu,-xcvbi,-xcvbitmanip,-xcvelw,-xcvmac,-xcvmem,-xcvsimd,-xsfvcp,-xsfvfnrclipxfqf,-xsfvfwmaccqqq,-xsfvqmaccdod,-xsfvqmaccqoq,-xtheadba,-xtheadbb,-xtheadbs,-xtheadcmo,-xtheadcondmov,-xtheadfmemidx,-xtheadmac,-xtheadmemidx,-xtheadmempair,-xtheadsync,-xtheadvdot,-xventanacondops,-za128rs,-za64rs,-zawrs,-zba,-zbb,-zbc,-zbkb,-zbkc,-zbkx,-zbs,-zca,-zcb,-zcd,-zce,-zcf,-zcmp,-zcmt,-zdinx,-zfa,-zfh,-zfhmin,-zfinx,-zhinx,-zhinxmin,-zic64b,-zicbom,-zicbop,-zicboz,-ziccamoa,-ziccif,-zicclsm,-ziccrse,-zicntr,-zicond,-zicsr,-zifencei,-zihintntl,-zihintpause,-zihpm,-zk,-zkn,-zknd,-zkne,-zknh,-zkr,-zks,-zksed,-zksh,-zkt,-zmmul,-zvbb,-zvbc,-zve32f,-zve32x,-zve64d,-zve64f,-zve64x,-zvfh,-zvfhmin,-zvkb,-zvkg,-zvkn,-zvknc,-zvkned,-zvkng,-zvknha,-zvknhb,-zvks,-zvksc,-zvksed,-zvksg,-zvksh,-zvkt,-zvl1024b,-zvl128b,-zvl16384b,-zvl2048b,-zvl256b,-zvl32768b,-zvl32b,-zvl4096b,-zvl512b,-zvl64b,-zvl65536b,-zvl8192b" }
attributes #7 = { nounwind "no-builtin-memcpy" "no-builtin-printf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="generic-rv32" "target-features"="+32bit,+a,+c,+m,+relax,-d,-e,-experimental-zacas,-experimental-zcmop,-experimental-zfbfmin,-experimental-zicfilp,-experimental-zicfiss,-experimental-zimop,-experimental-ztso,-experimental-zvfbfmin,-experimental-zvfbfwma,-f,-h,-smaia,-smepmp,-ssaia,-svinval,-svnapot,-svpbmt,-v,-xcvalu,-xcvbi,-xcvbitmanip,-xcvelw,-xcvmac,-xcvmem,-xcvsimd,-xsfvcp,-xsfvfnrclipxfqf,-xsfvfwmaccqqq,-xsfvqmaccdod,-xsfvqmaccqoq,-xtheadba,-xtheadbb,-xtheadbs,-xtheadcmo,-xtheadcondmov,-xtheadfmemidx,-xtheadmac,-xtheadmemidx,-xtheadmempair,-xtheadsync,-xtheadvdot,-xventanacondops,-za128rs,-za64rs,-zawrs,-zba,-zbb,-zbc,-zbkb,-zbkc,-zbkx,-zbs,-zca,-zcb,-zcd,-zce,-zcf,-zcmp,-zcmt,-zdinx,-zfa,-zfh,-zfhmin,-zfinx,-zhinx,-zhinxmin,-zic64b,-zicbom,-zicbop,-zicboz,-ziccamoa,-ziccif,-zicclsm,-ziccrse,-zicntr,-zicond,-zicsr,-zifencei,-zihintntl,-zihintpause,-zihpm,-zk,-zkn,-zknd,-zkne,-zknh,-zkr,-zks,-zksed,-zksh,-zkt,-zmmul,-zvbb,-zvbc,-zve32f,-zve32x,-zve64d,-zve64f,-zve64x,-zvfh,-zvfhmin,-zvkb,-zvkg,-zvkn,-zvknc,-zvkned,-zvkng,-zvknha,-zvknhb,-zvks,-zvksc,-zvksed,-zvksg,-zvksh,-zvkt,-zvl1024b,-zvl128b,-zvl16384b,-zvl2048b,-zvl256b,-zvl32768b,-zvl32b,-zvl4096b,-zvl512b,-zvl64b,-zvl65536b,-zvl8192b" } attributes #7 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) "no-builtin-memcpy" "no-builtin-memmove" "no-builtin-printf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="generic-rv32" "target-features"="+32bit,+a,+c,+m,+relax,-d,-e,-experimental-zacas,-experimental-zcmop,-experimental-zfbfmin,-experimental-zicfilp,-experimental-zicfiss,-experimental-zimop,-experimental-ztso,-experimental-zvfbfmin,-experimental-zvfbfwma,-f,-h,-smaia,-smepmp,-ssaia,-svinval,-svnapot,-svpbmt,-v,-xcvalu,-xcvbi,-xcvbitmanip,-xcvelw,-xcvmac,-xcvmem,-xcvsimd,-xsfvcp,-xsfvfnrclipxfqf,-xsfvfwmaccqqq,-xsfvqmaccdod,-xsfvqmaccqoq,-xtheadba,-xtheadbb,-xtheadbs,-xtheadcmo,-xtheadcondmov,-xtheadfmemidx,-xtheadmac,-xtheadmemidx,-xtheadmempair,-xtheadsync,-xtheadvdot,-xventanacondops,-za128rs,-za64rs,-zawrs,-zba,-zbb,-zbc,-zbkb,-zbkc,-zbkx,-zbs,-zca,-zcb,-zcd,-zce,-zcf,-zcmp,-zcmt,-zdinx,-zfa,-zfh,-zfhmin,-zfinx,-zhinx,-zhinxmin,-zic64b,-zicbom,-zicbop,-zicboz,-ziccamoa,-ziccif,-zicclsm,-ziccrse,-zicntr,-zicond,-zicsr,-zifencei,-zihintntl,-zihintpause,-zihpm,-zk,-zkn,-zknd,-zkne,-zknh,-zkr,-zks,-zksed,-zksh,-zkt,-zmmul,-zvbb,-zvbc,-zve32f,-zve32x,-zve64d,-zve64f,-zve64x,-zvfh,-zvfhmin,-zvkb,-zvkg,-zvkn,-zvknc,-zvkned,-zvkng,-zvknha,-zvknhb,-zvks,-zvksc,-zvksed,-zvksg,-zvksh,-zvkt,-zvl1024b,-zvl128b,-zvl16384b,-zvl2048b,-zvl256b,-zvl32768b,-zvl32b,-zvl4096b,-zvl512b,-zvl64b,-zvl65536b,-zvl8192b" }
attributes #8 = { "no-builtin-memcpy" "no-builtin-printf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="generic-rv32" "target-features"="+32bit,+a,+c,+m,+relax,-d,-e,-experimental-zacas,-experimental-zcmop,-experimental-zfbfmin,-experimental-zicfilp,-experimental-zicfiss,-experimental-zimop,-experimental-ztso,-experimental-zvfbfmin,-experimental-zvfbfwma,-f,-h,-smaia,-smepmp,-ssaia,-svinval,-svnapot,-svpbmt,-v,-xcvalu,-xcvbi,-xcvbitmanip,-xcvelw,-xcvmac,-xcvmem,-xcvsimd,-xsfvcp,-xsfvfnrclipxfqf,-xsfvfwmaccqqq,-xsfvqmaccdod,-xsfvqmaccqoq,-xtheadba,-xtheadbb,-xtheadbs,-xtheadcmo,-xtheadcondmov,-xtheadfmemidx,-xtheadmac,-xtheadmemidx,-xtheadmempair,-xtheadsync,-xtheadvdot,-xventanacondops,-za128rs,-za64rs,-zawrs,-zba,-zbb,-zbc,-zbkb,-zbkc,-zbkx,-zbs,-zca,-zcb,-zcd,-zce,-zcf,-zcmp,-zcmt,-zdinx,-zfa,-zfh,-zfhmin,-zfinx,-zhinx,-zhinxmin,-zic64b,-zicbom,-zicbop,-zicboz,-ziccamoa,-ziccif,-zicclsm,-ziccrse,-zicntr,-zicond,-zicsr,-zifencei,-zihintntl,-zihintpause,-zihpm,-zk,-zkn,-zknd,-zkne,-zknh,-zkr,-zks,-zksed,-zksh,-zkt,-zmmul,-zvbb,-zvbc,-zve32f,-zve32x,-zve64d,-zve64f,-zve64x,-zvfh,-zvfhmin,-zvkb,-zvkg,-zvkn,-zvknc,-zvkned,-zvkng,-zvknha,-zvknhb,-zvks,-zvksc,-zvksed,-zvksg,-zvksh,-zvkt,-zvl1024b,-zvl128b,-zvl16384b,-zvl2048b,-zvl256b,-zvl32768b,-zvl32b,-zvl4096b,-zvl512b,-zvl64b,-zvl65536b,-zvl8192b" } attributes #8 = { mustprogress nofree nounwind willreturn memory(inaccessiblemem: readwrite) "no-builtin-memcpy" "no-builtin-memmove" "no-builtin-printf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="generic-rv32" "target-features"="+32bit,+a,+c,+m,+relax,-d,-e,-experimental-zacas,-experimental-zcmop,-experimental-zfbfmin,-experimental-zicfilp,-experimental-zicfiss,-experimental-zimop,-experimental-ztso,-experimental-zvfbfmin,-experimental-zvfbfwma,-f,-h,-smaia,-smepmp,-ssaia,-svinval,-svnapot,-svpbmt,-v,-xcvalu,-xcvbi,-xcvbitmanip,-xcvelw,-xcvmac,-xcvmem,-xcvsimd,-xsfvcp,-xsfvfnrclipxfqf,-xsfvfwmaccqqq,-xsfvqmaccdod,-xsfvqmaccqoq,-xtheadba,-xtheadbb,-xtheadbs,-xtheadcmo,-xtheadcondmov,-xtheadfmemidx,-xtheadmac,-xtheadmemidx,-xtheadmempair,-xtheadsync,-xtheadvdot,-xventanacondops,-za128rs,-za64rs,-zawrs,-zba,-zbb,-zbc,-zbkb,-zbkc,-zbkx,-zbs,-zca,-zcb,-zcd,-zce,-zcf,-zcmp,-zcmt,-zdinx,-zfa,-zfh,-zfhmin,-zfinx,-zhinx,-zhinxmin,-zic64b,-zicbom,-zicbop,-zicboz,-ziccamoa,-ziccif,-zicclsm,-ziccrse,-zicntr,-zicond,-zicsr,-zifencei,-zihintntl,-zihintpause,-zihpm,-zk,-zkn,-zknd,-zkne,-zknh,-zkr,-zks,-zksed,-zksh,-zkt,-zmmul,-zvbb,-zvbc,-zve32f,-zve32x,-zve64d,-zve64f,-zve64x,-zvfh,-zvfhmin,-zvkb,-zvkg,-zvkn,-zvknc,-zvkned,-zvkng,-zvknha,-zvknhb,-zvks,-zvksc,-zvksed,-zvksg,-zvksh,-zvkt,-zvl1024b,-zvl128b,-zvl16384b,-zvl2048b,-zvl256b,-zvl32768b,-zvl32b,-zvl4096b,-zvl512b,-zvl64b,-zvl65536b,-zvl8192b" }
attributes #9 = { mustprogress nofree nounwind willreturn memory(inaccessiblemem: readwrite) "no-builtin-memcpy" "no-builtin-printf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="generic-rv32" "target-features"="+32bit,+a,+c,+m,+relax,-d,-e,-experimental-zacas,-experimental-zcmop,-experimental-zfbfmin,-experimental-zicfilp,-experimental-zicfiss,-experimental-zimop,-experimental-ztso,-experimental-zvfbfmin,-experimental-zvfbfwma,-f,-h,-smaia,-smepmp,-ssaia,-svinval,-svnapot,-svpbmt,-v,-xcvalu,-xcvbi,-xcvbitmanip,-xcvelw,-xcvmac,-xcvmem,-xcvsimd,-xsfvcp,-xsfvfnrclipxfqf,-xsfvfwmaccqqq,-xsfvqmaccdod,-xsfvqmaccqoq,-xtheadba,-xtheadbb,-xtheadbs,-xtheadcmo,-xtheadcondmov,-xtheadfmemidx,-xtheadmac,-xtheadmemidx,-xtheadmempair,-xtheadsync,-xtheadvdot,-xventanacondops,-za128rs,-za64rs,-zawrs,-zba,-zbb,-zbc,-zbkb,-zbkc,-zbkx,-zbs,-zca,-zcb,-zcd,-zce,-zcf,-zcmp,-zcmt,-zdinx,-zfa,-zfh,-zfhmin,-zfinx,-zhinx,-zhinxmin,-zic64b,-zicbom,-zicbop,-zicboz,-ziccamoa,-ziccif,-zicclsm,-ziccrse,-zicntr,-zicond,-zicsr,-zifencei,-zihintntl,-zihintpause,-zihpm,-zk,-zkn,-zknd,-zkne,-zknh,-zkr,-zks,-zksed,-zksh,-zkt,-zmmul,-zvbb,-zvbc,-zve32f,-zve32x,-zve64d,-zve64f,-zve64x,-zvfh,-zvfhmin,-zvkb,-zvkg,-zvkn,-zvknc,-zvkned,-zvkng,-zvknha,-zvknhb,-zvks,-zvksc,-zvksed,-zvksg,-zvksh,-zvkt,-zvl1024b,-zvl128b,-zvl16384b,-zvl2048b,-zvl256b,-zvl32768b,-zvl32b,-zvl4096b,-zvl512b,-zvl64b,-zvl65536b,-zvl8192b" } attributes #9 = { nofree nounwind memory(write, argmem: read, inaccessiblemem: readwrite) "no-builtin-memcpy" "no-builtin-memmove" "no-builtin-printf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="generic-rv32" "target-features"="+32bit,+a,+c,+m,+relax,-d,-e,-experimental-zacas,-experimental-zcmop,-experimental-zfbfmin,-experimental-zicfilp,-experimental-zicfiss,-experimental-zimop,-experimental-ztso,-experimental-zvfbfmin,-experimental-zvfbfwma,-f,-h,-smaia,-smepmp,-ssaia,-svinval,-svnapot,-svpbmt,-v,-xcvalu,-xcvbi,-xcvbitmanip,-xcvelw,-xcvmac,-xcvmem,-xcvsimd,-xsfvcp,-xsfvfnrclipxfqf,-xsfvfwmaccqqq,-xsfvqmaccdod,-xsfvqmaccqoq,-xtheadba,-xtheadbb,-xtheadbs,-xtheadcmo,-xtheadcondmov,-xtheadfmemidx,-xtheadmac,-xtheadmemidx,-xtheadmempair,-xtheadsync,-xtheadvdot,-xventanacondops,-za128rs,-za64rs,-zawrs,-zba,-zbb,-zbc,-zbkb,-zbkc,-zbkx,-zbs,-zca,-zcb,-zcd,-zce,-zcf,-zcmp,-zcmt,-zdinx,-zfa,-zfh,-zfhmin,-zfinx,-zhinx,-zhinxmin,-zic64b,-zicbom,-zicbop,-zicboz,-ziccamoa,-ziccif,-zicclsm,-ziccrse,-zicntr,-zicond,-zicsr,-zifencei,-zihintntl,-zihintpause,-zihpm,-zk,-zkn,-zknd,-zkne,-zknh,-zkr,-zks,-zksed,-zksh,-zkt,-zmmul,-zvbb,-zvbc,-zve32f,-zve32x,-zve64d,-zve64f,-zve64x,-zvfh,-zvfhmin,-zvkb,-zvkg,-zvkn,-zvknc,-zvkned,-zvkng,-zvknha,-zvknhb,-zvks,-zvksc,-zvksed,-zvksg,-zvksh,-zvkt,-zvl1024b,-zvl128b,-zvl16384b,-zvl2048b,-zvl256b,-zvl32768b,-zvl32b,-zvl4096b,-zvl512b,-zvl64b,-zvl65536b,-zvl8192b" }
attributes #10 = { mustprogress nofree nounwind willreturn memory(write, argmem: none, inaccessiblemem: readwrite) "no-builtin-memcpy" "no-builtin-printf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="generic-rv32" "target-features"="+32bit,+a,+c,+m,+relax,-d,-e,-experimental-zacas,-experimental-zcmop,-experimental-zfbfmin,-experimental-zicfilp,-experimental-zicfiss,-experimental-zimop,-experimental-ztso,-experimental-zvfbfmin,-experimental-zvfbfwma,-f,-h,-smaia,-smepmp,-ssaia,-svinval,-svnapot,-svpbmt,-v,-xcvalu,-xcvbi,-xcvbitmanip,-xcvelw,-xcvmac,-xcvmem,-xcvsimd,-xsfvcp,-xsfvfnrclipxfqf,-xsfvfwmaccqqq,-xsfvqmaccdod,-xsfvqmaccqoq,-xtheadba,-xtheadbb,-xtheadbs,-xtheadcmo,-xtheadcondmov,-xtheadfmemidx,-xtheadmac,-xtheadmemidx,-xtheadmempair,-xtheadsync,-xtheadvdot,-xventanacondops,-za128rs,-za64rs,-zawrs,-zba,-zbb,-zbc,-zbkb,-zbkc,-zbkx,-zbs,-zca,-zcb,-zcd,-zce,-zcf,-zcmp,-zcmt,-zdinx,-zfa,-zfh,-zfhmin,-zfinx,-zhinx,-zhinxmin,-zic64b,-zicbom,-zicbop,-zicboz,-ziccamoa,-ziccif,-zicclsm,-ziccrse,-zicntr,-zicond,-zicsr,-zifencei,-zihintntl,-zihintpause,-zihpm,-zk,-zkn,-zknd,-zkne,-zknh,-zkr,-zks,-zksed,-zksh,-zkt,-zmmul,-zvbb,-zvbc,-zve32f,-zve32x,-zve64d,-zve64f,-zve64x,-zvfh,-zvfhmin,-zvkb,-zvkg,-zvkn,-zvknc,-zvkned,-zvkng,-zvknha,-zvknhb,-zvks,-zvksc,-zvksed,-zvksg,-zvksh,-zvkt,-zvl1024b,-zvl128b,-zvl16384b,-zvl2048b,-zvl256b,-zvl32768b,-zvl32b,-zvl4096b,-zvl512b,-zvl64b,-zvl65536b,-zvl8192b" } attributes #10 = { mustprogress nofree nounwind willreturn memory(write, argmem: none, inaccessiblemem: readwrite) "no-builtin-memcpy" "no-builtin-memmove" "no-builtin-printf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="generic-rv32" "target-features"="+32bit,+a,+c,+m,+relax,-d,-e,-experimental-zacas,-experimental-zcmop,-experimental-zfbfmin,-experimental-zicfilp,-experimental-zicfiss,-experimental-zimop,-experimental-ztso,-experimental-zvfbfmin,-experimental-zvfbfwma,-f,-h,-smaia,-smepmp,-ssaia,-svinval,-svnapot,-svpbmt,-v,-xcvalu,-xcvbi,-xcvbitmanip,-xcvelw,-xcvmac,-xcvmem,-xcvsimd,-xsfvcp,-xsfvfnrclipxfqf,-xsfvfwmaccqqq,-xsfvqmaccdod,-xsfvqmaccqoq,-xtheadba,-xtheadbb,-xtheadbs,-xtheadcmo,-xtheadcondmov,-xtheadfmemidx,-xtheadmac,-xtheadmemidx,-xtheadmempair,-xtheadsync,-xtheadvdot,-xventanacondops,-za128rs,-za64rs,-zawrs,-zba,-zbb,-zbc,-zbkb,-zbkc,-zbkx,-zbs,-zca,-zcb,-zcd,-zce,-zcf,-zcmp,-zcmt,-zdinx,-zfa,-zfh,-zfhmin,-zfinx,-zhinx,-zhinxmin,-zic64b,-zicbom,-zicbop,-zicboz,-ziccamoa,-ziccif,-zicclsm,-ziccrse,-zicntr,-zicond,-zicsr,-zifencei,-zihintntl,-zihintpause,-zihpm,-zk,-zkn,-zknd,-zkne,-zknh,-zkr,-zks,-zksed,-zksh,-zkt,-zmmul,-zvbb,-zvbc,-zve32f,-zve32x,-zve64d,-zve64f,-zve64x,-zvfh,-zvfhmin,-zvkb,-zvkg,-zvkn,-zvknc,-zvkned,-zvkng,-zvknha,-zvknhb,-zvks,-zvksc,-zvksed,-zvksg,-zvksh,-zvkt,-zvl1024b,-zvl128b,-zvl16384b,-zvl2048b,-zvl256b,-zvl32768b,-zvl32b,-zvl4096b,-zvl512b,-zvl64b,-zvl65536b,-zvl8192b" }
attributes #11 = { "no-builtin-memcpy" "no-builtin-printf" } attributes #11 = { "no-builtin-memcpy" "no-builtin-memmove" "no-builtin-printf" }
attributes #12 = { allocsize(0) "no-builtin-memcpy" "no-builtin-printf" } attributes #12 = { allocsize(0) "no-builtin-memcpy" "no-builtin-memmove" "no-builtin-printf" }
attributes #13 = { nounwind } attributes #13 = { nobuiltin nounwind "no-builtin-memcpy" "no-builtin-memmove" "no-builtin-printf" }
attributes #14 = { nobuiltin nounwind "no-builtin-memcpy" "no-builtin-printf" } attributes #14 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !4} !llvm.module.flags = !{!0, !1, !2, !4}
!llvm.ident = !{!5} !llvm.ident = !{!5}

View File

@ -16,46 +16,69 @@
sw s2, 16(sp) # 4-byte Folded Spill sw s2, 16(sp) # 4-byte Folded Spill
sw s3, 12(sp) # 4-byte Folded Spill sw s3, 12(sp) # 4-byte Folded Spill
sw s4, 8(sp) # 4-byte Folded Spill sw s4, 8(sp) # 4-byte Folded Spill
sw s5, 4(sp) # 4-byte Folded Spill
mv s0, a1 mv s0, a1
mv s1, a0 mv s1, a0
call strlen call strlen
mv s2, a0 mv s4, a0
mv a0, s0 mv a0, s0
call strlen call strlen
mv s3, a0 mv s2, a0
add s4, a0, s2 add s5, a0, s4
addi a0, s4, 1 addi a0, s5, 1
call malloc call malloc
blez s2, .LBB0_3 li a1, 31
# %bb.1: # %.preheader1 mv s3, a0
add a1, a0, s2 blt a1, s4, .LBB0_8
mv a2, a0 # %bb.1:
.LBB0_2: # =>This Inner Loop Header: Depth=1 blez s4, .LBB0_4
lbu a3, 0(s1) # %bb.2: # %.preheader1
sb a3, 0(a2) add a0, s3, s4
addi a2, a2, 1 mv a1, s3
.LBB0_3: # =>This Inner Loop Header: Depth=1
lbu a2, 0(s1)
sb a2, 0(a1)
addi a1, a1, 1
addi s1, s1, 1 addi s1, s1, 1
bne a2, a1, .LBB0_2 bne a1, a0, .LBB0_3
.LBB0_3: .LBB0_4:
blez s3, .LBB0_6 li a1, 31
# %bb.4: # %.preheader add a0, s3, s4
add s2, s2, a0 blt a1, s2, .LBB0_9
add a1, a0, s4 .LBB0_5:
.LBB0_5: # =>This Inner Loop Header: Depth=1 blez s2, .LBB0_10
# %bb.6: # %.preheader
add a1, s3, s5
.LBB0_7: # =>This Inner Loop Header: Depth=1
lbu a2, 0(s0) lbu a2, 0(s0)
sb a2, 0(s2) sb a2, 0(a0)
addi s2, s2, 1 addi a0, a0, 1
addi s0, s0, 1 addi s0, s0, 1
bne s2, a1, .LBB0_5 bne a0, a1, .LBB0_7
.LBB0_6: j .LBB0_10
add s4, s4, a0 .LBB0_8:
sb zero, 0(s4) mv a0, s3
mv a1, s1
mv a2, s4
call memcpy
li a1, 31
add a0, s3, s4
bge a1, s2, .LBB0_5
.LBB0_9:
mv a1, s0
mv a2, s2
call memcpy
.LBB0_10:
add s5, s5, s3
sb zero, 0(s5)
mv a0, s3
lw ra, 28(sp) # 4-byte Folded Reload lw ra, 28(sp) # 4-byte Folded Reload
lw s0, 24(sp) # 4-byte Folded Reload lw s0, 24(sp) # 4-byte Folded Reload
lw s1, 20(sp) # 4-byte Folded Reload lw s1, 20(sp) # 4-byte Folded Reload
lw s2, 16(sp) # 4-byte Folded Reload lw s2, 16(sp) # 4-byte Folded Reload
lw s3, 12(sp) # 4-byte Folded Reload lw s3, 12(sp) # 4-byte Folded Reload
lw s4, 8(sp) # 4-byte Folded Reload lw s4, 8(sp) # 4-byte Folded Reload
lw s5, 4(sp) # 4-byte Folded Reload
addi sp, sp, 32 addi sp, sp, 32
ret ret
.builtin_Lfunc_end0: .builtin_Lfunc_end0:
@ -99,19 +122,28 @@ string.substring: # @string.substring
sub s1, a2, a1 sub s1, a2, a1
addi a0, s1, 1 addi a0, s1, 1
call malloc call malloc
add a1, a0, s1 add a1, s2, s0
blez s1, .LBB2_3 li a2, 31
# %bb.1: # %.preheader add s0, a0, s1
add s0, s0, s2 blt a2, s1, .LBB2_4
# %bb.1:
blez s1, .LBB2_5
# %bb.2: # %.preheader
mv a2, a0 mv a2, a0
.LBB2_2: # =>This Inner Loop Header: Depth=1 .LBB2_3: # =>This Inner Loop Header: Depth=1
lbu a3, 0(s0) lbu a3, 0(a1)
sb a3, 0(a2) sb a3, 0(a2)
addi a2, a2, 1 addi a2, a2, 1
addi s0, s0, 1 addi a1, a1, 1
bne a2, a1, .LBB2_2 bne a2, s0, .LBB2_3
.LBB2_3: j .LBB2_5
sb zero, 0(a1) .LBB2_4:
mv s2, a0
mv a2, s1
call memmove
mv a0, s2
.LBB2_5:
sb zero, 0(s0)
lw ra, 12(sp) # 4-byte Folded Reload lw ra, 12(sp) # 4-byte Folded Reload
lw s0, 8(sp) # 4-byte Folded Reload lw s0, 8(sp) # 4-byte Folded Reload
lw s1, 4(sp) # 4-byte Folded Reload lw s1, 4(sp) # 4-byte Folded Reload