[PATCH] D91724: [HardwareLoops] Change order of SCEV expression construction for InitLoopCount.

Janek van Oirschot via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 19 06:35:41 PST 2020


JanekvO added a comment.

In D91724#2404880 <https://reviews.llvm.org/D91724#2404880>, @samparker wrote:

> Out of curiosity, did you try performing the +1 in HardwareLoopInfo::isHardwareLoopCandidate instead? Looking back through the code, I think it would be more clear to rename 'ExitCount' to 'TripCount' and perform this addition outside of the pass.

I hadn't considered the +1 in `isHardwareLoopCandidate` until you mentioned it. I can add these changes in this diff, but I wonder whether the zero-extend should also be moved to `isHardwareLoopCandidate` at this point. That way only the uses of `ExitCount` (or `TripCount`, after renaming) will remain in the pass (as far as I can see).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91724



More information about the llvm-commits mailing list