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/nodes.h | |
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/nodes.h')
-rw-r--r-- | compiler/optimizing/nodes.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index 6b9d72ddf6..946091f70d 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -2262,16 +2262,15 @@ class HInvokeStaticOrDirect : public HInvoke { return GetInvokeType() == kStatic; } - // Remove the art::HLoadClass instruction set as last input by - // art::PrepareForRegisterAllocation::VisitClinitCheck in lieu of - // the initial art::HClinitCheck instruction (only relevant for - // static calls with explicit clinit check). - void RemoveLoadClassAsLastInput() { + // Remove the art::HClinitCheck or art::HLoadClass instruction as + // last input (only relevant for static calls with explicit clinit + // check). + void RemoveClinitCheckOrLoadClassAsLastInput() { DCHECK(IsStaticWithExplicitClinitCheck()); size_t last_input_index = InputCount() - 1; HInstruction* last_input = InputAt(last_input_index); DCHECK(last_input != nullptr); - DCHECK(last_input->IsLoadClass()) << last_input->DebugName(); + DCHECK(last_input->IsClinitCheck() || last_input->IsLoadClass()) << last_input->DebugName(); RemoveAsUserOfInput(last_input_index); inputs_.DeleteAt(last_input_index); clinit_check_requirement_ = ClinitCheckRequirement::kImplicit; |