[llvm-commits] [llvm] r48999 - /llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
Owen Anderson
resistor at mac.com
Tue Apr 1 00:27:49 PDT 2008
Ah, my bad. I misread what he was doing. :-)
--Owen
On Apr 1, 2008, at 2:05 AM, Evan Cheng wrote:
> It looks right to me:
>
> // If the starting point was specifiy, use it
> if (start) {
> QI = start;
> blockBegin = start->getParent()->begin();
> // If the starting point wasn't specified, but the block was, use it
> } else if (!start && block) {
> QI = block->end();
> blockBegin = block->begin();
> }
>
> // Walk backwards through the block, looking for dependencies
> while (QI != blockBegin) {
> --QI;
>
> QI is the iterator. Seems to me blockBegin really should point to the
> start of the block.
>
> Evan
>
> On Mar 31, 2008, at 11:12 PM, Owen Anderson wrote:
>
>> Dan,
>>
>> I don't think this is right. MemDep walks backwards through the
>> block to find dependencies, so it needs to start at the end of the
>> block.
>>
>> --Owen
>>
>> On Mar 31, 2008, at 5:08 PM, Dan Gohman wrote:
>>
>>> Author: djg
>>> Date: Mon Mar 31 17:08:00 2008
>>> New Revision: 48999
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=48999&view=rev
>>> Log:
>>> Set blockBegin to point to the beginning of the block,
>>> not the end.
>>>
>>> Modified:
>>> llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
>>>
>>> Modified: llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp?rev=48999&r1=48998&r2=48999&view=diff
>>>
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> ====================================================================
>>> --- llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp (original)
>>> +++ llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp Mon Mar 31
>>> 17:08:00 2008
>>> @@ -99,11 +99,11 @@
>>> // If the starting point was specifiy, use it
>>> if (start) {
>>> QI = start;
>>> - blockBegin = start->getParent()->end();
>>> + blockBegin = start->getParent()->begin();
>>> // If the starting point wasn't specified, but the block was, use it
>>> } else if (!start && block) {
>>> QI = block->end();
>>> - blockBegin = block->end();
>>> + blockBegin = block->begin();
>>> }
>>>
>>> // Walk backwards through the block, looking for dependencies
>>>
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2555 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20080401/b2275e6b/attachment.bin>
More information about the llvm-commits
mailing list