summaryrefslogtreecommitdiff
path: root/compiler/coreSyn
diff options
context:
space:
mode:
authorJoachim Breitner <mail@joachim-breitner.de>2016-12-15 10:57:43 -0800
committerJoachim Breitner <mail@joachim-breitner.de>2016-12-29 19:25:50 +0100
commitaac08a0f37442a79096d7d2392f34b42ee5da2bb (patch)
tree4001ca3f68b6bb5eef8089d52633817913c47a16 /compiler/coreSyn
parenta3704409acc3bd237d3e872f640686918fb51f5f (diff)
downloadhaskell-wip/T9291.tar.gz
Add a CSE pass to Stg (#9291)wip/T9291
This CSE pass only targets data constructor applications. This is probably the best we can do, as function calls and primitive operations might have side-effects. Introduces the flag -fstg-cse, enabled by default with -O. Differential Revision: https://phabricator.haskell.org/D2871
Diffstat (limited to 'compiler/coreSyn')
-rw-r--r--compiler/coreSyn/CoreSyn.hs8
-rw-r--r--compiler/coreSyn/TrieMap.hs6
2 files changed, 5 insertions, 9 deletions
diff --git a/compiler/coreSyn/CoreSyn.hs b/compiler/coreSyn/CoreSyn.hs
index 52ffad041b..17b546bb98 100644
--- a/compiler/coreSyn/CoreSyn.hs
+++ b/compiler/coreSyn/CoreSyn.hs
@@ -477,10 +477,6 @@ this exhaustive list can be empty!
-- Pre-cloning or substitution
type InBndr = CoreBndr
-type InVar = Var
-type InTyVar = TyVar
-type InCoVar = CoVar
-type InId = Id
type InType = Type
type InKind = Kind
type InBind = CoreBind
@@ -491,10 +487,6 @@ type InCoercion = Coercion
-- Post-cloning or substitution
type OutBndr = CoreBndr
-type OutVar = Var
-type OutId = Id
-type OutTyVar = TyVar
-type OutCoVar = CoVar
type OutType = Type
type OutKind = Kind
type OutCoercion = Coercion
diff --git a/compiler/coreSyn/TrieMap.hs b/compiler/coreSyn/TrieMap.hs
index c6b9f8e1d3..f8546d1680 100644
--- a/compiler/coreSyn/TrieMap.hs
+++ b/compiler/coreSyn/TrieMap.hs
@@ -15,7 +15,11 @@ module TrieMap(
LooseTypeMap,
MaybeMap,
ListMap,
- TrieMap(..), insertTM, deleteTM
+ TrieMap(..), insertTM, deleteTM,
+ LiteralMap,
+ lkDFreeVar, xtDFreeVar,
+ lkDNamed, xtDNamed,
+ (>.>), (|>), (|>>),
) where
import CoreSyn