[PATCH] D24868: Enhance calcColdCallHeuristics for InvokeInst

David Li via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 23 09:24:11 PDT 2016


davidxl added inline comments.

================
Comment at: test/Analysis/BranchProbabilityInfo/basic.ll:180
@@ +179,3 @@
+; CHECK-LABEL: test_invoket_code_callsite1
+define i32 @test_invoket_code_callsite1(i1 %c) personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
+entry:
----------------
invoket --> invoke

================
Comment at: test/Analysis/BranchProbabilityInfo/basic.ll:183
@@ +182,3 @@
+  br i1 %c, label %if.then, label %if.end
+; CHECK:  edge entry -> if.then probability is 0x07878788 / 0x80000000 = 5.88%
+; CHECK:  edge entry -> if.end probability is 0x78787878 / 0x80000000 = 94.12% [HOT edge]
----------------
Add a comment here  : cold call heuristic

================
Comment at: test/Analysis/BranchProbabilityInfo/basic.ll:187
@@ +186,3 @@
+if.then:
+  invoke i32 @InovkeCall()
+          to label %invoke.cont unwind label %lpad
----------------
typo -- InvokeCall

================
Comment at: test/Analysis/BranchProbabilityInfo/basic.ll:205
@@ +204,3 @@
+
+; CHECK-LABEL: test_invoket_code_callsite2
+define i32 @test_invoket_code_callsite2(i1 %c) personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
----------------
invoket --> invoke

================
Comment at: test/Analysis/BranchProbabilityInfo/basic.ll:209
@@ +208,3 @@
+  br i1 %c, label %if.then, label %if.end
+; CHECK:  edge entry -> if.then probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK:  edge entry -> if.end probability is 0x40000000 / 0x80000000 = 50.00%
----------------
Add a comment that cold call heuristic does not kick in when the cold callsite is in EH path


https://reviews.llvm.org/D24868





More information about the llvm-commits mailing list