[llvm-commits] [LLVMdev] SSI Patch
Nick Lewycky
nicholas at mxc.ca
Thu Sep 10 00:02:22 PDT 2009
Andre Tavares wrote:
> It is in its method now.
I noticed that insertSigma() still used 'unsigned j' when it didn't have
to (it used to use 'j' instead of 'i' because 'i' was used in an outer
loop). I changed that and committed it. Thanks!
Nick
> 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
>>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list