From 73e7ead20998392ccee6094f9bb714351e82e737 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sun, 2 Aug 2009 10:57:27 -0500 Subject: [PATCH] compiler.cfg.ssa.destruction: add optimization from old destruction pass: don't run on CFGs that have no phi instructions --- .../cfg/ssa/destruction/destruction.factor | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/basis/compiler/cfg/ssa/destruction/destruction.factor b/basis/compiler/cfg/ssa/destruction/destruction.factor index c768914070..b251578bc8 100644 --- a/basis/compiler/cfg/ssa/destruction/destruction.factor +++ b/basis/compiler/cfg/ssa/destruction/destruction.factor @@ -12,6 +12,7 @@ compiler.cfg.liveness.ssa compiler.cfg.ssa.cssa compiler.cfg.ssa.interference compiler.cfg.ssa.interference.live-ranges +compiler.cfg.utilities compiler.utilities ; IN: compiler.cfg.ssa.destruction @@ -94,11 +95,13 @@ M: insn prepare-insn drop ; ] each-basic-block ; : destruct-ssa ( cfg -- cfg' ) - dup construct-cssa - compute-ssa-live-sets - dup compute-defs - dup compute-dominance - dup compute-live-ranges - dup prepare-coalescing - process-copies - dup perform-renaming ; \ No newline at end of file + dup cfg-has-phis? [ + dup construct-cssa + compute-ssa-live-sets + dup compute-defs + dup compute-dominance + dup compute-live-ranges + dup prepare-coalescing + process-copies + dup perform-renaming + ] when ; \ No newline at end of file