Skip to content

Commit 3b92024

Browse files
paperchaliceLukacma
authored andcommitted
[polly] Remove unsafe-fp-math uses (NFC) (llvm#164603)
Post cleanup for llvm#164534.
1 parent 851c37f commit 3b92024

File tree

64 files changed

+220
-442
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+220
-442
lines changed

polly/docs/experiments/matmul/matmul.ll

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ target triple = "x86_64-unknown-linux-gnu"
1414
@.str.1 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
1515

1616
; Function Attrs: noinline nounwind uwtable
17-
define dso_local void @init_array() #0 {
17+
define dso_local void @init_array() {
1818
entry:
1919
%i = alloca i32, align 4
2020
%j = alloca i32, align 4
@@ -88,7 +88,7 @@ for.end19: ; preds = %for.cond
8888
}
8989

9090
; Function Attrs: noinline nounwind uwtable
91-
define dso_local void @print_array() #0 {
91+
define dso_local void @print_array() {
9292
entry:
9393
%i = alloca i32, align 4
9494
%j = alloca i32, align 4
@@ -154,10 +154,10 @@ for.end12: ; preds = %for.cond
154154
ret void
155155
}
156156

157-
declare dso_local i32 @fprintf(%struct._IO_FILE*, i8*, ...) #1
157+
declare dso_local i32 @fprintf(%struct._IO_FILE*, i8*, ...)
158158

159159
; Function Attrs: noinline nounwind uwtable
160-
define dso_local i32 @main() #0 {
160+
define dso_local i32 @main() {
161161
entry:
162162
%retval = alloca i32, align 4
163163
%i = alloca i32, align 4
@@ -261,9 +261,6 @@ for.end30: ; preds = %for.cond
261261
ret i32 0
262262
}
263263

264-
attributes #0 = { noinline nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
265-
attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
266-
267264
!llvm.module.flags = !{!0}
268265
!llvm.ident = !{!1}
269266

polly/docs/experiments/matmul/matmul.normalopt.ll

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ target triple = "x86_64-unknown-linux-gnu"
1313
@C = common dso_local local_unnamed_addr global [1536 x [1536 x float]] zeroinitializer, align 16
1414

1515
; Function Attrs: noinline norecurse nounwind uwtable writeonly
16-
define dso_local void @init_array() local_unnamed_addr #0 {
16+
define dso_local void @init_array() local_unnamed_addr {
1717
entry:
1818
br label %for.cond1.preheader
1919

@@ -60,7 +60,7 @@ for.end19: ; preds = %for.inc17
6060
}
6161

6262
; Function Attrs: noinline nounwind uwtable
63-
define dso_local void @print_array() local_unnamed_addr #1 {
63+
define dso_local void @print_array() local_unnamed_addr {
6464
entry:
6565
br label %for.cond1.preheader
6666

@@ -75,7 +75,7 @@ for.body3: ; preds = %for.inc, %for.cond1
7575
%arrayidx5 = getelementptr inbounds [1536 x [1536 x float]], [1536 x [1536 x float]]* @C, i64 0, i64 %indvars.iv6, i64 %indvars.iv
7676
%2 = load float, float* %arrayidx5, align 4
7777
%conv = fpext float %2 to double
78-
%call = tail call i32 (%struct._IO_FILE*, i8*, ...) @fprintf(%struct._IO_FILE* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %conv) #4
78+
%call = tail call i32 (%struct._IO_FILE*, i8*, ...) @fprintf(%struct._IO_FILE* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %conv)
7979
%3 = trunc i64 %indvars.iv to i32
8080
%rem = urem i32 %3, 80
8181
%cmp6 = icmp eq i32 %rem, 79
@@ -103,10 +103,10 @@ for.end12: ; preds = %for.end
103103
}
104104

105105
; Function Attrs: nounwind
106-
declare dso_local i32 @fprintf(%struct._IO_FILE* nocapture, i8* nocapture readonly, ...) local_unnamed_addr #2
106+
declare dso_local i32 @fprintf(%struct._IO_FILE* nocapture, i8* nocapture readonly, ...) local_unnamed_addr
107107

108108
; Function Attrs: noinline norecurse nounwind uwtable
109-
define dso_local i32 @main() local_unnamed_addr #3 {
109+
define dso_local i32 @main() local_unnamed_addr {
110110
entry:
111111
tail call void @init_array()
112112
br label %for.cond1.preheader
@@ -164,13 +164,7 @@ for.end30: ; preds = %for.inc28
164164
}
165165

166166
; Function Attrs: nounwind
167-
declare i32 @fputc(i32, %struct._IO_FILE* nocapture) local_unnamed_addr #4
168-
169-
attributes #0 = { noinline norecurse nounwind uwtable writeonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
170-
attributes #1 = { noinline nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
171-
attributes #2 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
172-
attributes #3 = { noinline norecurse nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
173-
attributes #4 = { nounwind }
167+
declare i32 @fputc(i32, %struct._IO_FILE* nocapture) local_unnamed_addr
174168

175169
!llvm.module.flags = !{!0}
176170
!llvm.ident = !{!1}

polly/docs/experiments/matmul/matmul.polly.interchanged+tiled+vector+openmp.ll

Lines changed: 19 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@ target triple = "x86_64-unknown-linux-gnu"
1313
@C = common dso_local local_unnamed_addr global [1536 x [1536 x float]] zeroinitializer, align 16
1414

1515
; Function Attrs: noinline nounwind uwtable
16-
define dso_local void @init_array() local_unnamed_addr #0 {
16+
define dso_local void @init_array() local_unnamed_addr {
1717
entry:
1818
%polly.par.userContext = alloca {}, align 8
1919
%polly.par.userContext1 = bitcast {}* %polly.par.userContext to i8*
20-
call void @GOMP_parallel_loop_runtime_start(void (i8*)* nonnull @init_array_polly_subfn, i8* nonnull %polly.par.userContext1, i32 0, i64 0, i64 1536, i64 1) #3
21-
call void @init_array_polly_subfn(i8* nonnull %polly.par.userContext1) #3
22-
call void @GOMP_parallel_end() #3
20+
call void @GOMP_parallel_loop_runtime_start(void (i8*)* nonnull @init_array_polly_subfn, i8* nonnull %polly.par.userContext1, i32 0, i64 0, i64 1536, i64 1)
21+
call void @init_array_polly_subfn(i8* nonnull %polly.par.userContext1)
22+
call void @GOMP_parallel_end()
2323
ret void
2424
}
2525

2626
; Function Attrs: noinline nounwind uwtable
27-
define dso_local void @print_array() local_unnamed_addr #1 {
27+
define dso_local void @print_array() local_unnamed_addr {
2828
entry:
2929
br label %for.cond1.preheader
3030

@@ -39,7 +39,7 @@ for.body3: ; preds = %for.inc, %for.cond1
3939
%arrayidx5 = getelementptr inbounds [1536 x [1536 x float]], [1536 x [1536 x float]]* @C, i64 0, i64 %indvars.iv6, i64 %indvars.iv
4040
%2 = load float, float* %arrayidx5, align 4
4141
%conv = fpext float %2 to double
42-
%call = tail call i32 (%struct._IO_FILE*, i8*, ...) @fprintf(%struct._IO_FILE* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %conv) #3
42+
%call = tail call i32 (%struct._IO_FILE*, i8*, ...) @fprintf(%struct._IO_FILE* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %conv)
4343
%3 = trunc i64 %indvars.iv to i32
4444
%rem = urem i32 %3, 80
4545
%cmp6 = icmp eq i32 %rem, 79
@@ -67,27 +67,27 @@ for.end12: ; preds = %for.end
6767
}
6868

6969
; Function Attrs: nounwind
70-
declare dso_local i32 @fprintf(%struct._IO_FILE* nocapture, i8* nocapture readonly, ...) local_unnamed_addr #2
70+
declare dso_local i32 @fprintf(%struct._IO_FILE* nocapture, i8* nocapture readonly, ...) local_unnamed_addr
7171

7272
; Function Attrs: noinline nounwind uwtable
73-
define dso_local i32 @main() local_unnamed_addr #0 {
73+
define dso_local i32 @main() local_unnamed_addr {
7474
entry:
7575
%polly.par.userContext3 = alloca {}, align 8
7676
tail call void @init_array()
7777
%polly.par.userContext1 = bitcast {}* %polly.par.userContext3 to i8*
78-
call void @GOMP_parallel_loop_runtime_start(void (i8*)* nonnull @main_polly_subfn, i8* nonnull %polly.par.userContext1, i32 0, i64 0, i64 1536, i64 1) #3
79-
call void @main_polly_subfn(i8* nonnull %polly.par.userContext1) #3
80-
call void @GOMP_parallel_end() #3
81-
call void @GOMP_parallel_loop_runtime_start(void (i8*)* nonnull @main_polly_subfn_1, i8* nonnull %polly.par.userContext1, i32 0, i64 0, i64 1536, i64 64) #3
82-
call void @main_polly_subfn_1(i8* nonnull %polly.par.userContext1) #3
83-
call void @GOMP_parallel_end() #3
78+
call void @GOMP_parallel_loop_runtime_start(void (i8*)* nonnull @main_polly_subfn, i8* nonnull %polly.par.userContext1, i32 0, i64 0, i64 1536, i64 1)
79+
call void @main_polly_subfn(i8* nonnull %polly.par.userContext1)
80+
call void @GOMP_parallel_end()
81+
call void @GOMP_parallel_loop_runtime_start(void (i8*)* nonnull @main_polly_subfn_1, i8* nonnull %polly.par.userContext1, i32 0, i64 0, i64 1536, i64 64)
82+
call void @main_polly_subfn_1(i8* nonnull %polly.par.userContext1)
83+
call void @GOMP_parallel_end()
8484
ret i32 0
8585
}
8686

8787
; Function Attrs: nounwind
88-
declare i32 @fputc(i32, %struct._IO_FILE* nocapture) local_unnamed_addr #3
88+
declare i32 @fputc(i32, %struct._IO_FILE* nocapture) local_unnamed_addr
8989

90-
define internal void @init_array_polly_subfn(i8* nocapture readnone %polly.par.userContext) #4 {
90+
define internal void @init_array_polly_subfn(i8* nocapture readnone %polly.par.userContext) {
9191
polly.par.setup:
9292
%polly.par.LBPtr = alloca i64, align 8
9393
%polly.par.UBPtr = alloca i64, align 8
@@ -146,7 +146,7 @@ declare void @GOMP_parallel_loop_runtime_start(void (i8*)*, i8*, i32, i64, i64,
146146

147147
declare void @GOMP_parallel_end() local_unnamed_addr
148148

149-
define internal void @main_polly_subfn(i8* nocapture readnone %polly.par.userContext) #4 {
149+
define internal void @main_polly_subfn(i8* nocapture readnone %polly.par.userContext) {
150150
polly.par.setup:
151151
%polly.par.LBPtr = alloca i64, align 8
152152
%polly.par.UBPtr = alloca i64, align 8
@@ -175,7 +175,7 @@ polly.par.loadIVBounds: ; preds = %polly.par.setup, %p
175175
br i1 %7, label %polly.par.exit, label %polly.par.loadIVBounds
176176
}
177177

178-
define internal void @main_polly_subfn_1(i8* nocapture readnone %polly.par.userContext) #4 {
178+
define internal void @main_polly_subfn_1(i8* nocapture readnone %polly.par.userContext) {
179179
polly.par.setup:
180180
%polly.par.LBPtr = alloca i64, align 8
181181
%polly.par.UBPtr = alloca i64, align 8
@@ -363,14 +363,7 @@ vector.ph: ; preds = %polly.loop_header14
363363
}
364364

365365
; Function Attrs: argmemonly nounwind
366-
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1) #5
367-
368-
attributes #0 = { noinline nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "polly-optimized" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
369-
attributes #1 = { noinline nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
370-
attributes #2 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
371-
attributes #3 = { nounwind }
372-
attributes #4 = { "polly.skip.fn" }
373-
attributes #5 = { argmemonly nounwind }
366+
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1)
374367

375368
!llvm.module.flags = !{!0}
376369
!llvm.ident = !{!1}

polly/docs/experiments/matmul/matmul.polly.interchanged+tiled+vector.ll

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ target triple = "x86_64-unknown-linux-gnu"
1313
@C = common dso_local local_unnamed_addr global [1536 x [1536 x float]] zeroinitializer, align 16
1414

1515
; Function Attrs: noinline norecurse nounwind uwtable writeonly
16-
define dso_local void @init_array() local_unnamed_addr #0 {
16+
define dso_local void @init_array() local_unnamed_addr {
1717
entry:
1818
br label %polly.loop_header
1919

@@ -61,7 +61,7 @@ polly.loop_header1: ; preds = %polly.loop_header1,
6161
}
6262

6363
; Function Attrs: noinline nounwind uwtable
64-
define dso_local void @print_array() local_unnamed_addr #1 {
64+
define dso_local void @print_array() local_unnamed_addr {
6565
entry:
6666
br label %for.cond1.preheader
6767

@@ -76,7 +76,7 @@ for.body3: ; preds = %for.inc, %for.cond1
7676
%arrayidx5 = getelementptr inbounds [1536 x [1536 x float]], [1536 x [1536 x float]]* @C, i64 0, i64 %indvars.iv6, i64 %indvars.iv
7777
%2 = load float, float* %arrayidx5, align 4
7878
%conv = fpext float %2 to double
79-
%call = tail call i32 (%struct._IO_FILE*, i8*, ...) @fprintf(%struct._IO_FILE* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %conv) #4
79+
%call = tail call i32 (%struct._IO_FILE*, i8*, ...) @fprintf(%struct._IO_FILE* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %conv)
8080
%3 = trunc i64 %indvars.iv to i32
8181
%rem = urem i32 %3, 80
8282
%cmp6 = icmp eq i32 %rem, 79
@@ -104,10 +104,10 @@ for.end12: ; preds = %for.end
104104
}
105105

106106
; Function Attrs: nounwind
107-
declare dso_local i32 @fprintf(%struct._IO_FILE* nocapture, i8* nocapture readonly, ...) local_unnamed_addr #2
107+
declare dso_local i32 @fprintf(%struct._IO_FILE* nocapture, i8* nocapture readonly, ...) local_unnamed_addr
108108

109109
; Function Attrs: noinline norecurse nounwind uwtable
110-
define dso_local i32 @main() local_unnamed_addr #3 {
110+
define dso_local i32 @main() local_unnamed_addr {
111111
entry:
112112
tail call void @init_array()
113113
call void @llvm.memset.p0i8.i64(i8* align 16 bitcast ([1536 x [1536 x float]]* @C to i8*), i8 0, i64 9437184, i1 false)
@@ -282,17 +282,10 @@ vector.ph: ; preds = %polly.loop_header26
282282
}
283283

284284
; Function Attrs: nounwind
285-
declare i32 @fputc(i32, %struct._IO_FILE* nocapture) local_unnamed_addr #4
285+
declare i32 @fputc(i32, %struct._IO_FILE* nocapture) local_unnamed_addr
286286

287287
; Function Attrs: argmemonly nounwind
288-
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1) #5
289-
290-
attributes #0 = { noinline norecurse nounwind uwtable writeonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "polly-optimized" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
291-
attributes #1 = { noinline nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
292-
attributes #2 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
293-
attributes #3 = { noinline norecurse nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "polly-optimized" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
294-
attributes #4 = { nounwind }
295-
attributes #5 = { argmemonly nounwind }
288+
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1)
296289

297290
!llvm.module.flags = !{!0}
298291
!llvm.ident = !{!1}

0 commit comments

Comments
 (0)