summaryrefslogtreecommitdiff
path: root/compiler/optimizing/parallel_move_test.cc
AgeCommit message (Collapse)Author
2018-09-20Revert^2 "ART: Refactor typedef to using"Andreas Gampe
This reverts commit ee07743e03042c2ca36e0c9513847a9e7d2509f1. Reason for revert: fixed attributes. Bug: 32619234 Test: m test-art-host Test: m test-art-target-gtest-unstarted_runtime_test Change-Id: I6f0a775adfdf6ecd132b470f7c5446e949872e20
2018-09-20Revert "ART: Refactor typedef to using"Andreas Gampe
This reverts commit 9a20ff06f7ccee08a742c315ec6d351ab56ba1cd. Reason for revert: Attributes on the wrong side. Bug: 32619234 Change-Id: I8fd2abef619b22c02ccfbf5ae629339f1a60918b
2018-09-19ART: Refactor typedef to usingAndreas Gampe
Add clang-tidy's modernize-use-using. Bug: 32619234 Test: WITH_TIDY=1 mmma art Change-Id: If50d37b5152af4270784e3cde7951292a9e19033
2018-08-28Use 'final' and 'override' specifiers directly in ART.Roland Levillain
Remove all uses of macros 'FINAL' and 'OVERRIDE' and replace them with 'final' and 'override' specifiers. Remove all definitions of these macros as well, which were located in these files: - libartbase/base/macros.h - test/913-heaps/heaps.cc - test/ti-agent/ti_macros.h ART is now using C++14; the 'final' and 'override' specifiers have been introduced in C++11. Test: mmma art Change-Id: I256c7758155a71a2940ef2574925a44076feeebf
2018-04-04Separate Malloc and MemMap ArenaPoolsDavid Sehr
Make ArenaPool an abstract base class and leave MallocArenaPool implementation with it. This enables arena_allocator to be free of MemMap, Mutex, etc., in preparation to move the remaining collections out of runtime/base to libartbase/base. Bug: 22322814 Test: make -j 50 test-art-host build and boot Change-Id: Ief84dcbfb749165d9bc82000c6b8f96f93052422
2017-09-25ART: Introduce compiler data type.Vladimir Marko
Replace most uses of the runtime's Primitive in compiler with a new class DataType. This prepares for introducing new types, such as Uint8, that the runtime does not need to know about. Test: m test-art-host-gtest Test: testrunner.py --host Bug: 23964345 Change-Id: Iec2ad82454eec678fffcd8279a9746b90feb9b0c
2017-07-24ART: Include cleanupAndreas Gampe
Let clang-format reorder the header includes. Derived with: * .clang-format: BasedOnStyle: Google IncludeIsMainRegex: '(_test|-inl)?$' * Steps: find . -name '*.cc' -o -name '*.h' | xargs sed -i.bak -e 's/^#include/ #include/' ; git commit -a -m 'ART: Include cleanup' git-clang-format -style=file HEAD^ manual inspection git commit -a --amend Test: mmma art Change-Id: Ia963a8ce3ce5f96b5e78acd587e26908c7a70d02
2015-12-17Fix braino in parallel move resolver.Nicolas Geoffray
Reiterating over the moves needs to set i to -1, not 0. bug:26241132 Change-Id: Iaae7eac5b421b0ee1b1ce89577c8b951b2d4dae8
2015-10-08Add DCHECKs to ArenaVector and ScopedArenaVector.Vladimir Marko
Implement dchecked_vector<> template that DCHECK()s element access and insert()/emplace()/erase() positions. Change the ArenaVector<> and ScopedArenaVector<> aliases to use the new template instead of std::vector<>. Remove DCHECK()s that have now become unnecessary from the Optimizing compiler. Change-Id: Ib8506bd30d223f68f52bd4476c76d9991acacadc
2015-09-29Optimizing: Tag arena allocations in code generators.Vladimir Marko
And completely remove the deprecated GrowableArray. Replace GrowableArray with ArenaVector in code generators and related classes and tag arena allocations. Label arrays use direct allocations from ArenaAllocator because Label is non-copyable and non-movable and as such cannot be really held in a container. The GrowableArray never actually constructed them, instead relying on the zero-initialized storage from the arena allocator to be correct. We now actually construct the labels. Also avoid StackMapStream::ComputeDexRegisterMapSize() being passed null references, even though unused. Change-Id: I26a46fdd406b23a3969300a67739d55528df8bf4
2015-04-17Opt compiler: Implement parallel move resolver without using swap.Zheng Xu
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
2015-04-15Type MoveOperands.Nicolas Geoffray
The ParallelMoveResolver implementation needs to know if a move is for 64bits or not, to handle swaps correctly. Bug found, and test case courtesy of Serguei I. Katkov. Change-Id: I9a0917a1cfed398c07e57ad6251aea8c9b0b8506
2015-03-31Fix wrong assumptions about ParallelMove.Nicolas Geoffray
Registers involved in single and double operations can drag stack locations as well, so it is possible to update a single stack location with a slot from a double stack location. bug:19999189 Change-Id: Ibeec7d6f1b3126c4ae226fca56e84dccf798d367
2015-03-06Opt compiler: Clean the use of `virtual` and `OVERRIDE`.Alexandre Rames
Change-Id: I806ec522b979334cee8f344fc95e8660c019160a
2015-02-19Move arenas into runtimeMathieu Chartier
Moved arena pool into the runtime. Motivation: Allow GC to use arena allocators, recycle arena pool for linear alloc. Bug: 19264997 Change-Id: I8ddbb6d55ee923a980b28fb656c758c5d7697c2f
2015-02-10Improve ParallelMoveResolver to work with pairs.Nicolas Geoffray
Change-Id: Ie2a540ffdb78f7f15d69c16a08ca2d3e794f65b9
2015-01-16Do not use register pair in a parallel move.Nicolas Geoffray
The ParallelMoveResolver does not work with pairs. Instead, decompose the pair into two individual moves. Change-Id: Ie9d3f0b078cef8dc20640c98b20bb20cc4971a7f
2015-01-16Remove test that is now invalid.Nicolas Geoffray
It does not make sense to have moves to the same destination within a single parallel move. There is now an explicit DCHECK to prevent these situations. Change-Id: I3a33e748579ecb53b95476e77a37164d2f145f5a
2015-01-14Remove constant moves after emitting them in parallel resolver.Nicolas Geoffray
This fixes the case where a constant move requires a scratch register. Note that there is no backend that needs this for now, but X86 might with the move to hard float. Change-Id: I37f6b8961b48f2cf6fbc0cd281e70d58466d018e
2014-11-03Remove -Wno-unused-parameter and -Wno-sign-promo from base cflags.Ian Rogers
Fix associated errors about unused paramenters and implict sign conversions. For sign conversion this was largely in the area of enums, so add ostream operators for the effected enums and fix tools/generate-operator-out.py. Tidy arena allocation code and arena allocated data types, rather than fixing new and delete operators. Remove dead code. Change-Id: I5b433e722d2f75baacfacae4d32aef4a828bfe1b
2014-10-09Stop converting from Location to ManagedRegister.Nicolas Geoffray
Now the source of truth is the Location object that knows which register (core, pair, fpu) it needs to refer to. Change-Id: I62401343d7479ecfb24b5ed161ec7829cda5a0b1
2014-09-29Fix a bug in the insertion of parallel move.Nicolas Geoffray
To make sure we do not connect interval siblings in the same parallel move, I added a new field in MoveOperands that tells for which instruction this move is for. A parallel move should not contains moves for the same instructions. The checks revealed a bug when connecting siblings, where we would choose the wrong parallel move. Change-Id: I70f27ec120886745c187071453c78da4c47c1dd2
2014-06-12Final CL to enable register allocation on x86.Nicolas Geoffray
This CL implements: 1) Resolution after allocation: connecting the locations allocated to an interval within a block and between blocks. 2) Handling of fixed registers: some instructions require inputs/output to be at a specific location, and the allocator needs to deal with them in a special way. 3) ParallelMoveResolver::EmitNativeCode for x86. Change-Id: I0da6bd7eb66877987148b87c3be6a983b4e3f858
2014-05-23Import Dart's parallel move resolver.Nicolas Geoffray
And write a few tests while at it. A parallel move resolver will be needed for performing multiple moves that are conceptually parallel, for example moves at a block exit that branches to a block with phi nodes. Change-Id: Ib95b247b4fc3f2c2fcab3b8c8d032abbd6104cd7