use of com.jopdesign.jcopter.analysis.MethodCacheAnalysis.AnalysisType in project jop by jop-devel.
the class GreedyConfig method getCacheApproximation.
public CacheCostCalculationMethod getCacheApproximation() {
CacheCostCalculationMethod defaultValue = options.getOption(WCA_CACHE_APPROXIMATION);
if (defaultValue != null) {
return defaultValue;
}
AnalysisType analysisType = getCacheAnalysisType();
if (analysisType == AnalysisType.ALWAYS_HIT) {
return CacheCostCalculationMethod.ALWAYS_HIT;
}
if (analysisType == AnalysisType.ALWAYS_MISS) {
return CacheCostCalculationMethod.ALWAYS_MISS;
}
if (analysisType == AnalysisType.ALWAYS_MISS_OR_HIT) {
return CacheCostCalculationMethod.ALL_FIT_SIMPLE;
}
return CacheCostCalculationMethod.ALL_FIT_REGIONS;
}
Aggregations