-
Jiaq
-
-
-
Joined on 10-18-2007
-
China
-
Posts 23
-
-
|
intrinsic non transactional memory operations
I'm currently using STM compiler to implement my own containers. However, it seems the compiler is applying some non-transactional version of memory operations such as memset internally. I've made the code as short as possible. The following code causes
tx_warning: tryclass2.cpp(29): a non tm_callable/tm_pure intrinsic function 'memset' called inside __tm_atomic section
I've written my own version of tmmemset, tmmemcpy, etc. The problem is how could I tell the compiler to use my implementation instead of its own?
#include "intel_compatibility.h"
class MyListNode{ public: int data; };
class MyList{ public:
struct _MyList_impl{
MyListNode node;
__attribute__((tm_callable)) _MyList_impl():node(){} };
_MyList_impl _M_impl;
__attribute__((tm_callable)) MyList():_M_impl(){} };
int main() { __tm_atomic{ MyList a; } }
Thanks for all your great work and patience.
|
|
| |
|
|
Re: intrinsic non transactional memory operations
Use -fno-builtin so the standard intrinsic library functions will not be recognized
|
|
| |
-
Jiaq
-
-
-
Joined on 10-18-2007
-
China
-
Posts 23
-
-
|
Re: intrinsic non transactional memory operations
Well, that works in this case. But it seems I cannot use the intrinsic transactional malloc/free anymore with that switch. Is it possible that I could selectively use the intrinsic functions? Thanks very much.
|
|
| |
|
|
Re: intrinsic non transactional memory operations
Unfortunately transactional malloc/free are recognized as part of our standard intrinsic library functions and disabled with -fno_builtin option is used. We will consider separation of transactional malloc/free and controlling under a different option.
|
|
| |