projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
59fa626
)
use a UniqSet for is MathFun, this list is getting quite large
author
Simon Marlow
<marlowsd@gmail.com>
Mon, 30 Mar 2009 08:29:57 +0000
(08:29 +0000)
committer
Simon Marlow
<marlowsd@gmail.com>
Mon, 30 Mar 2009 08:29:57 +0000
(08:29 +0000)
compiler/cmm/CLabel.hs
patch
|
blob
|
history
diff --git
a/compiler/cmm/CLabel.hs
b/compiler/cmm/CLabel.hs
index
f95a0fd
..
ecff3da
100644
(file)
--- a/
compiler/cmm/CLabel.hs
+++ b/
compiler/cmm/CLabel.hs
@@
-133,6
+133,7
@@
import CostCentre
import Outputable
import FastString
import DynFlags
import Outputable
import FastString
import DynFlags
+import UniqSet
-- -----------------------------------------------------------------------------
-- The CLabel type
-- -----------------------------------------------------------------------------
-- The CLabel type
@@
-522,9
+523,10
@@
maybeAsmTemp _ = Nothing
-- they are builtin to the C compiler. For these labels we avoid
-- generating our own C prototypes.
isMathFun :: CLabel -> Bool
-- they are builtin to the C compiler. For these labels we avoid
-- generating our own C prototypes.
isMathFun :: CLabel -> Bool
-isMathFun (ForeignLabel fs _ _ _) = fs `elem` math_funs
- where
- math_funs = [
+isMathFun (ForeignLabel fs _ _ _) = fs `elementOfUniqSet` math_funs
+isMathFun _ = False
+
+math_funs = mkUniqSet [
-- _ISOC99_SOURCE
(fsLit "acos"), (fsLit "acosf"), (fsLit "acosh"),
(fsLit "acoshf"), (fsLit "acoshl"), (fsLit "acosl"),
-- _ISOC99_SOURCE
(fsLit "acos"), (fsLit "acosf"), (fsLit "acosh"),
(fsLit "acoshf"), (fsLit "acoshl"), (fsLit "acosl"),
@@
-603,7
+605,6
@@
isMathFun (ForeignLabel fs _ _ _) = fs `elem` math_funs
(fsLit "y1"), (fsLit "y1f"), (fsLit "y1l"),
(fsLit "yn"), (fsLit "ynf"), (fsLit "ynl")
]
(fsLit "y1"), (fsLit "y1f"), (fsLit "y1l"),
(fsLit "yn"), (fsLit "ynf"), (fsLit "ynl")
]
-isMathFun _ = False
-- -----------------------------------------------------------------------------
-- Is a CLabel visible outside this object file or not?
-- -----------------------------------------------------------------------------
-- Is a CLabel visible outside this object file or not?