diff options
author | aldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-01-07 19:55:56 +0000 |
---|---|---|
committer | aldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-01-07 19:55:56 +0000 |
commit | 795299df51f9ab989c781ca673e4ae85fb481f66 (patch) | |
tree | 89c74075cb1a1d65f0e6eb39a5a916f269ba57bd /gcc/testsuite/gcc.dg/tm | |
parent | b151230496465733849d35117c0b2272d0dcea12 (diff) | |
download | gcc-795299df51f9ab989c781ca673e4ae85fb481f66.tar.gz |
+ * trans-mem.c (build_tm_load): Do not error on unsupported
+ builtins.
+ (build_tm_store): Same.
+ (expand_assign_tm): Call tm_memmove on unsupported load/store
+ builtins.
+ (expand_call_tm): Instrument stores embedded in a call if
+ appropriate.
+
+ * testsuite/gcc.dg/tm/memopt-6.c: Remove unimplemented message.
+ Check for implementation of aggregate instrumentation.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/transactional-memory@155708 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/tm')
-rw-r--r-- | gcc/testsuite/gcc.dg/tm/memopt-13.c | 15 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tm/memopt-6.c | 6 |
2 files changed, 19 insertions, 2 deletions
diff --git a/gcc/testsuite/gcc.dg/tm/memopt-13.c b/gcc/testsuite/gcc.dg/tm/memopt-13.c new file mode 100644 index 00000000000..9b7e5e5d153 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tm/memopt-13.c @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-options "-fgnu-tm -O -fdump-tree-tmmark" } */ + +struct large { int x[100]; }; +struct large large_global; +extern struct large function (void) __attribute__((transaction_safe)); + +void f() +{ + __transaction { + large_global = function(); + } +} + +/* { dg-final { scan-tree-dump-times "memmoveRtWt \\\(&large_global," 1 "tmmark" } } */ diff --git a/gcc/testsuite/gcc.dg/tm/memopt-6.c b/gcc/testsuite/gcc.dg/tm/memopt-6.c index 80ec56cd065..5bd0918c584 100644 --- a/gcc/testsuite/gcc.dg/tm/memopt-6.c +++ b/gcc/testsuite/gcc.dg/tm/memopt-6.c @@ -6,13 +6,15 @@ struct large bark(); extern int test (void) __attribute__((transaction_safe)); struct large lacopy; -int f() /* { dg-message "unimplemented: transactional load" } */ +int f() { int i = readint(); struct large lala = bark(); __transaction { lala.x[55] = 666; - lala = lacopy; + lala = lacopy; /* Aggregate instrumentation. */ } return lala.x[i]; } + +/* { dg-final { scan-tree-dump-times "memmoveRtWt \\\(&lala, &lacopy" 1 "tmedge" } } */ |