[PATCH] Use loop unrolling pragma metadata in the loop unroller (take 2)
hfinkel at anl.gov
hfinkel at anl.gov
Mon Jun 16 15:15:50 PDT 2014
----- Original Message -----
> From: "Mark Heffernan" <meheff at google.com>
> To: meheff at google.com, eliben at google.com, hfinkel at anl.gov, public at my.anl.gov, full at mailrelay.anl.gov, "name com"
> <name.com at mailrelay.anl.gov>
> Cc: llvm-commits at cs.uiuc.edu
> Sent: Monday, June 16, 2014 2:00:36 PM
> Subject: Re: [PATCH] Use loop unrolling pragma metadata in the loop unroller (take 2)
>
> ================
> 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.
Okay; I'm satisfied with this. Thanks! To be on the safe side, maybe cut it in half again (because because not all instructions contribute to the cost, so there is some variance here).
-Hal
>
> http://reviews.llvm.org/D4147
>
>
>
http://reviews.llvm.org/D4147
More information about the llvm-commits
mailing list