package org.graalvm.compiler.lir.alloc.trace;
import java.util.*;
import org.graalvm.compiler.options.*;
public class DefaultTraceRegisterAllocationPolicy_OptionDescriptors implements OptionDescriptors {
@Override
public OptionDescriptor get(String value) {
switch (value) {
case "TraceRAPolicy": {
return OptionDescriptor.create(
"TraceRAPolicy",
org.graalvm.compiler.lir.alloc.trace.DefaultTraceRegisterAllocationPolicy.TraceRAPolicies.class,
"TraceRA allocation policy to use.",
DefaultTraceRegisterAllocationPolicy.Options.class,
"TraceRAPolicy",
DefaultTraceRegisterAllocationPolicy.Options.TraceRAPolicy);
}
case "TraceRAalmostTrivialSize": {
return OptionDescriptor.create(
"TraceRAalmostTrivialSize",
Integer.class,
"Use BottomUp if there is only one block with at most this number of instructions",
DefaultTraceRegisterAllocationPolicy.Options.class,
"TraceRAalmostTrivialSize",
DefaultTraceRegisterAllocationPolicy.Options.TraceRAalmostTrivialSize);
}
case "TraceRAbottomUpRatio": {
return OptionDescriptor.create(
"TraceRAbottomUpRatio",
Double.class,
"Use LSRA / BottomUp ratio",
DefaultTraceRegisterAllocationPolicy.Options.class,
"TraceRAbottomUpRatio",
DefaultTraceRegisterAllocationPolicy.Options.TraceRAbottomUpRatio);
}
case "TraceRAnumVariables": {
return OptionDescriptor.create(
"TraceRAnumVariables",
Integer.class,
"Use BottomUp for traces with low number of variables at block boundaries",
DefaultTraceRegisterAllocationPolicy.Options.class,
"TraceRAnumVariables",
DefaultTraceRegisterAllocationPolicy.Options.TraceRAnumVariables);
}
case "TraceRAprobalilityThreshold": {
return OptionDescriptor.create(
"TraceRAprobalilityThreshold",
Double.class,
"Probability Threshold",
DefaultTraceRegisterAllocationPolicy.Options.class,
"TraceRAprobalilityThreshold",
DefaultTraceRegisterAllocationPolicy.Options.TraceRAprobalilityThreshold);
}
case "TraceRAsumBudget": {
return OptionDescriptor.create(
"TraceRAsumBudget",
Double.class,
"Sum Probability Budget Threshold",
DefaultTraceRegisterAllocationPolicy.Options.class,
"TraceRAsumBudget",
DefaultTraceRegisterAllocationPolicy.Options.TraceRAsumBudget);
}
case "TraceRAtrivialBlockAllocator": {
return OptionDescriptor.create(
"TraceRAtrivialBlockAllocator",
Boolean.class,
"Use special allocator for trivial blocks.",
DefaultTraceRegisterAllocationPolicy.Options.class,
"TraceRAtrivialBlockAllocator",
DefaultTraceRegisterAllocationPolicy.Options.TraceRAtrivialBlockAllocator);
}
}
return null;
}
@Override
public Iterator<OptionDescriptor> iterator() {
return new Iterator<OptionDescriptor>() {
int i = 0;
@Override
public boolean hasNext() {
return i < 7;
}
@Override
public OptionDescriptor next() {
switch (i++) {
case 0: return get("TraceRAPolicy");
case 1: return get("TraceRAalmostTrivialSize");
case 2: return get("TraceRAbottomUpRatio");
case 3: return get("TraceRAnumVariables");
case 4: return get("TraceRAprobalilityThreshold");
case 5: return get("TraceRAsumBudget");
case 6: return get("TraceRAtrivialBlockAllocator");
}
throw new NoSuchElementException();
}
};
}
}