summaryrefslogtreecommitdiff
path: root/compiler/optimizing/nodes.h
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2015-04-15 14:10:29 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-04-15 14:10:29 +0000
commita76a08fed88bd081bcc4d240f1ba3472a2acbbab (patch)
treecd016bb007c3757ab2a6df28bc1a65d6a8e78e44 /compiler/optimizing/nodes.h
parentacf9b7b7616a9b104e6f2146051d8e14d9cb9030 (diff)
parent9021825d1e73998b99c81e89c73796f6f2845471 (diff)
Merge "Type MoveOperands."
Diffstat (limited to 'compiler/optimizing/nodes.h')
-rw-r--r--compiler/optimizing/nodes.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h
index 539e0b5de0..6fb34da191 100644
--- a/compiler/optimizing/nodes.h
+++ b/compiler/optimizing/nodes.h
@@ -3455,8 +3455,11 @@ class HMonitorOperation : public HTemplateInstruction<1> {
class MoveOperands : public ArenaObject<kArenaAllocMisc> {
public:
- MoveOperands(Location source, Location destination, HInstruction* instruction)
- : source_(source), destination_(destination), instruction_(instruction) {}
+ MoveOperands(Location source,
+ Location destination,
+ Primitive::Type type,
+ HInstruction* instruction)
+ : source_(source), destination_(destination), type_(type), instruction_(instruction) {}
Location GetSource() const { return source_; }
Location GetDestination() const { return destination_; }
@@ -3504,11 +3507,17 @@ class MoveOperands : public ArenaObject<kArenaAllocMisc> {
return source_.IsInvalid();
}
+ bool Is64BitMove() const {
+ return Primitive::Is64BitType(type_);
+ }
+
HInstruction* GetInstruction() const { return instruction_; }
private:
Location source_;
Location destination_;
+ // The type this move is for.
+ Primitive::Type type_;
// The instruction this move is assocatied with. Null when this move is
// for moving an input in the expected locations of user (including a phi user).
// This is only used in debug mode, to ensure we do not connect interval siblings
@@ -3523,7 +3532,10 @@ class HParallelMove : public HTemplateInstruction<0> {
explicit HParallelMove(ArenaAllocator* arena)
: HTemplateInstruction(SideEffects::None()), moves_(arena, kDefaultNumberOfMoves) {}
- void AddMove(Location source, Location destination, HInstruction* instruction) {
+ void AddMove(Location source,
+ Location destination,
+ Primitive::Type type,
+ HInstruction* instruction) {
DCHECK(source.IsValid());
DCHECK(destination.IsValid());
if (kIsDebugBuild) {
@@ -3549,7 +3561,7 @@ class HParallelMove : public HTemplateInstruction<0> {
<< "Same destination for two moves in a parallel move.";
}
}
- moves_.Add(MoveOperands(source, destination, instruction));
+ moves_.Add(MoveOperands(source, destination, type, instruction));
}
MoveOperands* MoveOperandsAt(size_t index) const {