X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FStaticFlags.hs;h=499367dafdc38397b2a48a8dff362d87f73bfac0;hb=beded1205911615ac7c1cd175def682eaf8daa1e;hp=534c3d224f725f1ab9a62a266551a0b91ef83e16;hpb=a7f88c2f7900257d6791286f653cf141ebcb81c4;p=ghc-hetmet.git diff --git a/compiler/main/StaticFlags.hs b/compiler/main/StaticFlags.hs index 534c3d2..499367d 100644 --- a/compiler/main/StaticFlags.hs +++ b/compiler/main/StaticFlags.hs @@ -1,3 +1,6 @@ +{-# OPTIONS -fno-cse #-} +-- -fno-cse is needed for GLOBAL_VAR's to behave properly + ----------------------------------------------------------------------------- -- -- Static flags @@ -251,7 +254,7 @@ lookUp sw = sw `elem` packed_static_opts -- (lookup_str "foo") looks for the flag -foo=X or -fooX, -- and returns the string X lookup_str sw - = case firstJust (map (startsWith sw) staticFlags) of + = case firstJust (map (maybePrefixMatch sw) staticFlags) of Just ('=' : str) -> Just str Just str -> Just str Nothing -> Nothing @@ -451,19 +454,6 @@ isStaticFlag f = "funfolding-keeness-factor" ] - - --- Misc functions for command-line options - -startsWith :: String -> String -> Maybe String --- startsWith pfx (pfx++rest) = Just rest - -startsWith [] str = Just str -startsWith (c:cs) (s:ss) - = if c /= s then Nothing else startsWith cs ss -startsWith _ [] = Nothing - - ----------------------------------------------------------------------------- -- convert sizes like "3.5M" into integers @@ -662,7 +652,7 @@ way_details = , "-package concurrent" ]), (WayNDP, Way "ndp" False "Nested data parallelism" - [ "-fparr" + [ "-XParr" , "-fvectorise"]), (WayUser_a, Way "a" False "User way 'a'" ["$WAY_a_REAL_OPTS"]),