Commit 2ec79623 authored by Edward Z. Yang's avatar Edward Z. Yang
Browse files

Generalized assignment rewriting pass.

This assignment rewriting pass subsumes the previous reload
sinking pass, and also performs basic inlining.

Signed-off-by: Edward Z. Yang's avatarEdward Z. Yang <>
parent 64beb97a
......@@ -95,9 +95,8 @@ cpsTop hsc_env (CmmProc h@(TopInfo {stack_info=StackInfo {arg_space=entry_off}})
(dualLivenessWithInsertion procPoints) g
-- Insert spills at defns; reloads at return points
g <-
-- pprTrace "pre insertLateReloads" (ppr g) $
runOptimization $ insertLateReloads g -- Duplicate reloads just before uses
dump Opt_D_dump_cmmz "Post late reloads" g
runOptimization $ rewriteAssignments g
dump Opt_D_dump_cmmz "Post rewrite assignments" g
g <-
-- pprTrace "post insertLateReloads" (ppr g) $
dual_rewrite runOptimization Opt_D_dump_cmmz "Dead Assignment Elimination"
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment