[LLVMdev] [llvm-commits] SSI Patch

Andre Tavares andrelct at dcc.ufmg.br
Tue Sep 1 05:25:55 PDT 2009


I tried to make 5 separate patches, but as they are constructive, they 
had information from the last one. So I will post one by one as it gets 
on the tree.

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.

Patch attached

Andre Tavares wrote:
> 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,
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ssi1.patch
Type: text/x-diff
Size: 3546 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090901/8ee25868/attachment.patch>


More information about the llvm-dev mailing list