<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm/test/Transforms/LoopRotate, branch release_29</title>
<subtitle>http://llvm.org</subtitle>
<id>https://git.amat.us/llvm/atom/test/Transforms/LoopRotate?h=release_29</id>
<link rel='self' href='https://git.amat.us/llvm/atom/test/Transforms/LoopRotate?h=release_29'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/llvm/'/>
<updated>2011-02-14T23:03:23Z</updated>
<entry>
<title>Do not hoist @llvm.dbg.value. Here, @llvm.dbg.value is "referring" a value that is modified inside loop.</title>
<updated>2011-02-14T23:03:23Z</updated>
<author>
<name>Devang Patel</name>
<email>dpatel@apple.com</email>
</author>
<published>2011-02-14T23:03:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/llvm/commit/?id=3fc178ffdad0c3359f8e4bad084556a3054e1ed2'/>
<id>urn:sha1:3fc178ffdad0c3359f8e4bad084556a3054e1ed2</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125529 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
</entry>
<entry>
<title>merge tests into one crash.ll test.</title>
<updated>2011-01-11T07:50:07Z</updated>
<author>
<name>Chris Lattner</name>
<email>sabre@nondot.org</email>
</author>
<published>2011-01-11T07:50:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/llvm/commit/?id=86099ba2b5cf27127e0f5b7a1289b6d076687960'/>
<id>urn:sha1:86099ba2b5cf27127e0f5b7a1289b6d076687960</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123220 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
</entry>
<entry>
<title>remove a bogus assertion: the latch block of a loop is not </title>
<updated>2011-01-11T07:47:59Z</updated>
<author>
<name>Chris Lattner</name>
<email>sabre@nondot.org</email>
</author>
<published>2011-01-11T07:47:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/llvm/commit/?id=93767fdb61dfff6ab13056b2a73209998ae4e786'/>
<id>urn:sha1:93767fdb61dfff6ab13056b2a73209998ae4e786</id>
<content type='text'>
neccesarily an uncond branch to the header.  This fixes 
PR8955 (the assertion tripping).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123219 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
</entry>
<entry>
<title>When loop rotation happens, it is *very* common for the duplicated condbr</title>
<updated>2011-01-08T19:59:06Z</updated>
<author>
<name>Chris Lattner</name>
<email>sabre@nondot.org</email>
</author>
<published>2011-01-08T19:59:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/llvm/commit/?id=5d37370a6ff255293d0b97abf9e8b3d46ed17238'/>
<id>urn:sha1:5d37370a6ff255293d0b97abf9e8b3d46ed17238</id>
<content type='text'>
to be foldable into an uncond branch.  When this happens, we can make a
much simpler CFG for the loop, which is important for nested loop cases
where we want the outer loop to be aggressively optimized.

Handle this case more aggressively.  For example, previously on
phi-duplicate.ll we would get this:


define void @test(i32 %N, double* %G) nounwind ssp {
entry:
  %cmp1 = icmp slt i64 1, 1000
  br i1 %cmp1, label %bb.nph, label %for.end

bb.nph:                                           ; preds = %entry
  br label %for.body

for.body:                                         ; preds = %bb.nph, %for.cond
  %j.02 = phi i64 [ 1, %bb.nph ], [ %inc, %for.cond ]
  %arrayidx = getelementptr inbounds double* %G, i64 %j.02
  %tmp3 = load double* %arrayidx
  %sub = sub i64 %j.02, 1
  %arrayidx6 = getelementptr inbounds double* %G, i64 %sub
  %tmp7 = load double* %arrayidx6
  %add = fadd double %tmp3, %tmp7
  %arrayidx10 = getelementptr inbounds double* %G, i64 %j.02
  store double %add, double* %arrayidx10
  %inc = add nsw i64 %j.02, 1
  br label %for.cond

for.cond:                                         ; preds = %for.body
  %cmp = icmp slt i64 %inc, 1000
  br i1 %cmp, label %for.body, label %for.cond.for.end_crit_edge

for.cond.for.end_crit_edge:                       ; preds = %for.cond
  br label %for.end

for.end:                                          ; preds = %for.cond.for.end_crit_edge, %entry
  ret void
}

Now we get the much nicer:

define void @test(i32 %N, double* %G) nounwind ssp {
entry:
  br label %for.body

for.body:                                         ; preds = %entry, %for.body
  %j.01 = phi i64 [ 1, %entry ], [ %inc, %for.body ]
  %arrayidx = getelementptr inbounds double* %G, i64 %j.01
  %tmp3 = load double* %arrayidx
  %sub = sub i64 %j.01, 1
  %arrayidx6 = getelementptr inbounds double* %G, i64 %sub
  %tmp7 = load double* %arrayidx6
  %add = fadd double %tmp3, %tmp7
  %arrayidx10 = getelementptr inbounds double* %G, i64 %j.01
  store double %add, double* %arrayidx10
  %inc = add nsw i64 %j.01, 1
  %cmp = icmp slt i64 %inc, 1000
  br i1 %cmp, label %for.body, label %for.end

for.end:                                          ; preds = %for.body
  ret void
}

