<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm/test/Transforms/SimplifyCFG, branch release_24</title>
<subtitle>http://llvm.org</subtitle>
<id>https://git.amat.us/llvm/atom/test/Transforms/SimplifyCFG?h=release_24</id>
<link rel='self' href='https://git.amat.us/llvm/atom/test/Transforms/SimplifyCFG?h=release_24'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/llvm/'/>
<updated>2008-10-03T18:57:37Z</updated>
<entry>
<title>Nick Lewycky's patch.</title>
<updated>2008-10-03T18:57:37Z</updated>
<author>
<name>Devang Patel</name>
<email>dpatel@apple.com</email>
</author>
<published>2008-10-03T18:57:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/llvm/commit/?id=20da1f07dac4d771e55ee5c7f105ccedfa4caaaa'/>
<id>urn:sha1:20da1f07dac4d771e55ee5c7f105ccedfa4caaaa</id>
<content type='text'>
While hosting instruction check PHI node.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57025 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
</entry>
<entry>
<title>Do not hoist instruction above branch condition. The instruction may use branch condition.</title>
<updated>2008-09-17T18:21:49Z</updated>
<author>
<name>Devang Patel</name>
<email>dpatel@apple.com</email>
</author>
<published>2008-09-17T18:21:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/llvm/commit/?id=48fbc2d39b6efbd8d2d02e830cc91ab6e49b8dde'/>
<id>urn:sha1:48fbc2d39b6efbd8d2d02e830cc91ab6e49b8dde</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56286 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
</entry>
<entry>
<title>Fix simplifycfg crash in handing block merge.</title>
<updated>2008-09-09T01:06:56Z</updated>
<author>
<name>Devang Patel</name>
<email>dpatel@apple.com</email>
</author>
<published>2008-09-09T01:06:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/llvm/commit/?id=e435a5d9374b61049b16ef69e6314542815fadb4'/>
<id>urn:sha1:e435a5d9374b61049b16ef69e6314542815fadb4</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55971 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
</entry>
<entry>
<title>Remove GCSE and LoadVN from the testsuite.</title>
<updated>2008-08-16T00:00:54Z</updated>
<author>
<name>Owen Anderson</name>
<email>resistor@mac.com</email>
</author>
<published>2008-08-16T00:00:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/llvm/commit/?id=7c856c09cd5a2d6231d2f03e383bbc165833df8c'/>
<id>urn:sha1:7c856c09cd5a2d6231d2f03e383bbc165833df8c</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54832 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
</entry>
<entry>
<title>Fix mishandling of the infinite loop case when merging two blocks.  This</title>
<updated>2008-07-13T22:23:11Z</updated>
<author>
<name>Chris Lattner</name>
<email>sabre@nondot.org</email>
</author>
<published>2008-07-13T22:23:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/llvm/commit/?id=093a4385027235459ab6972b2e2fdc79061773cf'/>
<id>urn:sha1:093a4385027235459ab6972b2e2fdc79061773cf</id>
<content type='text'>
fixes PR2540.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53533 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
</entry>
<entry>
<title>Speculatively execute a block when the the block is the then part of a triangle shape and it contains a single, side effect free, cheap instruction. The branch is eliminated by adding a select instruction. i.e.</title>
<updated>2008-06-07T08:52:29Z</updated>
<author>
<name>Evan Cheng</name>
<email>evan.cheng@apple.com</email>
</author>
<published>2008-06-07T08:52:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/llvm/commit/?id=4d09efd7b8fdf9e8a8c89bdb821f4992091a764b'/>
<id>urn:sha1:4d09efd7b8fdf9e8a8c89bdb821f4992091a764b</id>
<content type='text'>
Turn                                                                                                                                                                                                       
BB:                                                                                                                                                                                                        
    %t1 = icmp                                                                                                                                                                                             
    br i1 %t1, label %BB1, label %BB2                                                                                                                                                                      
BB1:                                                                                                                                                                                                       
    %t3 = add %t2, c                                                                                                                                                                                       
    br label BB2                                                                                                                                                                                           
