projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implement SSE2 floating-point support in the x86 native code generator (#594)
[ghc-hetmet.git]
/
compiler
/
nativeGen
/
RegAlloc
/
Graph
/
Main.hs
diff --git
a/compiler/nativeGen/RegAlloc/Graph/Main.hs
b/compiler/nativeGen/RegAlloc/Graph/Main.hs
index
94b18ae
..
35ec879
100644
(file)
--- a/
compiler/nativeGen/RegAlloc/Graph/Main.hs
+++ b/
compiler/nativeGen/RegAlloc/Graph/Main.hs
@@
-11,7
+11,6
@@
module RegAlloc.Graph.Main (
where
import qualified GraphColor as Color
where
import qualified GraphColor as Color
-import qualified GraphBase as Color
import RegAlloc.Liveness
import RegAlloc.Graph.Spill
import RegAlloc.Graph.SpillClean
import RegAlloc.Liveness
import RegAlloc.Graph.Spill
import RegAlloc.Graph.SpillClean
@@
-311,9
+310,16
@@
graphAddCoalesce (r1, r2) graph
(vr2, classOfVirtualReg vr2)
graph
(vr2, classOfVirtualReg vr2)
graph
- | otherwise
- = panic "RegAlloc.Graph.Main.graphAddCoalesce: can't coalesce two real regs"
+ -- We can't coalesce two real regs, but there could well be existing
+ -- hreg,hreg moves in the input code. We'll just ignore these
+ -- for coalescing purposes.
+ | RegReal _ <- r1
+ , RegReal _ <- r2
+ = graph
+graphAddCoalesce _ _
+ = panic "graphAddCoalesce: bogus"
+
-- | Patch registers in code using the reg -> reg mapping in this graph.
patchRegsFromGraph
-- | Patch registers in code using the reg -> reg mapping in this graph.
patchRegsFromGraph
@@
-374,25
+380,13
@@
seqNode node
`seq` (seqVirtualRegList (uniqSetToList (Color.nodeCoalesce node)))
seqVirtualReg :: VirtualReg -> ()
`seq` (seqVirtualRegList (uniqSetToList (Color.nodeCoalesce node)))
seqVirtualReg :: VirtualReg -> ()
-seqVirtualReg reg
- = case reg of
- VirtualRegI _ -> ()
- VirtualRegHi _ -> ()
- VirtualRegF _ -> ()
- VirtualRegD _ -> ()
+seqVirtualReg reg = reg `seq` ()
seqRealReg :: RealReg -> ()
seqRealReg :: RealReg -> ()
-seqRealReg reg
- = case reg of
- RealRegSingle _ -> ()
- RealRegPair _ _ -> ()
+seqRealReg reg = reg `seq` ()
seqRegClass :: RegClass -> ()
seqRegClass :: RegClass -> ()
-seqRegClass c
- = case c of
- RcInteger -> ()
- RcFloat -> ()
- RcDouble -> ()
+seqRegClass c = c `seq` ()
seqMaybeRealReg :: Maybe RealReg -> ()
seqMaybeRealReg mr
seqMaybeRealReg :: Maybe RealReg -> ()
seqMaybeRealReg mr