// CheckStyle: stop header check
// CheckStyle: stop line length check
// GENERATED CONTENT - DO NOT EDIT
// Source: ControlFlowGraph.java
package org.graalvm.compiler.nodes.cfg;

import java.util.*;
import org.graalvm.compiler.options.*;
import org.graalvm.compiler.options.OptionType;
import org.graalvm.compiler.options.OptionStability;

public class ControlFlowGraph_OptionDescriptors implements OptionDescriptors {
    @Override
    public OptionDescriptor get(String value) {
        switch (value) {
        // CheckStyle: stop line length check
        case "DumpEndVersusExitLoopFrequencies": {
            return OptionDescriptor.create(
                /*name*/ "DumpEndVersusExitLoopFrequencies",
                /*optionType*/ OptionType.Debug,
                /*optionValueType*/ Boolean.class,
                /*help*/ "Debug flag to dump loop frequency differences computed based on loop end or exit nodes.If the frequencies diverge a lot, this may indicate missing profiles on control flowinside the loop body.",
                /*declaringClass*/ ControlFlowGraph.CFGOptions.class,
                /*fieldName*/ "DumpEndVersusExitLoopFrequencies",
                /*option*/ ControlFlowGraph.CFGOptions.DumpEndVersusExitLoopFrequencies,
                /*stability*/ OptionStability.EXPERIMENTAL,
                /*deprecated*/ false,
                /*deprecationMessage*/ "");
        }
        case "LoopExitVsLoopEndFrequencyDiff": {
            return OptionDescriptor.create(
                /*name*/ "LoopExitVsLoopEndFrequencyDiff",
                /*optionType*/ OptionType.Debug,
                /*optionValueType*/ Double.class,
                /*help*/ "Scaling factor of frequency difference computed based on loop ends or exits",
                /*declaringClass*/ ControlFlowGraph.CFGOptions.class,
                /*fieldName*/ "LoopExitVsLoopEndFrequencyDiff",
                /*option*/ ControlFlowGraph.CFGOptions.LoopExitVsLoopEndFrequencyDiff,
                /*stability*/ OptionStability.EXPERIMENTAL,
                /*deprecated*/ false,
                /*deprecationMessage*/ "");
        }
        case "UseLoopEndFrequencies": {
            return OptionDescriptor.create(
                /*name*/ "UseLoopEndFrequencies",
                /*optionType*/ OptionType.Debug,
                /*optionValueType*/ Boolean.class,
                /*help*/ "Derive loop frequencies only from backedge frequencies instead of from loop exit frequencies.",
                /*declaringClass*/ ControlFlowGraph.CFGOptions.class,
                /*fieldName*/ "UseLoopEndFrequencies",
                /*option*/ ControlFlowGraph.CFGOptions.UseLoopEndFrequencies,
                /*stability*/ OptionStability.EXPERIMENTAL,
                /*deprecated*/ false,
                /*deprecationMessage*/ "");
        }
        // CheckStyle: resume line length check
        }
        return null;
    }

    @Override
    public Iterator<OptionDescriptor> iterator() {
        return new Iterator<>() {
            int i = 0;
            @Override
            public boolean hasNext() {
                return i < 3;
            }
            @Override
            public OptionDescriptor next() {
                switch (i++) {
                    case 0: return get("DumpEndVersusExitLoopFrequencies");
                    case 1: return get("LoopExitVsLoopEndFrequencyDiff");
                    case 2: return get("UseLoopEndFrequencies");
                }
                throw new NoSuchElementException();
            }
        };
    }
}
