compiler.cfg.gvn.slots: make simplify-slot-addressing non-destructive
parent
3787f64422
commit
60abd53808
|
@ -51,7 +51,7 @@ M: array process-instruction
|
||||||
|
|
||||||
! FIXME there's going to be trouble with certain rewrites that
|
! FIXME there's going to be trouble with certain rewrites that
|
||||||
! modify the cfg / instructions destructively; namely those in
|
! modify the cfg / instructions destructively; namely those in
|
||||||
! alien.factor and slots.factor
|
! alien.factor
|
||||||
|
|
||||||
: value-numbering-iteration ( cfg -- )
|
: value-numbering-iteration ( cfg -- )
|
||||||
clear-exprs
|
clear-exprs
|
||||||
|
|
|
@ -13,7 +13,7 @@ IN: compiler.cfg.gvn.slots
|
||||||
|
|
||||||
: simplify-slot-addressing ( insn -- insn/f )
|
: simplify-slot-addressing ( insn -- insn/f )
|
||||||
dup simplify-slot-addressing? [
|
dup simplify-slot-addressing? [
|
||||||
dup slot>> vreg>insn
|
clone dup slot>> vreg>insn
|
||||||
[ src1>> >>slot ]
|
[ src1>> >>slot ]
|
||||||
[ src2>> over scale>> '[ _ _ shift - ] change-tag ]
|
[ src2>> over scale>> '[ _ _ shift - ] change-tag ]
|
||||||
bi
|
bi
|
||||||
|
|
Loading…
Reference in New Issue