projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Show spill/reload pseudo instrs in regalloc stage dump
[ghc-hetmet.git]
/
compiler
/
nativeGen
/
RegAllocColor.hs
diff --git
a/compiler/nativeGen/RegAllocColor.hs
b/compiler/nativeGen/RegAllocColor.hs
index
0a5c160
..
ecb5faf
100644
(file)
--- a/
compiler/nativeGen/RegAllocColor.hs
+++ b/
compiler/nativeGen/RegAllocColor.hs
@@
-106,13
+106,20
@@
regAlloc_spin (spinCount :: Int) triv regsFree slotsFree debug_codeGraphs code
then do
-- patch the registers using the info in the graph
let code_patched = map (patchRegsFromGraph graph_colored) code
then do
-- patch the registers using the info in the graph
let code_patched = map (patchRegsFromGraph graph_colored) code
+
+ -- strip off liveness information
let code_nat = map stripLive code_patched
let code_nat = map stripLive code_patched
+
+ -- rewrite SPILL/REALOAD pseudos into real instructions
+ let spillNatTop = mapGenBlockTop spillNatBlock
+ let code_final = map spillNatTop code_nat
-- record what happened in this stage for debugging
let stat =
RegAllocStatsColored
{ raGraph = graph_colored
-- record what happened in this stage for debugging
let stat =
RegAllocStatsColored
{ raGraph = graph_colored
- , raPatchedCmm = code_patched }
+ , raPatchedCmm = code_patched
+ , raFinalCmm = code_final }
return ( code_nat
, [stat] ++ maybeToList stat1 ++ debug_codeGraphs
return ( code_nat
, [stat] ++ maybeToList stat1 ++ debug_codeGraphs