summaryrefslogtreecommitdiffstats
path: root/compiler
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2015-06-21 18:57:02 +0100
committerNicolas Geoffray <ngeoffray@google.com>2015-06-22 08:58:30 +0100
commitff82263e2b96ad099c56c19b91c2286baaf82fa7 (patch)
treeb45a8a3c18293dd852e2d21759af5e53355da9dd /compiler
parent7257ece418469b284ae3cf1d9ba6617a62bdfc4f (diff)
downloadart-ff82263e2b96ad099c56c19b91c2286baaf82fa7.zip
art-ff82263e2b96ad099c56c19b91c2286baaf82fa7.tar.gz
art-ff82263e2b96ad099c56c19b91c2286baaf82fa7.tar.bz2
Fix String Change baseline compiler errors.
The String Change adds multiple move results if the uninitialized string is in multiple registers. This adds StoreLocals on the same instruction, which isn't allowed. Now, a LoadLocal is added for each extra move needed. bug:21902634 (cherry picked from commit aa919207d2fb63af11d72d3b7cdbc435769565af) Change-Id: I057d14cdac437d06eec20caaddd430c304e58196
Diffstat (limited to 'compiler')
-rw-r--r--compiler/optimizing/builder.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/optimizing/builder.cc b/compiler/optimizing/builder.cc
index 4e747df..c2a9b5c 100644
--- a/compiler/optimizing/builder.cc
+++ b/compiler/optimizing/builder.cc
@@ -773,6 +773,7 @@ bool HGraphBuilder::BuildInvoke(const Instruction& instruction,
// Add move-result for StringFactory method.
if (is_string_init) {
uint32_t orig_this_reg = is_range ? register_index : args[0];
+ UpdateLocal(orig_this_reg, invoke);
const VerifiedMethod* verified_method =
compiler_driver_->GetVerifiedMethod(dex_file_, dex_compilation_unit_->GetDexMethodIndex());
if (verified_method == nullptr) {
@@ -786,10 +787,10 @@ bool HGraphBuilder::BuildInvoke(const Instruction& instruction,
if (map_it != string_init_map.end()) {
std::set<uint32_t> reg_set = map_it->second;
for (auto set_it = reg_set.begin(); set_it != reg_set.end(); ++set_it) {
- UpdateLocal(*set_it, invoke);
+ HInstruction* load_local = LoadLocal(orig_this_reg, Primitive::kPrimNot);
+ UpdateLocal(*set_it, load_local);
}
}
- UpdateLocal(orig_this_reg, invoke);
}
return true;
}