When select is unfolded, copy profile metadata attached
to the select to a newly created branch
Details
Details
- Reviewers
- None
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
This comment was removed by rp.
Comment Actions
This patch addresses losing of the profile attribute during jump-threading, later causing not ideal block merge due to missing profile in shouldFoldCondBranchesToCommonDestination() where blocks are merged in case branch probability is unknown (and it is unknown as it was not propagated from select to br).
Comment Actions
We should update BPI\BFI in a similar way as it is done in updateBlockFreqAndEdgeWeight.
Comment Actions
Looks OK, except mentioned nit.
llvm/lib/Transforms/Scalar/JumpThreading.cpp | ||
---|---|---|
2768 | You should check sum of TrueWeight and FalseWeight is not 0 |
You should check sum of TrueWeight and FalseWeight is not 0