[PATCH] D80987: [Instruction] Remove setProfWeight()

Yevgeny Rouban via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 3 21:26:01 PDT 2020


yrouban marked an inline comment as done.
yrouban added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/cast-call-combine-prof.ll:35
 
-; CHECK: ![[$PROF]] = !{!"branch_weights", i32 2000}
+; CHECK: ![[$PROF]] = !{!"VP", i32 0, i64 2000, i64 -3913987384944532146, i64 2000}
 !0 = !{!"VP", i32 0, i64 2000, i64 -3913987384944532146, i64 2000}
----------------
davidxl wrote:
> yrouban wrote:
> > davidxl wrote:
> > > where does 'branch_weights' profdata go? 
> > "VP" is preserved as pointed out in the summary.
> If the invoke is still there, the branch weights should also be copied over, right?
In cast-call-combine-prof.ll there is no branch_weights metadata.
As the instcombine is fixed it is not converting "VP" to "branch_weights".
If the invoke instruction had "branch_weights" then the fixed instcombine would preserve it as well. In other words, with this patch we just copy whatever !prof data we have.
!prof can have either "VP" or "branch_weights", but not both.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80987/new/

https://reviews.llvm.org/D80987





More information about the llvm-commits mailing list