<commit_before>/*
 * Copyright 2010-2017 JetBrains s.r.o.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.jetbrains.kotlin.backend.konan

import org.jetbrains.kotlin.backend.konan.util.*
import org.jetbrains.kotlin.konan.target.CompilerOutputKind

enum class KonanPhase(val description: String,
                      vararg prerequisite: KonanPhase,
                      var enabled: Boolean = true, var verbose: Boolean = false) {

    /* */ FRONTEND("Frontend builds AST"),
    /* */ PSI_TO_IR("Psi to IR conversion"),
    /* */ SERIALIZER("Serialize descriptor tree and inline IR bodies"),
    /* */ BACKEND("All backend"),
    /* ... */ LOWER("IR Lowering"),
    /* ... ... */ TEST_PROCESSOR("Unit test processor"),
    /* ... ... */ LOWER_BEFORE_INLINE("Special operations processing before inlining"),
    /* ... ... */ LOWER_INLINE_CONSTRUCTORS("Inline constructors transformation", LOWER_BEFORE_INLINE),
    /* ... ... */ LOWER_INLINE("Functions inlining", LOWER_INLINE_CONSTRUCTORS, LOWER_BEFORE_INLINE),
    /* ... ... */ LOWER_AFTER_INLINE("Special operations processing after inlining"),
    /* ... ... ...  */ DESERIALIZER("Deserialize inline bodies"),
    /* ... ... */ LOWER_INTEROP_PART1("Interop lowering, part 1", LOWER_INLINE),
    /* ... ... */ LOWER_FOR_LOOPS("For loops lowering"),
    /* ... ... */ LOWER_ENUMS("Enum classes lowering"),
    /* ... ... */ LOWER_DELEGATION("Delegation lowering"),
    /* ... ... */ LOWER_INITIALIZERS("Initializers lowering", LOWER_ENUMS),
    /* ... ... */ LOWER_SHARED_VARIABLES("Shared Variable Lowering", LOWER_INITIALIZERS),
    /* ... ... */ LOWER_CALLABLES("Callable references Lowering", LOWER_DELEGATION),
    /* ... ... */ LOWER_LOCAL_FUNCTIONS("Local Function Lowering", LOWER_SHARED_VARIABLES, LOWER_CALLABLES),
    /* ... ... */ LOWER_INTEROP_PART2("Interop lowering, part 2", LOWER_LOCAL_FUNCTIONS),
    /* ... ... */ LOWER_VARARG("Vararg lowering", LOWER_CALLABLES),
    /* ... ... */ LOWER_TAILREC("tailrec lowering", LOWER_LOCAL_FUNCTIONS),
    /* ... ... */ LOWER_FINALLY("Finally blocks lowering", LOWER_INITIALIZERS, LOWER_LOCAL_FUNCTIONS, LOWER_TAILREC),
    /* ... ... */ LOWER_DEFAULT_PARAMETER_EXTENT("Default Parameter Extent Lowering", LOWER_TAILREC, LOWER_ENUMS),
    /* ... ... */ LOWER_INNER_CLASSES("Inner classes lowering", LOWER_DEFAULT_PARAMETER_EXTENT),
    /* ... ... */ LOWER_LATEINIT("Lateinit properties lowering"),
    /* ... ... */ LOWER_BUILTIN_OPERATORS("BuiltIn Operators Lowering", LOWER_DEFAULT_PARAMETER_EXTENT, LOWER_LATEINIT),
    /* ... ... */ LOWER_COROUTINES("Coroutines lowering", LOWER_LOCAL_FUNCTIONS),
    /* ... ... */ LOWER_TYPE_OPERATORS("Type operators lowering", LOWER_COROUTINES),
    /* ... ... */ BRIDGES_BUILDING("Bridges building", LOWER_COROUTINES),
    /* ... ... */ LOWER_STRING_CONCAT("String concatenation lowering"),
    /* ... ... */ LOWER_DATA_CLASSES("Data classes lowering"),
    /* ... ... */ AUTOBOX("Autoboxing of primitive types", BRIDGES_BUILDING, LOWER_COROUTINES),
    /* ... ... */ RETURNS_INSERTION("Returns insertion for Unit functions", AUTOBOX, LOWER_COROUTINES, LOWER_ENUMS),
    /* ... */ BITCODE("LLVM BitCode Generation"),
    /* ... ... */ RTTI("RTTI Generation"),
    /* ... ... */ BUILD_DFG("Data flow graph building"),
    /* ... ... */ SERIALIZE_DFG("Data flow graph serializing", BUILD_DFG),
    /* ... ... */ DESERIALIZE_DFG("Data flow graph deserializing"),
    /* ... ... */ ESCAPE_ANALYSIS("Escape analysis", BUILD_DFG, DESERIALIZE_DFG),
    /* ... ... */ CODEGEN("Code Generation"),
    /* ... ... */ BITCODE_LINKER("Bitcode linking"),
    /* */ LINK_STAGE("Link stage"),
    /* ... */ OBJECT_FILES("Bitcode to object file"),<commit_msg>Disabled escape analysis for now<commit_after>/*
 * Copyright 2010-2017 JetBrains s.r.o.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.jetbrains.kotlin.backend.konan

import org.jetbrains.kotlin.backend.konan.util.*
import org.jetbrains.kotlin.konan.target.CompilerOutputKind

enum class KonanPhase(val description: String,
                      vararg prerequisite: KonanPhase,
                      var enabled: Boolean = true, var verbose: Boolean = false) {

    /* */ FRONTEND("Frontend builds AST"),
    /* */ PSI_TO_IR("Psi to IR conversion"),
    /* */ SERIALIZER("Serialize descriptor tree and inline IR bodies"),
    /* */ BACKEND("All backend"),
    /* ... */ LOWER("IR Lowering"),
    /* ... ... */ TEST_PROCESSOR("Unit test processor"),
    /* ... ... */ LOWER_BEFORE_INLINE("Special operations processing before inlining"),
    /* ... ... */ LOWER_INLINE_CONSTRUCTORS("Inline constructors transformation", LOWER_BEFORE_INLINE),
    /* ... ... */ LOWER_INLINE("Functions inlining", LOWER_INLINE_CONSTRUCTORS, LOWER_BEFORE_INLINE),
    /* ... ... */ LOWER_AFTER_INLINE("Special operations processing after inlining"),
    /* ... ... ...  */ DESERIALIZER("Deserialize inline bodies"),
    /* ... ... */ LOWER_INTEROP_PART1("Interop lowering, part 1", LOWER_INLINE),
    /* ... ... */ LOWER_FOR_LOOPS("For loops lowering"),
    /* ... ... */ LOWER_ENUMS("Enum classes lowering"),
    /* ... ... */ LOWER_DELEGATION("Delegation lowering"),
    /* ... ... */ LOWER_INITIALIZERS("Initializers lowering", LOWER_ENUMS),
    /* ... ... */ LOWER_SHARED_VARIABLES("Shared Variable Lowering", LOWER_INITIALIZERS),
    /* ... ... */ LOWER_CALLABLES("Callable references Lowering", LOWER_DELEGATION),
    /* ... ... */ LOWER_LOCAL_FUNCTIONS("Local Function Lowering", LOWER_SHARED_VARIABLES, LOWER_CALLABLES),
    /* ... ... */ LOWER_INTEROP_PART2("Interop lowering, part 2", LOWER_LOCAL_FUNCTIONS),
    /* ... ... */ LOWER_VARARG("Vararg lowering", LOWER_CALLABLES),
    /* ... ... */ LOWER_TAILREC("tailrec lowering", LOWER_LOCAL_FUNCTIONS),
    /* ... ... */ LOWER_FINALLY("Finally blocks lowering", LOWER_INITIALIZERS, LOWER_LOCAL_FUNCTIONS, LOWER_TAILREC),
    /* ... ... */ LOWER_DEFAULT_PARAMETER_EXTENT("Default Parameter Extent Lowering", LOWER_TAILREC, LOWER_ENUMS),
    /* ... ... */ LOWER_INNER_CLASSES("Inner classes lowering", LOWER_DEFAULT_PARAMETER_EXTENT),
    /* ... ... */ LOWER_LATEINIT("Lateinit properties lowering"),
    /* ... ... */ LOWER_BUILTIN_OPERATORS("BuiltIn Operators Lowering", LOWER_DEFAULT_PARAMETER_EXTENT, LOWER_LATEINIT),
    /* ... ... */ LOWER_COROUTINES("Coroutines lowering", LOWER_LOCAL_FUNCTIONS),
    /* ... ... */ LOWER_TYPE_OPERATORS("Type operators lowering", LOWER_COROUTINES),
    /* ... ... */ BRIDGES_BUILDING("Bridges building", LOWER_COROUTINES),
    /* ... ... */ LOWER_STRING_CONCAT("String concatenation lowering"),
    /* ... ... */ LOWER_DATA_CLASSES("Data classes lowering"),
    /* ... ... */ AUTOBOX("Autoboxing of primitive types", BRIDGES_BUILDING, LOWER_COROUTINES),
    /* ... ... */ RETURNS_INSERTION("Returns insertion for Unit functions", AUTOBOX, LOWER_COROUTINES, LOWER_ENUMS),
    /* ... */ BITCODE("LLVM BitCode Generation"),
    /* ... ... */ RTTI("RTTI Generation"),
    /* ... ... */ BUILD_DFG("Data flow graph building"),
    /* ... ... */ SERIALIZE_DFG("Data flow graph serializing", BUILD_DFG),
    /* ... ... */ DESERIALIZE_DFG("Data flow graph deserializing"),
    /* ... ... */ ESCAPE_ANALYSIS("Escape analysis", BUILD_DFG, DESERIALIZE_DFG, enabled = false),
    /* ... ... */ CODEGEN("Code Generation"),
    /* ... ... */ BITCODE_LINKER("Bitcode linking"),
    /* */ LINK_STAGE("Link stage"),
    /* ... */ OBJECT_FILES("Bitcode to object file"),
{'fraction_non_alphanumeric': 0.1732766761095373, 'fraction_numerical': 0.003777148253068933, 'mean_word_length': 3.054066985645933, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4745255', 'n_tokens_mistral': 2695, 'n_tokens_neox': 2554, 'n_words': 551}