IMPL15.md (890B)
1 # IMPL15: Implement Check Module Optimizations 2 3 ## Summary 4 5 Make the check pass stricter and cheaper by using strict folds for 6 result accumulation and avoiding Map conversions in inter-proc checks. 7 8 ## Steps 9 10 1) Strict accumulation 11 - Replace `checkBlock` loop to accumulate: 12 - `violations :: [Violation]` (reverse + final reverse if needed) 13 - `linesChecked :: Int` 14 - `memAccesses :: Int` 15 - Use `foldl'` for strictness. 16 17 2) Inter-proc lookup cleanup 18 - Remove `inStatesMap` creation; use `IM.findWithDefault` directly when 19 iterating block indices in `checkCFGInterProc` and 20 `checkCFGInterProcWithConfig`. 21 22 3) Optional block filtering 23 - If `bbHasMemAccess` is available, skip `checkBlock` for blocks without 24 loads/stores. 25 26 ## Files to Touch 27 28 - `lib/Audit/AArch64/Check.hs` 29 - (Optional) `lib/Audit/AArch64/CFG.hs` 30 31 ## Validation 32 33 - `cabal test` 34 - Benchmark check path if available.