Search in sources :

Example 1 with AnalysisType

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;
}
Also used : AnalysisType(com.jopdesign.jcopter.analysis.MethodCacheAnalysis.AnalysisType) CacheCostCalculationMethod(com.jopdesign.wcet.ipet.IPETConfig.CacheCostCalculationMethod)

Aggregations

AnalysisType (com.jopdesign.jcopter.analysis.MethodCacheAnalysis.AnalysisType)1 CacheCostCalculationMethod (com.jopdesign.wcet.ipet.IPETConfig.CacheCostCalculationMethod)1