diff options
author | Roland Levillain <rpl@google.com> | 2015-04-24 23:01:24 +0100 |
---|---|---|
committer | Roland Levillain <rpl@google.com> | 2015-04-24 23:29:06 +0100 |
commit | 0379f82393237798616d485ad99952e73e480e12 (patch) | |
tree | 87f5ccd1fd0f4fa8156c31191040b7433c9ec907 /compiler/optimizing/code_generator_x86_64.cc | |
parent | 3507b795c034617e1c94fc9544a208d6c6f75735 (diff) | |
download | art-0379f82393237798616d485ad99952e73e480e12.tar.gz art-0379f82393237798616d485ad99952e73e480e12.tar.bz2 art-0379f82393237798616d485ad99952e73e480e12.zip |
Fix DCHECKs about clinit checks in Optimizing's code generators.
These assertions are not true for the baseline compiler. As
a temporary workaround, remove a clinit check as last input
of a static invoke if it is still present at the stage of
code generation.
Change-Id: I5655f4a0873e2e7ee7790b6a341c18b4b7b52af1
Diffstat (limited to 'compiler/optimizing/code_generator_x86_64.cc')
-rw-r--r-- | compiler/optimizing/code_generator_x86_64.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/optimizing/code_generator_x86_64.cc b/compiler/optimizing/code_generator_x86_64.cc index 9cf5c218d4..642900f461 100644 --- a/compiler/optimizing/code_generator_x86_64.cc +++ b/compiler/optimizing/code_generator_x86_64.cc @@ -1290,8 +1290,12 @@ Location InvokeDexCallingConventionVisitor::GetNextLocation(Primitive::Type type void LocationsBuilderX86_64::VisitInvokeStaticOrDirect(HInvokeStaticOrDirect* invoke) { // Explicit clinit checks triggered by static invokes must have been - // pruned by art::PrepareForRegisterAllocation. - DCHECK(!invoke->IsStaticWithExplicitClinitCheck()); + // pruned by art::PrepareForRegisterAllocation, but this step is not + // run in baseline. So we remove them manually here if we find them. + // TODO: Instead of this local workaround, address this properly. + if (invoke->IsStaticWithExplicitClinitCheck()) { + invoke->RemoveClinitCheckOrLoadClassAsLastInput(); + } IntrinsicLocationsBuilderX86_64 intrinsic(codegen_); if (intrinsic.TryDispatch(invoke)) { |