Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clash normalization benchmark #2568

Merged
merged 2 commits into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions benchmark/benchmark-normalization.hs
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,20 @@ benchFile idirs src =
env (setupEnv idirs src) $
\ ~(clashEnv, clashDesign, supplyN) -> do
let topEntities = fmap topId (designEntities clashDesign)
case topEntities of
topEntity:_ ->
bench ("normalization of " ++ src)
(nfIO
(normalizeEntity
clashEnv
(designBindings clashDesign)
(ghcTypeToHWType (opt_intWidth (envOpts clashEnv)))
ghcEvaluator
evaluator
topEntities
supplyN
topEntity))
_ -> error "no top entities"
topEntity = case topEntities of
t:_ -> t
_ -> error "no top entities"
bench ("normalization of " ++ src)
(nfIO
(normalizeEntity
clashEnv
(designBindings clashDesign)
(ghcTypeToHWType (opt_intWidth (envOpts clashEnv)))
ghcEvaluator
evaluator
topEntities
supplyN
topEntity))
leonschoorl marked this conversation as resolved.
Show resolved Hide resolved

setupEnv
:: [FilePath]
Expand Down
3 changes: 3 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ package clash-cores
-- so we're able to import its css file from the custom theme.
haddock-options: --theme=doc/linuwial-wrap-types.css --theme=Linuwial

package clash-benchmark
executable-dynamic: True

optional-packages:
./benchmark
./benchmark/profiling/prepare
Expand Down