Re: prevent optimisation of variables on SSA

2008-08-19 Thread Diego Novillo
On 8/15/08 1:00 PM, Martin Schindewolf wrote: Hi all, I currently introduce a temporary variable on SSA form but it does not survive the SSA optimisation passes. (Not even the simple ones triggered with -O1). Since the temporary variable is considered to be a gimple register it is not possible t

Re: prevent optimisation of variables on SSA

2008-08-19 Thread Diego Novillo
On 8/18/08 7:15 AM, Martin Schindewolf wrote: txn_handle.12_4 = __builtin_stm_new (); jmp_buf.13_5 = __builtin_stm_get_env (txn_handle.12_4); ssj_value.14_6 = _setjmp (jmp_buf.13_5); if (ssj_value.14_6 == 0) goto (); else goto (); # SUCC: 4 (false) 3 (true) # BLOCK 3 # PRED: 2

Re: prevent optimisation of variables on SSA

2008-08-19 Thread Martin Schindewolf
Hi Richard, thank you very much for your suggestions, it seems to be working well. Now, the temporary variables survive the SSA optimisations. and the txn_save_* variables are optimised "away". Is there any way to prevent this kind of optimisations on SSA form for a particular group of variab

Re: prevent optimisation of variables on SSA

2008-08-18 Thread Richard Guenther
On Mon, Aug 18, 2008 at 1:15 PM, Martin Schindewolf <[EMAIL PROTECTED]> wrote: > Hi, > I will try to explain in more detail: > I am trying to implement support for transactions in GCC. In particular for > a Software Transactional Memory library called tinySTM. Since transactions > have the nice pro

Re: prevent optimisation of variables on SSA

2008-08-18 Thread Martin Schindewolf
Hi, I will try to explain in more detail: I am trying to implement support for transactions in GCC. In particular for a Software Transactional Memory library called tinySTM. Since transactions have the nice property that they can abort and execute again, we need some kind of checkpointing at th

Re: prevent optimisation of variables on SSA

2008-08-15 Thread Richard Guenther
On Fri, Aug 15, 2008 at 7:00 PM, Martin Schindewolf <[EMAIL PROTECTED]> wrote: > Hi all, > > I currently introduce a temporary variable on SSA form but it > does not survive the SSA optimisation passes. (Not even the > simple ones triggered with -O1). Since the temporary variable > is considered to

prevent optimisation of variables on SSA

2008-08-15 Thread Martin Schindewolf
Hi all, I currently introduce a temporary variable on SSA form but it does not survive the SSA optimisation passes. (Not even the simple ones triggered with -O1). Since the temporary variable is considered to be a gimple register it is not possible to set a VUSE or VDEF for it. (I tried and it br