[LLVMdev] CodeGen fails for CallInst with label

Torvald Riegel tr16 at inf.tu-dresden.de
Sun Apr 20 11:18:34 PDT 2008


On Saturday 19 April 2008, Edward Lee wrote:
> On Sat, Apr 19, 2008 at 3:44 PM, Chris Lattner <sabre at nondot.org> wrote:
> >  It sounds like you're doing something STM like, have you contacted
> >  Torvald to see if he has ideas or insight?
> >  http://llvm.org/pubs/2008-02-23-TRANSACT-TangerObjBased.html
>
> Yeah, this is TM-like with the begin/end/abort+rollback. Thanks for
> the pointer, but it seems like Tanger's implementation doesn't support
> explicit aborts probably "Because our txns never abort." So there
> wasn't a need to give a label to tanger_begin() to lead to an abort
> block.

Tanger uses setjmp to jump back to the begin() after rolling back memory 
updates. This is rather brute-force and custom-build stack rollback and 
jumping back to begin could be faster, but it works. Tanger assumes that 
transactions are used like "atomic { }" blocks, so a transaction nevers 
starts and ends in different functions, for example.
BTW, supporting application-controlled rollback would be very easy (just allow 
applications to call the STM abort function).

Torvald



More information about the llvm-dev mailing list