[PATCH] Add loop unrolling metadata descriptions to LangRef.rst
meheff at google.com
Mon Jul 21 14:37:24 PDT 2014
On Fri, Jul 18, 2014 at 10:28 AM, Hal Finkel <hfinkel at anl.gov> wrote:
> > This doesn't exactly map nicely to the two metadata we have (one with
> > boolean operand, one with i32). Maybe a cleaner way to have done
> > this is with the following metadata:
> > llvm.loop.unroll.disable (no operand)
> > llvm.loop.unroll.fully_unroll (no operand)
> > llvm.loop.unroll.count i32
> > And only allow a single loop unroll metadata node per loop. Worth
> > making this change?
> Yes, I think so. Maybe we can even do it before we branch for the release
Started working on this. If it makes sense to change the IR metadata to
more closely match the intended meaning, then I suppose it makes sense to
change the pragma notation as well. Maybe something like:
#pragam clang loop unroll(disable)
#pragma clang loop unroll(full)
#pragma clang loop unroll_count(value)
The difference here is that previously "#pragma clang loop unroll(enable)"
meant full unrolling, now "unroll(full)" will means that. Also, a loop now
could now only have a single loop unrolling pragma (previously a loop could
have unroll(enable) and unroll_count(N) pragmas).
Overall I think this makes the unroll pragma clearer (no more 'enable'
magically meaning full unroll). I'll send out the patch shortly for review.
> > http://reviews.llvm.org/D4576
> Hal Finkel
> Assistant Computational Scientist
> Leadership Computing Facility
> Argonne National Laboratory
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits