-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This only has an effect on GHC 8.10 and later. Older versions need to manually set the relevant flags. TODO: warn when we had to override flags set by the user (ideally, we'd only warn when they explicitly differ, not when we're overriding behavior set by `-O2` or something. This also currently doesn't work, because some of our tests break when we don't ignore interface pragmas (I was hoping this would go away when we removed the presimplifier, but it didn't). Fixes #43.
- Loading branch information
Showing
17 changed files
with
73 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,4 +84,3 @@ test-suite unconcat-hierarchy-optimized | |
main-is: UnconCat/Main.hs | ||
ghc-options: | ||
-O2 | ||
-fignore-interface-pragmas |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,4 +93,3 @@ test-suite vec-hierarchy-optimized | |
main-is: Vec/Main.hs | ||
ghc-options: | ||
-O2 | ||
-fignore-interface-pragmas |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,4 +110,3 @@ test-suite base-hierarchy-optimized | |
main-is: Base/Main.hs | ||
ghc-options: | ||
-O2 | ||
-fignore-interface-pragmas |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
module Categorifier.DynFlags | ||
( plugin, | ||
) | ||
where | ||
|
||
import qualified Categorifier.GHC.Driver as GHC | ||
|
||
plugin :: GHC.DynFlags -> GHC.DynFlags | ||
plugin = setUpDynFlags | ||
|
||
-- | This sets up flags that allow the plugin to do what it needs to. | ||
-- | ||
-- For a compiler that doesn't support this plugin (before GHC 8.10), the following GHC options | ||
-- approximate it: | ||
-- | ||
-- [@-fno-ignore-interface-pragmas@]: Ensures we can inline definitions that we don't know how to | ||
-- interpret directly to the target category. This flag is also | ||
-- implied by @-O@ and @-O2@. | ||
setUpDynFlags :: GHC.DynFlags -> GHC.DynFlags | ||
setUpDynFlags = GHC.unSetGeneralFlag' GHC.Opt_IgnoreInterfacePragmas |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters