Augustine Mathews
2010-Jan-25 14:55 UTC
[LLVMdev] Deterministic code generation and llvm::Iterators
Guys, 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. Thanks, Augustine Mathew -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100126/8f5cc028/attachment.html>
Duncan Sands
2010-Jan-25 15:32 UTC
[LLVMdev] Deterministic code generation and llvm::Iterators
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. Thanks, Duncan.