BB2:                                                                                                                                                                                                       
=&gt;                                                                                                                                                                                                         
BB:                                                                                                                                                                                                        
    %t1 = icmp                                                                                                                                                                                             
    %t4 = add %t2, c                                                                                                                                                                                       
    %t3 = select i1 %t1, %t2, %t3


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52073 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
</entry>
<entry>
<title>Fix run line.</title>
<updated>2008-06-07T08:40:16Z</updated>
<author>
<name>Evan Cheng</name>
<email>evan.cheng@apple.com</email>
</author>
<published>2008-06-07T08:40:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/llvm/commit/?id=cce302fded6c4c7b84630094fb60bc16fb4b1749'/>
<id>urn:sha1:cce302fded6c4c7b84630094fb60bc16fb4b1749</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52072 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
</entry>
<entry>
<title>Restucture a part of the SimplifyCFG pass and include a testcase.</title>
<updated>2008-05-23T09:09:41Z</updated>
<author>
<name>Matthijs Kooijman</name>
<email>matthijs@stdin.nl</email>
</author>
<published>2008-05-23T09:09:41Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/llvm/commit/?id=5e179a23e311f8ea74844d7160f6ff9a5a1bd20a'/>
<id>urn:sha1:5e179a23e311f8ea74844d7160f6ff9a5a1bd20a</id>
<content type='text'>
The SimplifyCFG pass looks at basic blocks that contain only phi nodes,
followed by an unconditional branch. In a lot of cases, such a block (BB) can
be merged into their successor (Succ).

This merging is performed by TryToSimplifyUncondBranchFromEmptyBlock. It does
this by taking all phi nodes in the succesor block Succ and expanding them to
include the predecessors of BB. Furthermore, any phi nodes in BB are moved to
Succ and expanded to include the predecessors of Succ as well.

Before attempting this merge, CanPropagatePredecessorsForPHIs checks to see if
all phi nodes can be properly merged. All functional changes are made to
this function, only comments were updated in
TryToSimplifyUncondBranchFromEmptyBlock.

In the original code, CanPropagatePredecessorsForPHIs looks quite convoluted
and more like stack of checks added to handle different kinds of situations
than a comprehensive check. In particular the first check in the function did
some value checking for the case that BB and Succ have a common predecessor,
while the last check in the function simply rejected all cases where BB and
Succ have a common predecessor. The first check was still useful in the case
that BB did not contain any phi nodes at all, though, so it was not completely
useless.

Now, CanPropagatePredecessorsForPHIs is restructured to to look a lot more
similar to the code that actually performs the merge. Both functions now look
at the same phi nodes in about the same order.  Any conflicts (phi nodes with
different values for the same source) that could arise from merging or moving
phi nodes are detected. If no conflicts are found, the merge can happen.

Apart from only restructuring the checks, two main changes in functionality
happened.

Firstly, the old code rejected blocks with common predecessors in most cases.
The new code performs some extra checks so common predecessors can be handled
in a lot of cases. Wherever common predecessors still pose problems, the
blocks are left untouched.

Secondly, the old code rejected the merge when values (phi nodes) from BB were
used in any other place than Succ. However, it does not seem that there is any
situation that would require this check. Even more, this can be proven.

Consider that BB is a block containing of a single phi node "%a" and a branch
to Succ. Now, since the definition of %a will dominate all of its uses, BB
will dominate all blocks that use %a. Furthermore, since the branch from BB to
Succ is unconditional, Succ will also dominate all uses of %a.

Now, assume that one predecessor of Succ is not dominated by BB (and thus not
dominated by Succ). Since at least one use of %a (but in reality all of them)
is reachable from Succ, you could end up at a use of %a without passing
through it's definition in BB (by coming from X through Succ). This is a
contradiction, meaning that our original assumption is wrong. Thus, all
predecessors of Succ must also be dominated by BB (and thus also by Succ).

This means that moving the phi node %a from BB to Succ does not pose any
problems when the two blocks are merged, and any use checks are not needed.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51478 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
</entry>
<entry>
<title>sabre brings to my attention that the 'tr' suffix is also obsolete</title>
<updated>2008-05-20T21:00:03Z</updated>
<author>
<name>Gabor Greif</name>
<email>ggreif@gmail.com</email>
</author>
<published>2008-05-20T21:00:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/llvm/commit/?id=f6cadc440cbf04330b3cda9a3c76728f08035203'/>
<id>urn:sha1:f6cadc440cbf04330b3cda9a3c76728f08035203</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51349 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
</entry>
<entry>
<title>Rename the last test with .llx extension to .ll, resolve duplicate test by renaming to isnan2. Now that no test has llx ending there is no need to search for them from dg.exp too.</title>
<updated>2008-05-20T19:52:04Z</updated>
<author>
<name>Gabor Greif</name>
<email>ggreif@gmail.com</email>
</author>
<published>2008-05-20T19:52:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/llvm/commit/?id=722243bd402aaed698a279cb323cf37554befd53'/>
<id>urn:sha1:722243bd402aaed698a279cb323cf37554befd53</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51328 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
</entry>
</feed>
