diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2016-01-05 15:55:41 +0000 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2016-01-14 15:00:20 +0000 |
commit | 15bd22849ee6a1ffb3fb3630f686c2870bdf1bbc (patch) | |
tree | a261601589163faa4538bcf1c9d156e8ec4a42b3 /compiler/optimizing/optimizing_compiler.cc | |
parent | 5b7b5ddb515828c93f0c2aec67aa513c32d0de22 (diff) |
Implement irreducible loop support in optimizing.
So we don't fallback to the interpreter in the presence of
irreducible loops.
Implications:
- A loop pre-header does not necessarily dominate a loop header.
- Non-constant redundant phis will be kept in loop headers, to
satisfy our linear scan register allocation algorithm.
- while-graph optimizations, such as gvn, licm, lse, and dce
need to know when they are dealing with irreducible loops.
Change-Id: I2cea8934ce0b40162d215353497c7f77d6c9137e
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
-rw-r--r-- | compiler/optimizing/optimizing_compiler.cc | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc index 3eb72744ee..cafc6c5440 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -777,19 +777,16 @@ CodeGenerator* OptimizingCompiler::TryCompile(ArenaAllocator* arena, { PassScope scope(SsaBuilder::kSsaBuilderPassName, &pass_observer); - BuildSsaResult result = graph->TryBuildingSsa(&handles); - if (result != kBuildSsaSuccess) { + GraphAnalysisResult result = graph->TryBuildingSsa(&handles); + if (result != kAnalysisSuccess) { switch (result) { - case kBuildSsaFailNonNaturalLoop: - MaybeRecordStat(MethodCompilationStat::kNotCompiledNonNaturalLoop); - break; - case kBuildSsaFailThrowCatchLoop: + case kAnalysisFailThrowCatchLoop: MaybeRecordStat(MethodCompilationStat::kNotCompiledThrowCatchLoop); break; - case kBuildSsaFailAmbiguousArrayOp: + case kAnalysisFailAmbiguousArrayOp: MaybeRecordStat(MethodCompilationStat::kNotCompiledAmbiguousArrayOp); break; - case kBuildSsaSuccess: + case kAnalysisSuccess: UNREACHABLE(); } pass_observer.SetGraphInBadState(); |