[llvm-commits] [LLVMdev] SSI Patch
Andre Tavares
andrelct at dcc.ufmg.br
Thu Sep 10 13:12:45 PDT 2009
Next step:
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.
Andre Tavares wrote:
> Missed that. Thanks.
>
> I will submit the next one today.
>
> Nick Lewycky wrote:
>
>> 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
>>>
>>
>
>
--
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: 21575 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090910/f08b5f12/attachment.patch>
More information about the llvm-commits
mailing list