[LLVMdev] [PATCH] Fix nondeterministic behaviour in the CodeExtractor

Chris Lattner clattner at apple.com
Sat Jan 9 17:05:41 PST 2010


On Jan 9, 2010, at 4:11 PM, Julien Lerouge wrote:

> On Fri, Jan 08, 2010 at 05:04:17PM -0800, Chris Lattner wrote:
> 
>> On Jan 8, 2010, at 5:01 PM, Julien Lerouge wrote:
> 
>>> Hello,
>>> 
>>> The CodeExtractor contains a std::set<BasicBlock*> to keep track
>>> of the
>>> blocks to extract. Iterators on this set are not deterministic, and so
>>> the functions that are generated are not (the order of the
>>> inputs/outputs can change).
>>> 
>>> The attached patch uses a SetVector instead. Ok to apply ?
> 
>> Nice catch, please apply,
> 
>> -Chris
> 
> Thanks for the quick review. There is actually more, is it ok to apply
> this one as well (avoid std:vector<Value*> being sorted) ? 

Works for me, please apply.

-Chris



More information about the llvm-dev mailing list