[PATCH] Use loop unrolling pragma metadata in the loop unroller (take 2)

Mark Heffernan meheff at google.com
Mon Jun 16 12:00:36 PDT 2014


================
Comment at: lib/Transforms/Scalar/LoopUnrollPass.cpp:54
@@ +53,3 @@
+static cl::opt<unsigned>
+PragmaUnrollThreshold("pragma-unroll-threshold", cl::init(4096), cl::Hidden,
+  cl::desc("Unrolled size limit for loops with an unroll(enable) or "
----------------
hfinkel at anl.gov wrote:
> 4096 is much too small... we're worried about catching cases that might cause us to segfault, right? Make this at least an order of magnitude larger. You should experiment with this, take some simple loop and set the limit so that the memory size increase is limited to 200 MB or something like that.
I built a release build and ran it over a simple loop with pragma unroll(enable) with various values.  Looks like 32K results in a couple hundred more MB being consumed so changed to that value.

http://reviews.llvm.org/D4147






More information about the llvm-commits mailing list