diff --git a/CacheAnalysisPass/CacheAnalysisPass.cpp b/CacheAnalysisPass/CacheAnalysisPass.cpp index 97c4d2a..a438b86 100644 --- a/CacheAnalysisPass/CacheAnalysisPass.cpp +++ b/CacheAnalysisPass/CacheAnalysisPass.cpp @@ -215,15 +215,15 @@ struct CacheAnalysisPass : PassInfoMixin { } PreservedAnalyses run(Module &M, ModuleAnalysisManager &MAM) { - FunctionAnalysisManager &FAM = - MAM.getResult(M).getManager(); + // FunctionAnalysisManager &FAM = + // MAM.getResult(M).getManager(); addressCollector(M); - Function *EntryFunction; + // Function *EntryFunction; for (Function &F : M.getFunctionList()) { // Start iterating through CFG from entry point if (F.getName().equals(EntryPoint)) { - EntryFunction = &F; + // EntryFunction = &F; initEdges(F); } if (PrintAddresses) diff --git a/README.md b/README.md index 15163a9..7c2eb29 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,16 @@ # RTSA-lab01-CacheAnalysis In this lab session you will learn how to implement a LRU cache in abstract representation. -The Goal is to implement an LRU must Join in include/AbstractState.h. -For this we assume a "Set-Associative LRU Cache", with 16 sets an associativity of 4 and a cacheline size of two times instruction size. + +## Exercise +Implement a LRU Must-Join as described in the lecture, WCET - Cache Analysis. +A 16 SetCache with an associativity of 4 Assumed, and cache lines can hold two memory words -> CacheSize 1024kB. +In order to do so, complete the function "mustJoin" inside [include/AbstractState.h:138](https://git.cs.tu-dortmund.de/nils.hoelscher/RTSA-lab01-CacheAnalysis/src/branch/master/include/AbstractState.h#L138). +The goal is to join the inbound state into the "this" state. + The Project can be build, tested and Evaluated with the "helper" script. +The Setup and some nice to knows are described in the following sections. ## Disclaimer diff --git a/include/AbstractCache.h b/include/AbstractCache.h index b4cf544..cbec453 100644 --- a/include/AbstractCache.h +++ b/include/AbstractCache.h @@ -92,7 +92,7 @@ public: // everything is public, because IDGAF } Visited[Visitor.first] = true; } - return false; + return Ret; } /** @@ -104,8 +104,6 @@ public: // everything is public, because IDGAF void removeNestedLoops( std::list LoopBodyIn, std::map OrigNodeToUnrolledNode) { - unsigned int LoopHead = LoopBodyIn.front(); - unsigned int LoopTail = LoopBodyIn.back(); unsigned int NestLoopTail; for (unsigned int NodeNr : LoopBodyIn) { bool IsLoopHead = false;