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

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 3 21:57:46 PDT 2020


davidxl accepted this revision.
davidxl added a comment.
This revision is now accepted and ready to land.

lgtm (after fixing the comment mentioned by Hiroshi)



================
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}
----------------
yrouban wrote:
> 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.
ah thanks. The old diff does not have context so I read it wrong


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

https://reviews.llvm.org/D80987





More information about the llvm-commits mailing list