With all of these recent changes, we are now able to compile:

void foo(char *X) {
 for (int i = 0; i != 100; ++i) 
   for (int j = 0; j != 100; ++j)
     X[j+i*100] = 0;
}

into a single memset of 10000 bytes.  This series of changes
should also be helpful for other nested loop scenarios as well.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123079 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
</entry>
<entry>
<title>Three major changes:</title>
<updated>2011-01-08T18:52:51Z</updated>
<author>
<name>Chris Lattner</name>
<email>sabre@nondot.org</email>
</author>
<published>2011-01-08T18:52:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/llvm/commit/?id=0e4a1543aba1364fe4a1eacee46b6d08d4611506'/>
<id>urn:sha1:0e4a1543aba1364fe4a1eacee46b6d08d4611506</id>
<content type='text'>
1. Rip out LoopRotate's domfrontier updating code.  It isn't
   needed now that LICM doesn't use DF and it is super complex
   and gross.
2. Make DomTree updating code a lot simpler and faster.  The 
   old loop over all the blocks was just to find a block??
3. Change the code that inserts the new preheader to just use
   SplitCriticalEdge instead of doing an overcomplex 
   reimplementation of it.

No behavior change, except for the name of the inserted preheader.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123072 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
</entry>
<entry>
<title>Have loop-rotate simplify instructions (yay instsimplify!) as it clones</title>
<updated>2011-01-08T08:24:46Z</updated>
<author>
<name>Chris Lattner</name>
<email>sabre@nondot.org</email>
</author>
<published>2011-01-08T08:24:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/llvm/commit/?id=d9ec3572f3d0997348361334446f942194522127'/>
<id>urn:sha1:d9ec3572f3d0997348361334446f942194522127</id>
<content type='text'>
them into the loop preheader, eliminating silly instructions like
"icmp i32 0, 100" in fixed tripcount loops.  This also better exposes the 
bigger problem with loop rotate that I'd like to fix: once this has been
folded, the duplicated conditional branch *often* turns into an uncond branch.

Not aggressively handling this is pessimizing later loop optimizations 
somethin' fierce by making "dominates all exit blocks" checks fail.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123060 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
</entry>
<entry>
<title>Teach loop rotate to hoist trivially invariant instructions</title>
<updated>2010-09-06T01:10:22Z</updated>
<author>
<name>Chris Lattner</name>
<email>sabre@nondot.org</email>
</author>
<published>2010-09-06T01:10:22Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/llvm/commit/?id=50fb46983ccae116bdbda64471f4861108766135'/>
<id>urn:sha1:50fb46983ccae116bdbda64471f4861108766135</id>
<content type='text'>
in the duplicated block instead of duplicating them.  

Duplicating them into the end of the loop and the preheader 
means that we got a phi node in the header of the loop, 
which prevented LICM from hoisting them.  GVN would
usually come around later and merge the duplicated 
instructions so we'd get reasonable output... except that
anything dependent on the shoulda-been-hoisted value can't
be hoisted.  In PR5319 (which this fixes), a memory value
didn't get promoted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113134 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
</entry>
<entry>
<title>When rotating loops, put the original header at the bottom of the</title>
<updated>2010-08-17T17:39:21Z</updated>
<author>
<name>Dan Gohman</name>
<email>gohman@apple.com</email>
</author>
<published>2010-08-17T17:39:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/llvm/commit/?id=fc8042a1225790b3a6de434546623babea08496f'/>
<id>urn:sha1:fc8042a1225790b3a6de434546623babea08496f</id>
<content type='text'>
loop, making the resulting loop significantly less ugly.  Also, zap
its trivial PHI nodes, since it's easy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111255 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
</entry>
<entry>
<title>Fix some tests that didn't test anything.</title>
<updated>2010-06-26T20:05:06Z</updated>
<author>
<name>Benjamin Kramer</name>
<email>benny.kra@googlemail.com</email>
</author>
<published>2010-06-26T20:05:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/llvm/commit/?id=a2938e7e5f7f16b4593b6ddc0eaf14bd6ed620de'/>
<id>urn:sha1:a2938e7e5f7f16b4593b6ddc0eaf14bd6ed620de</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106954 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
</entry>
<entry>
<title>Delete useless trailing semicolons.</title>
<updated>2010-01-05T17:55:26Z</updated>
<author>
<name>Dan Gohman</name>
<email>gohman@apple.com</email>
</author>
<published>2010-01-05T17:55:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/llvm/commit/?id=aceba31b7a04fd28680209b2677915378877bc13'/>
<id>urn:sha1:aceba31b7a04fd28680209b2677915378877bc13</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92740 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
</entry>
</feed>
