[PATCH] D19827: Do not disable completely loop unroll when optimizing for size.

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Wed May 4 08:11:49 PDT 2016


rnk added a subscriber: rnk.
rnk accepted this revision.
rnk added a reviewer: rnk.
rnk added a comment.
This revision is now accepted and ready to land.

lgtm

To be clear, loop unrolling just lowers its size threshold when -Os is on:

  // Apply size attributes
  if (L->getHeader()->getParent()->optForSize()) {
    UP.Threshold = UP.OptSizeThreshold;
    UP.PartialThreshold = UP.PartialOptSizeThreshold;
  }

So this does more than enabling loop unrolling when pragmas are present. However, it that behavior is wrong then we should fix it in LLVM.


Repository:
  rL LLVM

http://reviews.llvm.org/D19827





More information about the cfe-commits mailing list