[PATCH] Reimplement heuristic for estimating complete-unroll optimization effects.

Michael Zolotukhin mzolotukhin at apple.com
Fri Apr 10 18:42:59 PDT 2015


- Move check for possible NumberOfOptimizedInstructions*100 overflow into canUnrollCompletely.
- Hoist computing SCEV expressions out of the main traversal loop. This step is semantically different from visiting instructions to check if they could become redundant after loop unrolling. It's different because we need to do it only once, while other visitors need to be run for every iteration of the loop.
- Make analyzeLoop return bool.
- Don't run the analysis if we can unroll the loop even without it.
- Make SCEVGEPDescriptor's fields Start and Step uint64_t (previously, they were APInt).
- Compute Index in uint64_t and make sure operands fit into 32-bit int.
- Other small changes.


http://reviews.llvm.org/D8816

Files:
  lib/Transforms/Scalar/LoopUnrollPass.cpp
  test/Transforms/LoopUnroll/full-unroll-heuristics.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8816.23635.patch
Type: text/x-patch
Size: 29299 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150411/f379feea/attachment.bin>


More information about the llvm-commits mailing list