[llvm] [LoopRotate] Set loop back edge weight to not less than exit weight (PR #86496)

via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 27 23:10:49 PDT 2024


https://github.com/WenleiHe requested changes to this pull request.

Actually I'm a bit confused looking at the test case..

1) You can have zero-trip loop, in which case `loop_exit` can be reached without going into `loop_body`, why loop back edge needs to be not less than exit weight? 

2) In principle, profile inference for sample PGO should make input counts consistent. It's there's input count inconsistency, we need track down the source of inconsistency. Fixing the input count inconsistency in a transformation isn't the right approach IMO. 

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


More information about the llvm-commits mailing list