package org.graalvm.compiler.java;
import java.util.*;
import org.graalvm.compiler.options.*;
import org.graalvm.compiler.options.OptionType;
public class BciBlockMapping_OptionDescriptors implements OptionDescriptors {
@Override
public OptionDescriptor get(String value) {
switch (value) {
case "DuplicateIrreducibleLoops": {
return OptionDescriptor.create(
"DuplicateIrreducibleLoops",
OptionType.Debug,
Boolean.class,
"When enabled, some limited amount of duplication will be performed in order compile code containing irreducible loops.",
BciBlockMapping.Options.class,
"DuplicateIrreducibleLoops",
BciBlockMapping.Options.DuplicateIrreducibleLoops);
}
case "MaxDuplicationFactor": {
return OptionDescriptor.create(
"MaxDuplicationFactor",
OptionType.Expert,
Double.class,
"How much duplication can happen because of irreducible loops before bailing out.",
BciBlockMapping.Options.class,
"MaxDuplicationFactor",
BciBlockMapping.Options.MaxDuplicationFactor);
}
}
return null;
}
@Override
public Iterator<OptionDescriptor> iterator() {
return new Iterator<OptionDescriptor>() {
int i = 0;
@Override
public boolean hasNext() {
return i < 2;
}
@Override
public OptionDescriptor next() {
switch (i++) {
case 0: return get("DuplicateIrreducibleLoops");
case 1: return get("MaxDuplicationFactor");
}
throw new NoSuchElementException();
}
};
}
}