1- {-# OPTIONS_GHC -Wwarn #-}
2- {-# OPTIONS_GHC -fno-warn-name-shadowing #-}
1+ {-# OPTIONS_GHC -Wno-name-shadowing #-}
32{-# OPTIONS_GHC -Wno-unused-matches #-}
43{-# LANGUAGE BlockArguments #-}
54
@@ -435,7 +434,7 @@ freshTyLocs ty ddefs = do
435434 -- return $ PackedTy tc newSoALoc
436435 dbuf' <- fresh
437436 let dcons = getConOrdering ddefs tc
438- locsForFields <- lift $ lift $ convertTyHelperSoAParent tc ddefs dcons
437+ locsForFields <- lift $ lift $ convertTyHelperSoAParent tc ddefs dcons
439438 let soaLocation = SoA (unwrapLocVar dbuf') locsForFields
440439 return $ PackedTy tc soaLocation
441440 Single _ -> do
@@ -1891,6 +1890,8 @@ finishExp e =
18911890 Ext (AllocateScalarsHere {}) -> err $ " todo: " ++ sdoc e
18921891 Ext (SSPush {}) -> err $ " todo: " ++ sdoc e
18931892 Ext (SSPop {}) -> err $ " todo: " ++ sdoc e
1893+ Ext (LetRegE {}) -> err $ " todo: " ++ sdoc e
1894+ Ext (BoundsCheckVector {}) -> err $ " todo: " ++ sdoc e
18941895 MapE {} -> err$ " MapE not supported"
18951896 FoldE {} -> err$ " FoldE not supported"
18961897
@@ -2015,21 +2016,18 @@ cleanExp e =
20152016 in if S. member s s'
20162017 then let ls = case lex of
20172018 GenSoALoc dcloc flocs -> [dcloc] ++ P. map (\ (_, ll) -> ll) flocs
2018- oth -> []
20192019 in (Ext (LetLocE s lex e'), S. delete s (S. union s' $ S. fromList ls))
20202020 else (e',s')
20212021 Ext (LetLocE s@ (SoA dloc flcs) lex @ (AssignLE _) e) -> let (e',s') = cleanExp e
20222022 in if S. member s s'
20232023 then let ls = case lex of
20242024 AssignLE loc -> [loc]
2025- oth -> []
20262025 in (Ext (LetLocE s lex e'), S. delete s (S. union s' $ S. fromList ls))
20272026 else (e' ,s')
20282027 Ext (LetLocE s@ (SoA dloc flcs) lex @ (GetFieldLocSoA _ loc) e) -> let (e',s') = cleanExp e
20292028 in if S. member s s'
20302029 then let ls = case lex of
20312030 GetFieldLocSoA _ loc -> [loc]
2032- oth -> []
20332031 in (Ext (LetLocE s lex e'), S. delete s (S. union s' $ S. fromList ls))
20342032 else (e' ,s')
20352033 Ext (LetLocE s@ (SoA dloc flcs) lex e) -> let (e',s') = cleanExp e
@@ -2054,6 +2052,8 @@ cleanExp e =
20542052 Ext (AllocateScalarsHere {}) -> err $ " todo: " ++ sdoc e
20552053 Ext (SSPush {}) -> err $ " todo: " ++ sdoc e
20562054 Ext (SSPop {}) -> err $ " todo: " ++ sdoc e
2055+ Ext (LetRegE {}) -> err $ " todo: " ++ sdoc e
2056+ Ext (BoundsCheckVector {}) -> err $ " todo: " ++ sdoc e
20572057 MapE {} -> err$ " MapE not supported"
20582058 FoldE {} -> err$ " FoldE not supported"
20592059
@@ -2128,6 +2128,7 @@ fixProj renam pvar proj e =
21282128moveProjsAfterSync :: LocVar -> Exp2 -> Exp2
21292129moveProjsAfterSync sv ex = case sv of
21302130 l@ (Single loc) -> go [] (S. singleton $ fromLocVarToFreeVarsTy l) ex
2131+ SoA {} -> error " moveProjsAfterSync: unexpected SoA location"
21312132 where
21322133 go :: [Binds (Exp2 )] -> S. Set FreeVarsTy -> Exp2 -> Exp2
21332134 go acc1 pending ex =
@@ -2685,6 +2686,9 @@ fixRANs prg@(Prog defs funs main) = do
26852686 AllocateScalarsHere {} -> return ([] ,e0)
26862687 SSPush {} -> return ([] ,e0)
26872688 SSPop {} -> return ([] ,e0)
2689+ LetRegE {} -> return ([] ,e0)
2690+ BoundsCheckVector {} -> return ([] ,e0)
2691+
26882692
26892693 LitE {} -> return ([] ,e0)
26902694 CharE {} -> return ([] ,e0)
0 commit comments