[compiler-rt] Bfi precision (PR #66285)

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 26 10:31:18 PDT 2023


================
@@ -43,51 +43,51 @@
 ;; Check BFI before and after
 
 ; BFI: block-frequency-info: foo
-; BFI:  - BB0[entry]: float = 1.0, int = 8, count = 4268
-; BFI:  - BB1[for.cond1.preheader]: float = 59.967, int = 479, count = 255547
-; BFI:  - BB2[if.then]: float = 2.5405, int = 20, count = 10670
-; BFI:  - BB3[if.end]: float = 59.967, int = 479, count = 255547
-; BFI:  - BB4[if.then7]: float = 2.5405, int = 20, count = 10670
-; BFI:  - BB5[if.end9]: float = 59.967, int = 479, count = 255547
-; BFI:  - BB6[if.then.1]: float = 2.5405, int = 20, count = 10670
-; BFI:  - BB7[if.end.1]: float = 59.967, int = 479, count = 255547
-; BFI:  - BB8[if.then7.1]: float = 2.5405, int = 20, count = 10670
-; BFI:  - BB9[if.end9.1]: float = 59.967, int = 479, count = 255547
-; BFI:  - BB10[if.then.2]: float = 2.5405, int = 20, count = 10670
-; BFI:  - BB11[if.end.2]: float = 59.967, int = 479, count = 255547
-; BFI:  - BB12[if.then7.2]: float = 2.5405, int = 20, count = 10670
-; BFI:  - BB13[if.end9.2]: float = 59.967, int = 479, count = 255547
-; BFI:  - BB14[if.then.3]: float = 2.5405, int = 20, count = 10670
-; BFI:  - BB15[if.end.3]: float = 59.967, int = 479, count = 255547
-; BFI:  - BB16[if.then7.3]: float = 2.5405, int = 20, count = 10670
-; BFI:  - BB17[if.end9.3]: float = 59.967, int = 479, count = 255547
-; BFI:  - BB18[for.end12]: float = 1.0, int = 8, count = 4268
+; BFI:  - BB0[entry]: float = 1.0, int = {{.*}}, count = 4268
+; BFI:  - BB1[for.cond1.preheader]: float = 59.967, int = {{.*}}, count = 255941
+; BFI:  - BB2[if.then]: float = 2.5405, int = {{.*}}, count = 10843
+; BFI:  - BB3[if.end]: float = 59.967, int = {{.*}}, count = 255941
+; BFI:  - BB4[if.then7]: float = 2.5405, int = {{.*}}, count = 10843
+; BFI:  - BB5[if.end9]: float = 59.967, int = {{.*}}, count = 255941
+; BFI:  - BB6[if.then.1]: float = 2.5405, int = {{.*}}, count = 10843
+; BFI:  - BB7[if.end.1]: float = 59.967, int = {{.*}}, count = 255941
+; BFI:  - BB8[if.then7.1]: float = 2.5405, int = {{.*}}, count = 10843
+; BFI:  - BB9[if.end9.1]: float = 59.967, int = {{.*}}, count = 255941
+; BFI:  - BB10[if.then.2]: float = 2.5405, int = {{.*}}, count = 10843
+; BFI:  - BB11[if.end.2]: float = 59.967, int = {{.*}}, count = 255941
+; BFI:  - BB12[if.then7.2]: float = 2.5405, int = {{.*}}, count = 10843
+; BFI:  - BB13[if.end9.2]: float = 59.967, int = {{.*}}, count = 255941
+; BFI:  - BB14[if.then.3]: float = 2.5405, int = {{.*}}, count = 10843
+; BFI:  - BB15[if.end.3]: float = 59.967, int = {{.*}}, count = 255941
+; BFI:  - BB16[if.then7.3]: float = 2.5405, int = {{.*}}, count = 10843
+; BFI:  - BB17[if.end9.3]: float = 59.967, int = {{.*}}, count = 255941
+; BFI:  - BB18[for.end12]: float = 1.0, int = {{.*}}, count = 4268
----------------
MatzeB wrote:

They feel a bit more of an implementation detail of the BFI pass. If we happen to further tune their calculation in the future they will change again. While the "float" and "count" value depends on the source alone and should be more stable.
That said no strong opinion, happy to put the costs back if you think that is better.

https://github.com/llvm/llvm-project/pull/66285


More information about the llvm-commits mailing list