[PATCH] D106126: [LoopUnroll] Double thresholds instead of increasing to pragma-unroll-threshold for llvm.loop.unroll.enable

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 18 15:09:38 PDT 2021


MaskRay abandoned this revision.
MaskRay added a comment.

I agree. I wasn't aware of the semantics of unroll(enabled)

LangRef: "This metadata suggests that the loop should be fully unrolled if the trip count is known at compile time and partially unrolled if the trip count is not known at compile time."

https://clang.llvm.org/docs/LanguageExtensions.html#loop-unrolling : "If unroll(enable) is specified the unroller will attempt to fully unroll the loop if the trip count is known at compile time."

Full unrolling does what the user asks, even though such a trip count may look silly.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106126



More information about the llvm-commits mailing list