package org.graalvm.compiler.loop;
import java.util.*;
import org.graalvm.compiler.options.*;
import org.graalvm.compiler.options.OptionType;
public class DefaultLoopPolicies_OptionDescriptors implements OptionDescriptors {
@Override
public OptionDescriptor get(String value) {
switch (value) {
case "ExactFullUnrollMaxNodes": {
return OptionDescriptor.create(
"ExactFullUnrollMaxNodes",
OptionType.Expert,
Integer.class,
"",
DefaultLoopPolicies.Options.class,
"ExactFullUnrollMaxNodes",
DefaultLoopPolicies.Options.ExactFullUnrollMaxNodes);
}
case "ExactPartialUnrollMaxNodes": {
return OptionDescriptor.create(
"ExactPartialUnrollMaxNodes",
OptionType.Expert,
Integer.class,
"",
DefaultLoopPolicies.Options.class,
"ExactPartialUnrollMaxNodes",
DefaultLoopPolicies.Options.ExactPartialUnrollMaxNodes);
}
case "FullUnrollMaxIterations": {
return OptionDescriptor.create(
"FullUnrollMaxIterations",
OptionType.Expert,
Integer.class,
"",
DefaultLoopPolicies.Options.class,
"FullUnrollMaxIterations",
DefaultLoopPolicies.Options.FullUnrollMaxIterations);
}
case "FullUnrollMaxNodes": {
return OptionDescriptor.create(
"FullUnrollMaxNodes",
OptionType.Expert,
Integer.class,
"",
DefaultLoopPolicies.Options.class,
"FullUnrollMaxNodes",
DefaultLoopPolicies.Options.FullUnrollMaxNodes);
}
case "LoopUnswitchFrequencyBoost": {
return OptionDescriptor.create(
"LoopUnswitchFrequencyBoost",
OptionType.Expert,
Double.class,
"",
DefaultLoopPolicies.Options.class,
"LoopUnswitchFrequencyBoost",
DefaultLoopPolicies.Options.LoopUnswitchFrequencyBoost);
}
case "LoopUnswitchMaxIncrease": {
return OptionDescriptor.create(
"LoopUnswitchMaxIncrease",
OptionType.Expert,
Integer.class,
"",
DefaultLoopPolicies.Options.class,
"LoopUnswitchMaxIncrease",
DefaultLoopPolicies.Options.LoopUnswitchMaxIncrease);
}
case "LoopUnswitchTrivial": {
return OptionDescriptor.create(
"LoopUnswitchTrivial",
OptionType.Expert,
Integer.class,
"",
DefaultLoopPolicies.Options.class,
"LoopUnswitchTrivial",
DefaultLoopPolicies.Options.LoopUnswitchTrivial);
}
case "UnrollMaxIterations": {
return OptionDescriptor.create(
"UnrollMaxIterations",
OptionType.Expert,
Integer.class,
"",
DefaultLoopPolicies.Options.class,
"UnrollMaxIterations",
DefaultLoopPolicies.Options.UnrollMaxIterations);
}
}
return null;
}
@Override
public Iterator<OptionDescriptor> iterator() {
return new Iterator<OptionDescriptor>() {
int i = 0;
@Override
public boolean hasNext() {
return i < 8;
}
@Override
public OptionDescriptor next() {
switch (i++) {
case 0: return get("ExactFullUnrollMaxNodes");
case 1: return get("ExactPartialUnrollMaxNodes");
case 2: return get("FullUnrollMaxIterations");
case 3: return get("FullUnrollMaxNodes");
case 4: return get("LoopUnswitchFrequencyBoost");
case 5: return get("LoopUnswitchMaxIncrease");
case 6: return get("LoopUnswitchTrivial");
case 7: return get("UnrollMaxIterations");
}
throw new NoSuchElementException();
}
};
}
}