[llvm-commits] SSI Patch

Andre Tavares andrelct at dcc.ufmg.br
Fri Aug 28 07:15:04 PDT 2009


I did a bunch of modifications on SSI. Most of them to make it faster, 
and a few inconsistencies I found. I will list what I did.

1. We had a function isUsedInTerminator that tested if a comparator was 
used in the terminator of its parent BasicBlock. This is wrong because a 
comparator can be created in a BasicBlock and used in the terminator of 
other BasicBlock, and can be used in more than one.

2. There was that list of all variables converted to SSI. I decided to 
remove it as you guys didn't like to have list holding memory. Now 
insertSigma tests if a sigma is already there before it inserts any.

3. InsertSSIphi had the test if (DF_BB == DF->end()) twice, one with 
break and the other with continue.  I kept the continue, which is the 
correct one.

4.  I changed the order in which we rename variables, and now fixphis 
will only need to get the case where a predecessor of a phi is missing, 
it will not have to change value for any phi anymore, because I insert 
the right information on the first time.

5.  SSI is not pruned anymore. To have it pruned we needed to test if a 
PHI or SIGMA dominated any use of the original variable. This costs 
time, and a pruned SSI is not under SSI rules. This was not a problem 
for ABCD, but could be for any other optimization that used it. So all 
PHIS and SIGMAS related to branch instructions are inserted. Those other 
optimization passes can remove them later if necessary.

Regards,

-- 
Andre Tavares
Master Student in Computer Science - UFMG - Brasil
http://dcc.ufmg.br/~andrelct

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ssi.patch
Type: text/x-diff
Size: 14831 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090828/da161b5d/attachment.patch>


More information about the llvm-commits mailing list