Displaying 20 results from an estimated 44 matches for "tripcount".
2010 Aug 12
0
[LLVMdev] Questions about trip count
...(l != NULL) {
l->dump();
errs() << "BB:\t" << BB->getNameStr() << "\n" ;
errs() << "Is simplifyed loop?\t" << l->isLoopSimplifyForm() <<
"\n" ;
errs() << "Tripcount " << l->getSmallConstantTripCount() << "\n"
;
const PHINode* phi = l->getCanonicalInductionVariable();
errs() << "Induction variable: " << *phi << "\n";
}
}
}
When I feed it with this program...
2016 May 07
3
[GSoC 2016] Introduction - Polly as an Analysis pass in LLVM
...ralInfo pass as
mentioned below.
2: Decouple DependenceInfo object from pass and create two passes. Same as
above.
3: Create the interface PolyhedralInfo, which will extract Memory Access
wise dependence information from Polly and provide few simple interfaces
like isParallel(), isVectorizable(), tripCount(Loop&).
Please feel free to post your comments and suggestions on this.
[1]
https://docs.google.com/document/d/1QyUzL3OOwJSI91lDqr7VsvqUsFyTY9FlpAwbGSipUtw/edit#
[2] https://groups.google.com/forum/#!topic/polly-dev/DuRxNmKfEnM
Regards,
Utpal Bora
Ph.D. Scholar
Computer Science & Engin...
2012 Apr 03
1
[LLVMdev] Possible typo in LoopUnrollPass.cpp
...Threshold = OptSizeUnrollThreshold;
As a result, the OptimizeForSize attribute is ignored when the pass
calculating the reduced count, which is not I expected.
Am i correct or i missed something? If i am correct, i am going to fix this.
best regards
ether
ps: the code contains typo
if (TripCount) {
// Reduce unroll count to be modulo of TripCount for partial unrolling
Count = CurrentThreshold / LoopSize;
<--------------------------should use Threshold
while (Count != 0 && TripCount%Count != 0)
Count--;
}
else if (UnrollRuntime) {...
2016 Jun 08
5
[Proposal][RFC] Cache aware Loop Cost Analysis
...http://reviews.llvm.org/D21124.
The patch basically creates groups of references that would lie in the same
cache line. Each group is then analysed with respect to innermost loops
considering cache lines. Penalty for the reference is:
a. 1, if the reference is invariant with the innermost loop,
b. TripCount for non-unit stride access,
c. TripCount / CacheLineSize for a unit-stride access.
Loop Cost is then calculated as the sum of the reference penalties times
the product of the loop bounds of the outer loops. This loop cost can then
be used as a profitability measure for cache reuse related optimizat...
2012 Nov 23
1
[LLVMdev] Disable loop unroll pass
...ptimizer
has no idea how to use this interface. If you just call
this interface to disable
unrolling, that would be overkill on some arch which has HW
support, as
on such arch HW-loop and unrolling are orthogonal.
- hasLoopZeroCostTopology(Loop *L, unsigend TripCount)
Why trip-count? It can be derived from the loop itself.
Which optimizer will call this interface?
I would suggest following interface:
/// get unrolling factor of given *INNERMOST* loop from HW's
perspective.
/// Note: this interface is for innermost loop only. Gett...
2011 Jan 20
0
[LLVMdev] induction variable computation not preserving scev
...opt -indvars | opt -analyze -scalar-evolution" which led me to add the forgetLoop here.
Ah, I tried the testcase, saw the crash, and assumed that was the bug
you were aiming to fix. The forgetLoop() call shouldn't be necessary
for correctness. But I do see how ScalarEvolution's cached tripcounts
are sub-optimal in this case, because they retain the type of the loop's
original induction variable, rather than the type that indvars has
chosen for the new induction variable. So forgetLoop() makes sense
there.
Dan
2016 Jun 09
2
[Proposal][RFC] Cache aware Loop Cost Analysis
....
>
> The patch basically creates groups of references that would lie in the
> same cache line. Each group is then analysed with respect to innermost
> loops considering cache lines. Penalty for the reference is:
> a. 1, if the reference is invariant with the innermost loop,
> b. TripCount for non-unit stride access,
> c. TripCount / CacheLineSize for a unit-stride access.
> Loop Cost is then calculated as the sum of the reference penalties times
> the product of the loop bounds of the outer loops. This loop cost can then
> be used as a profitability measure for cache reu...
2017 Aug 11
2
PHI nodes and connected ICMp
Thank you for your answer! I tested your example, yes, perhaps I should
preserve some kind of tree to parse this start and end expressions for
induction variable... I was surprised, that SCEV cannot compute the
tripcount here. I thought, that all linear and maybe expressions with
multiplication are suitable for analysis.
2017-08-10 19:30 GMT+02:00 Sanjoy Das <sanjoy at google.com>:
> Hi Anastasiya,
>
> If you're looking for the exit value of a PHI node, please take a look
> at what IndVarSim...
2012 Nov 23
0
[LLVMdev] Disable loop unroll pass
...mpler.
I think we are going off-topic. I'm not proposing new llvm instructions
to introduce hw loop semantics. What I'd like to do is to find a good
interface between the loop unroller and targets to prevent loop unrolling.
hasZeroCostLoop() and hasLoopZeroCostTopology(Loop *L, unsigend
TripCount) has been proposed so far.
Ivan
>
> Thanks
> Shuxin
>
> On 11/22/2012 02:56 PM, Gang Yu wrote:
>> Hi shuxin,
>>
>> Promote while-loop to do-loop is the job of loop induction
>> recognized, not this transformation. The scalar transform for hwloop
>> i...
2006 Jun 15
2
[LLVMdev] problem with loopinfo
hi,
The loopinfo pass failed to recognize the Tripcount of a simple program constructed by me, can you help me to figure out why this happened? Thanks.
The C program and corresponding .ll files are shown below. I used llvm1.7 to develop my own pass, and want to use the loop information.
-Wei
Test.c:
#include "stdio.h"
#define N 40
void...
2011 Jan 19
2
[LLVMdev] induction variable computation not preserving scev
On 19 January 2011 13:01, Dan Gohman <gohman at apple.com> wrote:
>
> On Jan 18, 2011, at 12:32 AM, Nick Lewycky wrote:
>
> > Hi,
> >
> > I tracked down a bug in indvars where we weren't updating SCEV properly.
> The attached patch shows the fix to this bug with a testcase, but it also
> causes five new test failures.
>
> Indvars isn't
2015 Jan 23
8
[LLVMdev] [RFC] Heuristic for complete loop unrolling
...So, the hot part looks like this:
for(y = 0..height) {
for (x = 0..width) {
val = 0
for (j = 0..5) {
for (i = 0..5) {
val += img[x+i,y+j] * weight[i,j]
}
}
}
}
And ‘weight' is just a constant matrix with some coefficients.
If we unroll the two internal loops (with tripcount 5), then we can replace weight[i,j] with concrete constant values. In this particular case, many of the coefficients are actually 0 or 1, which enables huge code simplifications later on. But currently we unroll only the innermost one, because unrolling both of them will exceed the threshold.
When...
2012 Nov 22
2
[LLVMdev] Disable loop unroll pass
Hi, Gang:
I don't want to discuss Open64 internal in LLVM mailing list. Let us
only focus on the design per se.
As your this mail and your previous mail combined give me a impression
that :
The only reason you introduce the specific operator for HW loop in
Scalar Opt simply because
you have hard time in figure out the trip count in CodeGen.
This might be true for Open64's
2013 Sep 27
2
[LLVMdev] Trip count and Loop Vectorizer
...memcpy optimization for such cases, and found that LLVM LoopVectorizer successfully vectorizes and unrolls the inner loop. However, in order to take the fast path (vmovups) it must copy at least 32 ints, where as in this case we only do an 8int copy.
** Upon closer look, LoopVectorizer obtains the TripCount for the innerloop using getSmallConstantTripCount(Loop,...). This value is 0 for the loop with unknown trip count. Loop unrolling is disabled when TC > 0. Should this be changed to TC >= 0 (which does the job for this testcase)? Or is there a better way to disable loop unrolling for such triv...
2016 Sep 16
2
SCEV cannot compute the trip count of Simple loop
Hi All,
I am trying to unroll the below loop, but couldn't as SCEV returns TripCount as 0.
void foo(int x) {
int p, i = 1;
int mat[6][6][6];
for (p = x+3 ; p<= x+6 ;p++)
mat[x][p][i] = mat[x][p][i] + 5;
}
For a quick reference I have added the generated IR compiled with clang using -O3.
Please let me know if this is an known issue in SCEV or I am missing something he...
2006 Jun 15
2
[LLVMdev] problem with loopinfo
...<sabre at nondot.org>
To: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu>
Sent: Thursday, June 15, 2006 3:35 PM
Subject: Re: [LLVMdev] problem with loopinfo
> On Thu, 15 Jun 2006, Wei Jiang wrote:
>> hi,
>> The loopinfo pass failed to recognize the Tripcount of a simple
>> program constructed by me, can you help me to figure out why this
>> happened? Thanks.
>> The C program and corresponding .ll files are shown below. I used
>> llvm1.7 to develop my own pass, and want to use the loop information.
>
> What passes are...
2006 Jun 15
0
[LLVMdev] problem with loopinfo
On Thu, 15 Jun 2006, Wei Jiang wrote:
> hi,
> The loopinfo pass failed to recognize the Tripcount of a simple program constructed by me, can you help me to figure out why this happened? Thanks.
> The C program and corresponding .ll files are shown below. I used llvm1.7 to develop my own pass, and want to use the loop information.
What passes are you running before your pass? trip count...
2016 Jun 23
2
[Proposal][RFC] Cache aware Loop Cost Analysis
...patch basically creates groups of references that would lie in the
>> same cache line. Each group is then analysed with respect to innermost
>> loops considering cache lines. Penalty for the reference is:
>> a. 1, if the reference is invariant with the innermost loop,
>> b. TripCount for non-unit stride access,
>> c. TripCount / CacheLineSize for a unit-stride access.
>> Loop Cost is then calculated as the sum of the reference penalties times
>> the product of the loop bounds of the outer loops. This loop cost can then
>> be used as a profitability measu...
2011 Jan 20
1
[LLVMdev] induction variable computation not preserving scev
...alues of the variables
within the loop can't have been changed by this? I expected to find such a
property based on my understanding of indvars, but when I looked through the
code I couldn't convince myself of it. Can you make such an argument?
But I do see how ScalarEvolution's cached tripcounts
> are sub-optimal in this case, because they retain the type of the loop's
> original induction variable, rather than the type that indvars has
> chosen for the new induction variable. So forgetLoop() makes sense
> there.
>
That's what I expected, and what I see in the test...
2008 May 09
3
[LLVMdev] [PATCH] Split LoopUnroll pass into mechanism and policy
...pInstruction and
> FoldBlockIntoPredecessor support functions there.
>
> Additionally, I've also moved the loop unrolling statistics into the
> Utils file. Is
> that a good idea?
>
> I've added two new methods to Loop (or LoopBase<> really):
> getSmallConstantTripCount() and getSmallConstantTripMultiple(),
> which return
> the trip count and multiple as a normal unsigned value.
>
> There are a number of remaining issues, though. Firstly, I observe
> some code
> duplication. Every pass that performs loop unrolling, should depend
> on the...