summaryrefslogtreecommitdiffstats
path: root/runtime/base
diff options
context:
space:
mode:
authorZheng Xu <zheng.xu@arm.com>2015-04-17 18:48:56 +0800
committerZheng Xu <zheng.xu@arm.com>2015-04-17 18:54:08 +0800
commitad4450e5c3ffaa9566216cc6fafbf5c11186c467 (patch)
treeeecf36e8e9d8112e765ad8840eb2d27f8d0415ab /runtime/base
parentf8bdd9f3a002970e4b8fdcf6fe6730116f1626c3 (diff)
downloadart-ad4450e5c3ffaa9566216cc6fafbf5c11186c467.tar.gz
art-ad4450e5c3ffaa9566216cc6fafbf5c11186c467.tar.bz2
art-ad4450e5c3ffaa9566216cc6fafbf5c11186c467.zip
Opt compiler: Implement parallel move resolver without using swap.
The algorithm of ParallelMoveResolverNoSwap() is almost the same with ParallelMoveResolverWithSwap(), except the way we resolve the circular dependency. NoSwap() uses additional scratch register to resolve the circular dependency. For example, (0->1) (1->2) (2->0) will be performed as (2->scratch) (1->2) (0->1) (scratch->0). On architectures without swap register support, NoSwap() can reduce the number of moves from 3x(N-1) to (N+1) when there is circular dependency with N moves. And also, NoSwap() algorithm does not depend on architecture register layout information, which means it can support register pairs on arm32 and X/W, D/S registers on arm64 without additional modification. Change-Id: Idf56bd5469bb78c0e339e43ab16387428a082318
Diffstat (limited to 'runtime/base')
-rw-r--r--runtime/base/macros.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/base/macros.h b/runtime/base/macros.h
index 6c33232b5f..c00ae78be8 100644
--- a/runtime/base/macros.h
+++ b/runtime/base/macros.h
@@ -46,6 +46,11 @@
#define ART_FRIEND_TEST(test_set_name, individual_test)\
friend class test_set_name##_##individual_test##_Test
+// Declare a friend relationship in a class with a typed test.
+#define ART_FRIEND_TYPED_TEST(test_set_name, individual_test)\
+template<typename T> ART_FRIEND_TEST(test_set_name, individual_test)
+
+
// DISALLOW_COPY_AND_ASSIGN disallows the copy and operator= functions. It goes in the private:
// declarations in a class.
#if !defined(DISALLOW_COPY_AND_ASSIGN)