[PATCH] Use loop unrolling pragma metadata in the loop unroller
Mark Heffernan
meheff at google.com
Mon Jun 16 01:24:40 PDT 2014
================
Comment at: lib/Transforms/Scalar/LoopUnrollPass.cpp:58
@@ -50,1 +57,3 @@
+static const unsigned PragmaFullUnrollCountLimit = 1024;
+
namespace {
----------------
Philip Reames wrote:
> a) I would choose a slightly higher value. The reason for the limit is mostly to avoid absolutely insane behaviour. i.e. 100k might be a good one
> b) Does the frontend enforce any type of limit?
> c) Might be worth making this an command line option
>
> None of these are must change, use your judgement.
(Looks like phabricator never sent out your comment at least to me, sigh)
Anyway, to answer your questions/comments. The frontend does not enforce a limit other than that the count has to be a positive value. The patch got reverted because it was a suspect in a build breakage. The second attempt includes making it a cl opt as you suggest and uses a size threshold rather than a count threshold. See http://reviews.llvm.org/D4147.
http://reviews.llvm.org/D4090
More information about the llvm-commits
mailing list