[LLVMdev] how to get a deterministic execution

Bill Wendling isanbard at gmail.com
Tue May 19 10:59:35 PDT 2009


On Mon, May 18, 2009 at 8:33 PM, dan mihai <dnmh68 at hotmail.com> wrote:
> Hello,
>
Yo!

> For debugging purposes, I've added a unique id member to the Value class:
>
> global_next_vuid = 0;
> Value::Value(..){
>   vuid = ++global_next_vuid;
> }
>
> My hope is that by looking at the vuid of a Value, I can see its vuid,
> set a conditional breakpoint and re-run the compiler to
> see who (what pass) constructed that value.
>
> Maybe I am not doing it the right way, but the above 'vuid' field doesn't
> seem
> to be updated deterministically.
>
We'd need a testcase to see what you mean...I'm not entirely sure that
what you're doing will work, though.

> I am using a DEBUG built. Is LLVM multithreaded by default?
>
No. LLVM isn't multithreaded safe just yet.

> Is it possible to get a deterministic behavior?
>
The code that's generated should be completely deterministic.

-bw




More information about the llvm-dev mailing list