diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2014-09-29 10:33:25 +0100 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2014-09-29 11:04:07 +0100 |
commit | 740475d5f45b8caa2c3c6fc51e657ecf4f3547e5 (patch) | |
tree | 81196b753045fa16c13a4c1106031c1f28d9d233 /compiler/optimizing/register_allocator.h | |
parent | 13c4e8f4ef687f650aa76fb15ab12762d5a85602 (diff) | |
download | art-740475d5f45b8caa2c3c6fc51e657ecf4f3547e5.tar.gz art-740475d5f45b8caa2c3c6fc51e657ecf4f3547e5.tar.bz2 art-740475d5f45b8caa2c3c6fc51e657ecf4f3547e5.zip |
Fix a bug in the insertion of parallel move.
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
Diffstat (limited to 'compiler/optimizing/register_allocator.h')
-rw-r--r-- | compiler/optimizing/register_allocator.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/compiler/optimizing/register_allocator.h b/compiler/optimizing/register_allocator.h index b97b6fc591..d4c233a7f8 100644 --- a/compiler/optimizing/register_allocator.h +++ b/compiler/optimizing/register_allocator.h @@ -108,11 +108,20 @@ class RegisterAllocator { void ConnectSplitSiblings(LiveInterval* interval, HBasicBlock* from, HBasicBlock* to) const; // Helper methods to insert parallel moves in the graph. - void InsertParallelMoveAtExitOf(HBasicBlock* block, Location source, Location destination) const; - void InsertParallelMoveAtEntryOf(HBasicBlock* block, Location source, Location destination) const; + void InsertParallelMoveAtExitOf(HBasicBlock* block, + HInstruction* instruction, + Location source, + Location destination) const; + void InsertParallelMoveAtEntryOf(HBasicBlock* block, + HInstruction* instruction, + Location source, + Location destination) const; void InsertMoveAfter(HInstruction* instruction, Location source, Location destination) const; - void AddInputMoveFor(HInstruction* instruction, Location source, Location destination) const; - void InsertParallelMoveAt(size_t position, Location source, Location destination) const; + void AddInputMoveFor(HInstruction* user, Location source, Location destination) const; + void InsertParallelMoveAt(size_t position, + HInstruction* instruction, + Location source, + Location destination) const; // Helper methods. void AllocateRegistersInternal(); |