[llvm-commits] [llvm] r52339 - /llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp

Chris Lattner clattner at apple.com
Mon Jun 16 12:59:37 PDT 2008


On Jun 16, 2008, at 12:33 PM, Evan Cheng wrote:

>
> On Jun 16, 2008, at 11:20 AM, Chris Lattner wrote:
>
>>
>> On Jun 16, 2008, at 11:17 AM, Evan Cheng wrote:
>>
>>> Author: evancheng
>>> Date: Mon Jun 16 13:17:09 2008
>>> New Revision: 52339
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=52339&view=rev
>>> Log:
>>> Iterating over SmallPtrSet is not deterministic.
>>
>> Neither is iterating over std::set!  What is the code trying to do?
>
> I thought std::set is ordered? It's visiting every "dead instruction"
> in the set and delete them if possible. It also insert operands of
> dead instructions into the set.

It is ordered by the pointer's address, which isn't stable across  
runs.  Maybe you want a SetVector or just a vector?

-Chris



More information about the llvm-commits mailing list