Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] getSmallConstantTripCount function doesn't work for obvious cases"
2011 Apr 27
2
[LLVMdev] getSmallConstantTripCount problem
In my pass, I add LoopInfo as a required pass. Then I'd like to print the
constant loop trip count of each loop if it has one. However, every time I
call loop->
getSmallConstantTripCount(), it returns 0, even for a very simple loop:
for(i=0; i<3; ++i) {;} What's the possible cause of this problem?
regards,
Bo
-------------- next part --------------
An HTML attachment was
2012 May 21
1
[LLVMdev] No getSmallConstantTripCount function in current LLVM version
Hi,
I cannot find the getSmallConstantTripCount function in the current LLVM. Can anyone tell me whether there is still such a function to get the trip count in LLVM?
Thank you very much.
Best,
Han
2014 Oct 16
2
[LLVMdev] RFC: Should we have (something like) -extra-vectorizer-passes in -O2?
----- Original Message -----
> From: "Chandler Carruth" <chandlerc at google.com>
> To: "Zinovy Nis" <zinovy.nis at gmail.com>
> Cc: "Hal Finkel" <hfinkel at anl.gov>, "James Molloy" <james at jamesmolloy.co.uk>, "LLVM Developers Mailing List"
> <llvmdev at cs.uiuc.edu>
> Sent: Thursday, October 16, 2014
2008 Oct 02
3
[LLVMdev] MS C++ gives error C2371 on this code while (obviously)gcc compiles it fine
gcc is correct. According to the ISO specification, the for-init-statement
is supposed to inject any variable names into the same declarative scope as
the condition of an equivalent restructuring of the loop in the form of a
while statement, which in turn fronts the declaration to an extra scope that
surrounds the /entire/ loop construct. VC++ seems to be scoping the
variables as if they were
2013 Sep 27
2
[LLVMdev] Trip count and Loop Vectorizer
Hi,
I am trying to get a small loop to *not vectorize* for cases where it doesn't make sense. For instance, this loop:
void foo(int a[4][8], int n)
{
int b[4][8];
for(int i = 0; i < 4; i++) {
for(int j = 0; j < n; j++) {
a[i][j] = b[i][j];
}
}
}
* Has maximum of 8ints copy. LLVM tries to use Memcpy for the inner loop. It is not helpful to perform
2016 Sep 16
4
SCEV cannot compute the trip count of Simple loop
Hi Deepali,
SCEV reports the backedge taken count as "((-1 * (sext i32 (3 + %x) to
i64))<nsw> + ((sext i32 (3 + %x) to i64) smax (sext i32 (6 + %x) to
i64)))", so symbolically it does have an answer.
Ideally SCEV should be able to exploit <nsw> on (3 + %x) and (6 + %x)
to fold the expression above to "3", but due to some systemic issues
SCEV can't exploit
2010 Apr 21
2
[LLVMdev] determining the number of iteration of a loop
Hello
I'm wandring to know how many times a block is executed inside a loop ?
knowing that I can't use getSmallConstantTripCount() because the number is
unkown "for (i=0;i<N;i++) for example"
I'm using a Function pass
for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) {
if (Loop *L = LI->getLoopFor(BB)) {
if (L->getHeader() ==
2008 May 09
0
[LLVMdev] [PATCH] Split LoopUnroll pass into mechanism and policy
Hi All,
the attached patch performs the splitting in the proposed manner.
before applying the patch, please execute
svn cp lib/Transforms/Scalar/LoopUnroll.cpp lib/Transforms/Utils/UnrollLoop.cpp
to make the patch apply and preserve proper history.
Transforms/Utils/UnrollLoop.cpp contains the unrollLoop function, which is now
used by the LoopUnroll pass. I've also moved the
2008 May 07
8
[LLVMdev] [PATCH] Split LoopUnroll pass into mechanism and policy
Hello Matthijs,
Separating mechanism from policy is a good thing for the LoopUnroll
pass. Instead of moving the policy to a subclass though, I think it'd
be better to move the mechanism, the unrollLoop function, out to be a
standalone utility function, with the LoopInfo object passed in
explicitly. FoldBlockIntoPredecessor would also be good to make into
a standalone utility function, since
2013 Sep 27
0
[LLVMdev] Trip count and Loop Vectorizer
Hi Sriram,
Thanks for performing this analysis. The problem here, both for memcpy and the vectorizer, is that we can’t predict the size of “n”, even though the only use of ’n’ is for the loop bound for the alloca [4 x [8 x i32]]. If you change the unroll condition to TC >= 0 then you will disable loop unrolling for all loops because getSmallConstantTripCount returns an unsigned number. You
2012 Jul 02
2
[LLVMdev] Alternative of Loop::getTripCount?
I found out that Loop::getTripCount method is obsolete in LLVM 3.1
Is there an alternative?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120702/ea6ca4e6/attachment.html>
2013 May 21
1
[LLVMdev] How to find the first block of each loop
Hello,
I want to insert a control-block before every outermost loop. My current
solution is: 1) find each outermost loop in some function; 2) find the loop
header with Loop->getHeader() APIs, and then insert the controller block
before the header block of current loop.
But I encounters problems when there multi subsequent loops in the
following example, where there is no code between loops:
2013 Sep 27
2
[LLVMdev] Trip count and Loop Vectorizer
Hi Nadav,
Thanks for the response. I forgot to mention that there is an upper limit of 16 for the Trip Count check,
TinyTripCountVectorThreshold = 16;
if (TC > 0u && TC < TinyTripCountVectorThreshold). So right now, any loop with Trip Count as 0, or with value >=16, LV with unroll. With the change to the lower bound, it will also include the loop with 0 trip count.
SCEV returns 0
2008 Oct 02
0
[LLVMdev] MS C++ gives error C2371 on this code while (obviously)gcc compiles it fine
Jay Freeman (saurik) wrote:
> gcc is correct. According to the ISO specification, the for-init-statement
> is supposed to inject any variable names into the same declarative scope as
> the condition of an equivalent restructuring of the loop in the form of a
> while statement, which in turn fronts the declaration to an extra scope that
> surrounds the /entire/ loop construct.
2013 Mar 11
2
[LLVMdev] PROPOSAL: struct-access-path aware TBAA
On Mar 11, 2013, at 4:23 PM, Daniel Berlin <dberlin at dberlin.org> wrote:
> On Mon, Mar 11, 2013 at 3:45 PM, Manman Ren <mren at apple.com> wrote:
>>
>> On Mar 11, 2013, at 2:37 PM, Daniel Berlin <dberlin at dberlin.org> wrote:
>>
>>> On Mon, Mar 11, 2013 at 2:06 PM, Manman Ren <mren at apple.com> wrote:
>>>>
>>>>
2013 Mar 12
2
[LLVMdev] PROPOSAL: struct-access-path aware TBAA
On Mar 11, 2013, at 7:52 PM, Daniel Berlin wrote:
> On Mon, Mar 11, 2013 at 4:56 PM, Manman Ren <mren at apple.com> wrote:
>>
>> On Mar 11, 2013, at 4:23 PM, Daniel Berlin <dberlin at dberlin.org> wrote:
>>
>>> On Mon, Mar 11, 2013 at 3:45 PM, Manman Ren <mren at apple.com> wrote:
>>>>
>>>> On Mar 11, 2013, at 2:37 PM,
2019 May 24
2
Bash completion thrown by quoted option args?
Leroy Tennison writes:
> I am going to take a really wild guess and say "Try replacing the outermost quotes with single quotes or escape the double quotes around the numeral 1". Your second example has double quotes within double quotes and I'm wondering if that's getting rendered as "yum --debuglevel=" 1 " install ..." (extra space added for
2013 Mar 12
0
[LLVMdev] PROPOSAL: struct-access-path aware TBAA
On Mon, Mar 11, 2013 at 4:56 PM, Manman Ren <mren at apple.com> wrote:
>
> On Mar 11, 2013, at 4:23 PM, Daniel Berlin <dberlin at dberlin.org> wrote:
>
>> On Mon, Mar 11, 2013 at 3:45 PM, Manman Ren <mren at apple.com> wrote:
>>>
>>> On Mar 11, 2013, at 2:37 PM, Daniel Berlin <dberlin at dberlin.org> wrote:
>>>
>>>> On
2013 Mar 13
3
[LLVMdev] PROPOSAL: struct-access-path aware TBAA
On Mar 12, 2013, at 12:20 PM, Daniel Berlin <dberlin at dberlin.org> wrote:
> On Tue, Mar 12, 2013 at 10:10 AM, Manman Ren <mren at apple.com> wrote:
>>
>> On Mar 11, 2013, at 7:52 PM, Daniel Berlin wrote:
>>
>>> On Mon, Mar 11, 2013 at 4:56 PM, Manman Ren <mren at apple.com> wrote:
>>>>
>>>> On Mar 11, 2013, at 4:23 PM,
2013 Mar 27
1
[LLVMdev] PROPOSAL: struct-access-path aware TBAA (new version)
Hello,
After discussions with Daniel, Dan and others, here is an updated proposal for struct-access-path aware TBAA.
Given an example
struct A {
int x;
int y;
};
struct B {
A a;
int z;
};
struct C {
B b1;
B b2;
int *p;
};
struct D {
C c;
};
The purpose of struct-path-aware TBAA is to say
"C::b1.a" will alias with "B::a.x", "C::b1.a" will alias with