diff options
| author | Manuel M T Chakravarty <chak@cse.unsw.edu.au> | 2012-12-05 15:28:19 +1100 |
|---|---|---|
| committer | Manuel M T Chakravarty <chak@cse.unsw.edu.au> | 2012-12-05 15:28:19 +1100 |
| commit | b77da25ef0d95e776a43779bbb4843eb01d33552 (patch) | |
| tree | 4aeb4d158a5e66d033bca83f2a804b2ce394b5ad /compiler/rename | |
| parent | 2a7217e3fa39410ac61e17f5c8e2ce3976bec1a9 (diff) | |
| download | haskell-b77da25ef0d95e776a43779bbb4843eb01d33552.tar.gz | |
Rewrote vectorisation avoidance (based on the HS paper)
* Vectorisation avoidance is now the default
* Types and values from unvectorised modules are permitted in scalar code
* Simplified the VECTORISE pragmas (see http://hackage.haskell.org/trac/ghc/wiki/DataParallel/VectPragma for the spec)
* Vectorisation information is now included in the annotated Core AST
Diffstat (limited to 'compiler/rename')
| -rw-r--r-- | compiler/rename/RnSource.lhs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/compiler/rename/RnSource.lhs b/compiler/rename/RnSource.lhs index 595f4653d3..0d897f3f0b 100644 --- a/compiler/rename/RnSource.lhs +++ b/compiler/rename/RnSource.lhs @@ -723,18 +723,14 @@ badRuleLhsErr name lhs bad_e \begin{code} rnHsVectDecl :: VectDecl RdrName -> RnM (VectDecl Name, FreeVars) -rnHsVectDecl (HsVect var Nothing) - = do { var' <- lookupLocatedOccRn var - ; return (HsVect var' Nothing, unitFV (unLoc var')) - } -- FIXME: For the moment, the right-hand side is restricted to be a variable as we cannot properly -- typecheck a complex right-hand side without invoking 'vectType' from the vectoriser. -rnHsVectDecl (HsVect var (Just rhs@(L _ (HsVar _)))) +rnHsVectDecl (HsVect var rhs@(L _ (HsVar _))) = do { var' <- lookupLocatedOccRn var ; (rhs', fv_rhs) <- rnLExpr rhs - ; return (HsVect var' (Just rhs'), fv_rhs `addOneFV` unLoc var') + ; return (HsVect var' rhs', fv_rhs `addOneFV` unLoc var') } -rnHsVectDecl (HsVect _var (Just _rhs)) +rnHsVectDecl (HsVect _var _rhs) = failWith $ vcat [ ptext (sLit "IMPLEMENTATION RESTRICTION: right-hand side of a VECTORISE pragma") , ptext (sLit "must be an identifier") |
