diff options
author | Vladimir Marko <vmarko@google.com> | 2014-06-19 14:59:05 +0100 |
---|---|---|
committer | Vladimir Marko <vmarko@google.com> | 2014-06-19 17:01:02 +0100 |
commit | 622bdbe6c295b08d06dfaa8d896b9ca152aa899c (patch) | |
tree | b4f48348ef21ebc58641ffe776ff5d975e3d0a78 /compiler/utils | |
parent | 995b32cc8e94a9730d6cf663a23afc9c997c1771 (diff) | |
download | art-622bdbe6c295b08d06dfaa8d896b9ca152aa899c.zip art-622bdbe6c295b08d06dfaa8d896b9ca152aa899c.tar.gz art-622bdbe6c295b08d06dfaa8d896b9ca152aa899c.tar.bz2 |
Fix topological ordering and use it for optimizations.
Use the topological sort order for ClassInitCheckElimination
and NullCheckEliminationAndTypeInference.
Change-Id: I315ca7f300dd11390f48aefebfe988baf91bdcf1
Diffstat (limited to 'compiler/utils')
-rw-r--r-- | compiler/utils/scoped_arena_containers.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/compiler/utils/scoped_arena_containers.h b/compiler/utils/scoped_arena_containers.h index 5deb661..6728565 100644 --- a/compiler/utils/scoped_arena_containers.h +++ b/compiler/utils/scoped_arena_containers.h @@ -17,8 +17,10 @@ #ifndef ART_COMPILER_UTILS_SCOPED_ARENA_CONTAINERS_H_ #define ART_COMPILER_UTILS_SCOPED_ARENA_CONTAINERS_H_ -#include <vector> +#include <deque> +#include <queue> #include <set> +#include <vector> #include "utils/scoped_arena_allocator.h" #include "safe_map.h" @@ -26,6 +28,12 @@ namespace art { template <typename T> +using ScopedArenaDeque = std::deque<T, ScopedArenaAllocatorAdapter<T>>; + +template <typename T> +using ScopedArenaQueue = std::queue<T, ScopedArenaDeque<T>>; + +template <typename T> using ScopedArenaVector = std::vector<T, ScopedArenaAllocatorAdapter<T>>; template <typename T, typename Comparator = std::less<T>> |