[PATCH] Fix nondeterministic behaviour in the CodeExtractor

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 ?

Thanks,
Julien

codeextractor.diff (2.64 KB)

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) ?

Thanks,
Julien

codeextractor.diff (1.46 KB)

Works for me, please apply.

-Chris