[all-commits] [llvm/llvm-project] 4d5598: [NFC] factor out unrolling decision logic

Ali-Sed via All-commits all-commits at lists.llvm.org
Wed Aug 18 11:21:56 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4d559837e887c278d7c27274f4f6b1b78b97c00d
      https://github.com/llvm/llvm-project/commit/4d559837e887c278d7c27274f4f6b1b78b97c00d
  Author: Ali Sedaghati <asedagha at sfu.ca>
  Date:   2021-08-18 (Wed, 18 Aug 2021)

  Changed paths:
    M llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp

  Log Message:
  -----------
  [NFC] factor out unrolling decision logic

Decoupling the unrolling logic into three different functions. The shouldPragmaUnroll() covers the 1st and 2nd priorities of the previous code, the shouldFullUnroll() covers the 3rd, and the shouldPartialUnroll() covers the 5th. The output of each function, Optional<unsigned>, could be a value for UP.Count, which means unrolling factor has been set, or None, which means decision hasn't been made yet and should try the next priority.

Reviewed By: mtrofin, jdoerfert

Differential Revision: https://reviews.llvm.org/D106001




More information about the All-commits mailing list