summaryrefslogtreecommitdiffstats
path: root/compiler/optimizing/builder.cc
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2014-04-16 17:38:32 +0100
committerNicolas Geoffray <ngeoffray@google.com>2014-04-17 13:23:24 +0000
commitdb928fcc975b431d8a78700c11bd7da21090384a (patch)
tree24092c6da3cd3651fc0eaee89d0093ac05afeaed /compiler/optimizing/builder.cc
parente8b2e6e70decca7ce324350c9c03c9a432ed64d6 (diff)
downloadart-db928fcc975b431d8a78700c11bd7da21090384a.zip
art-db928fcc975b431d8a78700c11bd7da21090384a.tar.gz
art-db928fcc975b431d8a78700c11bd7da21090384a.tar.bz2
Simplify HInvokeStatic code generation.
HPushArgument is not needed for now (but might be when we start optimizing). Also, calling convention for 64bits backend will require to know more about the argument than the argument's index. Therefore currently let HInvokeStatic setup the arguments, which is possible because arguments of a calls are virtual registers and not instructions. Change-Id: I8753ed6083aa083c5180ab53b436dc8de4f1fe31
Diffstat (limited to 'compiler/optimizing/builder.cc')
-rw-r--r--compiler/optimizing/builder.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/compiler/optimizing/builder.cc b/compiler/optimizing/builder.cc
index 637cf17..1efdd38 100644
--- a/compiler/optimizing/builder.cc
+++ b/compiler/optimizing/builder.cc
@@ -282,9 +282,7 @@ bool HGraphBuilder::BuildInvoke(const Instruction& instruction,
size_t start_index = 0;
if (is_instance_call) {
HInstruction* arg = LoadLocal(is_range ? register_index : args[0], Primitive::kPrimNot);
- HInstruction* push = new (arena_) HPushArgument(arg, 0);
- current_block_->AddInstruction(push);
- invoke->SetArgumentAt(0, push);
+ invoke->SetArgumentAt(0, arg);
start_index = 1;
}
@@ -305,9 +303,7 @@ bool HGraphBuilder::BuildInvoke(const Instruction& instruction,
return false;
}
HInstruction* arg = LoadLocal(is_range ? register_index + i : args[i], type);
- HInstruction* push = new (arena_) HPushArgument(arg, i);
- current_block_->AddInstruction(push);
- invoke->SetArgumentAt(argument_index, push);
+ invoke->SetArgumentAt(argument_index, arg);
if (type == Primitive::kPrimLong) {
i++;
}