[LLVMdev] Deterministic code generation and llvm::Iterators

Duncan Sands baldrick at free.fr
Mon Jan 25 07:32:43 PST 2010

Hi Augustine,

> It seems as though the llvm system doesn't deterministically iterate 
> over Module::iterator, or global_iterator. To make myself clearer, the 
> iterators iterate over all the global_variables but on different llvm 
> passes (different calls to opt -load), the iterators iterate over them 
> in different orders.
> I was thinking that it has something non deterministic to do with byte 
> code reading or the llvm system initializing the variable.

it is of course important to be deterministic.  However it's hard to know
what to reply since you don't specify what version of LLVM you are using
nor what exactly you do that enables you to see this behaviour.  Can you
please send a detailed description that will enable us to reproduce this.



More information about the llvm-dev mailing list