diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2015-04-20 15:20:15 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-04-20 15:20:15 +0000 |
commit | 27eac12a66a73eb38b5ccb45b62350cf341299d0 (patch) | |
tree | 7cc7eea6dd543720da2921c11f68296f5df37b07 /compiler/optimizing/code_generator_arm64.h | |
parent | e40d82ffe388458c2674ec051f1dd897362692eb (diff) | |
parent | ad4450e5c3ffaa9566216cc6fafbf5c11186c467 (diff) | |
download | art-27eac12a66a73eb38b5ccb45b62350cf341299d0.tar.gz art-27eac12a66a73eb38b5ccb45b62350cf341299d0.tar.bz2 art-27eac12a66a73eb38b5ccb45b62350cf341299d0.zip |
Merge "Opt compiler: Implement parallel move resolver without using swap."
Diffstat (limited to 'compiler/optimizing/code_generator_arm64.h')
-rw-r--r-- | compiler/optimizing/code_generator_arm64.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/compiler/optimizing/code_generator_arm64.h b/compiler/optimizing/code_generator_arm64.h index 9fe60b8adc..5a358671cc 100644 --- a/compiler/optimizing/code_generator_arm64.h +++ b/compiler/optimizing/code_generator_arm64.h @@ -198,15 +198,17 @@ class LocationsBuilderARM64 : public HGraphVisitor { DISALLOW_COPY_AND_ASSIGN(LocationsBuilderARM64); }; -class ParallelMoveResolverARM64 : public ParallelMoveResolver { +class ParallelMoveResolverARM64 : public ParallelMoveResolverNoSwap { public: ParallelMoveResolverARM64(ArenaAllocator* allocator, CodeGeneratorARM64* codegen) - : ParallelMoveResolver(allocator), codegen_(codegen) {} + : ParallelMoveResolverNoSwap(allocator), codegen_(codegen), vixl_temps_() {} + protected: + void PrepareForEmitNativeCode() OVERRIDE; + void FinishEmitNativeCode() OVERRIDE; + Location AllocateScratchLocationFor(Location::Kind kind) OVERRIDE; + void FreeScratchLocation(Location loc) OVERRIDE; void EmitMove(size_t index) OVERRIDE; - void EmitSwap(size_t index) OVERRIDE; - void RestoreScratch(int reg) OVERRIDE; - void SpillScratch(int reg) OVERRIDE; private: Arm64Assembler* GetAssembler() const; @@ -215,6 +217,7 @@ class ParallelMoveResolverARM64 : public ParallelMoveResolver { } CodeGeneratorARM64* const codegen_; + vixl::UseScratchRegisterScope vixl_temps_; DISALLOW_COPY_AND_ASSIGN(ParallelMoveResolverARM64); }; @@ -322,7 +325,6 @@ class CodeGeneratorARM64 : public CodeGenerator { // locations, and is used for optimisation and debugging. void MoveLocation(Location destination, Location source, Primitive::Type type = Primitive::kPrimVoid); - void SwapLocations(Location loc_1, Location loc_2); void Load(Primitive::Type type, vixl::CPURegister dst, const vixl::MemOperand& src); void Store(Primitive::Type type, vixl::CPURegister rt, const vixl::MemOperand& dst); void LoadCurrentMethod(vixl::Register current_method); |