[llvm-commits] [LLVMdev] SSI Patch

Andre Tavares andrelct at dcc.ufmg.br
Wed Sep 9 18:01:14 PDT 2009


It is in its method now.



Nick Lewycky wrote:
> Andre Tavares wrote:
>> 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.
>
> +            for (unsigned j = 0, e = TI->getNumSuccessors(); j < e; 
> ++j) {
> +              // Next Basic Block
> +              BasicBlock *BB_next = TI->getSuccessor(j);
> +              if (BB_next != BB &&
> +                  BB_next->getSinglePredecessor() != NULL &&
> +                  dominateAny(BB_next, value[i])) {
> +                PHINode *PN = PHINode::Create(
> +                    value[i]->getType(), SSI_SIG, BB_next->begin());
> +                PN->addIncoming(value[i], BB);
> +                sigmas.insert(std::make_pair(PN, i));
> +                created.insert(PN);
> +                need = true;
> +                defsites[i].push_back(BB_next);
> +                ++NumSigmaInserted;
> +              }
> +            }
>
> Please break this out into its own method. Otherwise, this looks fine 
> to me.
>
> Nick
>

-- 
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: 4279 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090909/28a3977d/attachment.patch>


More information about the llvm-commits mailing list