[llvm-commits] [RFC] Add support of RTM from TSX

Arnamoy Bhattacharyya arnamoy at ualberta.ca
Fri Sep 21 11:35:25 PDT 2012


On Fri, Sep 21, 2012 at 12:10 PM, Michael Liao <michael.liao at intel.com>wrote:

> On Fri, 2012-09-21 at 13:00 -0500, Hal Finkel wrote:
> > Michael,
> >
> > I am happy to see support for transactional memory, and because other
> > architectures also have transactional memory support (like the IBM BG/Q
> > with which I work), I would like to see the interface made slightly
> > more generic. I would like to propose the following interface:
> >
> > i32 @llvm.tm.begin(i32) - The parameter here is a hint: 0 ==
> > long-running transaction, 1 == short-running transaction (and you can
> > ignore this parameter on x86). The return value is a failure code. We
> > can probably keep Intel's convention: if bit 0 is set then bits 31:24
> > hold the user-defined abort code. If bit 1 is set, then the transaction
> > may succeed upon retry. The exact codes are otherwise target-defined.
> >
> > void @llvm.tm.end() - End the transactional region
> >
> > void @llvm.tm.abort(i8) - The i8 is a user-defined abort id
>

Indeed.  I can't  think of anything else at the top of my head right now
that might also be considered.  These three functions should do the job.
 And good point about the SR and LR mode.  :)

>
>
> >
> >  -Hal
> >
> > On Fri, 21 Sep 2012 09:57:17 -0700
> > Michael Liao <michael.liao at intel.com> wrote:
> >
> > > Hi
> > >
> > > Here's the patch adding RTM support from TSX[1] available in
> > > Haswell[2]. This patch adds 3 intrinsics of RTM, namely xbegin, xend,
> > > and xabort, which could be used to add hardware support for the draft
> > > C++ transaction language constructs.
> > >
> > > Thanks for your review.
> > > - Michael
> > >
> > > --------------
> > > [1] http://software.intel.com/sites/default/files/319433-014.pdf
> > > [2]
> > >
> http://software.intel.com/en-us/blogs/2012/02/07/transactional-synchronization-in-haswell
> >
> >
> >
>
>
>


-- 
Arnamoy Bhattacharyya
Athabasca Hall 143
Department of Computing Science - University of Alberta
Edmonton, Alberta, Canada, T6G 2E8
587-710-7073
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120921/a20fc180/attachment.html>


More information about the llvm-commits mailing list