Skip to content

Commit b9cfef8

Browse files
mbouazizbeauby
authored andcommitted
Do not specify intrinsic functions attributes
IIUC these attributes are known by LLVM anyway so there are no consequences in not specifying them. The reason for this change is that `argmemonly` is now replaced by `memory(argmem: readwrite)` and `readnone` by `memory(none)`
1 parent e724ea8 commit b9cfef8

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

skiplang/prelude/preamble/preamble32.ll

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,19 @@ declare ptr @SKIP_llvm_memcpy(ptr, ptr, i64)
1010

1111
; LLVM intrinsics
1212

13-
declare void @llvm.lifetime.start(i64 immarg, ptr nocapture) argmemonly nounwind
14-
declare void @llvm.lifetime.end(i64 immarg, ptr nocapture) argmemonly nounwind
13+
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
14+
declare void @llvm.lifetime.start(i64 immarg, ptr nocapture)
15+
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
16+
declare void @llvm.lifetime.end(i64 immarg, ptr nocapture)
1517

16-
declare i32 @llvm.eh.typeid.for(ptr) nounwind readnone
18+
; Function Attrs: nounwind readnone
19+
declare i32 @llvm.eh.typeid.for(ptr)
1720

21+
; Function Attrs: nounwind readnone
1822
declare i64 @llvm.ctlz.i64(i64, i1)
23+
; Function Attrs: nounwind readnone
1924
declare i64 @llvm.cttz.i64(i64, i1)
25+
; Function Attrs: nounwind readnone
2026
declare i64 @llvm.ctpop.i64(i64)
2127

2228
declare i32 @__gxx_personality_v0(...)

skiplang/prelude/preamble/preamble64.ll

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,19 @@ declare ptr @SKIP_llvm_memcpy(ptr, ptr, i64)
99

1010
; LLVM intrinsics
1111

12-
declare void @llvm.lifetime.start(i64 immarg, ptr nocapture) argmemonly nounwind
13-
declare void @llvm.lifetime.end(i64 immarg, ptr nocapture) argmemonly nounwind
12+
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
13+
declare void @llvm.lifetime.start(i64 immarg, ptr nocapture)
14+
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
15+
declare void @llvm.lifetime.end(i64 immarg, ptr nocapture)
1416

15-
declare i32 @llvm.eh.typeid.for(ptr) nounwind readnone
17+
; Function Attrs: nounwind readnone
18+
declare i32 @llvm.eh.typeid.for(ptr)
1619

20+
; Function Attrs: nounwind readnone
1721
declare i64 @llvm.ctlz.i64(i64, i1)
22+
; Function Attrs: nounwind readnone
1823
declare i64 @llvm.cttz.i64(i64, i1)
24+
; Function Attrs: nounwind readnone
1925
declare i64 @llvm.ctpop.i64(i64)
2026

2127
declare i32 @__gxx_personality_v0(...)

0 commit comments

Comments
 (0)